[Bug][Beta] Fix error in message sequencing on critical hits (#4259)

This commit is contained in:
innerthunder 2024-09-14 16:14:37 -07:00 committed by GitHub
parent d8dbc471af
commit 79fa80cfd8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -2620,10 +2620,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return result; 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. // In case of fatal damage, this tag would have gotten cleared before we could lapse it.
const destinyTag = this.getTag(BattlerTagType.DESTINY_BOND); const destinyTag = this.getTag(BattlerTagType.DESTINY_BOND);
@ -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 // want to include is.Fainted() in case multi hit move ends early, still want to render message
if (source.turnData.hitsLeft === 1 || this.isFainted()) { if (source.turnData.hitsLeft === 1 || this.isFainted()) {
switch (result) { switch (result) {