Acolyte and AcolyteVine
EventDialogue¶
These 2 enemies have a special interactions where it is possible for an Acolyte
to spawn an AcolyteVine
and get on top of it which changes their position to Flying
. Dropping down to Ground
from there can only happen in 2 ways:
Acolyte
gets an actor turn where they attack and then drop toGround
also killing theirAcolyteVine
Acolyte
orAcolyteVine
dies
Acolyte
is assumed to have cantfall set to true meaning it's not possible for the player to make them drop down without them doing their aerial strike unless Acolyte
or AcolyteVine
dies. The problem is this isn't something that the damage pipeline can accomdate and there's also the issue that if either dies, Acolyte
needs to drop down first and AcolyteVine
needs to die before Acolyte
gets killed if they were defeated.
This is why an EventDialogue for either enemies exists on their eventondeath: it allows the game to ensure that this drop down logic occurs as well as making sure that AcolyteVine
dies no matter if they died or Acolyte
did. It also handles other custom logic as part of the drop down that the damage pipeline cannot handle.
About status resistance¶
If Acolyte
's hp
is above 0 when this EventDialogue triggers, the dropdown logic will undo any resitance increases of Poison, Freeze, Numb and Sleep conditions.
Logic sequence¶
If there's more than 1 enemy party members:
Acolyte
andAcolyteVine
'senemydata
indexes are obtained if they exists- If
AcolyteVine
is present:AcolyteVine
animstate set to 18 (KO
)AcolyteVine
's yspin
set to 20.0AcolyteVine
'srotater
gets a DialogueAnim added that will cause them to shrink to Vector3.zeroVine2
sound plays- If
Acolyte
'shp
is above 0, their animstate is set to 11 (Hurt
) - ShakeScreen called with an ammount of (0.05, 0.05, 0.05) and 0.5 time
- Yield for 0.6 seconds
- If
Acolyte
'shp
is above 0,Fall
sound plays ChargeDown
sound plays- Over the course of 20.0 frames:
- If
Acolyte
'shp
is above 0,Acolyte
'sheight
lerped from 3.4 to 0.2. Otherwise,ItemBounce0
plays on the first frame only AcolyteVine
'sstartscale
changes towards Vector3.zeroAcolyteVine
's position increases by framestep * -0.2 each frame
- If
AcolyteVine
moved offscreen at 9999.0 in y- If
Acolyte
'shp
is above 0:- Jump called on
Acolyte
- Yield for 0.5 seconds
- Yield all frames until
Acolyte
isonground
- Yield for 0.2 seconds
Acolyte
's position changed toGround
AcolyteVine
is destroyedAcolyte
'sheight
set to 0.0Acolyte
'ssprite
local position reset to Vector3.zeroAcolyte
'sbasestate
set to 13 (BattleIdle
)Acolyte
'scursoroffset
,poisonres
,freezeres
,numbres
andsleepres
are reset to their default value from GetEnemyData without createentity
- Jump called on
- If
Acolyte
is still present, but theirhp
is 0:Acolyte
'seventondeath
set to -1 (so this EventDialogue isn't recursively called)- A CheckDead is done which will cleanly kill
Acolyte
Otherwise (if the enemy killed just now is the only one left which is normally Acolyte
):
- The enemy's
eventondeath
set to -1 (so this EventDialogue isn't recursively called) - A CheckDead is done which will cleanly kill the enemy
In either case, ReorganizeEnemies is called