Maki¶
Assumptions¶
It is assumed that this enemy is fought alongside Kina and Yin. If either or neither are present, the entire enemy action logic will behave in very unexpected ways.
StartBattle special logic¶
After loading this enemy, the following special adjustements happens to them if flags 614 is true (HARDEST is active):
maxhpandhpgets increased by 10defgets incremented
data usage¶
At the start of the action, if data is null or empty, it's initialised to be 2 element with a starting value of 0.
data[0]: A phase tracker that can have 3 possible states depending on the value:- 0: The initial state, this enemy hasn't gone through a phase transition. From here, the value is only set to 1 in the pre move logic when Yin is no longer present in
enemydata(they died) - 1: This enemy found that Yin is no longer present in
enemydata(they died) in the pre move logic and is ready to perform the phase transition. The value will only be set to 2 when this transition is finished - 2: This enemy completed its phase transition in the pre move logic. From there, it is technically still possible to go through the phase transition again with this value, but it's not going to happen in practice because the phase transition also requires this enemy to not have an AttackUp condition, but an infinite one was inflicted during the phase transition
- 0: The initial state, this enemy hasn't gone through a phase transition. From here, the value is only set to 1 in the pre move logic when Yin is no longer present in
data[1]: A shared cooldown on the usage of either the party wide sword slash move or the charging move. When either move is used,data[1]is set to 2. When either the single or double sword slash moves is used, the value is decremented after the move's usage. The value needs to reach 0 for the party wide sword slash move or the charging move to become usable again. Effectively, it's a shared antispam of 2 actor turns (not counting the one when the combo attack is used if applicable) for the usage of either moves
Move selection¶
5 moves are possible:
- A single target sword slash
- A single target double sword slash
- A party wide aerial sword slash
- Increment
charge, then either prepares a big attack or use a move right away that consumes thecharge - A single target double hitting attack involving the consumption of Kina's actor turn that can also hit a nearby player party member as a collateral hit
Move 5 is always (and only used) when basestate isn't 13 (BattleIdle) meaning move 4 was used previously while Kina was present in enemydata as this cause basestate to change away from 13.
However, it is still possible for move 5 to not actually be used when basestate is 13 if Kina became absent from enemydata (they died since move 4 was used) or they are currently stopped. When this happens while basestate isn't 13, it is set to 13 (alongside the local startstate) and a continue directive is issued to the enemy action loop which restarts the entire action. It effectively means that this enemy will revert to the standard move selection process detailed below which excludes move 5.
As for the other moves, the decision of which move to use is based on odds. However, some moves have additional requirements that must be fufilled for the move to be used if selected. If the move is selected, but their requirements aren't fufilled, either another move will be used or a continue directive will be issued to the enemy action loop which restarts the entire action and effectively rerolls the move selection. The following table contains all these informations for move 1 through 4:
| Move | Odds | Requirements | Falback if requirements aren't fufilled |
|---|---|---|---|
| 1 | 4/13 | None, the move is always used | N/A |
| 2 | 3/13 | HPPercenkinaHPPercent is 0.6 or lowerdata[1] is 0 or lower (the cooldown on this move / the charge move expired) |
A continue directive will be issued to the enemy action loop which restarts the entire action and effectively rerolls the move selection |
| 4 | 3/13 |
|
A continue directive will be issued to the enemy action loop which restarts the entire action and effectively rerolls the move selection |
Pre move logic¶
The following logic always happens before the usage of a move if data[0] is 0 (the phase transition hasn't happened yet) while Yin is no longer present in enemydata (they died):
Wamsound plays- Emoticon called with the
Exclamationemote for 45 time - Yield for 0.5 seconds
- Yield for 0.25 seconds
data[0]is set to 1 (mark the phase transition as starting)- RemoveCondition called to remove the AttackUp condition on this enemy (it's possible Yin inflicted it, but it needs to be removed for the phase transition to work)
From there, because data[0] is above 0 and this enemy doesn't have the AttackUp condition, it meets the requirement for the phase transition logic to occur:
- animstate set to 4 (
ItemGet) Charge7sound plays- ShakeSprite called with 0.1 intensity and 45.0 frametimer
- Yield for 0.5 seconds
- StatusEffect called to inflict the AttackUp condition on this enemy for 999999 main turns (effectively infinite) with effect
- Yield for 0.5 seconds
- If
data[0]is 1 (always the case) and Kina isn't present inenemydata(they died), they are revived with the following logic:- The EntityControl with a
Kinaanimid is obtained by checking all EntityControl childed to thebattlemap - ShakeSprite called on the
Kinaentity with 0.1 intensity and 30.0 frametimer - Yield for 0.5 seconds
- AddNewEnemy called to add a new Kina enemy positioned offscreen at -99.0 in y. NOTE: This bypasses the standard ReviveEnemy process which includes a few differences, but the main ones that matters are:
expandmoneyaren't zeroed outalreadycountedis NOT set to true which means that if the player defeatsKinaagain, their defeated counter in their bestiary entry will increase by 2 instead of 1- ReorganizeEnemies with order is NOT called, but in this specific case, it doesn't change anything:
Kinawill still end up atenemydata[1]either way - Their
hpwon't be restored with a percentage (it gets set to 10 soon after the call instead)
- Yield for a frame
enemydata[lastaddedid]position set to theKinaentity (the one inreservedata)- Heal called on
enemydata[lastaddedid]with 10hp(this doesn't actually do anything logically sinceKinais already at full health here, but it does show thehpcounter visually) enemydata[lastaddedid]'shpis set to 10enemydata[lastaddedid]animstate set to 13 (BattleIdle)- The
Kinaentity found earlier is destroyed. It means only the actual enemy one is left - Yield for 0.5 seconds
- SetText is called in dialogue with the following:
- text:
commondialogue[179] - fonttype: 0 (
BubblegumSans) - linebreak:
messagebreak - tridimensional: false
- position: Vector3.zero
- size: Vector3.one
- parent:
enemydata[lastaddedid](Kina) - caller: null
- text:
- Yield all frames until the message lock is released
- This enemy (
Maki) animstate set to 13 (BattleIdle) - Yield for a frame
- SetText is called in dialogue with the following:
- text:
commondialogue[180] - fonttype: 0 (
BubblegumSans) - linebreak:
messagebreak - tridimensional: false
- position: Vector3.zero
- size: Vector3.one
- parent: This enemy (
Maki) - caller: null
- text:
- Yield all frames until the message lock is released
- The EntityControl with a
data[0]is set to 2 (mark the phase transition as completed)
Post move logic¶
The following logic happens after the usage of the single target single and double sword slash moves:
- If
data[1]is above 0 (the party wide sword slash move and charging move cooldowns), it is decremented
Move 1 - Single sword slash¶
A single target sword slash.
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Always happen | This enemy | playertargetID after GetSingleTarget |
8 | null | {NoDamageAnim, NoSound} | commandsuccess |
Logic sequence¶
- GetSingleTarget called
- Camera moves to look near the midpoint between this enemy and
playertargetentity - animstate set to 110
- Yield for 0.25 seconds
Gleamparticles plays with theGleamsound at this enemy + (0.1, 2.3, -0.1) with 0.5 alivetime- Yield for 0.5 seconds
- Camera moves to look near
playerdata[playertargetID] trailset to trueToss9sound plays with 1.2 pitch- ForceMove to
playertargetentityposition + (2.0, 0.0, -0.1) with 4.0 multiplier with 112 movestate and 113 stopstate - Yield all frames until
forcemovingis done HugeHitsound playstrailset to false- DoDamage 1 call happens
playertargetentityanimstate set to 11 (Hurt), but ifcommandsuccessis true (blocked, ignores FRAMEONE), the animstate is set to 24 (Block) instead- Jump called on
playertargetentitywith an h of theirjumpheight* 2.0 playertargetentity's yspinset to 35.0- Yield for 0.5 seconds
- animstate set to 13 (
BattleIdle) - Yield all frames (up to 30.0 frames) until both this enemy and
playertargetentityareonground - DeathSmoke particles plays at
playertargetentityposition playertargetentity'sspinzeroed outplayertargetentityanimstate set to 18 (KO)- Yield for 0.5 seconds
Move 2 - Double sword slash¶
A single target double sword slash.
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Always happen | This enemy | playertargetID after GetSingleTarget |
5 | null | {NoDamageAnim, NoSound} | commandsuccess |
| 2 | Always happen | This enemy | The same target as DoDamage 1 | 5 | null | {NoDamageAnim, NoSound} | commandsuccess |
Logic sequence¶
- GetSingleTarget called
- Camera moves to look near the midpoint between this enemy and
playertargetentity Slash2sound plays- ShakeSprite called with 0.1 intensity and 45.0 frametimer
- animstate set to 115
- Yield for 0.25 seconds
- Yield for 0.5 seconds
- Camera moves to look near
playerdata[playertargetID] trailset to trueToss9sound plays with 1.2 pitch- ForceMove to
playertargetentityposition + (2.0, 0.0, -0.1) with 4.0 multiplier with 112 movestate and 113 stopstate - Yield all frames until
forcemovingis done HugeHitsound playstrailset to false- DoDamage 1 call happens
playertargetentityanimstate set to 11 (Hurt), but ifcommandsuccessis true (blocked, ignores FRAMEONE), the animstate is set to 24 (Block) instead- Jump called on
playertargetentitywith an h of theirjumpheight* 2.0 playertargetentity's yspinset to 35.0- Yield for 0.5 seconds
Toss7sound plays- Camera moves a bit up
- Yield all frames until
playertargetentity'srigidy velocity reaches 0.0 or below (they start to fall) - LockRigid called on the
playertargetentityto lock theirrigid(prevents them to fall further) - animstate set to 116
- y position increased by 1.0
- SetAnimForce called
- z
spinset to 20.0 - Jump called with an h of 25.0
- Yield all frames until this enemy's
rigidy velocity reaches 0.0 or below (they start to fall) spinzeroed outspriteangles reset to Vector3.zero- animstate set to 106
- SetAnimForce called
- x position decreased by 0.5 and y position decreased by 1.0
- Yield all frames until this enemy y position becomes equal or lower than
playertargetentity's y position - Camera moves a bit to the left
- animstate set to 107
- ShakeScreen called with 0.2 ammount and 0.5 time with dontreset
HugeHit14sound plays- DoDamage 2 call happens
- ForceMove called on
playertargetentityto 0.0 in y with 7.0 multiplier using their current animstate as movestate and 18 (KO) as stopstate - Yield all frames (up to 30.0 frames) until both this enemy and
playertargetentityareonground - ShakeScreen called with 0.3 ammount and 1.0 time with dontreset
Thud4sound playsDirtExplodeparticles plays atplayertargetentityposition- DeathSmoke particles plays at
playertargetentityposition playertargetentity'sspinzeroed outplayertargetentityanimstate set to 18 (KO)- Yield for 0.5 seconds
Move 3 - Party wide aerial sword slash¶
A party wide aerial sword slash.
PartyDamage¶
| # | Conditions | caller | damage | property | block | jumpheight | spinammount | jumpevenonblock | overrides |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Always happen | This enemy | 6 | null | commandsuccess |
0.0 | Vector3.zero | false | null |
Logic sequence¶
data[1]is set to 2 (this is the shared cooldown of this move and the charging one)- Camera moves to look near the midpoint between this enemy and
partymiddle Charge10sound plays with 1.1 pitch- ShakeSprite called with 0.1 intensity and 45.0 frametimer
- animstate set to 110
- Yield for 0.25 seconds
Gleamparticles plays with theGleamsound at this enemy + (0.1, 2.3, -0.1) with 0.5 alivetime- Yield for 0.5 seconds
- Camera moves to look near
partymiddle - animstate set to 116
- y position increased by 1.0
- SetAnimForce called
- z
spinset to 20.0 - Over the course of 51.0 frames, this enemy moves to
partymiddle+ 5.0 in y via a BeizierCurve3 with a ymax of 6.0 spinzeroed outspriteangles reset to Vector3.zero- animstate set to 106
- SetAnimForce called
- ForceMove called to move + 1.0 in y with 20.0 multiplier using 106 as movestate and stopstate
- Yield all frames until
forcemovingis done trailset to true- Camera moves a bit to the left
- ForceMove called to
partymiddlewith 5.0 multiplier using 106 as movestate and 107 as stopstate - Yield all frames until
forcemovingis done trailset to false- ShakeScreen called with 0.3 ammount and 1.0 time with dontreset
BigHitsound playsimpactsmokeparticles plays atpartymiddle- For each player party members:
- Jump called on them with an h of 15.0
- y
spinset to 20.0
- PartyDamage 1 call happens
- Yield for 0.25 seconds
- Yield all frames (up to 100.0 frames) until
playerdata[0](usuallyBee) isonground - For each player party members:
- DeathSmoke particles plays at their position
spinzeroed out on them
- Yield for 0.5 seconds
Move 4 - Increments charge, then prepares a big attack or use a move¶
Increment charge, then either prepares a big attack or use a move right away that consumes the charge. No damages are dealt.
dontusecharge set to true¶
This move sets dontusecharge to true if Kina is present which means charges will not get zeroed out in post action. If Kina is absent, it may be set to false instead which causes no changes.
Logic sequence¶
data[1]is set to 2 (this is the shared cooldown with this move and the party wide sword slash one)- If either Kina is present or
chargeis 0 (the latter should always be the case):- Camera moves to look near this enemy
- ShakeSprite called with 0.1 intensity and 45.0 frametimer
- animstate and
basestateset to 110 (this slate the usage of the combo attack on the next actor turn, but this will be undone later if Kina isn't present meaning they died) Charge7sound plays- Yield for 0.5 seconds
chargeis incremented- StatEffect called on this enemy with type 4 (green up arrow)
StatUpsound plays- Yield for 0.5 seconds
- If Kina is present, the local startstate is set to
basestate
- If Kina is absent (they died),
basestateis set to 13 (prevents the combo attack to be used on the next actor turn) and a continue directive is issued to the enemy action loop which restarts the action and effectively uses another move immediately, but it can only be the single or double sword slash move sincedata[1]'s antispam is in effect
Move 5 - Combo attack with Kina¶
A single target double hitting attack involving the consumption of Kina's actor turn that can also hit a nearby player party member as a collateral hit.
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Always happen | This enemy | playertargetID after GetSingleTarget |
6 | null | {NoDamageAnim, NoSound} | commandsuccess |
| 2 | Always happen | This enemy | The same playertargetID as DoDamage 1 |
5 | null | {NoDamageAnim} | commandsuccess |
| 3 | Happens if there's at least 1 player party member alive (hp above 0 and not eatenby) after DoDamage 2 |
null | The last playerdata element whose hp is above 0 and is not the target of DoDamage 1 and 2 |
4 | null | null | commandsuccess |
Logic sequence¶
- The
enemydataindex of Kina is obtained - This enemy
basestateand the local startstate set to 13 (prevents the usage of this move on the next actor turn) - SetText is called in dialogue with the following:
- text:
commondialogue[181] - fonttype: 0 (
BubblegumSans) - linebreak:
messagebreak - tridimensional: false
- position: Vector3.zero
- size: Vector3.one
- parent: This enemy (
Maki) - caller: null
- text:
- Yield all frames until the message lock is released
- GetSingleTarget called
- Yield for a frame
Kinaanimstate set to 103Toss3sound playsSlash2sound plays- This enemy animstate set to 115
- Yield for 0.5 seconds
- DeathSmoke particles plays at
Kina's position with a size of 2.0x - Yield for a frame
Kinaposition set toplayertargetentityposition + (4.0, 15.0, -0.1)Kina'strailset to trueKinaanimstate set to 104- Yield for 0.5 seconds
- Camera moves to look neat
playerdata[playertargetID] - This enemy's
trailset to true - ForceMove called on this enemy to move them to
playertargetentityposition + (2.0, 0.0, -0.1) with 4.0 multiplier using 112 as movestate and 113 as stopstate - Yield all frames until
forcemovingis done - This enemy's
trailset to false Toss9sound plays with 1.2 pitchHugeHitsound plays- Camera moves a bit up right and zooms in
- ShakeScreen called with 0.2 ammount and 0.5 time with dontreset
- DoDamage 1 call happens
playertargetentityanimstate set to 11 (Hurt)- Jump called on
playertargetentitywith an h of theirjumpheight* 2.0 playertargetentity's yspinset to 35.0- Yield all frames until
playertargetentity'srigidy velocity becomes 0.0 or below (they start falling) - This enemy animstate set to 13 (
BattleIdle) - MainManager.ArcMovement called on this enemy to move them to startp with 10.0 height and 30.0 frametime (done in parallel)
Kina'sspritez angle set to -20.0- ForceMove called on
Kinato move them toplayertargetentityposition + 1.5 in y with 27.0 multiplier using 104 as movestate and 105 as stopstate Toss12sound plays- Yield all frames until
forcemovingis done - Yield for 0.1 seconds
- DoDamage 2 call happens
- SetDefaultCamera called
Kinaanimstate set to 101Kina's zspinset to 30.0Kina'sspritelocal y position increased by 1.0- SetAnimForce called on
Kina Woosh5sound plays with 0.8 pitch- MainManager.ArcMovement called on
Kinato move them to their position before this action with 3.0 height and 30.0 frametime (done in parallel) playertargetentity'sspinmultiplied by -1.0 (it inverts their existing yspin)- If there's at least 1 player party member alive (
hpabove 0 and not eatenby), the first one inplayerdataorder whosehpis above 0 and it'splayertargetIDwill be set to receive the collateral damage - ForceMove called to move
playertargetentityto either the collateral hit receiver position + 1.0 in y if it exists or to their position before this action if it doesn't with 30.0 multiplier using 11 (Hurt) as movestate and stopstate - Yield for 0.5 seconds
Dropsound playsKina'strailset to falseKina'sspinzeroed outKina's animstate set to 106Kina'sspriteangles reset to Vector3.zeroKina's position set to the value before this action- SetAnimForce called on
Kina - Yield for a frame
- If the collateral receiver exists:
- DoDamage 3 call happens
- MainManager.ArcMovement called on
playertargetentityto move them to their position before this action with 4.0 height and 30.0 frametime (done in parallel)
- DeathSmoke particles plays at
playertargetentityposition playertargetentityanimstate set to 18 (KO)playertargetentity'sspinzeroed out- Yield for 0.5 seconds
Kina'scantmovegets incremented (meaning they will not be able to act this main turn)