/
test_berzerk_firststrike.cfg
44 lines (41 loc) · 1.18 KB
/
test_berzerk_firststrike.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Tests the order of hits that results when a spearman is attacked by an ulfserker.
# If first strike and berzerk interact correctly, should repeat DADADAA
#define ADD_SYMBOL S
{VARIABLE SEQUENCE ("$SEQUENCE|"+"{S}")}
{VARIABLE_OP LEN string_length $SEQUENCE}
{IF_VAR LEN equals 29 (
[then]
{RETURN ({VARIABLE_CONDITIONAL SEQUENCE equals "DADADAADADADAADADADAADADADAAD"})}
[/then]
)}
#enddef
{GENERIC_UNIT_TEST "test_berzerk_firststrike" (
[event]
name = attacker misses, attacker hits
first_time_only=no
{ADD_SYMBOL "A"}
[/event]
[event]
name = defender misses, defender hits
first_time_only=no
{ADD_SYMBOL "D"}
[/event]
[event]
name = start
{VARIABLE SEQUENCE ""}
{UNIT 1 "Dwarvish Ulfserker" 7 4 (hitpoints=100)}
{UNIT 2 "Spearman" 8 4 (hitpoints=100)}
[do_command]
[attack]
weapon = 0
defender_weapon = 0
[source]
x,y=7,4
[/source]
[destination]
x,y=8,4
[/destination]
[/attack]
[/do_command]
[/event]
)}