Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
fix: an aftermath of implementing actions 8~10 #86
Browse files Browse the repository at this point in the history
  • Loading branch information
MalitsPlus committed Nov 18, 2023
1 parent 6d7674b commit 4a483d6
Show file tree
Hide file tree
Showing 16 changed files with 111 additions and 97 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ android {
applicationId "com.github.malitsplus.shizurunotes"
minSdk 26
targetSdk 30
versionCode 104
versionName "1.25.0"
versionCode 105
versionName "1.26.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public String localizedDetail(int level, Property property) {
return I18N.getString(R.string.Summon_a_field_of_radius_d1_on_s2_to_cast_effect_d3_for_s4_sec,
(int)actionValue3.value,
targetParameter.buildTargetClause(),
actionDetail1 % 10,
getActionNum(actionDetail1),
buildExpression(level, durationValues, RoundingMode.UNNECESSARY, property));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public String localizedDetail(int level, Property property) {
switch (conditionType) {
case hit:
return I18N.getString(R.string.Use_d1_s2_every_s3_hits_in_next_s4_sec,
actionDetail2 % 10,
getActionNum(actionDetail2),
limitation,
Utils.roundIfNeed(actionValue1.value),
buildExpression(level, durationValues, RoundingMode.UNNECESSARY, property)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,11 @@ public String buildExpression(int level,
protected void setActionValues(List<ActionValue> actionValues){
this.actionValues = actionValues;
}

protected int getActionNum(int actionDetail) {
return actionDetail % 100;
}

protected List<ActionValue> getActionValues() {
return actionValues;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ public String localizedDetail(int level, Property property) {
case 0:
result = I18N.getString(R.string.Modifier_add_s1_HP_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
break;
case 1:
result = I18N.getString(R.string.Modifier_add_s1_lost_HP_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
break;
case 2:
/*
Expand All @@ -60,55 +60,55 @@ public String localizedDetail(int level, Property property) {
result = I18N.getString(R.string.Modifier_add_s1_count_of_defeated_enemies_to_value_d2_of_effect_d3,
s1,
actionDetail2,
actionDetail1 % 10);
getActionNum(actionDetail1));
break;
case 4:
result = I18N.getString(R.string.Modifier_add_s1_count_of_targets_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
break;
case 5:
result = I18N.getString(R.string.Modifier_add_s1_count_of_damaged_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
break;
case 6:
result = I18N.getString(R.string.Modifier_add_s1_total_damage_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
break;
case 12:
result = I18N.getString(R.string.Modifier_add_s1_count_of_s2_behind_self_to_value_d3_of_effect_d4,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
targetParameter.buildTargetClause(), actionDetail2, actionDetail1 % 10);
targetParameter.buildTargetClause(), actionDetail2, getActionNum(actionDetail1));
break;
case 13:
result = I18N.getString(R.string.Modifier_add_s1_lost_hp_total_hp_of_s2_behind_self_to_value_d3_of_effect_d4,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
targetParameter.buildTargetClause(), actionDetail2, actionDetail1 % 10);
targetParameter.buildTargetClause(), actionDetail2, getActionNum(actionDetail1));
break;
case 102:
result = I18N.getString(R.string.Modifier_add_s1_count_of_omemes_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
break;
default:
if (actionValue1.value >= 200 && actionValue1.value < 300){
result = I18N.getString(R.string.Modifier_add_s1_stacks_of_mark_ID_d2_to_value_d3_of_effect_d4,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
((int)actionValue1.value) % 2000, actionDetail2, actionDetail1 % 10);
((int)actionValue1.value) % 2000, actionDetail2, getActionNum(actionDetail1));
} else if(actionValue1.value >= 2000 && actionValue1.value < 3000){
result = I18N.getString(R.string.Modifier_add_s1_stacks_of_mark_ID_d2_to_value_d3_of_effect_d4,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
((int)actionValue1.value) % 200, actionDetail2, actionDetail1 % 10);
((int)actionValue1.value) % 200, actionDetail2, getActionNum(actionDetail1));
} else if(actionValue1.value >= 7 && actionValue1.value <= 10){
result = I18N.getString(R.string.Modifier_add_s1_s2_of_s3_to_value_d4_of_effect_d5,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
keyType.description(), targetParameter.buildTargetClause(), actionDetail2, actionDetail1 % 10);
keyType.description(), targetParameter.buildTargetClause(), actionDetail2, getActionNum(actionDetail1));
} else if(actionValue1.value >= 20 && actionValue1.value < 30) {
result = I18N.getString(R.string.Modifier_add_s1_number_on_counter_d2_to_value_d3_of_effect_d4,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
(int)actionValue1.value % 10, actionDetail2, actionDetail1 % 10);
(int)actionValue1.value % 10, actionDetail2, getActionNum(actionDetail1));
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ protected void childInit() {
@Override
public String localizedDetail(int level, Property property) {
return I18N.getString(R.string.Set_a_countdown_timer_on_s1_trigger_effect_d2_after_s3_sec,
targetParameter.buildTargetClause(), actionDetail1 % 10, actionValue1.valueString());
targetParameter.buildTargetClause(), getActionNum(actionDetail1), actionValue1.valueString());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ public String localizedDetail(int level, Property property) {
else if(actionValue1.value == 1)
result = I18N.getString(R.string.Modifier_multiple_s1_lost_HP_max_HP_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
else if(actionValue1.value == 2)
result = I18N.getString(R.string.Modifier_multiple_s1_count_of_defeated_enemies_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
else if(actionValue1.value == 4)
result = I18N.getString(R.string.Modifier_multiple_s1_count_of_targets_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
else if(actionValue1.value >= 200 && actionValue1.value < 300)
result = I18N.getString(R.string.Modifier_multiple_s1_stacks_of_mark_ID_d2_to_value_d3_of_effect_d4,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
((int)actionValue1.value) % 200, actionDetail2, actionDetail1 % 10);
((int)actionValue1.value) % 200, actionDetail2, getActionNum(actionDetail1));
return result;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ protected String buildFormulaString(int level, Property property) {
case 0:
result = I18N.getString(R.string.Modifier_add_s1_HP_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
break;
case 1:
result = I18N.getString(R.string.Modifier_add_s1_lost_HP_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
break;
case 2:
/*
Expand All @@ -61,51 +61,51 @@ protected String buildFormulaString(int level, Property property) {
result = I18N.getString(R.string.Modifier_add_s1_count_of_defeated_enemies_to_value_d2_of_effect_d3,
s1,
actionDetail2,
actionDetail1 % 10);
getActionNum(actionDetail1));
break;
case 4:
result = I18N.getString(R.string.Modifier_add_s1_count_of_targets_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
break;
case 5:
result = I18N.getString(R.string.Modifier_add_s1_count_of_damaged_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
break;
case 6:
result = I18N.getString(R.string.Modifier_add_s1_total_damage_to_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
break;
case 12:
result = I18N.getString(R.string.Modifier_add_s1_count_of_s2_behind_self_to_value_d3_of_effect_d4,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
targetParameter.buildTargetClause(), actionDetail2, actionDetail1 % 10);
targetParameter.buildTargetClause(), actionDetail2, getActionNum(actionDetail1));
break;
case 13:
result = I18N.getString(R.string.Modifier_add_s1_lost_hp_total_hp_of_s2_behind_self_to_value_d3_of_effect_d4,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
targetParameter.buildTargetClause(), actionDetail2, actionDetail1 % 10);
targetParameter.buildTargetClause(), actionDetail2, getActionNum(actionDetail1));
break;
case 102:
result = I18N.getString(R.string.Modifier_add_s1_count_of_omemes_value_d2_of_effect_d3,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
actionDetail2, actionDetail1 % 10);
actionDetail2, getActionNum(actionDetail1));
break;
default:
if (actionValue1.value >= 200 && actionValue1.value < 300){
result = I18N.getString(R.string.Modifier_add_s1_stacks_of_mark_ID_d2_to_value_d3_of_effect_d4,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
((int)actionValue1.value) % 200, actionDetail2, actionDetail1 % 10);
((int)actionValue1.value) % 200, actionDetail2, getActionNum(actionDetail1));
} else if(actionValue1.value >= 7 && actionValue1.value <= 10){
result = I18N.getString(R.string.Modifier_add_s1_s2_of_s3_to_value_d4_of_effect_d5,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
keyType.description(), targetParameter.buildTargetClause(), actionDetail2, actionDetail1 % 10);
keyType.description(), targetParameter.buildTargetClause(), actionDetail2, getActionNum(actionDetail1));
} else if(actionValue1.value >= 20 && actionValue1.value < 30) {
result = I18N.getString(R.string.Modifier_add_s1_number_on_counter_d2_to_value_d3_of_effect_d4,
buildExpression(level, null, RoundingMode.UNNECESSARY, property, false, false, true),
(int)actionValue1.value % 10, actionDetail2, actionDetail1 % 10);
(int)actionValue1.value % 10, actionDetail2, getActionNum(actionDetail1));
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ protected void childInit() {
public String localizedDetail(int level, Property property) {
if(actionDetail2 !=0 && actionDetail3 != 0)
return I18N.getString(R.string.Condition_if_the_specific_field_exists_then_use_d1_otherwise_d2,
actionDetail2 % 10, actionDetail3 % 10);
getActionNum(actionDetail2), getActionNum(actionDetail3));
else if(actionDetail2 != 0)
return I18N.getString(R.string.Condition_if_the_specific_field_exists_then_use_d,
actionDetail2 % 10);
getActionNum(actionDetail2));
else
return super.localizedDetail(level, property);
}
Expand Down
Loading

0 comments on commit 4a483d6

Please sign in to comment.