UtBS S2: rewrite activation of side 2
Implements the previous behaviour via a custom event. Also removes an event which would never be triggered
This commit is contained in:
parent
c1aeb04e93
commit
83a06bc106
1 changed files with 59 additions and 136 deletions
|
@ -192,8 +192,6 @@
|
|||
[event]
|
||||
name=prestart
|
||||
|
||||
{VARIABLE bandits_mobilized 0}
|
||||
|
||||
# Set starting scenario objectives
|
||||
|
||||
[objectives]
|
||||
|
@ -334,27 +332,6 @@
|
|||
{VARIABLE max_ghosts {ON_DIFFICULTY 6 7 8} }
|
||||
[/event]
|
||||
|
||||
# Clears a side's units of their guardian status
|
||||
#define MOBILIZE_SIDE SIDE
|
||||
[store_unit]
|
||||
variable=enemy
|
||||
kill=yes
|
||||
[filter]
|
||||
side={SIDE}
|
||||
[/filter]
|
||||
[/store_unit]
|
||||
[foreach]
|
||||
array=enemy
|
||||
[do]
|
||||
{CLEAR_VARIABLE this_item.ai_special,this_item.status.guardian}
|
||||
[unstore_unit]
|
||||
variable=this_item
|
||||
[/unstore_unit]
|
||||
[/do]
|
||||
[/foreach]
|
||||
{CLEAR_VARIABLE enemy}
|
||||
#enddef
|
||||
|
||||
# Special Encounter events
|
||||
|
||||
# Encounter 1: Scorpions attack
|
||||
|
@ -823,49 +800,77 @@
|
|||
# These are related to the ogre ambush. A player unit being killed by an ogre,
|
||||
# or an ogre being killed by a player unit, changes the behavior of the bandits
|
||||
# whenever they are encountered.
|
||||
[event]
|
||||
name=mobilize_black_hand_bandits
|
||||
[filter_condition]
|
||||
[variable]
|
||||
name=bandits_mobilized
|
||||
boolean_equals=no
|
||||
[/variable]
|
||||
[have_unit]
|
||||
role="Black Lieutenant"
|
||||
[or]
|
||||
role="Black Hand Bandit"
|
||||
[/or]
|
||||
[/have_unit]
|
||||
[/filter_condition]
|
||||
|
||||
[store_unit]
|
||||
variable=bandits
|
||||
kill=yes
|
||||
[filter]
|
||||
role="Black Lieutenant"
|
||||
[or]
|
||||
role="Black Hand Bandit"
|
||||
[/or]
|
||||
[/filter]
|
||||
[/store_unit]
|
||||
[foreach]
|
||||
array=bandits
|
||||
[do]
|
||||
{CLEAR_VARIABLE this_item.ai_special,this_item.status.guardian}
|
||||
[unstore_unit]
|
||||
variable=this_item
|
||||
[/unstore_unit]
|
||||
[/do]
|
||||
[/foreach]
|
||||
{CLEAR_VARIABLE bandits}
|
||||
|
||||
{VARIABLE bandits_mobilized yes}
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=die
|
||||
first_time_only=no
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[filter_second]
|
||||
side=3
|
||||
[not]
|
||||
type=Giant Scorpion
|
||||
[/not]
|
||||
race=ogre
|
||||
[/filter_second]
|
||||
|
||||
[filter_condition]
|
||||
[variable]
|
||||
name=bandits_mobilized
|
||||
less_than=1
|
||||
[/variable]
|
||||
[/filter_condition]
|
||||
|
||||
{MOBILIZE_SIDE 2}
|
||||
{VARIABLE bandits_mobilized 1}
|
||||
[fire_event]
|
||||
name=mobilize_black_hand_bandits
|
||||
[/fire_event]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=die
|
||||
first_time_only=no
|
||||
[filter]
|
||||
side=3
|
||||
[not]
|
||||
type=Giant Scorpion
|
||||
[/not]
|
||||
race=ogre
|
||||
[/filter]
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=ogres_killed
|
||||
equals=3
|
||||
[/variable]
|
||||
[variable]
|
||||
name=bandits_mobilized
|
||||
less_than=1
|
||||
[/variable]
|
||||
[then]
|
||||
{MOBILIZE_SIDE 2}
|
||||
{VARIABLE bandits_mobilized 1}
|
||||
[fire_event]
|
||||
name=mobilize_black_hand_bandits
|
||||
[/fire_event]
|
||||
[/then]
|
||||
[else]
|
||||
{VARIABLE_OP ogres_killed add 1}
|
||||
|
@ -925,82 +930,15 @@
|
|||
speaker=Kaleh
|
||||
message= _ "We need that water, and if we have to go through you to get it, so be it."
|
||||
[/message]
|
||||
{MOBILIZE_SIDE 2}
|
||||
|
||||
{UNCLEAR_FOG}
|
||||
|
||||
[fire_event]
|
||||
name=mobilize_black_hand_bandits
|
||||
[/fire_event]
|
||||
[/then]
|
||||
|
||||
[else]
|
||||
{VARIABLE black_patrol_dialogue 0}
|
||||
[event]
|
||||
name=sighted
|
||||
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
|
||||
[filter_second]
|
||||
role=Black Lieutenant
|
||||
[/filter_second]
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=black_patrol_dialogue
|
||||
equals=0
|
||||
[/variable]
|
||||
[then]
|
||||
[scroll_to_unit]
|
||||
role=Black Lieutenant
|
||||
[/scroll_to_unit]
|
||||
|
||||
{CLEAR_FOG 1 8 44 2}
|
||||
|
||||
[message]
|
||||
role=Black Lieutenant
|
||||
message= _ "We don’t know who you are, and we don’t much care. Tremble before the might of the Black Hand!"
|
||||
[/message]
|
||||
|
||||
[message]
|
||||
speaker=Kaleh
|
||||
message= _ "We need that water, and if we have to go through you to get it, so be it."
|
||||
[/message]
|
||||
|
||||
{VARIABLE black_patrol_dialogue 1}
|
||||
[if]
|
||||
[variable]
|
||||
name=bandits_mobilized
|
||||
less_than=1
|
||||
[/variable]
|
||||
[then]
|
||||
{MOBILIZE_SIDE 2}
|
||||
{VARIABLE bandits_mobilized 1}
|
||||
[/then]
|
||||
[/if]
|
||||
[/then]
|
||||
[/if]
|
||||
{UNCLEAR_FOG}
|
||||
[/event]
|
||||
# events that spark off Bandit mobility:
|
||||
# - a fight between one of the bandits
|
||||
# - and a player unit dying
|
||||
[event]
|
||||
name=attack_end
|
||||
[filter]
|
||||
side=1
|
||||
[/filter]
|
||||
[filter_second]
|
||||
side=2
|
||||
[/filter_second]
|
||||
|
||||
[filter_condition]
|
||||
[variable]
|
||||
name=bandits_mobilized
|
||||
less_than=1
|
||||
[/variable]
|
||||
[/filter_condition]
|
||||
|
||||
{MOBILIZE_SIDE 2}
|
||||
{VARIABLE bandits_mobilized 1}
|
||||
[/event]
|
||||
[event]
|
||||
name=sighted
|
||||
[filter]
|
||||
|
@ -1010,13 +948,6 @@
|
|||
side=1
|
||||
[/filter_second]
|
||||
|
||||
[filter_condition]
|
||||
[variable]
|
||||
name=black_patrol_dialogue
|
||||
equals=0
|
||||
[/variable]
|
||||
[/filter_condition]
|
||||
|
||||
[scroll_to_unit]
|
||||
role=Black Lieutenant
|
||||
[/scroll_to_unit]
|
||||
|
@ -1033,18 +964,11 @@
|
|||
message= _ "We need that water, and if we have to go through you to get it, so be it."
|
||||
[/message]
|
||||
|
||||
{VARIABLE black_patrol_dialogue 1}
|
||||
[if]
|
||||
[variable]
|
||||
name=bandits_mobilized
|
||||
less_than=1
|
||||
[/variable]
|
||||
[then]
|
||||
{MOBILIZE_SIDE 2}
|
||||
{VARIABLE bandits_mobilized 1}
|
||||
[/then]
|
||||
[/if]
|
||||
{UNCLEAR_FOG}
|
||||
|
||||
[fire_event]
|
||||
name=mobilize_black_hand_bandits
|
||||
[/fire_event]
|
||||
[/event]
|
||||
[/else]
|
||||
[/if]
|
||||
|
@ -1752,7 +1676,6 @@
|
|||
[/if]
|
||||
# clearing variables
|
||||
{CLEAR_VARIABLE bandits_mobilized}
|
||||
{CLEAR_VARIABLE black_patrol_dialogue}
|
||||
{CLEAR_VARIABLE ghosts}
|
||||
{CLEAR_VARIABLE ghosts_already_spawned}
|
||||
{CLEAR_VARIABLE ghosts_killed}
|
||||
|
|
Loading…
Add table
Reference in a new issue