mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 22:02:18 +02:00
hp added, moves added
This commit is contained in:
parent
f5a0652875
commit
f8f5b4057b
@ -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
|
||||
}
|
||||
};
|
||||
}) : [],
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user