pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

[Bug] Sacrificial moves not activating PostFaintAbAttr

Open torranx opened this issue 6 months ago • 4 comments

Describe the bug

SacrificialAttr and SacrificialAttrOnHit do not proc PostFaintAbAttr when:

  • The Pokemon using the sacrificial move hasn't taken any attacks yet hence the ff code does not run
if (pokemon.turnData?.attacksReceived?.length) {
      const lastAttack = pokemon.turnData.attacksReceived[0];
      applyPostFaintAbAttrs(PostFaintAbAttr, pokemon, this.scene.getPokemonById(lastAttack.sourceId)!, new PokemonMove(lastAttack.move).getMove(), lastAttack.result); // TODO: is this bang correct?
    }

User data export file

No response

Session export file

No response

Expected behavior

It should proc abilities extending PostFaintAbAttr

Screenshots / Videos

No response

What OS did you observe the bug on?

Mac/OSX

If other please specify

No response

Which browser do you use?

Chrome

If other please specify

No response

Additional context

No response

torranx avatar Aug 14 '24 21:08 torranx