Scarlet¶
StartBattle logic¶
This enemy has special logic that occurs after load on StartBattle:
basestateis set to 5 (Angry)
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]: When move 5 is used (the party wide explosion move), this value is set to 4 and decreases at the end of the action including the current actor turn. Everytime that move 5 is selected, it is rerolled if this value is still higher than 0. Effectively, it's a cooldown in amount of actor turns left before being able to use the move again which is 3 full actor turns
HardMode changes¶
HardMode being true does the following changes:
- The HPPercent threshold for getting a 999999 main turns (infinite) AttackUp condition changes to 0.65 from 0.5 until
hpgoes above this threshold at which point, the condition is removed until it reaches the threshold again. This threshold also changes the moment that thehpdrain fraction increases from 1/2 ceiled to 2/3 ceiled for every applicable move except the party wide explosion - On the first actor turn that HPPercent threshold reaches less than 0.4, this enemy will get a 999999 mnain turns (infinite) DefenseUp condition which is never removed
- In the shockwave attack move, the wave takes 25.0 frames instead of 35.0 frames to reach its target
- In the heart projectile attack move, the heart takes 60.0 frames to reach its target instead of 80.0
- In the umbrealla throw move, each half of the umbrealla trajectory takes 50.0 frames instead of 60.0 frames
Move selection¶
7 moves are possible:
- A single target slash attack that drains
hp - A single target shockwave attack
- A single target faster slash attack that inflicts AttackDown and drains
hp - A single target heart projectile attack that inflicts DefenseDown and drains
hp - Have a flower bud appear and inflict AttackUp to themselves
- A party wide explosion attack that drains
hp - A single target umbrella throw that hits twice and drains
hp
The decision of which move to use is based on odds, but the odds changes depending if HPPercent is less than 0.45 or not. Here are the odds in either situations:
| Move | HPPercent >= 0.45 | HPPercent < 0.45 |
|---|---|---|
| 1 | 2/9 | 3/13 |
| 2 | 2/9 | 1/13 |
| 3 | 1/9 | 3/13 |
| 4 | 1/9 | Never used |
| 5 | 1/9 | Never used |
| 6 | 1/9 | 3/13 |
| 7 | 1/9 | 3/13 |
Selecting move 5 however will reroll the move selection if this enemy already has the AttackUp condition.
Selecting move 6 will also reroll the move selection if HPPercent is higher than 0.7 or if data[0] is higher than 0 (meaning the actor turns cooldown on the move hasn't yet expired, see the data usage section for details).
Pre move logic¶
There's logic that always happen at the start of the action. There's 3 parts to it: the inifinite AttackUp, the infinite DefenseUp and some logic that always happen.
Infinite AttackUp¶
If HPPercent is less than 0.5 (0.65 is hardmode is true) and this enemy doesn't already have the AttackUp condition, the following happens to inflict it (it also increases the drain fractions of all moves except the explosion attack from 1/2 to 2/3):
Charge10sound plays- animstate set to 120
- ShakeSrprite called with intensity (0.1, 0.0, 0.0) and 30.0 frametimer
- Yield for 0.5 seconds
- animstate set to 113
StatUpsound plays- StatEffect called on this enemy with type 0 (red up arrow)
- Yield for 0.65 seconds
basestateset to 13 (BattleIdle)- SetCondition called to inflict the
AttackUpcondition on this enemy for 999999 main turns (infinite)
However, if they are above the hp threshold and they have the AttackUp condition with more than 10 turns, it is assumed they received the infinite condition before, but are no longer in the hp threshold. In that case, it is removed by doing the following (it also reverts the drain fractions of all moves except the explosion attack to 1/2):
- RemoveCondition called to remove the
AttackUpcondition on this enemy basestateset to 5 (Angry)
Inifinite DefenseUp¶
If hardmode is true, HPPercent is less than 0.4 and this enemy doesn't already have the DefenseUp condition, the following happens to inflict it (it is never removed):
Charge10sound plays- animstate set to 120
- ShakeSrprite called with intensity (0.1, 0.0, 0.0) and 30.0 frametimer
- Yield for 0.5 seconds
- animstate set to 113
StatUpsound plays- StatEffect called on this enemy with type 1 (blue up arrow)
- SetCondition called to inflict the
DefenseUpcondition on this enemy for 999999 main turns (infinite) - Yield for 0.65 seconds
Logic that always happen¶
The local startstate is always set to basestate (after both of the section above occured).
Post move logic¶
The following logic always happen at the end of the action:
- If
data[0]is higher than 0 (the move 5 cooldown hasn't expired yet), it is decremented
Move 1 - Slash attack¶
A single target slash attack that drains hp.
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Always happen | This enemy | playertargetID after GetSingleTarget |
3 | null | null | commandsuccess |
Logic sequence¶
- GetSingleTarget called
- Camera moves to look near
playerdata[playertargetID] - MoveTowards
playerdata[playertargetID]position + (2.0, 0.0, -0.15) with a 2.0 multiplier - Yield all frames until
forcemoveis done - animstate set to 100
- Yield for 0.25 seconds
Charge10sound plays- ShakeSrprite called with intensity (0.1, 0.0, 0.0) and 20.0 frametimer
- Yield for 0.3 seconds
Gleamparticles plays with theGleamsound at this enemy + (0.25, 2.1, -0.1) with 0.5 alivetime- Yield for 0.3 seconds
- animstate set to 102
- DoDamage 1 call happens
HugeHitsound plays- ShakeScreen called with an ammount of 0.1 and 0.15 time
- Camera moves up and back a bit
playertargetentityhas Jump called on them with an h of 15.0 ifcommandsuccessis false (didn't block, ignores FRAMEONE) or 7.5 if it's true (blocked, ignores FRAMEONE)playertargetentityhas SlowSpinStop called on them with a spinammount of 30.0 in y and 30.0 frametime- Yield for 0.5 seconds
- If
lastdamageis higher than 0, Heal is called to heal this enemy'shpby that value / 2.0 ceiled. That fraction changes to be 2/3 ceiled if the firsthpthreshold is reached (see the pre move logic section above for details) - Yield all frames until
playertargetentityisongroundand has itsspin's magnitude become 0.1 or lower
Move 2 - Shockwave attack¶
A single target shockwave attack.
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 |
3 | null | null | commandsuccess |
Logic sequence¶
- GetSingleTarget called
- Camera moves to look near this enemy
- animstate set to 120
Charge12sound plays- Yield for 0.25 seconds
CherryChargeandCherryBallparticles plays at this enemy position + (0.8, 1.0, -0.1) with a time of -1.0CherryBallparticles has their scale zeroed out- ShakeSrprite called with intensity (0.05, 0.0, 0.0) and 45.0 frametimer
- Over the course of 40.0 frames,
CherryBallparticles has their scale lerped to Vector3.one - Yield for 0.25 seconds
- Camera moves to look near the midpoint between this enemy and
playertargetentity CherryChargeandCherryBallparticles gets destroyed- Yield a frame
Lazer2sound plays- A new
Prefabs/Objects/WaveProjectileobject gets instantiated offscreen at -999.0 in y - animstate set to 117
- Over the course of 35.0 frames (25.0 frames instead if hardmode is true), the
Prefabs/Objects/WaveProjectileobject moves from this enemy + (-1.0, 1.5, 0.0) toplayertargetentityposition + (0.25, 1.25, 0.0) via a lerp and its y scale gets lerped to 1.5 CherryBoomparticles plays atplayertargetentityposition + (0.0, 1.25, -0.1)Prefabs/Objects/WaveProjectilegets destroyed- DoDamage 1 call happens
- Yield for 0.5 seconds
Move 3 - Faster slash attack¶
A single target faster slash attack that inflicts AttackDown and drains hp.
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Always happen | This enemy | playertargetID after GetSingleTarget |
4 | null | null | commandsuccess |
Logic sequence¶
- Camera moves to look near this enemy
- GetSingleTarget called
- animstate set to 120
Charge12sound plays- Yield for 0.25 seconds
CherryChargeandCherryBallparticles plays at this enemy position + (0.8, 1.0, -0.1) with a time of -1.0CherryBallparticles has their scale zeroed out- ShakeSrprite called with intensity (0.05, 0.0, 0.0) and 45.0 frametimer
Woosh3sound plays- Over the course of 30.0 frames,
CherryBallparticles has their scale lerped to Vector3.one - Yield for 0.25 seconds
- Camera moves a bit to the left
CherryChargeandCherryBallparticles gets destroyed- Yield a frame
- animstate set to 101
trailset to true- Over the course of 17.0 frames, this enemy moves to
playertargetentityposition + (1.5, 0.0, -0.15) via a lerp trailset to falseGleamparticles plays with theGleamsound at this enemy + (0.25, 2.1, -0.1) with 0.5 alivetime- Yield for 0.3 seconds
- animstate set to 102
- DoDamage 1 call happens
CherryBoomparticles plays atplayertargetentityposition + (0.0, 1.25, -0.1)HugeHitsound playsStatDownsound plays- StatEffect called on
playertargetentitywith type 2 (red down arrow) - ShakeScreen called with an ammount of 0.1 and 0.15 time
- Camera moves up and back a bit
playertargetentityhas Jump called on them with an h of 15.0 ifcommandsuccessis false (didn't block, ignores FRAMEONE) or 7.5 if it's true (blocked, ignores FRAMEONE)playertargetentityhas SlowSpinStop called on them with a spinammount of 30.0 in y and 30.0 frametime- Yield for 0.5 seconds
- If
lastdamageis higher than 0, Heal is called to heal this enemy'shpby that value / 2.0 ceiled. That fraction changes to be 2/3 ceiled if the firsthpthreshold is reached (see the pre move logic section above for details) - Yield all frames until
playertargetentityisongroundand has itsspin's magnitude become 0.1 or lower - SetCondition called on
playertargetentityto inflict AttackDown for main 2 turns (effectively 1 main turn since the current main turn gets advanced soon after)
Move 4 - Heart projectile¶
A single target heart projectile attack that inflicts DefenseDown and drains hp.
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 |
3 | null | null | commandsuccess |
Logic sequence¶
- GetSingleTarget called
- Camera moves to look near this enemy
- animstate set to 104
- Yield for 0.75 seconds
Kisssound playsLazer3sound plays- animstate set to 105
- A new sprite object is created rooted and offscreen at 999.0 in y using the
Sprites/Particles/plainheartsprite with a color of E57F8C (light red) with a scale of 0.65x and a ShadowLite SetUp with 0.3 opacity and 0.6 size - Yield for 0.3 seconds
- Camera moves to look near
playertargetentity - Over the course of 80.0 frames (60.0 frames instead if hardmode is true),
Sprites/Particles/plainheartmoves from this enemy position + (-1.0, 1.85, -0.1) toplayertargetentityposition + (0.0, 1.0, -0.1). Before each yield, the z angle is set to Sin(Time.time * 3.0) * 10.0 - Camera moves to look near the rooted MainCam object
Sprites/Particles/plainheartgets destroyed- DoDamage 1 call happens
StatDownsound plays- StatEffect called on
playertargetentitywith type 3 (blue down arrow) - SetCondition called on
playertargetentityto inflict DefenseDown for 3 main turns (2 main turns instead ifcommandsuccessis true which means the player blocked ignoring FRAMEONE). Effectively, it's 2 or 1 main turns since the current main turns ends soon after - Yield for 0.5 seconds
- SetDefaultCamera called
- If
lastdamageis higher than 0, Heal is called to heal this enemy'shpby that value / 2.0 ceiled. That fraction changes to be 2/3 ceiled if the firsthpthreshold is reached (see the pre move logic section above for details) - Yield for 0.5 seconds
Move 5 - Flower bud giving AttackUp¶
Have a flower bud appear and inflict AttackUp to themselves. No damages are dealt.
Logic sequence¶
Disappearsound plays- A new
Prefabs/Objects/OpeningFlowerBudobject is created rooted at this enemy position + (0.0, 0.0, -0.1) whose SpriteRenderer color gets set to pure white half opaque - Camera moves look near this enemy
- animstate set to 107
- Yield for 1 second
- The
Prefabs/Objects/OpeningFlowerBud's Animator has theCloseanimation clip played - animstate set to 109
StatUpsound plays- StatEffect called on this enemy with type 0 (red up arrow)
Prefabs/Objects/OpeningFlowerBudgets destroyedCherryBoomparticles plays at this enemy position + (0.0, 1.25, -0.1)- Yield for 0.5 seconds
Move 6 - Explosion attack¶
A party wide explosion attack that drains hp.
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, done for each player party member whose hp is above 0 |
This enemy | The player party member | 3 | null | {BlockSoundOnly} | commandsuccess |
Logic sequence¶
data[0]is set to 4 (meaning this move won't be used until 4 actor turns passes including the current one)- Camera moves to look near this enemy
- animstate set to 111
Charge10sound plays- Yield for 0.4 seconds
- ShakeSrprite called with intensity (0.1, 0.0, 0.0) and 30.0 frametimer
CherryChargeparticles plays at this enemy position + (0.0, 1.5, -0.1) with a time of -1.0- Yield for 0.5 seconds
- Camera moves to look near the player party
- Yield for 0.3 seconds
CherryChargemoved offscreen at 999.0 in yCharge14sound playsGrowingBudsparticles plays at this enemy + (0.15, 2.4, -0.1) with an alivetime of 0.5 and a scale of (1.5, 0.5, 2.0)- Yield for 0.85 seconds
Gleamparticles plays with theGleamsound at this enemy + (0.15, 2.1, -0.1) with 0.5 alivetime- Yield for 0.5 seconds
- animstate set to 113
GrowingBudsparticles has LerpObject called to go -1.0 in y over 100.0 frames with destroyonendCherryChargeparticles gets destroyed in 5.0 secondsExplosion2sound playsFlowerImpactparticles plays at (-4.5, 0.0, 0.0)impactsmokeparticles plays at (-4.5, 0.0, 0.0)- ShakeScreen called with an ammount of 0.1 and 0.15 time
- For each player party members whose
hpis above 0, DoDamage 1 calls happens with them - Yield for 0.75 seconds
- If the sum of all the
lastdamagevalues after each DoDamage 1 calls is higher than 0, Heal is called to heal this enemy'shpby that value clamped from 0 to 8 - Yield for 0.5 seconds
Move 7 - Umbrella throw¶
A single target umbrella throw that hits twice and drains hp.
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 |
3 | null | null | commandsuccess |
| 2 | Always happen after DoDamage 1 | This enemy | Same as DoDamage 1 | 2 | null | null | commandsuccess |
Logic sequence¶
- GetSingleTarget called
- Camera moves to look near the midpoint between this enemy and
playertargetentity Charge10sound plays- animstate set to 100
- Yield for 0.25 seconds
- ShakeSrprite called with intensity (0.1, 0.0, 0.0) and 20.0 frametimer
- Yield for 0.3 seconds
- ShakeSrprite called with intensity (0.15, 0.0, 0.0) and 30.0 frametimer
- Yield for 0.35 seconds
- animstate set to 122
Woosh4sound plays- A new sprite object is created rooted at this enemy position + (0.0, 2.0, -0.1) using the
Sprites/Entities/scarlet[18]sprite (the umbrella) with an AudioSource setup to play theAudio/Sounds/Wooshaudio clip on loop with a volume of MainManager.soundvolume* 2.0 with a maxDistance of 100.0 and a spatialBlend of 1.0 - SetDefaultCamera called
- Over the course of 60.0 frames (50.0 instead if hardmode is true), the umbrella moves to (-15.0, 0.75,
playertargetentity's z position -0.1) and on the first frame that its x position becomes lower than theplayertargetentityx position, DoDamage 1 call happen. This is immeditately followed by the reverse trajectory over the same amount of frames, but on the first frame that the umbrella's x position is higher than theplayertargetentityx position, DoDamage 2 call happens - The umbrella gets destroyed
Tosssound playsDropsound plays with 1.1 pitch and 0.8 volume- animstate set to 102
- Yield for 0.5 seconds
- If the sums of DoDamage 1 and 2's
lastdamagevalues is higher than 0, Heal is called to heal this enemy'shpby that value / 2.0 ceiled. That fraction changes to be 2/3 ceiled if the firsthpthreshold is reached (see the pre move logic section above for details) - Yield for 0.5 seconds