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
Showing
2 changed files
with
156 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
#define EXPECT_HITPOINTS leader1 healer1 leader2 healer2 | ||
[store_unit] | ||
[filter] | ||
side=1 | ||
canrecruit=yes | ||
[/filter] | ||
variable=leader1 | ||
kill=no | ||
[/store_unit] | ||
[store_unit] | ||
[filter] | ||
side=2 | ||
canrecruit=yes | ||
[/filter] | ||
variable=leader2 | ||
kill=no | ||
[/store_unit] | ||
[store_unit] | ||
[filter] | ||
side=1 | ||
canrecruit=no | ||
[/filter] | ||
variable=healer1 | ||
kill=no | ||
[/store_unit] | ||
[store_unit] | ||
[filter] | ||
side=2 | ||
canrecruit=no | ||
[/filter] | ||
variable=healer2 | ||
kill=no | ||
[/store_unit] | ||
[if] | ||
[not] | ||
{VARIABLE_CONDITIONAL leader1.hitpoints numerical_equals {leader1}} | ||
{VARIABLE_CONDITIONAL leader2.hitpoints numerical_equals {leader2}} | ||
{VARIABLE_CONDITIONAL healer1.hitpoints numerical_equals {healer1}} | ||
{VARIABLE_CONDITIONAL healer2.hitpoints numerical_equals {healer2}} | ||
[/not] | ||
[then] | ||
{FAIL} | ||
[/then] | ||
[/if] | ||
#enddef | ||
|
||
{GENERIC_UNIT_TEST "heal" ( | ||
[event] | ||
name = start | ||
# Create two healers adjacent to the leaders | ||
{UNIT 1 (Elvish Shyde) 7 4 (id=healer1)} | ||
{UNIT 2 (Saurian Soothsayer) 13 4 (id=healer2)} | ||
[modify_unit] | ||
[filter][/filter] | ||
# Ensure we can heal as much as we may need to | ||
hitpoints=1 | ||
max_hitpoints=999 | ||
[/modify_unit] | ||
[/event] | ||
|
||
# Baseline: as defined in the scenario | ||
[event] | ||
name=side 1 turn 1 refresh | ||
{EXPECT_HITPOINTS 1 1 1 1} | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
# side 2 gets healing but no rest healing | ||
[event] | ||
name=side 2 turn 1 refresh | ||
{EXPECT_HITPOINTS 1 1 9 1} | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
# side 1 gets healing but no rest healing (??) | ||
[event] | ||
name=side 1 turn 2 refresh | ||
{EXPECT_HITPOINTS 9 1 9 1} | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
# side 2 gets healing and rest healing | ||
[event] | ||
name=side 2 turn 2 refresh | ||
{EXPECT_HITPOINTS 9 1 19 3} | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
# side 1 gets healing and rest healing | ||
[event] | ||
name=side 1 turn 3 refresh | ||
{EXPECT_HITPOINTS 19 3 19 3} | ||
[move_unit] | ||
side=1 | ||
canrecruit=yes | ||
to_x,to_y=8,1 | ||
[/move_unit] | ||
[move_unit] | ||
side=1 | ||
canrecruit=no | ||
to_x,to_y=8,2 | ||
[/move_unit] | ||
[modify_unit] | ||
[filter] | ||
side=1 | ||
[/filter] | ||
moves=0 | ||
[/modify_unit] | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
# side 2 gets healing and rest healing | ||
[event] | ||
name=side 2 turn 3 refresh | ||
{EXPECT_HITPOINTS 19 3 29 5} | ||
[move_unit] | ||
side=2 | ||
canrecruit=yes | ||
to_x,to_y=15,1 | ||
[/move_unit] | ||
[move_unit] | ||
side=2 | ||
canrecruit=no | ||
to_x,to_y=15,2 | ||
[/move_unit] | ||
[modify_unit] | ||
[filter] | ||
side=2 | ||
[/filter] | ||
moves=0 | ||
[/modify_unit] | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
# side 1 gets healing but not rest healing | ||
[event] | ||
name=side 1 turn 4 refresh | ||
{EXPECT_HITPOINTS 27 3 29 5} | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
# side 2 gets healing but not rest healing | ||
[event] | ||
name=side 2 turn 4 refresh | ||
{EXPECT_HITPOINTS 27 3 37 5} | ||
[end_turn][/end_turn] | ||
[/event] | ||
|
||
[event] | ||
name=turn 5 | ||
{SUCCEED} | ||
[/event] | ||
|
||
)} |
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