UtBS S5: fix event listed out of order

This commit is contained in:
DisherProject 2019-03-04 14:08:28 +01:00
parent 15f004ccfd
commit e7cc255d80

View file

@ -730,65 +730,6 @@
[/message]
[/event]
# EVENT 5 IS LISTED OUT OF ORDER BECAUSE FOR SOME REASON IT WASN'T
# FIRING WHEN PLACED AFTER EVENT 4.5. CURRENTLY THIS EVENT WORKS
# FINE WHEN IT IS HERE AND EVENT 6 FIRES FINE AFTER 4.5. SO EVEN
# THOUGH THE EVENTS ARE OUT OF ORDER, I'M LEAVING THEM THIS WAY
# BECAUSE IT SEEMS TO MAKE EVERYTHING WORK FINE.
# Event 5: Sighted dwarf/troll leader events
#define DWARF_ALLY_APPROACH_MESSAGES
{VARIABLE Fundin_approach_message (_ "What are you doing back here? The trolls hide in the southern tunnels, not this way.")}
{VARIABLE Nori_approach_message (_ "What are you doing back here? The trolls hide in the southern tunnels, not this way.")}
# wmllint: local spelling stinkin'
{VARIABLE Thungar_approach_message (_ "Nasty dwarves and stinkin elves, we will smash you all!")}
{VARIABLE Gnarl_approach_message (_ "Kill the elves! We must stop them here. This is our land, crush the intruders!")}
#enddef
#define TROLL_ALLY_APPROACH_MESSAGES
{VARIABLE Fundin_approach_message (_ "Treacherous elves, how can you fight with such horrid creatures as trolls? I will cleave all in two with my axe!")}
{VARIABLE Nori_approach_message (_ "If you think you can take these caves from us, then you are fools. We are masters of fighting underground and we will die to defend our home. Fight on, my brothers!")}
{VARIABLE Thungar_approach_message (_ "What you doing back here? Nasty dwarves are to the north, no dwarves this way. Go back and fight bravely.")}
{VARIABLE Gnarl_approach_message (_ "What you doing back here? Nasty dwarves are to the north, no dwarves this way. Go back and fight bravely.")}
#enddef
#define APPROACH_LEADER LEADER_ID ENTER_X_SPAN ENTER_Y_SPAN REMOVE_X_SPAN REMOVE_Y_SPAN
[event]
name=moveto
[filter]
x={ENTER_X_SPAN}
y={ENTER_Y_SPAN}
side=1
[/filter]
[remove_shroud]
x={REMOVE_X_SPAN}
y={REMOVE_Y_SPAN}
side=1
[/remove_shroud]
[message]
speaker={LEADER_ID}
message=${LEADER_ID}_approach_message
[/message]
[/event]
#enddef
# NW dwarf
{APPROACH_LEADER Fundin 23-31 8-17 22-31 7-17}
# NE dwarf
{APPROACH_LEADER Nori 41-51 10-16 40-52 9-17}
# SW troll
{APPROACH_LEADER Thungar 23-31 37-44 21-32 37-44}
# SE troll
{APPROACH_LEADER Gnarl 42-51 37-45 42-51 37-46}
#undef APPROACH_LEADER
# victory events for trolls and dwarves here to make the ally event easier to follow
#define CLOAK_KILL_OBJECTIVES
[objectives]
@ -1344,7 +1285,6 @@
message= _ "Bah! Your kind all the same. Everyone turns on trolls. But youll see, Griknagh will smash you all."
[/message]
{DWARF_ALLY_APPROACH_MESSAGES}
{DWARF_ALLY_VICTORY}
[event]
name=troll_victory_test
@ -1411,7 +1351,6 @@
message= _ "I knew elves couldnt be trusted. Foolish boy, you will regret your betrayal. Taste dwarven steel!"
[/message]
{TROLL_ALLY_APPROACH_MESSAGES}
{TROLL_ALLY_VICTORY}
[event]
name=dwarf_victory_test
@ -2463,6 +2402,102 @@
{CLEAR_VARIABLE assassin_turn}
[/event]
# Event 5: Sighted dwarf/troll leader events
[event]
name=sighted
first_time_only=no
[filter]
side=2,3,4,5
canrecruit=yes
[/filter]
[filter_second]
side=1
[/filter_second]
[filter_condition]
[not]
[have_unit]
id=$unit.id
find_in=leaders_who_spoke
[/have_unit]
[/not]
[/filter_condition]
[switch]
variable=ally_race
[case]
value=dwarf
[switch]
variable=unit.id
[case]
value=Thungar
[message]
speaker=unit
message= _ "Nasty dwarves and stinkin elves, we will smash you all!"
[/message]
[/case]
[case]
value=Gnarl
[message]
speaker=unit
message= _ "Kill the elves! We must stop them here. This is our land, crush the intruders!"
[/message]
[/case]
[else]
[message]
speaker=unit
message= _ "What you doing back here? Nasty dwarves are to the north, no dwarves this way. Go back and fight bravely."
[/message]
[/else]
[/switch]
[/case]
[case]
value=troll
[switch]
variable=unit.id
[case]
value=Fundin
[message]
speaker=unit
message= _ "Treacherous elves, how can you fight with such horrid creatures as trolls? I will cleave all in two with my axe!"
[/message]
[/case]
[case]
value=Nori
[message]
speaker=unit
message= _ "If you think you can take these caves from us, then you are fools. We are masters of fighting underground and we will die to defend our home. Fight on, my brothers!"
[/message]
[/case]
[else]
[message]
speaker=unit
message= _ "What you doing back here? Nasty dwarves are to the north, no dwarves this way. Go back and fight bravely."
[/message]
[/else]
[/switch]
[/case]
[/switch]
[set_variables]
name=leaders_who_spoke
mode=append
[value]
id=$unit.id
[/value]
[/set_variables]
[/event]
# Event 6: death events for each leader
#for each death check to see if other leader is dead, if so
@ -2622,10 +2657,8 @@
#at victory, clear variables:
[event]
name=victory
{CLEAR_VARIABLE Fundin_approach_message}
{CLEAR_VARIABLE Nori_approach_message}
{CLEAR_VARIABLE Thungar_approach_message}
{CLEAR_VARIABLE Gnarl_approach_message}
{CLEAR_VARIABLE leaders_who_spoke}
[/event]
# if player runs out of time, display time over message