add test of [modify_unit] facing= attribute
This commit is contained in:
parent
b272239ea9
commit
f664b4e5af
2 changed files with 54 additions and 0 deletions
53
data/test/scenarios/facing.cfg
Normal file
53
data/test/scenarios/facing.cfg
Normal file
|
@ -0,0 +1,53 @@
|
|||
#define TURN_UNIT ID DIRECTION
|
||||
[modify_unit]
|
||||
[filter]
|
||||
id={ID}
|
||||
[/filter]
|
||||
facing={DIRECTION}
|
||||
[/modify_unit]
|
||||
[store_unit]
|
||||
[filter]
|
||||
id={ID}
|
||||
[/filter]
|
||||
variable=temp
|
||||
kill=no
|
||||
[/store_unit]
|
||||
{ASSERT ({VARIABLE_CONDITIONAL temp.facing equals {DIRECTION}})}
|
||||
#enddef
|
||||
|
||||
{GENERIC_UNIT_TEST "modify_unit_facing" (
|
||||
[event]
|
||||
name = side 1 turn 1
|
||||
{TURN_UNIT alice "n"}
|
||||
[/event]
|
||||
[event]
|
||||
name = side 1 turn 2
|
||||
{TURN_UNIT alice "ne"}
|
||||
[/event]
|
||||
[event]
|
||||
name = side 1 turn 3
|
||||
{TURN_UNIT alice "nw"}
|
||||
[/event]
|
||||
[event]
|
||||
name = side 1 turn 4
|
||||
{TURN_UNIT alice "s"}
|
||||
[/event]
|
||||
[event]
|
||||
name = side 1 turn 5
|
||||
{TURN_UNIT alice "sw"}
|
||||
[/event]
|
||||
[event]
|
||||
name = side 1 turn 6
|
||||
{TURN_UNIT alice "se"}
|
||||
[/event]
|
||||
[event]
|
||||
name = side 1 turn 7
|
||||
{RETURN ([true][/true])}
|
||||
[/event]
|
||||
[event]
|
||||
name = side turn
|
||||
first_time_only = no
|
||||
[end_turn]
|
||||
[/end_turn]
|
||||
[/event]
|
||||
)}
|
|
@ -70,6 +70,7 @@
|
|||
0 modify_turns_three
|
||||
0 modify_turns_four
|
||||
0 replace_schedule_prestart
|
||||
0 modify_unit_facing
|
||||
#
|
||||
# Attack calculations & codepath tests
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue