Weevil¶
HardMode changes¶
HardMode being true does the following changes:
- The enemy party member chewing move, if all other conditions applies, has a 8/10 chance to occur instead of 5/10
- In the enemy party member chewing move, this enemy now gets healed their
hpto theirmaxhpinstead of 5hp - In the player party member chewing move, the odds to gain an AttackUp conditions if it wasn't already inflicted changes to 5/10 from 3/10
Move selection¶
2 moves are possible:
- A single target chewing attack
- Chews on the first Seedling, AngryPlant or FlyTrap among the enemy party which defeats them, but drains their
hp
Move 2 is always used if all of the following conditions are fufilled:
- HPPercent is less than 0.65
- A 5/10 RNG check passes (8/10 instead if hardmode is true)
- A Seedling, AngryPlant or FlyTrap is present among the enemy party
- The applicable enemy party member's position is
Ground
If these conditions aren't all fufilled, move 1 is always used instead.
Pre move logic¶
Before the move, the first enemydata index who is a Seedling, AngryPlant or FlyTrap is obtained if one exists. This is done to both check if move 2 can be used and also to get the right enemydata index for it.
Move 1 - Chewing attack on player party member¶
A single target chewing attack.
DoDamage calls¶
| # | Conditions | attacker | target | damageammount | property | overrides | block |
|---|---|---|---|---|---|---|---|
| 1 | Always happen | This enemy | playertargetID after GetSingleTarget |
3 | null | null | commandsuccess |
Logic sequence¶
- If this enemy doesn't already have the AttackUp condition and a 3/10 RNG check passes (5/10 instead if hardmode is true):
- Camera moves to look near this enemy zoomed in
WeevilAwoosound plays- animstate set to 100
- Yield for 0.8 seconds
- StatEffect called with type 0 (red up arrow)
- SetCondition called to inflict the AttackUp condition on this enemy for 2 main turns
- Yield for 0.75 seconds
- GetSingleTarget called
- Camera moves to look near
playertargetentitiy - MoveTowards
playertargetentityposition + (1.0, 0.0, -0.1) at 2.0 multiplier using 23 (Chase) as walkstate and 103 as stopstate - Yield all frames until
forcemoveis done playertargetentity's yspinset to 15.0- Done 4 times:
- position set to (
playertargetentityx position +/- 1.5, 0.0,playertargetentityz position - 0.1). The x position offset is -1.5 on the first and third time while it's +1.5 on the second and fourth time - FaceTowards
playertargetentity spriteangles set to its FlipAngleChewsound plays with volume 1.1 + 0.1 * the 0 based index of this loop- For the next 10.0 frames,
playertargetentityanimstate is set to 11 (Hurt) unlessblockcooldownhasn't expired where it's set to 24 (Block) instead
- position set to (
playertargetentity'sspinzeroed out- SetDefaultCamera called
flipset to true- DoDamage 1 call happens
- Yield for 0.2 seconds
- MoveTowards startp at 2.0 multiplier using 23 (
Chase) as walkstate and 0 (Idle) as stopstate - Yield all frames until
forcemoveis done flipset to false
Move 2 - Chewing attack on Seedling, AngryPlant or FlyTrap enemy party member¶
Chews on the first Seedling, AngryPlant or FlyTrap among the enemy party which defeats them, but drains their hp. No damages are dealt to the player party and for the enemy party members, nothing happens through the damage pipeline (everything is done manually).
Logic sequence¶
playertargetentityis set to the targetted enemy party member- Emoticon called with the
Exclamationemote with a time of 30 - Yield for 0.6 seconds
- Camera moves to look near
playertargetentitiy - MoveTowards
playertargetentityposition + (1.0, 0.0, -0.1) at 2.0 multiplier using 23 (Chase) as walkstate and 103 as stopstate - Yield all frames until
forcemoveis done playertargetentity's yspinset to 15.0- Done 4 times:
- position set to (
playertargetentityx position +/- 1.5, 0.0,playertargetentityz position - 0.1). The x position offset is -1.5 on the first and third time while it's +1.5 on the second and fourth time - FaceTowards
playertargetentity spriteangles set to its FlipAngleChewsound plays with volume 1.1 + 0.1 * the 0 based index of this loop- For the next 10.0 frames,
playertargetentityanimstate is set to 11 (Hurt)
- position set to (
playertargetentity'sspinzeroed out- SetDefaultCamera called
flipset to trueDamage0sound plays- HitPart particles played at
playertargetentity+ Vector3.up - Heal called to heal this enemy for 5
hp(to itsmaxhpinstead if hardmode is true which heals them to full) - The targeted enemy party member's
hpis set to 0 - The targeted enemy party member's
expis set to 0 - The targeted enemy party member's
moneyis set to 0 - Yield for 0.2 seconds
- MoveTowards startp at 2.0 multiplier using 23 (
Chase) as walkstate and 0 (Idle) as stopstate - Yield all frames until
forcemoveis done flipset to false- StartDeath is called on the targetted enemy party member which ends up setting its
deathcoroutineto a new Death call with activatekill followed by a frame yield.
NOTE: The StartDeath call doesn't do everything that CheckDead was supposed to do outside of the bestiary change and rewards setup (which were undesired already). Here are what is omitted to be done:
- DestroyConditionIcons is not called on the targetted enemy party member's battleentity. This allows them to be rendered for a very brief moment before their death and eventual destruction which normally wouldn't happen since they would be destroyed before their death process happens
- If the enemy party member had any
holditem, they aren't dropped via DropItem - If the enemy party member had an eventondeath, it is not triggered
However, if the enemy party member's deathtype doesn't end with their destructions, some information that was supposed to be cleared will be persisted:
chargeisn't zeroed out- condition aren't cleared