Icefall¶
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Done for each enemy party member that fufills these conditions:
|
playerdata[currentturn] |
The enemy party member | playerdata[currentturn].atk |
Freeze | Empty array | false |
Icicle launch¶
This action doesn't feature an action command, but it does feature some logic involving an icicle being launch at an angle determined by the player. In a way, it's a "fake" action command because it's logic specific to this action, but it does involve user inputs.
The way it works is after some initial animations, a new UI object called crosshair is created rooted to the scene with a sprite of guisprites[41] (a crosshair without its ring) on layer 15 (3DUI).
From there, all frames are yielded until the Confirm input is pressed, but before the yield, the crosshair z angle and x/y position changes. The angle is only for visual effects (it gets incremented by 5x the game's frametime each frame), but the position is what affects the action's logic. The x and y changes with a sin and cos curve respectively (the t term is Time.time):
- x: sin(5t) * 3.25 + 3.5
- y: cos(2x) * 2 + 2.5
This can be summarised by the following:
- The x varies between 0.5 and 6.75 with a period of 2pi / 5 (~1.26 seconds)
- The y varies between 0.5 and 4.5 with a period of pi (~3.1416 seconds)
This essentially creates a sort of zig zag movement over a rectangle with a lower left corner at (0.5, 0.5) and an upper right corner at (6.75, 4.5).
However, it should be noted for the y position, the camera's y camoffset will be added to any point if it was above 4.0. This moves the whole rectangle up to line up with the camera and it allows to compensate for a vertically high camera.
The final position when Confirm is pressed will be the one used to call IsInRadius with and for damages to be dealt, the point needs to be less than 3.3 units away from the enemy party member. This test is performed for each enemy party members that aren't OutOfReach or Underground. Damages won't be dealt if the enemy party member is too far away.
This means it allows to target multiple enemy party emmebrs are once, but regardless of where the crosshair lands, damages are dealt or not dealt, there is no analogue variation.
Logic sequence¶
- Camera is set to look at the center
- attacker animstate set to 105
Prefabs/Objects/icecleinstantiated rooted above the party, but with a scale of Vector3.zero and its BoxCollider destroyedSpinsound played onsounds[8]with a pitch of 0.0 on loop- Over the course of 60.0 frames, the
Prefabs/Objects/icecle's scale grows to Vector3.one and its y angle increases continuously until it reaches a 10.0 increment. Also,sounds[8].pitchincreases towards 1.0 - attacker animstate set to 106
- The
crosshairUI object is created like mentioned in the section above Crosshairsound plays onsounds[9]with 0.9 pitch and 0.35 volume on loop- All enemy party members whose position isn't
OutOfReachorUndergroundhave TempCrosshair called on them without groundpos and the return is stored in a temporary array - Yield for a frame
- The Confirm input loop mentioned above occurs, but before each yield,
Prefabs/Objects/icecle's y angle gets incremented by 10.0. This continues indefinetely until the Confirm input is pressed sounds[9]is stopped with a 0.1 fade speedsounds[8]is stopped with a 0.1 fade speedIceMothThrowsound is played- attacker animstate set to 107
crosshairis disabled (this is to stop rendering it, but it is still physically present)Prefabs/Objects/icecleangles are reset to (0.0, 0.0, 45.0 +crosshair's y position * 4.0)- Over the course of 11/200 frames (~18.18),
Prefabs/Objects/icecle's position goes towards thecrosshair's position - All TempCrosshair created earlier gets destroyed
IceMothHitsound playsPrefabs/Particles/mothicenormalinstantiated childed toPrefabs/Objects/iceclewith -90.0 degrees rotation in x and a scale of (2.0, 2.0, 2.0) and destroyed in 5.0 secondsPrefabs/Objects/icecleis destroyed- The position of
crosshairis obtained and the UI object is then destroyed - Each enemy is checked for the DoDamage 1 call and it is performed if applicable as mentioned in the section above
- If DoDamage 1 was called at least once,
AtkSucesssound plays - Yield for 1.0 seconds