This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7968fd5
commit 725b618
Showing
16 changed files
with
417 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...a/com/github/malitsplus/shizurunotes/data/action/AccumulativeDamageActionForAllEnemy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.github.malitsplus.shizurunotes.data.action; | ||
|
||
import com.github.malitsplus.shizurunotes.R; | ||
import com.github.malitsplus.shizurunotes.common.I18N; | ||
import com.github.malitsplus.shizurunotes.data.Property; | ||
|
||
import java.math.RoundingMode; | ||
|
||
public class AccumulativeDamageActionForAllEnemy extends AccumulativeDamageAction { | ||
@Override | ||
public String localizedDetail(int level, Property property) { | ||
return I18N.getString(R.string.Add_additional_s1_damage_per_attack_with_max_s2_stacks_to_current_target_for_all_enemy, | ||
buildExpression(level, property), buildExpression(level, stackValues, RoundingMode.FLOOR, property)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...main/java/com/github/malitsplus/shizurunotes/data/action/AttackSealActionForAllEnemy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.github.malitsplus.shizurunotes.data.action; | ||
|
||
import com.github.malitsplus.shizurunotes.R; | ||
import com.github.malitsplus.shizurunotes.common.I18N; | ||
import com.github.malitsplus.shizurunotes.data.Property; | ||
import com.github.malitsplus.shizurunotes.utils.Utils; | ||
|
||
import java.math.RoundingMode; | ||
|
||
public class AttackSealActionForAllEnemy extends AttackSealAction { | ||
@Override | ||
public String localizedDetail(int level, Property property) { | ||
if(condition == Condition.hit) | ||
return I18N.getString(R.string.Make_s1_when_get_one_hit_by_the_caster_gain_one_mark_stack_max_s2_ID_s3_for_s4_sec_for_all_enemy, | ||
targetParameter.buildTargetClause(), | ||
Utils.roundDownDouble(actionValue1.value), | ||
Utils.roundDownDouble(actionValue2.value), | ||
buildExpression(level, durationValues, RoundingMode.UNNECESSARY, property)); | ||
else if(condition == Condition.damage && target == Target.owner) | ||
return I18N.getString(R.string.Make_s1_when_deal_damage_gain_one_mark_stack_max_s2_ID_s3_for_s4_sec_for_all_enemy, | ||
targetParameter.buildTargetClause(), | ||
Utils.roundDownDouble(actionValue1.value), | ||
Utils.roundDownDouble(actionValue2.value), | ||
buildExpression(level, durationValues, RoundingMode.UNNECESSARY, property)); | ||
else if(condition == Condition.criticalHit && target == Target.owner) | ||
return I18N.getString(R.string.Make_s1_when_deal_critical_damage_gain_one_mark_stack_max_s2_ID_s3_for_s4_sec_for_all_enemy, | ||
targetParameter.buildTargetClause(), | ||
Utils.roundDownDouble(actionValue1.value), | ||
Utils.roundDownDouble(actionValue2.value), | ||
buildExpression(level, durationValues, RoundingMode.UNNECESSARY, property)); | ||
else | ||
return super.localizedDetail(level, property); | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
...in/java/com/github/malitsplus/shizurunotes/data/action/ChangeCriticalReferenceAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.github.malitsplus.shizurunotes.data.action; | ||
|
||
import com.github.malitsplus.shizurunotes.R; | ||
import com.github.malitsplus.shizurunotes.common.I18N; | ||
import com.github.malitsplus.shizurunotes.data.Property; | ||
|
||
public class ChangeCriticalReferenceAction extends ActionParameter { | ||
|
||
enum CriticalReferenceType{ | ||
unknown(-1), | ||
normal(1), | ||
physicalCrit(2), | ||
magicCrit(3), | ||
sumCrit(4); | ||
|
||
private int value; | ||
CriticalReferenceType(int value){ | ||
this.value = value; | ||
} | ||
public int getValue(){ | ||
return value; | ||
} | ||
|
||
public static CriticalReferenceType parse(int value){ | ||
for(CriticalReferenceType item : CriticalReferenceType.values()){ | ||
if(item.getValue() == value) | ||
return item; | ||
} | ||
return unknown; | ||
} | ||
|
||
public String description() { | ||
switch (this) { | ||
case normal: return I18N.getString(R.string.normal); | ||
case physicalCrit: return I18N.getString(R.string.Physical_Critical); | ||
case magicCrit: return I18N.getString(R.string.Magic_Critical); | ||
case sumCrit: return I18N.getString(R.string.Sum_of_phy_and_mag); | ||
} | ||
return I18N.getString(R.string.unknown); | ||
} | ||
} | ||
|
||
protected CriticalReferenceType referenceType; | ||
|
||
@Override | ||
protected void childInit() { | ||
super.childInit(); | ||
referenceType = CriticalReferenceType.parse(actionDetail2); | ||
} | ||
|
||
@Override | ||
public String localizedDetail(int level, Property property) { | ||
if (referenceType == CriticalReferenceType.normal) { | ||
return I18N.getString(R.string.no_effect); | ||
} | ||
return I18N.getString(R.string.Use_critical_reference_s1_for_skill_d2, | ||
referenceType.description(), | ||
getActionNum(actionDetail1) | ||
); | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
app/src/main/java/com/github/malitsplus/shizurunotes/data/action/CopyAtkParamAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.github.malitsplus.shizurunotes.data.action; | ||
|
||
import com.github.malitsplus.shizurunotes.R; | ||
import com.github.malitsplus.shizurunotes.common.I18N; | ||
import com.github.malitsplus.shizurunotes.data.Property; | ||
|
||
public class CopyAtkParamAction extends ActionParameter { | ||
|
||
enum AtkType{ | ||
atk(1), | ||
magicStr(2); | ||
|
||
private int value; | ||
AtkType(int value){ | ||
this.value = value; | ||
} | ||
public int getValue(){ | ||
return value; | ||
} | ||
|
||
public static AtkType parse(int value){ | ||
for(AtkType item : AtkType.values()){ | ||
if(item.getValue() == value) | ||
return item; | ||
} | ||
return atk; | ||
} | ||
|
||
public String description() { | ||
switch (this) { | ||
case atk: return I18N.getString(R.string.ATK); | ||
case magicStr: return I18N.getString(R.string.Magic_STR); | ||
} | ||
return I18N.getString(R.string.unknown); | ||
} | ||
} | ||
|
||
protected AtkType atkType; | ||
|
||
@Override | ||
protected void childInit() { | ||
super.childInit(); | ||
atkType = AtkType.parse(actionDetail1); | ||
} | ||
|
||
@Override | ||
public String localizedDetail(int level, Property property) { | ||
return I18N.getString(R.string.Use_param_s1_of_s2_for_action_d3, | ||
atkType.description(), | ||
targetParameter.buildTargetClause(), | ||
getActionNum(actionDetail2) | ||
); | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
app/src/main/java/com/github/malitsplus/shizurunotes/data/action/EnvironmentAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package com.github.malitsplus.shizurunotes.data.action; | ||
|
||
import com.github.malitsplus.shizurunotes.R; | ||
import com.github.malitsplus.shizurunotes.common.I18N; | ||
import com.github.malitsplus.shizurunotes.data.Property; | ||
|
||
import java.math.RoundingMode; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class EnvironmentAction extends ActionParameter { | ||
|
||
public enum EnvironmentType{ | ||
unknown(-1), | ||
thundering(137); | ||
|
||
private int value; | ||
EnvironmentType(int value){ | ||
this.value = value; | ||
} | ||
public int getValue(){ | ||
return value; | ||
} | ||
|
||
public static EnvironmentType parse(int value){ | ||
for(EnvironmentType item : EnvironmentType.values()){ | ||
if(item.getValue() == value) | ||
return item; | ||
} | ||
return unknown; | ||
} | ||
|
||
public String description() { | ||
switch (this) { | ||
case thundering: return I18N.getString(R.string.thundering); | ||
} | ||
return I18N.getString(R.string.unknown); | ||
} | ||
} | ||
|
||
protected EnvironmentType environmentType; | ||
protected List<ActionValue> durationValues = new ArrayList<>(); | ||
|
||
@Override | ||
protected void childInit() { | ||
super.childInit(); | ||
environmentType = EnvironmentType.parse(actionDetail2); | ||
durationValues.add(new ActionValue(actionValue1, actionValue2, null)); | ||
} | ||
|
||
@Override | ||
public String localizedDetail(int level, Property property) { | ||
return I18N.getString(R.string.Summon_a_field_of_s1_environment_for_s2_for_s3_sec, | ||
environmentType.description(), | ||
targetParameter.buildTargetClause(), | ||
buildExpression(level, durationValues, RoundingMode.UNNECESSARY, property) | ||
); | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
...c/main/java/com/github/malitsplus/shizurunotes/data/action/EveryAttackCriticalAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package com.github.malitsplus.shizurunotes.data.action; | ||
|
||
import com.github.malitsplus.shizurunotes.R; | ||
import com.github.malitsplus.shizurunotes.common.I18N; | ||
import com.github.malitsplus.shizurunotes.data.Property; | ||
|
||
import java.math.RoundingMode; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class EveryAttackCriticalAction extends ActionParameter { | ||
enum CriticalType{ | ||
physical(1), | ||
magical(2), | ||
both(3); | ||
|
||
private int value; | ||
CriticalType(int value){ | ||
this.value = value; | ||
} | ||
public int getValue(){ | ||
return value; | ||
} | ||
|
||
public static CriticalType parse(int value){ | ||
for(CriticalType item : CriticalType.values()){ | ||
if(item.getValue() == value) | ||
return item; | ||
} | ||
return physical; | ||
} | ||
|
||
public String description() { | ||
switch (this) { | ||
case physical: return I18N.getString(R.string.physical); | ||
case magical: return I18N.getString(R.string.magical); | ||
case both: return I18N.getString(R.string.both); | ||
} | ||
return I18N.getString(R.string.unknown); | ||
} | ||
} | ||
|
||
protected CriticalType criticalType; | ||
protected List<ActionValue> durationValues = new ArrayList<>(); | ||
|
||
@Override | ||
protected void childInit() { | ||
super.childInit(); | ||
criticalType = CriticalType.parse(actionDetail1); | ||
durationValues.add(new ActionValue(actionValue1, actionValue2, null)); | ||
} | ||
|
||
@Override | ||
public String localizedDetail(int level, Property property) { | ||
return I18N.getString(R.string.Make_s1_dmg_dealt_by_self_promised_to_get_critical_for_s2_sec, | ||
criticalType.description(), | ||
buildExpression(level, durationValues, RoundingMode.UNNECESSARY, property) | ||
); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...c/main/java/com/github/malitsplus/shizurunotes/data/action/IfContainsUnitGroupAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.github.malitsplus.shizurunotes.data.action; | ||
|
||
import com.github.malitsplus.shizurunotes.R; | ||
import com.github.malitsplus.shizurunotes.common.I18N; | ||
import com.github.malitsplus.shizurunotes.data.Property; | ||
|
||
public class IfContainsUnitGroupAction extends ActionParameter { | ||
@Override | ||
protected void childInit() { | ||
super.childInit(); | ||
} | ||
|
||
@Override | ||
public String localizedDetail(int level, Property property) { | ||
return I18N.getString(R.string.Enabled_if_s1_in_group_d2_or_d3, | ||
targetParameter.buildTargetClause(true), | ||
actionDetail1, | ||
actionDetail2 | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.