Midge¶
Assumptions¶
It is assumed that this enemy is loaded with a chargeonotherenemy configured so their hitaction logic works (typically it would be set to Midge so hitting them causes others Midge to enter in a hitaction).
HardMode changes¶
HardMode being true does the following changes:
- The odds of move usage changes to be 1/2 for either move instead of being 3/5 for the aerial strike and 2/5 for the bite
hitaction support¶
This enemy supports hitaction logic and it will be performed when hitaction is true. The pre move logic and the aerial strike move will be done immediately after.
Logic sequence¶
- Emoticon called with the
Exclamationemote with a time of 35 chargeis incrementedWamsound plays- Yield all frames until
emoticoncooldownexpires - Move 1 (aerial strike) is immediately used
Move selection¶
2 moves are possible:
- A single target aerial strike
- A single target bite attack that may drain
hp
The odds to use each move depends on if hardmode is true or note:
| Move | Odds if hardmode is false | Odds if hardmode is true |
|---|---|---|
| 1 | 3/5 | 1/2 |
| 2 | 2/5 | 1/2 |
However, in a hitaction, Move 1 is always used after the hitaction logic mentioned in the section above.
Pre move logic¶
There's logic that happens before each moves, but after the hitaction logic if position is Ground:
checkingdeadis set to a new GotoPos coroutine on this enemy to change its position toFlying(checkingdeadis set to null when the coroutine completes)- Yield a frame
- Yield all frames until
checkingdeadis null
Here is what the coroutine effectively ends up doing:
- Over the course of 20.0 frames,
heightis lerped toinitialheight bobrangeandbobspeedset tostartbfandstartbsrespectivelyheightset toinitialheight- position set to
Flying checkingdeadset to null informing the caller that the coroutine is done
Move 1 - Aerial strike¶
A single target aerial strike.
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Always happen | This enemy | playertargetID after GetSingleTarget |
1 | Pierce1 | null | commandsuccess |
1: Enemy piercing damages are disabled so this property does nothing, see the CalculateBaseDamage documentation to learn more
Logic sequence¶
- Yield a frame
- GetSingleTarget called
- Camera moves to look near this enemy
PingUpsound plays- animstate set to 100
- Over the course of 40.0 frames,
heightincreases by 2.0 via a lerp - animstate set to 23 (
Chase) trailset to truespritez angle set to 20.0- Camera moves to look near
playertargetentity PingShotsound playsFastWooshsound plays- Over the course of 20.0 frames,
heightis lerped to 1.0 and position is lerped to from startp toplayertargetentityposition + (1.0, 0.0, -0.1) trailset to false- DoDamage 1 call happens
- Yield for 0.2 seconds
spriteangles reset to Vector3.zero- Over the course of 20.0 frames,
heightis lerped toinitialheightand position is lerped to +1.5 in x
Move 2 - Bite attack¶
A single target bite attack that may drain hp.
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Always happen | This enemy | playertargetID after GetSingleTarget |
2 | Pierce1 | null | commandsuccess |
1: Enemy piercing damages are disabled so this property does nothing, see the CalculateBaseDamage documentation to learn more
Logic sequence¶
- Yield a frame
- GetSingleTarget called
- Camera moves to look near
playerdata[playertargetID] BugWingsound plays on loop- Over the course of 50.0 frames, position is lerped to
playertargetentityposition + (2.0, 0.0, -0.2) - animstate set to 0 (
Idle) - Over the course of 15.0 frames, position is lerped to
playertargetentityposition + (0.5, 0.0, -0.1) andheightis lerped to 1.15 +playertargetentity.animid* 0.2 BugWingsound stoppedrotatergets a SpriteBounce added and MessageBounce called on it which will make the sprite stretch and squeeze periodically- animstate set to 101
- ShakeSprite called on
playertargetentitywith intensity (0.1, 0.0, 0.0) and 0.5 frametimer Kisssound plays with 0.85 pitch and 0.9 volume- For the next 30.0 frames,
playertargetentityanimstate is set to 11 (Hurt) unlessblockcooldownhasn't expired for this frame where it's set to 24 (Block) instead - Camera moves to look a bit up right
- DoDamage 1 call happens
- If
commandsuccessis false (didn't block, ignores FRAMEONE), Heal is called to heal this enemy bylastdamageamount ofhp - The SpriteBounce added earlier is destroyed
- Yield a frame
rotaterscale is set to the one before this action- animstate set to 0 (
Idle) - Over the course of 20.0 frames,
heightis lerped toinitialheightand position is lerped to be +1.5 in x - Yield for 0.5 seconds