EI S06b: fix a couple of small bugs, code improvements (#9707)

* Simplify Owaec/Yannic meet event
* Simplify meeting event after enemy leaders deaths
* Use correct variable in Yannic's last_breath event
* Fix bug with victory message
* Make scenario-ending event non-repeatable
* Simplify time-over event
This commit is contained in:
Thewodoros 2025-01-08 15:35:54 +03:00 committed by GitHub
parent f05b6e32b7
commit f83f5533d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 30 deletions

View File

@ -728,15 +728,11 @@
name=moveto
[filter]
id=Owaec
[/filter]
[filter_condition] # if Owaec moves adjacent to Yannic
[have_unit]
# if Owaec moves adjacent to Yannic
[filter_adjacent]
id=Yannic
[filter_adjacent]
id=Owaec
[/filter_adjacent]
[/have_unit]
[/filter_condition]
[/filter_adjacent]
[/filter]
[fire_event]
name=meet_yannic
[/fire_event]
@ -762,18 +758,20 @@
#po: there were originally 4 of them, and 3 are now defeated
message= _ "Thats almost all the undead leaders defeated!"
[/message]
[fire_event]
name=meet_yannic
[/fire_event]
[if]
[have_unit]
id=Yannic
[/have_unit]
[then]
[fire_event]
name=meet_yannic
[/fire_event]
[/then]
[/if]
[/event]
[event]
name=meet_yannic
[filter_condition]
[have_unit]
id=Yannic
[/have_unit]
[/filter_condition]
[message]
speaker=Owaec
message= _ "Who commands this garrison? Time is short. We must evacuate whats left of your men before—"
@ -831,13 +829,12 @@
# win when any unit reaches the north signpost
[event]
name=moveto
first_time_only=no
[filter]
side=1
x,y=27,1
[/filter]
{MESSAGE_IF_COUNT 4-3 unit _"Ive broken through the undead lines. Follow me before we are overwhelmed!"}
{MESSAGE_IF_COUNT 2-0 unit _"The northern path is clear! Follow me, let us cross the Great River."}
{MESSAGE_IF_COUNT 3-4 unit _"Ive broken through the undead lines. Follow me before we are overwhelmed!"}
{MESSAGE_IF_COUNT 0-2 unit _"The northern path is clear! Follow me, let us cross the Great River."}
[endlevel]
result=victory
bonus=no
@ -980,12 +977,6 @@
[event] # once your turn is over, you can't win, so skip straight to time-over
name=side 1 turn {SCENARIO_TURN_LIMIT} end
[fire_event]
name=time over
[/fire_event]
[/event]
[event]
name=time over
{FIND_NEARBY (type=Skeleton,Skeleton Archer,Revenant,Bone Shooter,Draug,Banebow,Chocobone) 29 34 999}
{SPAWN_IF_UNFOUND 4 (Skeleton) 28 35}
@ -1037,10 +1028,6 @@
animate=no
[/kill]
{KILL id=Dacyn ANIMATE=yes FIRE_EVENT=yes}
[fire_event]
name=defeat
[/fire_event]
[/event]
{ENEMYDEATHS_SORADOC}

View File

@ -245,7 +245,7 @@
speaker=Yannic
message= _ "Alas, I fall..."
[/message]
[if] {VARIABLE_CONDITIONAL saved_yannic equals yes}
[if] {VARIABLE_CONDITIONAL met_yannic equals yes}
[or]
[have_unit]
id=Yannic