Skip to content

Pisci

Assumptions

It is assumed this enemy is fought alongside Cenn 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):
  • Otherwise (the player is fighting them for the first time):
  • battlepos is increased by 1.0 in x
  • position is set to the new battlepos

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]: A cooldown for using the PisciWall summon moves. When the move is used, the value is set to 2 and it gets decremented in the pre move logic if it is higher than 0. The summon move only becomes usable again if the value is 0 by the time the move selection process occurs and the enemy isn't present already. Effectively, it's an antispam of 1 actor turn on the move's usage

HardMode changes

HardMode being true does the following changes:

  • The odds to heal Cenn by 4 hp when their HPPercen is lower than 0.75 in the pre move logic changes to 41% from 31%
  • In the rocks projectiles throw move, the amount of hits to do changes to be random between 2 and 3 instead of being random between 2 and 4
  • In the rocks projectiles throw move, the speed of each Projectile calls changes to be random between 38.0 and 44.0 instead of being always 47.5

Move selection

2 moves are possible:

  1. A multiple targets rocks projectiles throw
  2. Summons a PisciWall enemy

The decision of which move to use is based on the following odds:

Move Odds
1 1/2
2 1/2

However, if move 2 is selected and a PisciWall is already present or that data[0] is higher than 0 (meaning the cooldown on it hasn't expired yet), move 1 will be used instead.

Pre move logic

The following logic always happen before using a move. It's in 4 parts done in order: data[0] decrement, the first fight event logic, the infinite AttackUp condition logic and the healing Cenn logic.

data[0] decrement

This part only happens if data[0] is higher than 0 (the PisciWall summon cooldown hasn't expired yet):

  • data[0] gets decremented which is the actor turn cooldown on summoning a PisciWall enemy

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 Cenn is lower than 0.5 (if they are present):
  • 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 killing Cenn and Pisci and all this happens BEFORE DoAction gets to resume. Since DoAction can't operate on an empty enemydata, 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 Cenn 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 Cenn logic

This part happens if all of the following conditions are fufilled:

  • Cenn is present
  • Cenn'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 the CrunchyLeaf item sprite positioned at this enemy position + its cursoroffset + (-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 Cenn by 4 hp
  • Yield for 0.5 seconds

Move 1 - Rocks projectiles throw

A multiple targets rocks projectiles 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.

Projectile calls

# Conditions damage property attacker playertarget obj speed height extraargs destroyparticle audioonhit audiomoving spin nosound
1 Always happen from 2 to 4 times (2 to 3 times instead if hardmode is true), but the call and further calls won't happen if there's not at least 1 player party member alive (hp above 0 and not eatenby) 2 null This enemy playertargetID after GetSingleTarget (target changes for each calls) A new sprite object rooted using the MightyPeeble medal sprite positioned at this enemy position + (-0.5, 1.5, -0.1) with a scale of 0.85x 47.5 (random between 38.0 and 44.0 instead if hardmode is true) 3.5 null null null null (0.0, 0.0, 25.0) false

Logic sequence

  • GetSingleTarget called (but this call won't do anything)
  • Camera moves to look near the midpoint between this enemy and playerdata[playertargetID]
  • The amount of hits is determined. It's random between 2 and 4 inclusive (between 2 and 3 inclusive instead if hardmode is true). A SpriteRenderer array is initialised with this amount as the length to hold the projectiles objects
  • For each hit to do, if there's at least 1 player party member alive (hp above 0 and not eatenby):
    • GetSingleTarget called
    • animstate set to 100
    • Toss13 sound plays
    • Yield for 0.166 seconds
    • The projectile element is set to a new sprite object rooted using the MightyPeeble medal sprite positioned at this enemy position + (-0.5, 1.5, -0.1) with a scale of 0.85x
    • Projectile 1 call happens
    • Yield for a random interval between 0.45 and 0.65 seconds
    • animstate set to 0 (Idle)
    • Yield for a frame
  • Yield all frames until all projectiles objects are null (all Projectile 1 calls completed)
  • Yield for 0.5 seconds

Move 2 - PisciWall summon

Summons a PisciWall enemy. No damages are dealt.

The PisciWall is an enemy that has no action logic and thus doesn't need a documentation page. Its only purpose is to be hinderance since it is always the first enemy party member whose poisition is Ground which affects some player actions's targetting.

Logic sequence

  • data[2] is set to 2 (prevents the usage of this move on the next actor turn if PisciWall isn't present by that time)
  • MoveTowards (-0.15, 0.0, 0.0) with 2.0 multiplier using 1 (Walk) as walkstate and 101 as stopstate
  • Camera moves to look near forcetarget
  • Yield all frames until forcemove is done
  • Dig2 sound plays with 0.7 pitch
  • ContinuousSmokeSphere particles plays at this enemy position with -1 alivetime and 0.5x scale
  • Yield for 0.5 seconds
  • checkingdead set to a new SummonEnemy call to summon a PisciWall with type FromGroundKeepScale at (-0.25, 0.0, -0.1)
  • Yield all frames until checkingdead is null (the coroutine completed)
  • enemydata[lastaddedid]'s diebyitself is set to true which allows CheckDead to kill the summoned enemy if they are the only one remaining in the enemy party
  • The ContinuousSmokeSphere particles gets moved offscreen at -9999.0 in y then destroyed in 2.0 seconds
  • Yield for 0.5 seconds