Modifying battle-scene.ts

Added code to get Form and Tera Type
Typo fixed in pokemon.ts
This commit is contained in:
PsychedelicSeal 2024-10-31 16:00:42 -06:00
parent f5e260bee4
commit 2f641fee90
2 changed files with 1 additions and 2 deletions

View File

@ -2965,7 +2965,7 @@ export default class BattleScene extends SceneBase {
biome: this.currentBattle ? getBiomeName(this.arena.biomeType) : "", biome: this.currentBattle ? getBiomeName(this.arena.biomeType) : "",
wave: this.currentBattle?.waveIndex || 0, wave: this.currentBattle?.waveIndex || 0,
party: this.party ? this.party.map(p => { party: this.party ? this.party.map(p => {
return { name: p.name, type: p.getTypes(), level: p.level, currentHP: p.hp, maxHP: p.getMaxHp(), status: p.status }; return { name: p.name, form: p.formIndex, types: p.getTypes(), tera: p.getTeraType(), level: p.level, currentHP: p.hp, maxHP: p.getMaxHp(), status: p.status };
}) : [], }) : [],
modeChain: this.ui?.getModeChain() ?? [], modeChain: this.ui?.getModeChain() ?? [],
}; };

View File

@ -181,7 +181,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
} }
this.exp = dataSource?.exp || getLevelTotalExp(this.level, species.growthRate); this.exp = dataSource?.exp || getLevelTotalExp(this.level, species.growthRate);
this.levelExp = dataSource?.levelExp || 0; this.levelExp = dataSource?.levelExp || 0;
if (dataSource) { if (dataSource) {
this.id = dataSource.id; this.id = dataSource.id;
this.hp = dataSource.hp; this.hp = dataSource.hp;