[Bug] fix boss-segment reload persistence: (#2613)

add boss-segments to into pokemon-data & load it in EnemyPokemon constructor
This commit is contained in:
flx-sta 2024-06-26 10:19:24 -07:00 committed by GitHub
parent 29283d81a0
commit 74a7b1bb79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -3385,7 +3385,7 @@ export class EnemyPokemon extends Pokemon {
this.trainerSlot = trainerSlot;
if (boss) {
this.setBoss();
this.setBoss(boss, dataSource?.bossSegments);
}
if (Overrides.OPP_STATUS_OVERRIDE) {

View File

@ -50,6 +50,7 @@ export default class PokemonData {
public fusionLuck: integer;
public boss: boolean;
public bossSegments?: integer;
public summonData: PokemonSummonData;
@ -96,6 +97,7 @@ export default class PokemonData {
if (!forHistory) {
this.boss = (source instanceof EnemyPokemon && !!source.bossSegments) || (!this.player && !!source.boss);
this.bossSegments = source.bossSegments;
}
if (sourcePokemon) {