AToTB S03 Logical guards

The second wave of guards should react according to the situation. That means, when they arrive, if Arvith is still fighting the first wave, they should join the fight rather than ask for the password.
This commit is contained in:
Gregory A Lundberg 2016-08-15 16:16:45 -05:00
parent 9696307a09
commit 8b984cfa6b

View file

@ -89,6 +89,7 @@ Yet for some reason I fear these brothers more. If Mordak were here it would be
facing=sw
[unit]
role=Guard
id=Guard_leader
name= _ "Guard"
type=Assassin
@ -290,8 +291,6 @@ Yet for some reason I fear these brothers more. If Mordak were here it would be
[/gold_carryover]
[/objectives]
{VARIABLE delay_guards false}
# Making the gates impassable
[terrain]
x=5,6
@ -354,10 +353,6 @@ Yet for some reason I fear these brothers more. If Mordak were here it would be
role=Guard
[/kill]
[kill]
id=Guard_leader
[/kill]
[remove_shroud]
side=1
x= 0, 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-32, 33,34-35,36-37, 38
@ -379,8 +374,6 @@ Yet for some reason I fear these brothers more. If Mordak were here it would be
speaker=Guard_leader
message= _ "Wrong! Die!"
[/message]
{VARIABLE delay_guards true}
[/else]
[/if]
{CLEAR_VARIABLE password_picked}
@ -432,38 +425,65 @@ Yet for some reason I fear these brothers more. If Mordak were here it would be
[/message]
[/event]
# Trigger 2nd guards at turn3 only if you did not attack the first
# ones in turn 1, if they are attacked in turn 1, trigger this
# event in turn 6
[event]
name=new turn
[filter_condition]
[variable]
name=delay_guards
boolean_equals=false
[/variable]
[variable]
name=turn_number
numerical_equals=3
[/variable]
[or]
[variable]
name=delay_guards
boolean_equals=true
[/variable]
[variable]
name=turn_number
numerical_equals=6
[/variable]
[/or]
[/filter_condition]
name=turn 3
[if]
[have_unit]
side=2
role=Guard
[/have_unit]
[then]
[event]
name=turn 6
[fire_event]
name=second wave
[/fire_event]
[if]
[not]
[have_unit]
side=2
role=Guard
[/have_unit]
[/not]
[then]
[fire_event]
name=second challenge
[/fire_event]
[/then]
[/if]
[/event]
[/then]
[else]
[fire_event]
name=second wave
[/fire_event]
[fire_event]
name=second challenge
[/fire_event]
[/else]
[/if]
[/event]
[event]
name=second wave
[move_unit_fake]
side=2
type=Rogue
x= 7,10,16
y=23,21,24
[/move_unit_fake]
[unit]
side=2
role=Guard2
id=Guard2_leader
name= _ "Guard"
type=Rogue
x,y=16,24
facing=se
animate=no
[/unit]
[unit]
@ -472,6 +492,7 @@ Yet for some reason I fear these brothers more. If Mordak were here it would be
name= _ "Guard"
type=Bandit
x,y=17,24
facing=se
[/unit]
[unit]
@ -480,6 +501,7 @@ Yet for some reason I fear these brothers more. If Mordak were here it would be
name= _ "Guard"
type=Bandit
x,y=16,24
facing=se
[/unit]
#ifndef EASY
@ -489,8 +511,13 @@ Yet for some reason I fear these brothers more. If Mordak were here it would be
name= _ "Guard"
type=Bandit
x,y=17,23
facing=se
[/unit]
#endif
[/event]
[event]
name=second challenge
[message]
speaker=Guard2_leader
@ -539,9 +566,6 @@ Yet for some reason I fear these brothers more. If Mordak were here it would be
[kill]
role=Guard2
[/kill]
[kill]
id=Guard2_leader
[/kill]
[/then]
[else]
@ -822,12 +846,6 @@ Yet for some reason I fear these brothers more. If Mordak were here it would be
[/endlevel]
[/event]
[event]
name=victory
{CLEAR_VARIABLE delay_guards}
[/event]
{BARAN_LAST_BREATH}
{ARVITH_LAST_BREATH}