Cenn
¶
Assumptions¶
It is assumed this enemy is fought alongside Pisci as they have several interactions together that would work unexpectedly if a fight is started without the presence of both enemy party members at once.
It is also assumed that this enemy is loaded with their eventondeath set to the proper EventDialogue because it allows the first fight to end early in case this enemy dies before their HPPercent becomes lower than 0.5. On the second fight, the StartBattle logic will disable it.
StartBattle special logic¶
This enemy has special logic after being loaded in StartBattle:
- If flags 497 is true (after beating
Cenn
and Pisci the first time):eventondeath
is set to -1 which disables their EventDialogue
- Otherwise (the player is fighting them for the first time):
- AlwaysSurvive is added to this enemy's weakness
battlepos
is increased by 1.0 in x- position is set to the new
battlepos
HardMode changes¶
HardMode being true does the following changes:
- The odds to heal Pisci by 4
hp
when their HPPercen is lower than 0.75 in the pre move logic changes to 41% from 31% - In the stick boomerang throw move, the amount of frames the stick takes to reach its target changes to 36.0 on the first movement and 46.0 frames on the second movement instead of being 44.0 frames on the first movement and 54.0 frames on the second movement
Move selection¶
2 moves are possible:
- A single target double hitting stick boomerang throw
- A single target stick slash attack
The decision of which move to use is based on the following odds:
Move | Odds |
---|---|
1 | 1/2 |
2 | 1/2 |
Pre move logic¶
The following logic always happen before using a move. It's in 3 parts done in order: the first fight event logic, the infinite AttackUp condition logic and the healing Pisci logic.
First fight event logic¶
This part only happens if flags 497 is false meaning this is the first time to player fights Cenn
and Pisci:
- If HPPercent of this enemy or Pisci is lower than 0.5 (if they are present):
- EventDialogue 15 is triggered
- Yield all frames until
inevent
is false (if the EventDialogue above was triggered, it effectively stalls DoAction entirely until the battle almost ends)
NOTE: If the EventDialogue is triggered here, it won't prevent DoAction from running while ReturnToOverworld without flee is ongoing. This creates a problem because the EventDialogue runs a ReorganizeEnemies which clears
enemeydata
due to killingCenn
and Pisci and all this happens BEFORE DoAction gets to resume. Since DoAction can't operate on an emptyenemydata
, it will immediately throw an IndexOutOfRange excpetion. Fortunately, this throw is inconsequential because ReturnToOverworld is still ongoing and the battle would already be in a terminal flow by this point. Effectively, the battle will still end without consequences because DoAction can't race against this process anyway before it throws and gets destroyed due to the battle teardown process.
Infinite AttackUp condition logic¶
This part only happens if Pisci is not present in the enemy party and that this enemy doesn't already have the AttackUp condition:
Wam
sound plays- Emoticon called on this enemy with the
Exclamation
emote for 30 time - Yield for 0.5 seconds
- StatusEffect called to inflict the AttackUp condition on this enemy for 999 main turns (effectively infinite) with effect
- Yield for 0.5 seconds
Healing Pisci logic¶
This part happens if all of the following conditions are fufilled:
Pisci
is presentPisci
's HPPercent is less than 0.75- A 31% RNG check passes (41% instead if hardmode is true)
If all of the above are fufilled:
Ping2
sound plays- Emoticon called on this enemy with the
Exclamation
emote for 30 time - Yield for 0.5 seconds
- A new sprite object is created childed to the
battlemap
using theCrunchyLeaf
item sprite positioned at this enemy position + itscursoroffset
+ (-0.4, -0.1, -0.1) - animstate set to 4 (
Angry
) ItemHold
sound plays- Yield for a second
- The item sprite gets destroyed
- animstate set to the local startstate
- Heal called to heal
Pisci
by 4hp
- Yield for 0.5 seconds
Move 1 - Stick boomerang throw¶
A single target double hitting stick boomerang 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 the target.
DoDamage calls¶
# | Conditions | attacker | target | damageammount | property | overrides | block |
---|---|---|---|---|---|---|---|
1 | Always happen | This enemy | playertargetID after GetSingleTarget |
2 | null | null | commandsuccess |
2 | Always happen | This enemy | Same target as DoDamage 1 | 1 | null | null | commandsuccess |
Logic sequence¶
- GetSingleTarget called
- Camera moves to look near the midpoint between this enemy and
playerdata[playertargetID]
- animstate set to 102
- Yield for 0.5 seconds
Woosh4
sound plays- animstate set to 103
Woosh
sound plays on loop usingsounds[9]
with 1.2 pitch- A new sprite object is created childed to the
battlemap
using theprojectilepsrites[16]
sprite (a branch stick) positioned at this enemy position + (-0.35, 1.25, -0.1) - Over the course of 44.0 frames (36.0 frames instead if hardmode is true), the stick moves to a SmoothLerp result via a lerp to its position where it changes to
playertargetentity
position + (-7.5, 1.25, -0.1) where the first half is a lerp and the second half is a SmoothStep of each of the vector's components. Before each frame yield, the stick's z angle is increased by 25.0x the game's frametime. On th first frame that the stick x position becomes lower thanplayertargetentity
x position, DoDamage 1 call happens - Over the course of 54.0 frames (46.0 frames instead if hardmode is true), the stick moves to a SmoothLerp result via a lerp to its position where it changes to this enemy position + (0.9, 1.25, -0.1) where the first half is a lerp and the second half is a SmoothStep of each of the vector's components. Before each frame yield, the stick's z angle is increased by 25.0x the game's frametime. On th first frame that the stick x position becomes higher than
playertargetentity
x position, DoDamage 2 call happens sounds[9]
is stopped- The stick object is destroyed
- animstate set to 104
- Yield for 0.5 seconds
Move 2 - Stick slash attack¶
A single target stick slash attack.
DoDamage calls¶
# | Conditions | attacker | target | damageammount | property | overrides | block |
---|---|---|---|---|---|---|---|
1 | Always happen | This enemy | playertargetID after GetSingleTarget |
2 | null | null | commandsuccess |
Logic sequence¶
- GetSingleTarget called
- Camera moves to look near
playerdata[playertargetID]
- Yield all frames until
forcemove
is done Slash2
sound plays- Yield for 0.5 seconds
- animstate set to 101
- DoDamage 1 call happens
- Yield for 0.5 seconds