Fix stack overflow with weather abilities
This commit is contained in:
1 parent
fbb901e591
commit
43bf8e13ea
4 files changed
+12
-8
No files matched your search
@@ -724,8 +724,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
return allAbilities[starterPassiveAbilities[starterSpeciesId]];
|
||||
}
|
||||
|
||||
canApplyPassive(): boolean {
|
||||
return this.isBoss();
|
||||
}
|
||||
|
||||
canApplyAbility(passive: boolean = false): boolean {
|
||||
if (passive)
|
||||
if (passive && !this.canApplyPassive())
|
||||
return false;
|
||||
const ability = (!passive ? this.getAbility() : this.getPassiveAbility());
|
||||
if (ability.isIgnorable && this.scene.arena.ignoreAbilities)
|
||||
|
||||
Reference in new issue
Block a user