Hopefully fixes bugs with the scenario not triggering victory...

...in all circumstances it should.
This commit is contained in:
Lari Nieminen 2007-05-11 23:13:58 +00:00
parent 3aeda4f2df
commit 78c9813401

View File

@ -269,7 +269,7 @@ next_scenario=6_Towards_the_Caves
[/message]
[message]
description=Thursagan
message= _ "(whispered) So you what are you going to do?"
message= _ "(whispered) So what are you going to do?"
[/message]
[message]
description=Durstorn
@ -386,13 +386,23 @@ next_scenario=6_Towards_the_Caves
[/event]
#define IN_CAVES
x=18-20,15-23,14-24,15-23,16-22,19
y=12 ,13 ,14-19,20 ,21 ,22
[filter_location]
x,y=19,16
radius=6
# x=16-22,15-23,13-25,15-22,17-21
# y= 11, 12,13-19, 20, 21
[/filter_location]
#enddef
#define NOT_IN_CAVES
x=1-40 ,1-18 ,20-40,1-14 ,24-40,1-13 ,25-40,1-14 ,24-40,1-15 ,23-40,1-18 ,20-40,1-40
y=1-11 ,12 ,12 ,13 ,13 ,14-19,14-19,20 ,20 ,21 ,21 ,22 ,22 ,23-38
[filter_location]
[not]
x,y=19,16
radius=6
# x=16-22,15-23,13-25,15-22,17-21
# y= 11, 12,13-19, 20, 21
[/not]
[/filter_location]
#enddef
[event]
@ -400,6 +410,11 @@ y=1-11 ,12 ,12 ,13 ,13 ,14-19,14-19,20 ,20 ,21 ,21 ,22 ,22 ,
[filter]
description=Glonoin
[/filter]
[kill]
description=Glonoin
animate=no
fire_event=no
[/kill]
[message]
description=Durstorn
message= _ "Ha! Now we can get those tools easily, and go back to our own caves."
@ -448,6 +463,9 @@ y=1-11 ,12 ,12 ,13 ,13 ,14-19,14-19,20 ,20 ,21 ,21 ,22 ,22 ,
description=Durstorn
message= _ "Indeed. Kill them! And make sure no more enter. Then we can close the gates."
[/message]
{VARIABLE ready_to_close yes}
[objectives]
side=1
[objective]
@ -505,6 +523,9 @@ y=1-11 ,12 ,12 ,13 ,13 ,14-19,14-19,20 ,20 ,21 ,21 ,22 ,22 ,
description=Durstorn
message= _ "Indeed. Everyone to the caves, and kill those still inside!"
[/message]
{VARIABLE ready_to_close yes}
[objectives]
side=1
[objective]
@ -538,50 +559,182 @@ y=1-11 ,12 ,12 ,13 ,13 ,14-19,14-19,20 ,20 ,21 ,21 ,22 ,22 ,
[/objectives]
[/else]
[/if]
[event]
[/event]
[event]
name=die
first_time_only=no
[if]
[have_unit]
description=Rugnur
{IN_CAVES}
[/have_unit]
[have_unit]
description=Alanin
{IN_CAVES}
[/have_unit]
[have_unit]
description=Krawg
{IN_CAVES}
[/have_unit]
[have_unit]
description=Thursagan
{IN_CAVES}
[/have_unit]
[have_unit]
description=Durstorn
{IN_CAVES}
[/have_unit]
[then]
[if]
[have_unit]
side=2,3
{IN_CAVES}
[/have_unit]
[else]
[message]
description=Durstorn
message= _ "We have driven all of the dwarves and elves out of these caves! Now, seal the gates!"
[/message]
[endlevel]
result=victory
bonus=no
[/endlevel]
[/else]
[/if]
[/then]
[/if]
[/event]
[filter]
side=2,3
[/filter]
[if]
[variable]
name=ready_to_close
equals=yes
[/variable]
[have_unit]
description=Rugnur
{IN_CAVES}
[/have_unit]
[have_unit]
description=Alanin
{IN_CAVES}
[/have_unit]
[have_unit]
description=Krawg
{IN_CAVES}
[/have_unit]
[have_unit]
description=Thursagan
{IN_CAVES}
[/have_unit]
[have_unit]
description=Durstorn
{IN_CAVES}
[/have_unit]
[then]
[if]
[have_unit]
side=2,3
{IN_CAVES}
[/have_unit]
[else]
[message]
description=Durstorn
message= _ "We have driven all of the dwarves and elves out of these caves! Now, seal the gates!"
[/message]
[endlevel]
result=victory
bonus=no
[/endlevel]
[/else]
[/if]
[/then]
[/if]
[/event]
[event]
name=moveto
first_time_only=no
[filter]
side=1
[not]
[not]
description=Rugnur
[/not]
[not]
description=Alanin
[/not]
[not]
description=Krawg
[/not]
[not]
description=Thursagan
[/not]
[not]
description=Durstorn
[/not]
[/not]
[/filter]
[if]
[variable]
name=ready_to_close
equals=yes
[/variable]
[have_unit]
description=Rugnur
{IN_CAVES}
[/have_unit]
[have_unit]
description=Alanin
{IN_CAVES}
[/have_unit]
[have_unit]
description=Krawg
{IN_CAVES}
[/have_unit]
[have_unit]
description=Thursagan
{IN_CAVES}
[/have_unit]
[have_unit]
description=Durstorn
{IN_CAVES}
[/have_unit]
[then]
[if]
[have_unit]
side=2,3
{IN_CAVES}
[/have_unit]
[else]
[message]
description=Durstorn
message= _ "We have driven all of the dwarves and elves out of these caves! Now, seal the gates!"
[/message]
[endlevel]
result=victory
bonus=no
[/endlevel]
[/else]
[/if]
[/then]
[/if]
[/event]
[event]
name=new turn
first_time_only=no
[if]
[variable]
name=ready_to_close
equals=yes
[/variable]
[have_unit]
description=Rugnur
{IN_CAVES}
[/have_unit]
[have_unit]
description=Alanin
{IN_CAVES}
[/have_unit]
[have_unit]
description=Krawg
{IN_CAVES}
[/have_unit]
[have_unit]
description=Thursagan
{IN_CAVES}
[/have_unit]
[have_unit]
description=Durstorn
{IN_CAVES}
[/have_unit]
[then]
[if]
[have_unit]
side=2,3
{IN_CAVES}
[/have_unit]
[else]
[message]
description=Durstorn
message= _ "We have driven all of the dwarves and elves out of these caves! Now, seal the gates!"
[/message]
[endlevel]
result=victory
bonus=no
[/endlevel]
[/else]
[/if]
[/then]
[/if]
[/event]
[event]