mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 15:22:19 +02:00
Add isMega helper function
This commit is contained in:
parent
6f686a05e3
commit
6d123259ad
@ -3204,6 +3204,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
return maxForms.includes(this.getFormKey()) || (!!this.getFusionFormKey() && maxForms.includes(this.getFusionFormKey()!));
|
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 {
|
canAddTag(tagType: BattlerTagType): boolean {
|
||||||
if (this.getTag(tagType)) {
|
if (this.getTag(tagType)) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user