From 6d123259adae112780648cdfcc8a04297a230a58 Mon Sep 17 00:00:00 2001 From: Xavion3 Date: Mon, 3 Mar 2025 09:47:34 +1100 Subject: [PATCH] Add isMega helper function --- src/field/pokemon.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index f0486a8f111..09a1e962cf0 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -3204,6 +3204,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return maxForms.includes(this.getFormKey()) || (!!this.getFusionFormKey() && maxForms.includes(this.getFusionFormKey()!)); } + isMega(): boolean { + const megaForms = [ SpeciesFormKey.MEGA, SpeciesFormKey.MEGA_X, SpeciesFormKey.MEGA_Y, SpeciesFormKey.PRIMAL ] as string[]; + return megaForms.includes(this.getFormKey()) || (!!this.getFusionFormKey() && megaForms.includes(this.getFusionFormKey()!)); + } + canAddTag(tagType: BattlerTagType): boolean { if (this.getTag(tagType)) { return false;