Fix pokemon applying burn reduction
parent
fae5b642f6
commit
6decbec6a9
|
@ -1179,7 +1179,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
damage.value = Math.ceil(((((2 * source.level / 5 + 2) * power.value * sourceAtk.value / targetDef.value) / 50) + 2) * stabMultiplier.value * typeMultiplier.value * arenaAttackTypeMultiplier * screenMultiplier.value * ((this.scene.randBattleSeedInt(15) + 85) / 100) * criticalMultiplier);
|
||||
if (isPhysical && source.status && source.status.effect === StatusEffect.BURN) {
|
||||
const burnDamageReductionCancelled = new Utils.BooleanHolder(false);
|
||||
applyAbAttrs(BypassBurnDamageReductionAbAttr, this, burnDamageReductionCancelled);
|
||||
applyAbAttrs(BypassBurnDamageReductionAbAttr, source, burnDamageReductionCancelled);
|
||||
if (!burnDamageReductionCancelled.value)
|
||||
damage.value = Math.floor(damage.value / 2);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue