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