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.
- Loading branch information
1 parent
c1fd40c
commit 815739f
Showing
40 changed files
with
1,295 additions
and
1 deletion.
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
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
33 changes: 33 additions & 0 deletions
33
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/drains/drains_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,33 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [drains]value= | ||
## | ||
# Actions: | ||
# Give the leaders an drains ability with both the value and add attributes | ||
# Have the side 1 leader attack the side 2 leader with both its weapons | ||
## | ||
# Expected end state: | ||
# The both leaders have 2 weapons each of which now drains 6 hp (5+1), add is ignored | ||
# The leader of side 1 heals 6 hp total since it has full hp when its first strike is made | ||
# The leader of side 2 heals 12 hp total since it was damaged when its first strike was made | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "drains_add" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY drains 5 (add=1) SELF=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 194 DAMAGE2=188 STRIKE_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
34 changes: 34 additions & 0 deletions
34
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/drains/drains_add_divide.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,34 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [drains]value= | ||
## | ||
# Actions: | ||
# Give the leaders a drains ability with the value, add, and divide attributes | ||
# Have the side 1 leader attack the side 2 leader with both its weapons | ||
## | ||
# Expected end state: | ||
# The both leaders have 2 weapons each of which now drains 3 hp ((5+1)/2) | ||
# The leader of side 1 heals 3 hp total since it has full hp when its first strike is made | ||
# The leader of side 2 heals 6 hp total since it was damaged when its first strike was made | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "drains_add_divide" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY drains 5 (add=1 | ||
divide=2) SELF=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 197 DAMAGE2=194 STRIKE_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
34 changes: 34 additions & 0 deletions
34
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/drains/drains_add_multiply.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,34 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [drains]value= | ||
## | ||
# Actions: | ||
# Give the leaders a drains ability with the value, add, and multiply attributes | ||
# Have the side 1 leader attack the side 2 leader with both its weapons | ||
## | ||
# Expected end state: | ||
# The both leaders have 2 weapons each of which now drains 12 hp ((5+1)*2) | ||
# The leader of side 1 heals 12 hp total since it has full hp when its first strike is made | ||
# The leader of side 2 heals 24 hp total since it was damaged when its first strike was made | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "drains_add_multiply" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY drains 5 (add=1 | ||
multiply=2) SELF=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 188 DAMAGE2=176 STRIKE_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
34 changes: 34 additions & 0 deletions
34
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/drains/drains_add_sub.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,34 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [drains]value= | ||
## | ||
# Actions: | ||
# Give the leaders a drains ability with the value, add, and sub attributes | ||
# Have the side 1 leader attack the side 2 leader with both its weapons | ||
## | ||
# Expected end state: | ||
# The both leaders have 2 weapons each of which now drains 3 hp (5-2), add is ignored | ||
# The leader of side 1 heals 3 hp total since it has full hp when its first strike is made | ||
# The leader of side 2 heals 6 hp total since it was damaged when its first strike was made | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "drains_add_sub" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY drains 5 (add=1 | ||
sub=2) SELF=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 197 DAMAGE2=194 STRIKE_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
41 changes: 41 additions & 0 deletions
41
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/drains/drains_affect_allies.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,41 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [drains]affect_allies= | ||
## | ||
# Actions: | ||
# Give the side 1 leader a drains ability that only affects adjacent allies | ||
# Have the side 2 leader attack the side 3 leader with both its weapons | ||
# Have the side 1 leader attack the side 4 leader with both its weapons | ||
## | ||
# Expected end state: | ||
# The all leaders have 2 weapons each of which now drains 2 hp | ||
# The leader of side 2 heals 2 hp total since it has full hp when its first strike is made | ||
# No other units are healed via drains | ||
##### | ||
{COMMON_KEEP_A_B_C_D_UNIT_TEST "drains_affect_allies" ( | ||
[event] | ||
name = start | ||
|
||
[modify_side] | ||
side=1,2 | ||
team_name=allies | ||
[/modify_side] | ||
|
||
[modify_unit] | ||
[filter] | ||
side=1 | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY drains 2 ([affect_adjacent][/affect_adjacent]) ALLIES=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 198 DAMAGE2=200 ID1=bob ID2=charlie WEAPON_COUNT=2 STRIKE_COUNT=2} | ||
{ATTACK_AND_VALIDATE 200 ID1=alice ID2=dave WEAPON_COUNT=2 STRIKE_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE_LEADER="Elvish Archer"} |
33 changes: 33 additions & 0 deletions
33
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/drains/drains_affect_enemies.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,33 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [drains]affect_enemies= | ||
## | ||
# Actions: | ||
# Give the side 1 leader a drains ability that only affects adjacent enemies | ||
# Have the side 1 leader attack the side 2 leader with both its weapons | ||
## | ||
# Expected end state: | ||
# The side 2 leader has 2 weapons each of which now has drains 2 hp | ||
# The side 1 leader has 2 weapons neither of which has been modified to have drains | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "drains_affect_enemies" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
side=1 | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY drains 2 ([affect_adjacent][/affect_adjacent]) ENEMIES=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 200 DAMAGE2=196 WEAPON_COUNT=2 STRIKE_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
44 changes: 44 additions & 0 deletions
44
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/drains/drains_affect_everybody.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,44 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [drains]affect_allies= | ||
## | ||
# Actions: | ||
# Give the side 1 leader a drains ability with affect_allies, affect_enemies, and affect_self | ||
# Make side 1 and side 2 allies | ||
# Have the side 1 leader attack the side 3 leader with both its weapons | ||
# Have the side 2 leader attack the side 4 leader with both its weapons | ||
# Have the side 4 leader attack the side 1 leader with both its weapons | ||
## | ||
# Expected end state: | ||
# The side 1 leader has 2 weapons each of which now drains 2 hp | ||
# The side 2 leader has 2 weapons each of which now has drains 2 hp | ||
# The side 4 leader has 2 weapons each of which now has drains 2 hp | ||
##### | ||
{COMMON_KEEP_A_B_C_D_UNIT_TEST "drains_affect_everybody" ( | ||
[event] | ||
name = start | ||
|
||
[modify_side] | ||
side=1,2 | ||
team_name=allies | ||
[/modify_side] | ||
|
||
[modify_unit] | ||
[filter] | ||
side = 1 | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY drains 2 ([affect_adjacent][/affect_adjacent]) ENEMIES=yes SELF=yes ALLIES=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 198 DAMAGE2=196 ID1=alice ID2=charlie WEAPON_COUNT=2 STRIKE_COUNT=2} | ||
{ATTACK_AND_VALIDATE 198 DAMAGE2=196 ID1=bob ID2=dave WEAPON_COUNT=2 STRIKE_COUNT=2} | ||
{ATTACK_AND_VALIDATE 198 DAMAGE2=196 ID1=dave ID2=alice WEAPON_COUNT=2 STRIKE_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE_LEADER="Elvish Archer"} |
31 changes: 31 additions & 0 deletions
31
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/drains/drains_affect_self_no.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,31 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [drains]affect_self= | ||
## | ||
# Actions: | ||
# Give the leaders a drains ability that doesn't affect themselves. | ||
# Have the side 1 leader attack the side 2 leader with both its weapons | ||
## | ||
# Expected end state: | ||
# The side 1 leader has 2 weapons neither of which drains | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "drains_affect_self_no" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY drains 2 ()} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 200 WEAPON_COUNT=2 STRIKE_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
33 changes: 33 additions & 0 deletions
33
.../test/scenarios/wml_tests/UnitsWML/AbilitiesWML/drains/drains_default_cumulative_both.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,33 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [drains]cumulative= | ||
## | ||
# Actions: | ||
# Give the leaders a drains ability with non-unique IDs, one with cumulative=yes, and one with cumulative=no | ||
# The drains abilities give a lower value than drains' default of 50% gives | ||
# Have the side 1 leader attack the side 2 leader with both its weapons | ||
## | ||
# Expected end state: | ||
# The side 1 leader has 2 weapons both of which drain 50 hp (50% of 100), since the 50% default gives a higher value | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "drains_default_cumulative_both" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY drains 40 () ID=1 CUMULATIVE=yes SELF=yes} | ||
{TEST_ABILITY drains 30 () ID=1 CUMULATIVE=no SELF=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 150 DAMAGE2=100 WEAPON_COUNT=2 STRIKE_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
32 changes: 32 additions & 0 deletions
32
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/drains/drains_default_cumulative_no.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: [drains]cumulative= | ||
## | ||
# Actions: | ||
# Give the leaders a drains ability with non-unique IDs with cumulative=no | ||
# The drains abilities give a lower value than drains' default of 50% gives | ||
# Have the side 1 leader attack the side 2 leader with both its weapons | ||
## | ||
# Expected end state: | ||
# The side 1 leader has 2 weapons both of which drain 30 hp, using the value of the cumulative=no ability even though it's lower | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "drains_default_cumulative_no" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY drains 30 () ID=1 CUMULATIVE=no SELF=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 170 DAMAGE2=140 WEAPON_COUNT=2 STRIKE_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
Oops, something went wrong.