diff --git a/data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/resistance/resistance_cumulative_max_value.cfg b/data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/resistance/resistance_cumulative_max_value.cfg new file mode 100644 index 00000000000..a51e607b605 --- /dev/null +++ b/data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/resistance/resistance_cumulative_max_value.cfg @@ -0,0 +1,37 @@ +# wmllint: no translatables + +##### +# API(s) being tested: [resistance]cumulative= +## +# Actions: +# Give all units 20% resistance to all damage types with max_value=15 and cumulative=yes +# Give all units 30% resistance to all damage types with max_value=17 and cumulative=yes +# Give all units 20% resistance to all damage types with max_value=15 and cumulative=yes +# All abilities have unique ids +# Attack each other +## +# Expected end state: +# In 1.18, the cumulative effect is 30% resistance with a max_value of 47. +# The damage from the attack is reduced by 30% +##### +{COMMON_KEEP_A_B_UNIT_TEST "resistance_cumulative_max_value" ( + [event] + name = start + + [modify_unit] + [filter] + [/filter] + [effect] + apply_to = new_ability + [abilities] + {TEST_ABILITY resistance 20 (max_value=15) ID=1 CUMULATIVE=yes SELF=yes} + {TEST_ABILITY resistance 30 (max_value=17) ID=2 CUMULATIVE=yes SELF=yes} + {TEST_ABILITY resistance 20 (max_value=15) ID=3 CUMULATIVE=yes SELF=yes} + [/abilities] + [/effect] + [/modify_unit] + + {ATTACK_AND_VALIDATE 70} + {SUCCEED} + [/event] +)} diff --git a/wml_test_schedule b/wml_test_schedule index f584bdbe501..ff1d0f9ae24 100644 --- a/wml_test_schedule +++ b/wml_test_schedule @@ -602,6 +602,7 @@ 0 resistance_two_cumulative_mixed_unique_id 0 resistance_two_cumulative_mixed_unique_id_skeletal 0 resistance_max_value +0 resistance_cumulative_max_value 0 resistance_negative_max_value 0 resistance_apply_to_blade 0 resistance_apply_to_non_blade