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.
Showing
38 changed files
with
1,947 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#define SET_HP | ||
|
||
#arg VALUE | ||
1#endarg | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
hitpoints = {VALUE} | ||
[/modify_unit] | ||
#enddef | ||
|
||
#define TEST_HEALS VALUE OTHER | ||
|
||
#arg ID | ||
1#endarg | ||
|
||
#arg SELF | ||
no#endarg | ||
|
||
#arg ALLIES | ||
yes#endarg | ||
|
||
#arg ENEMIES | ||
no#endarg | ||
|
||
#arg POISON | ||
"slowed"#endarg | ||
|
||
#arg CUMULATIVE | ||
no#endarg | ||
|
||
[heals] | ||
id = {ID} | ||
name = "test-heals_{ID}" | ||
affect_self = {SELF} | ||
affect_allies = {ALLIES} | ||
affect_enemies = {ENEMIES} | ||
poison = {POISON} | ||
value = {VALUE} | ||
{OTHER} | ||
cumulative = {CUMULATIVE} | ||
[affect_adjacent] | ||
[/affect_adjacent] | ||
[/heals] | ||
#enddef |
File renamed without changes.
56 changes: 56 additions & 0 deletions
56
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/heals/heal_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,56 @@ | ||
##### | ||
# API(s) being tested: [heals]value= | ||
## | ||
# Actions: | ||
# Give the leaders a heals ability with both the value and add attributes | ||
# Spawn a Mage next to the side 1 leader. | ||
# Set all units' hitpoints to 1. | ||
# Wait a turn for healing to take place. | ||
## | ||
# Expected end state: | ||
# The Mage has 7 hp: 1 + 2 (rest healing) + 4 ([heals], 2 (value) + 2 (add)) | ||
##### | ||
{GENERIC_UNIT_TEST "heal_add" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_HEALS 2 (add=2)} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{NOTRAIT_UNIT 1 (Mage) 7 4} | ||
{SET_HP VALUE=1} | ||
|
||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name = side 2 turn 1 | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name =side 1 turn 2 | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name = side 2 turn 2 | ||
|
||
[store_unit] | ||
[filter] | ||
type = "Mage" | ||
[/filter] | ||
variable = temp | ||
[/store_unit] | ||
{ASSERT {VARIABLE_CONDITIONAL temp.hitpoints numerical_equals 7}} | ||
{SUCCEED} | ||
[/event] | ||
)} |
57 changes: 57 additions & 0 deletions
57
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/heals/heal_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,57 @@ | ||
##### | ||
# API(s) being tested: [heals]value= | ||
## | ||
# Actions: | ||
# Give the leaders a heals ability with both the value, add, and divide attributes | ||
# Spawn a Mage next to the side 1 leader. | ||
# Set all units' hitpoints to 1. | ||
# Wait a turn for healing to take place. | ||
## | ||
# Expected end state: | ||
# The Mage has 5 hp: 1 + 2 (rest healing) + 2 ([heals], (3+1)/2) | ||
##### | ||
{GENERIC_UNIT_TEST "heal_add_divide" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_HEALS 3 (add=1 | ||
divide=2)} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{NOTRAIT_UNIT 1 (Mage) 7 4} | ||
{SET_HP VALUE=1} | ||
|
||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name = side 2 turn 1 | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name =side 1 turn 2 | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name = side 2 turn 2 | ||
|
||
[store_unit] | ||
[filter] | ||
type = "Mage" | ||
[/filter] | ||
variable = temp | ||
[/store_unit] | ||
{ASSERT {VARIABLE_CONDITIONAL temp.hitpoints numerical_equals 5}} | ||
{SUCCEED} | ||
[/event] | ||
)} |
57 changes: 57 additions & 0 deletions
57
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/heals/heal_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,57 @@ | ||
##### | ||
# API(s) being tested: [heals]value= | ||
## | ||
# Actions: | ||
# Give the leaders a heals ability with both the value, add, and multiply attributes | ||
# Spawn a Mage next to the side 1 leader. | ||
# Set all units' hitpoints to 1. | ||
# Wait a turn for healing to take place. | ||
## | ||
# Expected end state: | ||
# The Mage has 11 hp: 1 + 2 (rest healing) + 8 ([heals], (3+1)*2) | ||
##### | ||
{GENERIC_UNIT_TEST "heal_add_multiply" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_HEALS 3 (add=1 | ||
multiply=2)} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{NOTRAIT_UNIT 1 (Mage) 7 4} | ||
{SET_HP VALUE=1} | ||
|
||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name = side 2 turn 1 | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name =side 1 turn 2 | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name = side 2 turn 2 | ||
|
||
[store_unit] | ||
[filter] | ||
type = "Mage" | ||
[/filter] | ||
variable = temp | ||
[/store_unit] | ||
{ASSERT {VARIABLE_CONDITIONAL temp.hitpoints numerical_equals 11}} | ||
{SUCCEED} | ||
[/event] | ||
)} |
58 changes: 58 additions & 0 deletions
58
data/test/scenarios/wml_tests/UnitsWML/AbilitiesWML/heals/heal_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,58 @@ | ||
##### | ||
# API(s) being tested: [heals]value= | ||
## | ||
# Actions: | ||
# Give the leaders a heals ability with both the value, add, and sub attributes | ||
# Spawn a Mage next to the side 1 leader. | ||
# Set all units' hitpoints to 1. | ||
# Wait a turn for healing to take place. | ||
## | ||
# Expected end state: | ||
# The Mage has 4 hp: 1 + 2 (rest healing) + 1 ([heals], 3 (value) - 2 (sub)) | ||
# The value of the add attribute is ignored. | ||
##### | ||
{GENERIC_UNIT_TEST "heal_add_sub" ( | ||
[event] | ||
name = start | ||
|
||
[modify_unit] | ||
[filter] | ||
[/filter] | ||
[effect] | ||
apply_to = new_ability | ||
[abilities] | ||
{TEST_HEALS 3 (add=20 | ||
sub=2)} | ||
[/abilities] | ||
[/effect] | ||
[/modify_unit] | ||
|
||
{NOTRAIT_UNIT 1 (Mage) 7 4} | ||
{SET_HP VALUE=1} | ||
|
||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name = side 2 turn 1 | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name =side 1 turn 2 | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name = side 2 turn 2 | ||
|
||
[store_unit] | ||
[filter] | ||
type = "Mage" | ||
[/filter] | ||
variable = temp | ||
[/store_unit] | ||
{ASSERT {VARIABLE_CONDITIONAL temp.hitpoints numerical_equals 4}} | ||
{SUCCEED} | ||
[/event] | ||
)} |
Oops, something went wrong.