Skip to content

Commit

Permalink
[Bug][Beta] Fix error in message sequencing on critical hits (#4259)
Browse files Browse the repository at this point in the history
  • Loading branch information
innerthunder authored Sep 14, 2024
1 parent d8dbc47 commit 79fa80c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/field/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2620,10 +2620,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return result;
}

if (isCritical) {
this.scene.queueMessage(i18next.t("battle:hitResultCriticalHit"));
}

// In case of fatal damage, this tag would have gotten cleared before we could lapse it.
const destinyTag = this.getTag(BattlerTagType.DESTINY_BOND);

Expand Down Expand Up @@ -2666,6 +2662,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
}
}

if (isCritical) {
this.scene.queueMessage(i18next.t("battle:hitResultCriticalHit"));
}

// want to include is.Fainted() in case multi hit move ends early, still want to render message
if (source.turnData.hitsLeft === 1 || this.isFainted()) {
switch (result) {
Expand Down

0 comments on commit 79fa80c

Please sign in to comment.