mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 22:39:31 +02:00
Adding to updateGameInfo()
This commit is contained in:
parent
487deb3f43
commit
cb2f2d53ce
@ -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() ?? [],
|
||||
};
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user