Cover edge case of salt cure, insert HitResult for ALL damage regardless of optional variable
This commit is contained in:
parent
ae4e94254f
commit
cce05a1244
|
@ -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]
|
// When damage is done from any source (Move or Indirect damage, e.g. weather), store latest occurrence in damageSources[0]
|
||||||
if (result !== undefined) {
|
if (result !== undefined) {
|
||||||
this.turnData?.damageSources?.unshift(result);
|
this.turnData?.damageSources?.unshift(result);
|
||||||
|
} else {
|
||||||
|
this.turnData?.damageSources?.unshift(HitResult.OTHER);
|
||||||
}
|
}
|
||||||
const damagePhase = new DamageAnimPhase(this.getBattlerIndex(), damage, result as DamageResult, critical);
|
const damagePhase = new DamageAnimPhase(this.getBattlerIndex(), damage, result as DamageResult, critical);
|
||||||
globalScene.unshiftPhase(damagePhase);
|
globalScene.unshiftPhase(damagePhase);
|
||||||
|
|
Loading…
Reference in New Issue