TryCondition¶
A method that is only used by NeedlerPincer to attempt to inflict conditions as part of the NeedleToss and NeedlePincer actions (with caveats and dead logic, see below to learn more).
It functions similarily than the infliction logic of CalculateBaseDamage, but it has several differences (even new issues) and it doesn't support all conditions that the damage pipeline supports.
private void TryCondition(ref MainManager.BattleData data, MainManager.BattleCondition condition, int turns)
Supported conditions¶
It only supports the following conditions (the method does nothing for any other):
- Freeze (never used under normal gameplay), requires passing a resistance check with the target's
freezeres
for infliction - Fire (never used under normal gameplay), requires the same conditions then CalculateBaseDamage, but without the block check or Sturdy check for infliction
- Sleep, requires passing a resistance check with the target's
sleepres
for infliction - Numb, requires passing a resistance check with the target's
numbres
for infliction - Poison, requires passing a resistance check with the target's
poisonres
for infliction
Resistance check differences¶
The resistance check does have logic to take into account player infliction including logic to reduce the corresponding resistance by 15 if the StatusBoost
medal is equipped on the target, but this logic is never used under normal gameplay. This is because the method is only used when the player attacks an enemy and in these cases, the enemy is the target.
Issue with the resistance checks¶
NOTE: All these resistance checks are off by 1. It means that the chance of infliction is always 1% less than it should be. It implies that a 50 resistance is actually 49% chance to inflict and that a 0 resistance is a 99% chance to inflict instead of 100%
Infliction logic differences¶
The following are all differences with CalculateBaseDamage regarding infliction:
- Freeze (never used under normal gameplay):
- If the target has the Topple condition, it is never removed
- The target will never have Drop called on it even if its position is
Ground
with aheight
above 0.05 - The infliction is done directly with SetCondition rather than AddDelayedCondition
- UpdateAnim is called at the end
- Fire (never used under normal gameplay):
- UpdateAnim is called at the end
- Sleep:
- The target's
sleepres
increase is 8 instead of 9 (10 instead of 13 on HardMode) - The target will never have Drop called on it even if its position is
Ground
with aheight
above 0.05 - The infliction is done directly with SetCondition rather than AddDelayedCondition
- UpdateAnim is called at the end
- The target's
- Numb:
- On HardMode the target's
numbres
increase is 20 instead of 22. It remains at 17 otherwise - The target's
cantmove
is always set to 1, even if its actimmobile is true - The target will never have Drop called on it even if its position is
Ground
with aheight
above 0.05 - The infliction is done directly with SetCondition rather than AddDelayedCondition
- UpdateAnim is called at the end
- On HardMode the target's
- Poison:
- There is now a
poisonres
increase by 5 (8 instead when on HardMode) - UpdateAnim is called at the end
- There is now a