FrigidCoffin¶
Many of the logic here is shared by Moth's basic attack. As such, it is assumed that the actor is Moth's player party member.
It is also assumed that this action cannot target a Flying target.
DoCommand calls¶
| # | Conditions | timer | commandtype | data |
|---|---|---|---|---|
| 1 | None | 25.0 | RandomPressKeyTimer | {0.0, 4.0} |
| 2 | DoCommand 1 set commandsuccess to true |
120.0 | SequentialKeys | {3.0} |
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1_a | DoCommand 1 set commandsuccess to true |
Moth's player party member |
availabletargets[target] |
Moth's atk unclamped - 1 + combo after DoCommand 2 (from 0 to 3 inclusive) |
Magic | Empty array | false |
| 1_b | DoCommand 1 set commandsuccess to false |
Moth's player party member |
availabletargets[target] |
Moth's atk unclamped |
null | {NoSound} | false |
Freeze infliction logic¶
Right after the DoDamage 1_a call happens, there is some custom Freeze infliction logic that falls outside of CalculateBaseDamage. Since this DoDamage call doesn't have a Freeze property, it can't inflict it, but the action still can with this custom logic that differs slightly from the one used in the damage pipeline.
The condition will be inflicted if all of the following are true:
- If
combois higher than 2 (all inputs were pressed correctly after DoCommand 2) lastdamageis higher than 0 (DoDamage 1_a dealt more than 0 damage to the target)- target's
freezeresis lower than 100 (it's not immune) - A resistance test passes with target's
freezeres- 30 (- 35 instead ifMothhasStatusBoostmedal equipped).
The resistance test is performed by generating a random number between 0 and 99 inclusive and seeing if this number is at least the calculated resistance. The test pass if it is and fails if it's not. Exceptionally, if the target's freezeres was already 30 or below, the test always passes.
These conditions differs from the ones in the damage pipeline logic. Here's the differences:
- The resitence test has 2 changes:
- The target's
freezeres- 30 is used instead of using thefreezeresdirectly and it also allows anyfreezeresof 30 or below to always pass the test - The
StatusBoostmedal decreases furtherfreezeresby 5 instead of 15. This means that if it is equipped, the resistence used isfreezeres- 35 instead offreezeres- 15
- The target's
- The infliction doesn't require the target to not have the Sturdy condition, but it should be noted that this can't happen under normal gameplay
If all of the above conditions are met, the infliction occurs by doing the following:
- SetCondition called on target to inflict Freeze for 2 turns
- If target's
originalid+ 1's endata'shasiceanimis true, target'siniceset to true - If target's actimmobile is false, its
cantmoveis set to 1 (needs one actor turn before being able to act again) - Freeze is called on the target
- If target's
frozenlastturnis true, itsfreezeresincrements by 25. Otherwise, target'sfreezeresincrements by 13 (18 instead if on HardMode)
However, this logic differs from the one used in the damage pipeline in the following ways:
- The condition is inflicted for 2 turns instead of 1
- The condition is added immediately instead of being a delayed condition. This only has a visual difference: the
Prefabs/Particles/Snowflakesthat normally appears won't appear - The target's
inicebeing set to true condition does not account for being at theGiantLairFridgeInsidemap or in any maps outside of theGiantLairarea. Additionally, it doesn't reset the target's weakness to only containHornExtraDamageif the conditions are fufilled - The damage pipeline logic has no requirements regarding
actimmobilebeing false to setcantmoveto 1. This shouldn't affect anything in practice because other parts of the battle system allows to bypass inaction viaactimmobile - The
freezeresincrease match with the exception that it lacks an increase by 70 that the damage pipeline logic can do. It would have done so if target'soriginalid+ 1's endata'shasiceanimis true while being at theGiantLairFridgeInsidemap or in any maps outside of theGiantLairarea - If the target had a Topple condition, it is not removed unlike the damage pipeline logic
- If the target had a Sleep condition, it is not removed if 0 damage is dealt while it normally would be in the damage pipeline logic. It is removed otherwise by DoDamage as it usually does. Unintuitively, because the damage pipeline logic was incorrect, this ends up workarounding the issue because it allows DoDamage to enforce the correct waking up logic
- The damage pipeline logic normally includes a Drop of the target if its position is
Groundwhile having aheightabove 0.05. While this action doesn't feature this in the freeze infliction logic, a variation of it is included after meaning it applies regardless if the infliction happened or not. The only meaningful difference (as this action is assumed to not be possible onFlyingenemy party members) is theheightrequirements for the drop is being above 0.1 instead of 0.05. This shouldn't affect anything under normal gameplay
Logic sequence¶
- If in
demomode, CreateHelpBox is called with id 2 - Camera is zoomed in at 0.01 speed from the midpoint between
Mothand targetentity IceMothThrowsound playsMothanimstate set to 108- A
Prefabs/AnimSpecific/mothbattlesphereis instantiated a bit up-left fromMothposition with 90.0 degress rotatex in x with aPrefabs/Objects/SingleSphereas child at half transparency. Themothbattlespherewill be destroyed in 2.0 seconds - DoCommand 1 happens
- Yield until DoCommand is done
- Camera is reset to default at 0.3 speed
- A
Prefabs/Particles/mothicenormalappears slighly up from targetentity with x rotation of -90.0 and destroyed in 2.0 seconds Prefabs/Objects/icepillarappears at targetentity with x rotation of -90.0, a DialogueAnim with x/y targetscale of 0.5- If
commandsuccessis true (action command succeeded):Mothanimstate set to 111IceMothHitsound playsicepillar's DialogueAnim targetscale is set to half of the target'ssize- target animstate set to 11 (
Hurt) and notdigging - target's position is set to
Ground - 0.5 seconds yield
Mothanimstate set to 105icepillargets childed to the target'ssprite- Target has LockRigid(true) called
- Over the course of 15.0 frames, the target is lifted up in y to 1.5 * (1 - target's weight / 100.0 clamped from 0.0 to 1.0) and while this happens, the target's y
spinis continuously incremented every frame by 10.0 * (1 - target's weight / 100.0) * the ratio of the 15.0 progression Mothanimstate set to 102- DoCommand 2 call happens
- Frame yield
- Yield until
doingactionis false Mothanimstate is set to 116- Frame yield
- DoDamage 1_a call happens
- The custom freeze infliction logic mentioned above is performed
icepillardestroyed- ShakeScreen called with ammount of (0.1, 0.1, 0.1) and time of 0.1
IceShatterparticles played withIceBreaksound at slightly above the target- 0.5 seconds yield
- target
spinzeroed out - Over the course of 10.0 frames, the target is moved back to its original position
- StopAllCoroutine on the target's
battleentity Mothanimstate set to 118- 0.5 seconds yield
- LockRigid(false) called on the target
- target's
basestaterestored to what it was before - If target's
heightis above 0.1 while its cantfall is false, target'sdroproutineis set to a new Drop call followed by its position set toGround - target's
ongroundset to false
- Otherwise (action command failed):
icepillar's DialogueAnim targetscale is set to (0.4, 0.4, 0.5)Mothanimstate set to 109IceMothMisssound plays- DoDamage 1_b happens
- 1.2 seconds yield
- A
Prefabs/Particles/IceShatterappears slighly up fromMothwith x rotation of -90.0 and destroyed in 1.0 seconds Mothanimstate set to 0 (Idle)
- If
Prefabs/Objects/icepillarstill exists, its DialogueAnim is set to shrink at 0.05 speed