Mothiva1¶
Assumptions¶
This enemy is meant to function with Zasp present as due to their hitaction logic that changes when they are the only one left in enemydata. This enemy also has logic change if Zasp is present or not.
StartBattle special logic¶
After this enemy is loaded on StartBattle, if flags 606 is true (won the second round of the Colosseum), the following happens on this enemy:
hpandmaxhpare increased by 15hardatkis incrementedlockrelayreceiveis set to true
data usage¶
At the start of the action, if data is null or empty, it's initialised to be 1 element with a starting value of 0.
data[0]: The amount of times this enemy revived Zasp fromreservedata. This is used as a deterant on the usage on the reviving move as if all other conditions to use it are satisfied, but this value is 2 or above (1 or above instead if hardmode is true), there is a 51% chance that the kick move is used instead
HardMode changes¶
HardMode being true does the following changes:
- In the music note throw move (party wide version), the note will take 40 frames instead of 50 frames to reach its target leading to the DoDamage call
- In the music note throw move (single targer version), the amount of hits to do changes to be random between 2 and 3 inclusive instead of being random between 1 and 3 inclusive
- The relay move may be used instead of always being redirected to either the music note throw or the kick move
- When deciding to use the revive move, it is now possible with a 51% chance to redirect to the kick move if
data[0]is 1 or above. Normally, this would only have been possible ifdata[0]is 2 or above and pass the 51% RNG check
Move selection¶
6 moves are possible:
- A party wide music note throw
- A single target music note throws that may hit multiple times
- A single target kick attack that may hit multiple times
- Sings which inflicts the DefenseUp condition to Zasp
- Relay her turn which gives an actor turn to Zasp
- Revives Zasp from the
reservedata
Move 6 is special because its decision requires all the following conditions to be true and if they are fufilled, it takes priority over all other moves:
forceattackis -1 (meaning the enemy party isn't affected by BeetleTaunt)reservedataexists and contains Zasp- A 75% RNG check passes
Move 1 and 2 are treated as the same unit during the move selection process and it will be refered to as "move 1-2". When move 1-2 is selected and used, the decision of which move to use among the 2 is based on the following odds:
| Move | Odds |
|---|---|
| 1 | 1/3 |
| 2 | 2/3 |
All the moves except move 6 have base odds which are shown in the following table. However, the decision of the move to use may not be the final one. It is possible the move's logic decides to perform a different move instead which is reffered to as a redirection. Redirections may chain together and they typically happen when proceeding with the move is illogical or undesired.
Here are all the move's base odds and their possible redirections:
| Move | Base odds | Possible redirections |
|---|---|---|
| 1-2 | 3/7 | None |
| 3 | 2/7 | Move 1-2 if HPPercent is higher than 0.6 |
| 4 | 1/7 | |
| 5 | 1/7 | Move 1-2 or 3 determined randomly if any of the following is true1:
|
| 6 | N/A | Move 3 if data[0] (amount of times revive was done) is at least 2 (at least 1 instead if hardmode is true) and a 51% RNG check passes |
1: There is an issue if move 3 or 4 (singing or relay) redirects to move 2 (kick) because nonphysical will remain true even if the kick move was not meant to be nonphysical. This will incorrectly affect the effects of the FrostBite, SpikeBod and PoisonTouch medal if equipped on the target of the kick.
Move 1 - Party wide music note throw¶
A party wide music note throw.
nonphyscal set to true¶
This move always sets nonphyscal to true which affects the effects of the FrostBite, SpikeBod and PoisonTouch medal if equipped on any targets.
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Always happen for each player party member whose hp is above 0 |
This enemy | The player party member | 2 | Pierce1 | null | commandsuccess |
1: Enemy piercing damages are disabled so this property does nothing, see the CalculateBaseDamage documentation to learn more
Logic sequence¶
Prefabs/Particles/MusicSimpleinstantiated near this enemy- animstate set to 103
- All
Sprites/Particles/musicpreloaded Charge4sound plays- Camera moves to look near this enemy
- Yield for 0.5 seconds
- A new GameObject with a SpriteRenderer is created using a random sprite from
Sprites/Particles/musicusing a color of RainbowColor from 0 to 9 variants (determined at random) and a SpinAround with anitselfof (0.0, 0.0, 2.0). The object is positioned at the this enemy + (0.0, 2.0, 0.1) - Over the course of 40.0 frames, the music note moves + 2.5 in y via a lerp, gets scaled to 3x via a lerp and has its SpinAround's
itself's z changed to 20.0 via a lerp - animstate set to 101
Prefabs/Particles/MusicSimplepositioned offscreen and destroyed in 2.0 seconds- Yield for 0.5 seconds
- Camera moves to look near the player party
Launchsound plays- Over the course of 50 frames (40 frames instead if hardmode is true), the music note moves to
partymiddleusing a BeizierCurve3 with a ymax of 9.0 musicexplosionparticles played atpartymiddleimpactsmokeparticles played atpartymiddleBigHitsound plays- ShakeScreen for (0.15, 0.15, 0.15) ammount and 0.25 time
- For each player party members whose
hpis above 0, DoDamage 1 call happens - The music note object is destroyed
- Yield for 0.5 seconds
Move 2 - Single target music note throws¶
A single target music note throws that may hit multiple times.
nonphyscal set to true¶
This move always sets nonphyscal to true which affects the effects of the FrostBite, SpikeBod and PoisonTouch medal if equipped on any targets.
Projectile calls¶
| # | Conditions | damage | property | attacker | playertarget | obj | speed | height | extraargs | destroyparticle | audioonhit | audiomoving | spin | nosound |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Always happen from 1 to 3 times (from 2 to 3 times instead if hardmode is true) | 1 | Pierce1 | This enemy | playertargetID after GetSingleTarget (target is the same for each calls) |
A new GameObject rooted with a SpriteRenderer using a random sprite in Sprites/Particles/music (music note sprites) using a color of a RainbowColor from 0 to 9 variants and a SpinAround with an itself of (0.0, 0.0, 2.0) |
35 (20 instead if hardmode is true) | 0.0 | null | null | PingShot |
null | Vector3.zero | false |
1: Enemy piercing damages are disabled so this property does nothing, see the CalculateBaseDamage documentation to learn more
Logic sequence¶
Prefabs/Particles/MusicSimpleinstantiated near this enemy- animstate set to 103
- All
Sprites/Particles/musicpreloaded StatUp2sound plays- GetSingleTarget called
- The amount of hits is determined which is random between 1 and 3 times inclusive (between 2 and 3 times inclusive instead if hardmode is true)
- Camera moves to look near the midpoint between this enemy and
playertargetentity - Yield for 0.5 seconds
- For each hit to do:
PingUpsound plays- A new GameObject with a SpriteRenderer is created using a random sprite from
Sprites/Particles/musicusing a color of RainbowColor from 0 to 9 variants (determined at random) and a SpinAround with anitselfof (0.0, 0.0, 2.0). The object is positioned at the this enemy + (0.0, 2.0, 0.1) - Over the course of 20.0 frames, the music note moves to 3.0 in y and 0.1 in z via a lerp and has its SpinAround's
itself's z changed to 15.0 via a lerp. For the new x position, it's positioned such that it is equidistant horizontally at the entity's x position -2.0
Prefabs/Particles/MusicSimplepositioned offscreen and destroyed in 2.0 seconds- animstate set to 101
- Yield for 0.5 seconds
- For each hit to do
Pingsound plays with a pitch of 1.0 + the hit index starting from 0 * 0.1- Projectile 1 call happens
- Yield for 0.7 seconds
- Yield all frames until all projectiles fired are destroyed (All Projectile call completed)
- Yield for 0.5 seconds
Move 2 - Kick attack¶
A single target kick attack that may hit multiple times
This may redirect to move 1-2 (either music note throws moves), check the move selection section above for details.
About nonphyscal incorrectly being set to true¶
If this move is performed as a result from a redirection of move 4 or 5 (singing or relay), nonphysical will be set to true, but this move was never supposed to do this meaning this is undesired. This will incorrectly affect the effects of the FrostBite, SpikeBod and PoisonTouch medal if equipped on the target.
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Always happen | This enemy | playertargetID after GetSingleTarget |
2 | null | null if commandsuccess is false (didn't blocked, ignores FRAMEONE) and {NoDamageAnim} if it's true |
commandsuccess |
| 2 | Only happens if commansuccess was false (didn't blocked, ignores FRAMEONE) in DoDamage 1 and if it was, it is done 3 times |
null | The same as DoDamage 1 | 1 | null | null | false |
Logic sequence¶
- GetSingleTarget called
- Camera moves to look near
playertargetentity - MoveTowards
playertargetentity+ (0.6, 0.0, -0.15) with a 1.5 multiplier with 100 walkstate and 104 stop state - Yield for a frame
- Yield all frames until
forcemoveis done - Camera stops targetting anyone
- Yield for 0.1 seconds
MothivaKicksound plays- DoDamage 1 call happens
- If
commandsuccessis false (didn't blocked, ignores FRAMEONE):- Yield for a frame
Turnsound plays- Camera moves slighly down and forward
playertargetentityanimstate set to 11 (Hurt)playertargetentityhas Jump called on them with an h of 15.0playertargetentityyspinset to -15.0- Yield for 0.5 seconds
- Yield all frames until
playertargetentityisonground - Yield for a frame
Death3sound playsplayertargetentity'sspinzeroed outplayertargetentityhas FlipAngle called on them with setangleplayertargetentityanimstate set to 18 (KO)- DeathSmoke particles plays at
playertargetentity - ShakeScreen for 0.1 time
- Yield for 0.5 seconds
- Done 3 times:
- animstate set to 106
- Yield for 0.15 seconds
- animstate set to 107
- DoDamage 2 call happens
playertargetentityhas ShakeSprite called on them for (0.1, 0.0, 0.0) intensity and 0.1 frametimer- Camera moves slightly down and forward
- Yield for 0.235 seconds
- Yield for 0.75 seconds
Move 3 - Singing¶
Sings which inflicts the DefenseUp condition to Zasp. No damages are dealt.
This may redirect to move 1-2 or 3 (either music note throw moves or kick), check the move selection section above for details.
nonphyscal set to true¶
This move always sets nonphyscal to true which affects the effects of the FrostBite, SpikeBod and PoisonTouch medal if equipped on any targets.
NOTE: It also incorrectly affects move 3 (kick) if redirected to it from this move.
Logic sequence¶
- The
enemydataindex of Zasp is obtained - animstate set to 103
Prefabs/Particles/MusicSimpleinstantiated and positioned near this enemyStatUp2sound plays- Yield for 1 second
Zaspanimstate set to 106BugWingFastsound playsStatUpsound plays- SetCondition called on
Zaspto inflict the DefenseUp condition for 2 turns (effectively 1 turn since the main turn gets advanced soon after) - StatEffect on
Zaspwith type 0 (blue up arrow) - Yield for 0.65 seconds
Prefabs/Particles/MusicSimplepositioned offscreen and destroyed in 2.0 seconds
Move 4 - Relay¶
Relay her turn which gives an actor turn to Zasp. No damages are dealt.
This may redirect to move 1-2 or 3 (either music note throw moves or kick), check the move selection section above for details.
nonphyscal set to true¶
This move always sets nonphyscal to true which affects the effects of the FrostBite, SpikeBod and PoisonTouch medal if equipped on any targets.
NOTE: It also incorrectly affects move 3 (kick) if redirected to it from this move.
Logic sequence¶
- The
enemydataindex of Zasp is obtained - animstate set to 4 (
ItemGet) Zaspanimstate set to 2 (Jump)- y
spinset to 15.0 Zasp's yspinset to 15.0Zasp'scantmovedecremented which gives them an extra actor turnRelaysound plays- Yield for 0.5 seconds
spinzeroed outZasp'sspinzeroed outZaspanimstate set to itsbasestate- animstate set to the
basestate
Move 5 - Revive¶
Revives Zasp from the reservedata
This may redirect to move 3 (kick), check the move selection section above for details.
nonphyscal set to true¶
This move always sets nonphyscal to true which affects the effects of the FrostBite, SpikeBod and PoisonTouch medal if equipped on any targets.
Unlike move 4 and 5 (singing and relay), it won't incorrectly affect move 3 (kick) if redirected to it from this move.
Logic sequence¶
- If
data[0]is 0 (no revives was done before):- SetText called in dialogue mode with the following:
- text:
commondialogue[95] - fonttype: 0 (
BubblegumSans) - linebreak:
messagebreak - tridimensional: false
- position: Vector3.zero
- cameraoffset: Vector3.zero
- size: Vector3.one
- parent: this enemy
- caller: null
- text:
- Yield all frames until the message lock is released
- Yield for 0.5 seconds
- SetText called in dialogue mode with the following:
data[0]incremented (the amount of time this move was used)MothivaRessound plays- animstate set to 103
Prefabs/Particles/MusicSimpleinstantiated and positioned near this enemy- Over the course of 40.0 frames, all Light under the
battlemaphas their intensity changed to be halved via a lerp - ReviveEnemy called with Zasp's
reservedataindex leaving them with of 20% ofhpceiled without canmove - The
enemydataindex ofZaspis obtained Prefabs/Objects/Spotlightinstantiated nearZasp- Yield for 1 second
Healsound plays- ShowDamageCounter called with type 1 (HP counter) with an ammount of
Zasp'shpstarting at (0.0, 2.0, 0.0) and ending at (0.0, 1.0, 0.0) - Yield for 0.6 seconds
Zaspanimstate set to 105- Yield for a second
Zaspanimstate set to 13 (BattleIdle)Prefabs/Objects/SpotlightdestroyedPrefabs/Particles/MusicSimplepositioned offscreen and destroyed in 2.0 seconds- Over the course of 40.0 frames, all Light under the
battlemaphas their intensity changed to be their value before this action via a lerp - All Light under the
battlemaphas their intensity set to be their value before this action