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
aba0abe
commit 374069b
Showing
37 changed files
with
1,212 additions
and
26 deletions.
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
31 changes: 31 additions & 0 deletions
31
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/damage/damage_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,31 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [damage]value= | ||
## | ||
# Actions: | ||
# Give the leaders an damage 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 side 1 leader has 2 weapons each of which now has 6 damage (5+1) | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "damage_add" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY damage 5 (add=1) SELF=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 6 (DAMAGE_VALUE=) WEAPON_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
32 changes: 32 additions & 0 deletions
32
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/damage/damage_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,32 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [damage]value= | ||
## | ||
# Actions: | ||
# Give the leaders a damage 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 side 1 leader has 2 weapons each of which now has 3 damage ((5+1)/2) | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "damage_add_divide" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY damage 5 (add=1 | ||
divide=2) SELF=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 3 (DAMAGE_VALUE=) WEAPON_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
32 changes: 32 additions & 0 deletions
32
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/damage/damage_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,32 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [damage]value= | ||
## | ||
# Actions: | ||
# Give the leaders a damage 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 side 1 leader has 2 weapons each of which now has 12 damage ((5+1)*2) | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "damage_add_multiply" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY damage 5 (add=1 | ||
multiply=2) SELF=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 12 (DAMAGE_VALUE=) WEAPON_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
32 changes: 32 additions & 0 deletions
32
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/damage/damage_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,32 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [damage]value= | ||
## | ||
# Actions: | ||
# Give the leaders a damage 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 side 1 leader has 2 weapons each of which now has 3 damage (5-2), add is ignored | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "damage_add_sub" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY damage 5 (add=1 | ||
sub=2) SELF=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 3 (DAMAGE_VALUE=) WEAPON_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
40 changes: 40 additions & 0 deletions
40
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/damage/damage_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,40 @@ | ||
# wmllint: no translatables | ||
|
||
##### | ||
# API(s) being tested: [damage]affect_allies= | ||
## | ||
# Actions: | ||
# Give the side 1 leader a damage 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 side 2 leader has 2 weapons each of which now has 2 damage | ||
# The side 1 leader has 2 weapons neither of which has been modified to have 2 damage | ||
##### | ||
{COMMON_KEEP_A_B_C_D_UNIT_TEST "damage_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 damage 2 ([affect_adjacent][/affect_adjacent]) ALLIES=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 5 DAMAGE2=2 (DAMAGE_VALUE=) ID1=bob ID2=charlie WEAPON_COUNT=2} | ||
{ATTACK_AND_VALIDATE 5 (DAMAGE_VALUE=) ID1=alice ID2=dave WEAPON_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE_LEADER="Elvish Archer"} |
33 changes: 33 additions & 0 deletions
33
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/damage/damage_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: [damage]affect_enemies= | ||
## | ||
# Actions: | ||
# Give the side 1 leader a damage 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 2 damage | ||
# The side 1 leader has 2 weapons neither of which has been modified to have 2 damage | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "damage_affect_enemies" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
side=1 | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY damage 2 ([affect_adjacent][/affect_adjacent]) ENEMIES=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 2 DAMAGE2=5 (DAMAGE_VALUE=) WEAPON_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
44 changes: 44 additions & 0 deletions
44
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/damage/damage_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: [damage]affect_allies= | ||
## | ||
# Actions: | ||
# Give the side 1 leader a damage 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 has 2 damage | ||
# The side 2 leader has 2 weapons each of which now has 2 damage | ||
# The side 4 leader has 2 weapons each of which now has 2 damage | ||
##### | ||
{COMMON_KEEP_A_B_C_D_UNIT_TEST "damage_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 damage 2 ([affect_adjacent][/affect_adjacent]) ENEMIES=yes SELF=yes ALLIES=yes} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 2 (DAMAGE_VALUE=) ID1=alice ID2=charlie WEAPON_COUNT=2} | ||
{ATTACK_AND_VALIDATE 2 (DAMAGE_VALUE=) ID1=bob ID2=dave WEAPON_COUNT=2} | ||
{ATTACK_AND_VALIDATE 2 (DAMAGE_VALUE=) ID1=dave ID2=alice WEAPON_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE_LEADER="Elvish Archer"} |
31 changes: 31 additions & 0 deletions
31
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/damage/damage_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: [damage]affect_self= | ||
## | ||
# Actions: | ||
# Give the leaders a damage 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 has 2 damage | ||
##### | ||
{COMMON_KEEP_A_B_UNIT_TEST "damage_affect_self_no" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_ABILITY damage 2 ()} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{ATTACK_AND_VALIDATE 5 (DAMAGE_VALUE=) WEAPON_COUNT=2} | ||
{SUCCEED} | ||
[/event] | ||
) SIDE2_LEADER="Elvish Archer"} |
Oops, something went wrong.