Cover edge case of salt cure, insert HitResult for ALL damage regardless of optional variable

This commit is contained in:
Christopher Schmidt 2025-01-26 12:20:31 -05:00
parent ae4e94254f
commit cce05a1244
1 changed files with 2 additions and 0 deletions

View File

@ -3063,6 +3063,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
// When damage is done from any source (Move or Indirect damage, e.g. weather), store latest occurrence in damageSources[0]
if (result !== undefined) {
this.turnData?.damageSources?.unshift(result);
} else {
this.turnData?.damageSources?.unshift(HitResult.OTHER);
}
const damagePhase = new DamageAnimPhase(this.getBattlerIndex(), damage, result as DamageResult, critical);
globalScene.unshiftPhase(damagePhase);