hp added, moves added

This commit is contained in:
Devin Gearing 2024-05-16 20:22:09 -05:00
parent f5a0652875
commit f8f5b4057b

View File

@ -2006,10 +2006,47 @@ export default class BattleScene extends SceneBase {
weather: this.arena?.weather || {},
wave: this.currentBattle?.waveIndex || 0,
party: this.party ? this.party.map(p => {
return { name: p.name, level: p.level, speciesId: p.species.speciesId, fusionId: p.fusionSpecies?.speciesId || -1, active: p.active, gender: p.gender, fieldPosition: p.fieldPosition, speciesVariant: p.variant, fusionVariant: p.fusionVariant, hp: Math.ceil((p.hp/p.stats[0])*100)};
return {
name: p.name,
level: p.level,
speciesId: p.species.speciesId,
fusionId: p.fusionSpecies?.speciesId || -1,
active: p.active,
gender: p.gender,
fieldPosition: p.fieldPosition,
speciesVariant: p.variant,
fusionVariant: p.fusionVariant,
ability: p.abilityIndex,
hp: {
current: p.hp,
max: p.getMaxHp(),
percent: (p.getHpRatio(false))*100
},
moveset: p.moveset.map(m => {
return {
moveId: m.moveId,
ppUsed: m.ppUsed,
ppUp: m.ppUp,
ppBase: m.getMove().pp
}
})
};
}) : [],
enemyParty: this.getEnemyParty() ? this.getEnemyParty().map(p => {
return { name: p.name, level: p.level, speciesId: p.species.speciesId, fusionId: p.fusionSpecies?.speciesId || -1, active: p.active, gender: p.gender, fieldPosition: p.fieldPosition, speciesVariant: p.variant, fusionVariant: p.fusionVariant, hp: Math.ceil((p.hp/p.stats[0])*100)};
return {
name: p.name,
level: p.level,
speciesId: p.species.speciesId,
fusionId: p.fusionSpecies?.speciesId || -1,
active: p.active,
gender: p.gender,
fieldPosition: p.fieldPosition,
speciesVariant: p.variant,
fusionVariant: p.fusionVariant,
hp: {
percent: (p.getHpRatio(false))*100
}
};
}) : [],
};