Update battle info on stat change

pull/348/head
Flashfyre 2024-04-30 23:23:32 -04:00
parent 6fd5709b13
commit 93765d4121
2 changed files with 8 additions and 0 deletions

View File

@ -1552,6 +1552,8 @@ export class CopyStatsAttr extends MoveEffectAttr {
else else
user.removeTag(BattlerTagType.CRIT_BOOST); user.removeTag(BattlerTagType.CRIT_BOOST);
user.updateInfo();
target.scene.queueMessage(getPokemonMessage(user, 'copied\n') + getPokemonMessage(target, `'s stat changes!`)); target.scene.queueMessage(getPokemonMessage(user, 'copied\n') + getPokemonMessage(target, `'s stat changes!`));
return true; return true;
@ -1566,6 +1568,8 @@ export class InvertStatsAttr extends MoveEffectAttr {
for (let s = 0; s < target.summonData.battleStats.length; s++) for (let s = 0; s < target.summonData.battleStats.length; s++)
target.summonData.battleStats[s] *= -1; target.summonData.battleStats[s] *= -1;
user.updateInfo();
target.scene.queueMessage(getPokemonMessage(target, `'s stat changes\nwere all reversed!`)); target.scene.queueMessage(getPokemonMessage(target, `'s stat changes\nwere all reversed!`));
return true; return true;
@ -1580,6 +1584,8 @@ export class ResetStatsAttr extends MoveEffectAttr {
for (let s = 0; s < target.summonData.battleStats.length; s++) for (let s = 0; s < target.summonData.battleStats.length; s++)
target.summonData.battleStats[s] = 0; target.summonData.battleStats[s] = 0;
user.updateInfo();
target.scene.queueMessage(getPokemonMessage(target, `'s stat changes\nwere eliminated!`)); target.scene.queueMessage(getPokemonMessage(target, `'s stat changes\nwere eliminated!`));
return true; return true;

View File

@ -1624,6 +1624,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
this.summonData.tags.push(tag); this.summonData.tags.push(tag);
if (this instanceof PlayerPokemon && source.summonData.battleStats.find(bs => bs === 6)) if (this instanceof PlayerPokemon && source.summonData.battleStats.find(bs => bs === 6))
this.scene.validateAchv(achvs.TRANSFER_MAX_BATTLE_STAT); this.scene.validateAchv(achvs.TRANSFER_MAX_BATTLE_STAT);
this.updateInfo();
} }
getMoveHistory(): TurnMove[] { getMoveHistory(): TurnMove[] {
@ -1924,6 +1925,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
} }
this.summonDataPrimer = null; this.summonDataPrimer = null;
} }
this.updateInfo();
} }
resetBattleData(): void { resetBattleData(): void {