forked from wesnoth/wesnoth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a couple more no max_value tests
- Loading branch information
1 parent
1b473ff
commit b7c3448
Showing
5 changed files
with
112 additions
and
145 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/resistance/resistance_no_max_value.cfg
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,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] | ||
)} |
38 changes: 38 additions & 0 deletions
38
...scenarios/wml_tests/UnitsWML/AbilitiesWML/resistance/resistance_no_value_no_max_value.cfg
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,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] | ||
)} |
39 changes: 39 additions & 0 deletions
39
...arios/wml_tests/UnitsWML/AbilitiesWML/resistance/resistance_no_value_no_max_value_add.cfg
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,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] | ||
)} |
144 changes: 0 additions & 144 deletions
144
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/resistance_value.cfg
This file was deleted.
Oops, something went wrong.
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