Skip to content

Commit

Permalink
add a couple more no max_value tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pentarctagon committed Dec 15, 2023
1 parent 1b473ff commit b7c3448
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 145 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# wmllint: no translatables

#####
# API(s) being tested: [resistance]max_value
##
# Actions:
# Give all units resistance to all damage types with a value of 50
# Attack each other
##
# Expected end state:
# The damage from the attack is reduced by 50%
#####

{COMMON_KEEP_A_B_UNIT_TEST "resistance_no_max_value" (
[event]
name = start

[modify_unit]
[filter]
[/filter]
[effect]
apply_to = new_ability
[abilities]
{TEST_ABILITY resistance 50 () SELF=yes}
[/abilities]
[/effect]
[/modify_unit]

{ATTACK_AND_VALIDATE 50}
{SUCCEED}
[/event]
)}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#textdomain wesnoth-test

#####
# API(s) being tested: [resistance]max_value
##
# Actions:
# Give all units resistance to all damage types no value or max_value specified
# Attack each other
##
# Expected end state:
# The damage from the attack is not reduced
#####

{COMMON_KEEP_A_B_UNIT_TEST "resistance_no_value_no_max_value" (
[event]
name = start

[modify_unit]
[filter]
[/filter]
[effect]
apply_to = new_ability
[abilities]
[resistance]
id = resistance1
name = _"test-resistance_1"
affect_self = yes
affect_allies = no
affect_enemies = no
[/resistance]
[/abilities]
[/effect]
[/modify_unit]

{ATTACK_AND_VALIDATE 100}
{SUCCEED}
[/event]
)}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#textdomain wesnoth-test

#####
# API(s) being tested: [resistance]max_value
##
# Actions:
# Give all units resistance to all damage types no value or max_value specified, but with add=20
# Attack each other
##
# Expected end state:
# The damage from the attack is reduced by 20%
#####

{COMMON_KEEP_A_B_UNIT_TEST "resistance_no_value_no_max_value_add" (
[event]
name = start

[modify_unit]
[filter]
[/filter]
[effect]
apply_to = new_ability
[abilities]
[resistance]
id = resistance1
name = _"test-resistance_1"
affect_self = yes
affect_allies = no
affect_enemies = no
add=20
[/resistance]
[/abilities]
[/effect]
[/modify_unit]

{ATTACK_AND_VALIDATE 80}
{SUCCEED}
[/event]
)}

This file was deleted.

4 changes: 3 additions & 1 deletion wml_test_schedule
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@
0 damage_secondary_type_test
0 swarms_filter_student_by_type
0 swarms_effects_not_checkable
0 resistance_value_test
0 filter_special_id_active
0 filter_ability_special_id_active
0 filter_special_id_not_exists
Expand Down Expand Up @@ -570,6 +569,9 @@
0 resistance_active_on_offense
0 resistance_active_on_defense
0 resistance_active_on_both
0 resistance_no_max_value
0 resistance_no_value_no_max_value
0 resistance_no_value_no_max_value_add
# Warnings about WML
0 unknown_scenario_false_positives
0 unknown_scenario_interpolated
Expand Down

0 comments on commit b7c3448

Please sign in to comment.