Mantidfly¶
Asumptions¶
It is assumed that this enemy gets loaded with more than 1 moves because the logic assumes this enemy has multiple actor turns per main turn.
HardMode changes¶
HardMode being true does the following changes:
- In the aerial dash move, the amount of frames this enemy takes to move changes to 30.0 frames from 35.5 frames
- In the sky drop move, the DoCommand call (which is a TappingKey) has
barfilldecrease 25% faster each frame. However, this change doesn't affect anything ifmashcommandaltis true making the command a SequentialKeys - In the sky drop move, the amount of frames the drop takes changes to 34.0 frames from 38.0 frames
Move selection¶
3 moves are possible:
- A single target slash attack
- A single target aerial dash attack
- A single target sky drop that the player may prevent from dealing damages
The decision on which move to use is based on odds, but the odds changes depending on if cantmove is 0 or not (0 means this enemy is taking their last available actor turn of the current main turn). Here are the odds in either situations:
| Move | Odds when cantmove isn't 0 |
Odds when cantmove is 0 |
|---|---|---|
| 1 | 1/2 | 2/7 |
| 2 | 1/2 | 2/7 |
| 3 | Never used | 3/7 |
Pre move logic¶
The following logic always happen before using a move:
initialheightset to 2.0- GetSingleTarget called
- If position is
Ground:checkingdeadis set to a new ChangePosition call to change the position toFlying- Yield all frames until
checkingdeadis null (the coroutine completed)
Move 1 - Slash attack¶
A single target slash attack.
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Always happen | This enemy | playertargetID after GetSingleTarget |
3 | Pierce1 | null | commandsuccess |
1: Enemy piercing damages are disabled so this property does nothing, see the CalculateBaseDamage documentation to learn more
Logic sequence¶
- Camera moves to look near
playerdata[playertargetID] - animstate set to 1 (
Walk) - Over the course of 41.0 frames:
heightchanges to 0.0 via a lerp calculated over 60.0 frames- This enemy moves to
playertargetentityposition + (1.5, 0.0, -0.1) via a SmoothLerp - Before each frame yield when
heightis above 0.0 and this enemy'ssoundisn't playing,BugWingsound plays on this enemy'ssound
- animstate set to 100
Growl2sound plays with 1.1 pitch- Yield for 0.5 seconds
Slash3sound plays- DoDamage 1 call happens
- Yield for 0.5 seconds
- position is set to
Ground
Move 2 - Dash attack¶
A single target aerial dash attack.
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Always happen | This enemy | playertargetID after GetSingleTarget |
2 | Sleep | null | commandsuccess |
Logic sequence¶
- animstate set to 101
BugWingFastsound plays- Over the course of 31.0 frames, this enemy moves to + 2.0 in x via a SmoothLerp. Before each frame yield,
heightdecreases by BeizierFloat of 1.0 (will smoothly decrease up to 0.5 then back to no decrease) - ShakeSprite called with an intensity of 0.1 and 30.0 frametimer
- Yield for 0.5 seconds
- animstate set to 104
- Camera moves to look near
playerdata[playertargetID] Toss4sound plays- Over the course of 35.5 frames (30.0 frames instead if hardmode is true), this enemy moves to
playertargetentityposition + (-3.0, 0.0, -0.1) via a BeizierCurve3 with a mid ofplayertargetentityposition + (0.0, 0.0 - this enemyheight, -0.1). On the first frame this enemy x position becomes lower than theplayertargetentityx position, DoDamage 1 call happens - Yield for 0.25 seconds
Move 3 - Sky drop¶
A single target sky drop that the player may prevent from dealing damages.
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 the target.
DoCommand calls¶
| # | Conditions | timer | commandtype | data |
|---|---|---|---|---|
| 1 | None | 165.0 | TappingKey |
|
1: Due to the clamping logic related to this value, it means that the decrease value per frame is 0.005 * the game's frametime when hardmode is false and 0.00625 * the game's frametime when hardmode is true. Effectively, it means that hardmode being true makes barfil decrease 25% more per frame
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Only happens if barfill is less than 0.975 (almost filled) after DoCommand 1 |
This enemy | playertargetID after GetSingleTarget |
5 | null | null | commandsuccess |
Logic sequence¶
- If
heightis above 0.1,BugWingsound plays via PlayMoveSound on loop usingsounds[9] - Camera moves to look near
playerdata[playertargetID] - MoveTowards
playertargetentityposition + (2.0, 0.0, -0.1) with a 2.5 multiplier - Yield all frames until
forcemoveis done sounds[9]stopped- animstate set to 101
- ShakeSprite called with intensity of 0.1 and 30.0 frametimer
- Yield for 0.5 seconds
Grow1sound plays- If
heightis above 0.1,BugWingsound plays via PlayMoveSound on loop usingsounds[9] - Over the course of 11.0 frames, this enemy moves to
playertargetentityposition + (0.5, 0.0, -0.1) via a lerp and theirheightchanges to 0.0 via a lerp - animstate set to 102
playertargetentitygets childed to this enemysprite- Yield for 0.25 seconds
- CreateHelpBox called with 4 (the
TappingKeycommand's help) - DoCommand 1 call happens
- Yield all frames until
doingactiongoes to false, but only waiting up to 166.0 frames. Over the course of this wait, this enemy moves to + 6.5 in y via a lerp - DestroyHelpBox is called which sets
helpboxidto -1 and destroyshelpboxif it existed in 0.5 seconds with shrink before setting it to null - Yield for 0.25 seconds
sounds[9]stopped- If
barfillis 0.975 or higher (the bar was almost filled), the attack is cancelled with the following:playertargetentityanimstate set to 13 (BattleIdle)playertargetentitygets childed tobattlemap- This enemy
heightset to its value before this action - This enemy y position gets decreased by the
heightvalue before this action - This enemy animstate set to 0 (
Idle) - This enemy
flyinganimset to true - Yield all frames until
playertargetentityisonground - SetDefaultCamera called
- This action is over early
- Otherwise (the bar wasn't almost filled):
- Over the course of 51.0 frames, this enemy moves to 15.0 in y via a lerp
- animstate set to 103
- y
spinset to 30.0 spritez angle set to 180.0Fall2sound plays- Over the course of 38.0 frames (34.0 frames instead if hardmode is true), this enemy moves to 1.25 in y via a lerp
- ShakeScreen called with an ammount of (0.2, 0.0, 0.0) with a time of 1.0 with dontreset
Thud3sound plays with 1.1 pitchimpactsmokepartciles plays at this enemy position- DoDamage 1 call happens
spinzeroed outspritez angle set to 180.0- Yield for 0.25 seconds
spriteangles zeroed out- Yield for a frame
playertargetentitygets childed to thebattlemap- animstate set to 0 (
Idle) - Over the course of 31.0 frames, this enemy moves to + 2.0 in x via a lerp and their
heightchanges to the value it had before this action