diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 83995e9c75e..32c88ab1b38 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2965,7 +2965,7 @@ export default class BattleScene extends SceneBase { biome: this.currentBattle ? getBiomeName(this.arena.biomeType) : "", wave: this.currentBattle?.waveIndex || 0, party: this.party ? this.party.map(p => { - return { name: p.name, type: p.type[0], level: p.level, currentHP: p.hp, maxHP: p.stats[0], status: p.status }; + return { name: p.name, type: p.getTypes(), level: p.level, currentHP: p.hp, maxHP: p.getMaxHp(), status: p.status }; }) : [], modeChain: this.ui?.getModeChain() ?? [], }; diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 278a28937ef..1bd0b22b6aa 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -89,7 +89,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { public exp: integer; public levelExp: integer; public gender: Gender; - public hp: integer; + private _hp: number; + public get hp() { + return this._hp; + } + public set hp(hp: number) { + this._hp = hp; + } public stats: integer[]; public ivs: integer[]; public nature: Nature; @@ -181,6 +187,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } this.exp = dataSource?.exp || getLevelTotalExp(this.level, species.growthRate); this.levelExp = dataSource?.levelExp || 0; + if (dataSource) { this.id = dataSource.id; this.hp = dataSource.hp; diff --git a/src/phases/command-phase.ts b/src/phases/command-phase.ts index 6d4d46c51c9..b4d3d6b93bb 100644 --- a/src/phases/command-phase.ts +++ b/src/phases/command-phase.ts @@ -30,6 +30,8 @@ export class CommandPhase extends FieldPhase { start() { super.start(); + this.scene.updateGameInfo(); + const commandUiHandler = this.scene.ui.handlers[Mode.COMMAND]; if (commandUiHandler) { if (this.scene.currentBattle.turn === 1 || commandUiHandler.getCursor() === Command.POKEMON) {