disables final boss passive (#3393)

Co-authored-by: ImperialSympathizer <imperialsympathizer@gmail.com>
This commit is contained in:
ImperialSympathizer 2024-08-08 15:59:23 -04:00 committed by GitHub
parent b54a255c15
commit ba9378d1d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -1081,6 +1081,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
(Overrides.OPP_PASSIVE_ABILITY_OVERRIDE !== Abilities.NONE && !this.isPlayer())) { (Overrides.OPP_PASSIVE_ABILITY_OVERRIDE !== Abilities.NONE && !this.isPlayer())) {
return true; return true;
} }
// Final boss does not have passive
if (this.scene.currentBattle?.battleSpec === BattleSpec.FINAL_BOSS && this instanceof EnemyPokemon) {
return false;
}
return this.passive || this.isBoss(); return this.passive || this.isBoss();
} }

View File

@ -56,6 +56,14 @@ describe("Final Boss", () => {
expect(game.scene.getEnemyPokemon()!.species.speciesId).not.toBe(Species.ETERNATUS); expect(game.scene.getEnemyPokemon()!.species.speciesId).not.toBe(Species.ETERNATUS);
}); });
it("should not have passive enabled on Eternatus", async () => {
await runToFinalBossEncounter(game, [Species.BIDOOF]);
const eternatus = game.scene.getEnemyPokemon();
expect(eternatus.species.speciesId).toBe(Species.ETERNATUS);
expect(eternatus.hasPassive()).toBe(false);
});
it.todo("should change form on direct hit down to last boss fragment", () => {}); it.todo("should change form on direct hit down to last boss fragment", () => {});
}); });