Fix scaling issue with wave 1000 boss

pull/16/head
Flashfyre 2024-02-27 22:50:27 -05:00
parent b90d725afe
commit 61eb15ffd6
2 changed files with 10 additions and 2 deletions

View File

@ -482,11 +482,15 @@ export class EncounterPhase extends BattlePhase {
if (enemyPokemon.species.speciesId === Species.ETERNATUS) {
if (this.scene.gameMode === GameMode.CLASSIC && (battle.battleSpec === BattleSpec.FINAL_BOSS || !(battle.waveIndex % 250))) {
if (battle.battleSpec !== BattleSpec.FINAL_BOSS)
if (battle.battleSpec !== BattleSpec.FINAL_BOSS) {
enemyPokemon.formIndex = 1;
enemyPokemon.updateScale();
}
enemyPokemon.setBoss();
} else if (!(battle.waveIndex % 1000))
} else if (!(battle.waveIndex % 1000)) {
enemyPokemon.formIndex = 1;
enemyPokemon.updateScale();
}
}
loadEnemyAssets.push(enemyPokemon.loadAssets());

View File

@ -406,6 +406,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return 1;
}
updateScale(): void {
this.setScale(this.getSpriteScale());
}
updateSpritePipelineData(): void {
[ this.getSprite(), this.getTintSprite() ].map(s => s.pipelineData['teraColor'] = getTypeRgb(this.getTeraType()));
this.updateInfo(true);