Only check ability attribute if move attribute was false

This commit is contained in:
Matthew Ross 2024-05-10 20:01:34 -07:00
parent a25e5ccac0
commit a856e2f5d7

View File

@ -1406,9 +1406,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
if (isPhysical && source.status && source.status.effect === StatusEffect.BURN) {
const burnDamageReductionCancelled = new Utils.BooleanHolder(false);
applyMoveAttrs(BypassBurnDamageReductionAttr, source, this, move, burnDamageReductionCancelled)
applyAbAttrs(BypassBurnDamageReductionAbAttr, source, burnDamageReductionCancelled);
if (!burnDamageReductionCancelled.value)
damage.value = Math.floor(damage.value / 2);
if(!burnDamageReductionCancelled.value){
applyAbAttrs(BypassBurnDamageReductionAbAttr, source, burnDamageReductionCancelled);
if (!burnDamageReductionCancelled.value)
damage.value = Math.floor(damage.value / 2);
}
}
move.getAttrs(HitsTagAttr).map(hta => hta as HitsTagAttr).filter(hta => hta.doubleDamage).forEach(hta => {
if (this.getTag(hta.tagType))