2024-01-13 17:24:24 +00:00
|
|
|
import { TimeOfDay } from "./enums/time-of-day";
|
2024-01-10 04:34:43 +00:00
|
|
|
import { PokemonFormChangeItemModifier } from "../modifier/modifier";
|
|
|
|
import Pokemon from "../pokemon";
|
2024-01-13 17:24:24 +00:00
|
|
|
import { Moves } from "./enums/moves";
|
2024-01-10 04:34:43 +00:00
|
|
|
import { SpeciesFormKey } from "./pokemon-species";
|
2024-01-13 17:24:24 +00:00
|
|
|
import { Species } from "./enums/species";
|
2024-01-10 04:34:43 +00:00
|
|
|
import { StatusEffect } from "./status-effect";
|
|
|
|
|
|
|
|
export enum FormChangeItem {
|
|
|
|
NONE,
|
|
|
|
|
|
|
|
ABOMASITE,
|
|
|
|
ABSOLITE,
|
|
|
|
AERODACTYLITE,
|
|
|
|
AGGRONITE,
|
|
|
|
ALAKAZITE,
|
|
|
|
ALTARIANITE,
|
|
|
|
AMPHAROSITE,
|
|
|
|
AUDINITE,
|
|
|
|
BANETTITE,
|
|
|
|
BEEDRILLITE,
|
|
|
|
BLASTOISINITE,
|
|
|
|
BLAZIKENITE,
|
|
|
|
CAMERUPTITE,
|
|
|
|
CHARIZARDITE_X,
|
|
|
|
CHARIZARDITE_Y,
|
|
|
|
DIANCITE,
|
|
|
|
GALLADITE,
|
|
|
|
GARCHOMPITE,
|
|
|
|
GARDEVOIRITE,
|
|
|
|
GENGARITE,
|
|
|
|
GLALITITE,
|
|
|
|
GYARADOSITE,
|
|
|
|
HERACRONITE,
|
|
|
|
HOUNDOOMINITE,
|
|
|
|
KANGASKHANITE,
|
|
|
|
LATIASITE,
|
|
|
|
LATIOSITE,
|
|
|
|
LOPUNNITE,
|
|
|
|
LUCARIONITE,
|
|
|
|
MANECTITE,
|
|
|
|
MAWILITE,
|
|
|
|
MEDICHAMITE,
|
|
|
|
METAGROSSITE,
|
|
|
|
MEWTWONITE_X,
|
|
|
|
MEWTWONITE_Y,
|
|
|
|
PIDGEOTITE,
|
|
|
|
PINSIRITE,
|
|
|
|
RAYQUAZITE,
|
|
|
|
SABLENITE,
|
|
|
|
SALAMENCITE,
|
|
|
|
SCEPTILITE,
|
|
|
|
SCIZORITE,
|
|
|
|
SHARPEDONITE,
|
|
|
|
SLOWBRONITE,
|
|
|
|
STEELIXITE,
|
|
|
|
SWAMPERTITE,
|
|
|
|
TYRANITARITE,
|
|
|
|
VENUSAURITE,
|
|
|
|
|
|
|
|
BLUE_ORB = 50,
|
|
|
|
RED_ORB,
|
|
|
|
ADAMANT_CRYSTAL,
|
|
|
|
LUSTROUS_ORB,
|
|
|
|
GRISEOUS_CORE,
|
|
|
|
REVEAL_GLASS,
|
2024-02-14 05:21:44 +00:00
|
|
|
GRACIDEA,
|
2024-02-20 00:37:28 +00:00
|
|
|
MAX_MUSHROOMS,
|
2024-02-22 01:59:08 +00:00
|
|
|
PRISON_BOTTLE,
|
|
|
|
N_LUNARIZER,
|
|
|
|
N_SOLARIZER,
|
|
|
|
RUSTED_SWORD,
|
|
|
|
RUSTED_SHIELD,
|
|
|
|
ICY_REINS_OF_UNITY,
|
|
|
|
SHADOW_REINS_OF_UNITY,
|
2024-02-20 00:37:28 +00:00
|
|
|
WELLSPRING_MASK,
|
|
|
|
HEARTHFLAME_MASK,
|
|
|
|
CORNERSTONE_MASK
|
2024-01-10 04:34:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export type SpeciesFormChangeConditionPredicate = (p: Pokemon) => boolean;
|
|
|
|
export type SpeciesFormChangeConditionEnforceFunc = (p: Pokemon) => void;
|
|
|
|
|
|
|
|
export class SpeciesFormChange {
|
|
|
|
public speciesId: Species;
|
|
|
|
public preFormKey: string;
|
|
|
|
public formKey: string;
|
|
|
|
public trigger: SpeciesFormChangeTrigger;
|
|
|
|
public quiet: boolean;
|
|
|
|
|
|
|
|
constructor(speciesId: Species, preFormKey: string, evoFormKey: string, trigger: SpeciesFormChangeTrigger, quiet: boolean = false) {
|
|
|
|
this.speciesId = speciesId;
|
|
|
|
this.preFormKey = preFormKey;
|
|
|
|
this.formKey = evoFormKey;
|
|
|
|
this.trigger = trigger;
|
|
|
|
this.quiet = quiet;
|
|
|
|
}
|
|
|
|
|
|
|
|
canChange(pokemon: Pokemon): boolean {
|
|
|
|
if (pokemon.species.speciesId !== this.speciesId)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if (!pokemon.species.forms.length)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
const formKeys = pokemon.species.forms.map(f => f.formKey);
|
|
|
|
if (formKeys[pokemon.formIndex] !== this.preFormKey)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if (formKeys[pokemon.formIndex] === this.formKey)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if (!this.trigger.canChange(pokemon))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
findTrigger(triggerType: { new(...args: any[]): SpeciesFormChangeTrigger }): SpeciesFormChangeTrigger {
|
|
|
|
if (!this.trigger.hasTriggerType(triggerType))
|
|
|
|
return null;
|
|
|
|
|
|
|
|
let trigger = this.trigger;
|
|
|
|
|
|
|
|
if (trigger instanceof SpeciesFormChangeCompoundTrigger)
|
|
|
|
return trigger.triggers.find(t => t.hasTriggerType(triggerType));
|
|
|
|
|
|
|
|
return trigger;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class SpeciesFormChangeCondition {
|
|
|
|
public predicate: SpeciesFormChangeConditionPredicate;
|
|
|
|
public enforceFunc: SpeciesFormChangeConditionEnforceFunc;
|
|
|
|
|
|
|
|
constructor(predicate: SpeciesFormChangeConditionPredicate, enforceFunc?: SpeciesFormChangeConditionEnforceFunc) {
|
|
|
|
this.predicate = predicate;
|
|
|
|
this.enforceFunc = enforceFunc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export abstract class SpeciesFormChangeTrigger {
|
|
|
|
canChange(pokemon: Pokemon): boolean {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
hasTriggerType(triggerType: { new(...args: any[]): SpeciesFormChangeTrigger }): boolean {
|
|
|
|
return this instanceof triggerType;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-13 17:24:24 +00:00
|
|
|
export class SpeciesFormChangeManualTrigger extends SpeciesFormChangeTrigger {
|
|
|
|
canChange(pokemon: Pokemon): boolean {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-10 04:34:43 +00:00
|
|
|
export class SpeciesFormChangeCompoundTrigger {
|
|
|
|
public triggers: SpeciesFormChangeTrigger[];
|
|
|
|
|
|
|
|
constructor(...triggers: SpeciesFormChangeTrigger[]) {
|
|
|
|
this.triggers = triggers;
|
|
|
|
}
|
|
|
|
|
|
|
|
canChange(pokemon: Pokemon): boolean {
|
|
|
|
for (let trigger of this.triggers) {
|
|
|
|
if (!trigger.canChange(pokemon))
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
hasTriggerType(triggerType: { new(...args: any[]): SpeciesFormChangeTrigger }): boolean {
|
|
|
|
return !!this.triggers.find(t => t.hasTriggerType(triggerType));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class SpeciesFormChangeItemTrigger extends SpeciesFormChangeTrigger {
|
|
|
|
public item: FormChangeItem;
|
|
|
|
public active: boolean;
|
|
|
|
|
|
|
|
constructor(item: FormChangeItem, active: boolean = true) {
|
|
|
|
super();
|
|
|
|
this.item = item;
|
|
|
|
this.active = active;
|
|
|
|
}
|
|
|
|
|
|
|
|
canChange(pokemon: Pokemon): boolean {
|
2024-02-14 05:21:44 +00:00
|
|
|
return !!pokemon.scene.findModifier(m => m instanceof PokemonFormChangeItemModifier && m.pokemonId === pokemon.id && m.formChangeItem === this.item && m.active === this.active);
|
2024-01-10 04:34:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class SpeciesFormChangeTimeOfDayTrigger extends SpeciesFormChangeTrigger {
|
|
|
|
public timesOfDay: TimeOfDay[];
|
|
|
|
|
|
|
|
constructor(...timesOfDay: TimeOfDay[]) {
|
|
|
|
super();
|
|
|
|
this.timesOfDay = timesOfDay;
|
|
|
|
}
|
|
|
|
|
|
|
|
canChange(pokemon: Pokemon): boolean {
|
|
|
|
return this.timesOfDay.indexOf(pokemon.scene.arena.getTimeOfDay()) > -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class SpeciesFormChangeActiveTrigger extends SpeciesFormChangeTrigger {
|
|
|
|
public active: boolean;
|
|
|
|
|
|
|
|
constructor(active: boolean = false) {
|
|
|
|
super();
|
|
|
|
this.active = active;
|
|
|
|
}
|
|
|
|
|
|
|
|
canChange(pokemon: Pokemon): boolean {
|
|
|
|
return pokemon.isActive(true) === this.active;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class SpeciesFormChangeStatusEffectTrigger extends SpeciesFormChangeTrigger {
|
|
|
|
public statusEffects: StatusEffect[];
|
|
|
|
public invert: boolean;
|
|
|
|
|
|
|
|
constructor(statusEffects: StatusEffect | StatusEffect[], invert: boolean = false) {
|
|
|
|
super();
|
|
|
|
if (!Array.isArray(statusEffects))
|
|
|
|
statusEffects = [ statusEffects ];
|
|
|
|
this.statusEffects = statusEffects;
|
|
|
|
this.invert = invert;
|
|
|
|
}
|
|
|
|
|
|
|
|
canChange(pokemon: Pokemon): boolean {
|
|
|
|
return (this.statusEffects.indexOf(pokemon.status?.effect || StatusEffect.NONE) > -1) !== this.invert;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class SpeciesFormChangeMoveLearnedTrigger extends SpeciesFormChangeTrigger {
|
|
|
|
public move: Moves;
|
|
|
|
public known: boolean;
|
|
|
|
|
|
|
|
constructor(move: Moves, known: boolean = true) {
|
|
|
|
super();
|
|
|
|
this.move = move;
|
|
|
|
this.known = known;
|
|
|
|
}
|
|
|
|
|
|
|
|
canChange(pokemon: Pokemon): boolean {
|
|
|
|
return (!!pokemon.moveset.filter(m => m.moveId === this.move).length) === this.known;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class SpeciesFormChangeMoveUsedTrigger extends SpeciesFormChangeTrigger {
|
|
|
|
public move: Moves;
|
|
|
|
public used: boolean;
|
|
|
|
|
|
|
|
constructor(move: Moves, used: boolean = true) {
|
|
|
|
super();
|
|
|
|
this.move = move;
|
|
|
|
this.used = used;
|
|
|
|
}
|
|
|
|
|
|
|
|
canChange(pokemon: Pokemon): boolean {
|
|
|
|
return pokemon.summonData && !!pokemon.getLastXMoves(1).filter(m => m.move === this.move).length === this.used;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-14 05:21:44 +00:00
|
|
|
export class SpeciesDefaultFormMatchTrigger extends SpeciesFormChangeTrigger {
|
|
|
|
private formKey: string;
|
|
|
|
|
|
|
|
constructor(formKey: string) {
|
|
|
|
super();
|
|
|
|
this.formKey = formKey;
|
|
|
|
}
|
|
|
|
|
|
|
|
canChange(pokemon: Pokemon): boolean {
|
|
|
|
return this.formKey === pokemon.species.forms[pokemon.scene.getSpeciesFormIndex(pokemon.species, pokemon.gender, pokemon.nature, true)].formKey;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-10 04:34:43 +00:00
|
|
|
export function getSpeciesFormChangeMessage(pokemon: Pokemon, formChange: SpeciesFormChange, preName: string): string {
|
|
|
|
const isMega = formChange.formKey.indexOf(SpeciesFormKey.MEGA) > -1;
|
2024-02-14 05:21:44 +00:00
|
|
|
const isGmax = formChange.formKey.indexOf(SpeciesFormKey.GIGANTAMAX) > -1;
|
|
|
|
const isEmax = formChange.formKey.indexOf('eternamax') > -1;
|
2024-01-10 04:34:43 +00:00
|
|
|
const isRevert = !isMega && formChange.formKey === pokemon.species.forms[0].formKey;
|
|
|
|
const prefix = !pokemon.isPlayer() ? pokemon.hasTrainer() ? 'Foe ' : 'Wild ' : 'Your ';
|
|
|
|
if (isMega)
|
|
|
|
return `${prefix}${preName} mega-evolved\ninto ${pokemon.name}!`;
|
2024-02-14 05:21:44 +00:00
|
|
|
if (isGmax)
|
|
|
|
return `${prefix}${preName} Gigantamaxed\ninto ${pokemon.name}!`;
|
|
|
|
if (isEmax)
|
|
|
|
return `${prefix}${preName} Eternamaxed\ninto ${pokemon.name}!`;
|
2024-01-10 04:34:43 +00:00
|
|
|
if (isRevert)
|
|
|
|
return `${prefix}${pokemon.name} reverted\nto its original form!`;
|
|
|
|
return `${prefix}${preName} changed form!`;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface PokemonFormChanges {
|
|
|
|
[key: string]: SpeciesFormChange[]
|
|
|
|
}
|
|
|
|
|
|
|
|
export const pokemonFormChanges: PokemonFormChanges = {
|
|
|
|
[Species.VENUSAUR]: [
|
2024-02-14 05:21:44 +00:00
|
|
|
new SpeciesFormChange(Species.VENUSAUR, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.VENUSAURITE)),
|
|
|
|
new SpeciesFormChange(Species.VENUSAUR, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
2024-01-10 04:34:43 +00:00
|
|
|
],
|
|
|
|
[Species.BLASTOISE]: [
|
2024-02-14 05:21:44 +00:00
|
|
|
new SpeciesFormChange(Species.BLASTOISE, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.BLASTOISINITE)),
|
|
|
|
new SpeciesFormChange(Species.BLASTOISE, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
2024-01-10 04:34:43 +00:00
|
|
|
],
|
|
|
|
[Species.CHARIZARD]: [
|
|
|
|
new SpeciesFormChange(Species.CHARIZARD, '', SpeciesFormKey.MEGA_X, new SpeciesFormChangeItemTrigger(FormChangeItem.CHARIZARDITE_X)),
|
2024-02-14 05:21:44 +00:00
|
|
|
new SpeciesFormChange(Species.CHARIZARD, '', SpeciesFormKey.MEGA_Y, new SpeciesFormChangeItemTrigger(FormChangeItem.CHARIZARDITE_Y)),
|
|
|
|
new SpeciesFormChange(Species.CHARIZARD, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.BUTTERFREE]: [
|
|
|
|
new SpeciesFormChange(Species.BUTTERFREE, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
2024-01-10 04:34:43 +00:00
|
|
|
],
|
|
|
|
[Species.BEEDRILL]: [
|
|
|
|
new SpeciesFormChange(Species.BEEDRILL, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.BEEDRILLITE))
|
|
|
|
],
|
|
|
|
[Species.PIDGEOT]: [
|
|
|
|
new SpeciesFormChange(Species.PIDGEOT, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.PIDGEOTITE))
|
|
|
|
],
|
2024-02-14 05:21:44 +00:00
|
|
|
[Species.PIKACHU]: [
|
|
|
|
new SpeciesFormChange(Species.PIKACHU, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.MEOWTH]: [
|
|
|
|
new SpeciesFormChange(Species.MEOWTH, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
2024-01-10 04:34:43 +00:00
|
|
|
[Species.ALAKAZAM]: [
|
|
|
|
new SpeciesFormChange(Species.ALAKAZAM, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.ALAKAZITE))
|
|
|
|
],
|
2024-02-14 05:21:44 +00:00
|
|
|
[Species.MACHAMP]: [
|
|
|
|
new SpeciesFormChange(Species.MACHAMP, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
2024-01-10 04:34:43 +00:00
|
|
|
[Species.SLOWBRO]: [
|
|
|
|
new SpeciesFormChange(Species.SLOWBRO, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.SLOWBRONITE))
|
|
|
|
],
|
|
|
|
[Species.GENGAR]: [
|
2024-02-14 05:21:44 +00:00
|
|
|
new SpeciesFormChange(Species.GENGAR, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.GENGARITE)),
|
|
|
|
new SpeciesFormChange(Species.GENGAR, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.KINGLER]: [
|
|
|
|
new SpeciesFormChange(Species.KINGLER, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
2024-01-10 04:34:43 +00:00
|
|
|
],
|
|
|
|
[Species.KANGASKHAN]: [
|
|
|
|
new SpeciesFormChange(Species.KANGASKHAN, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.KANGASKHANITE))
|
|
|
|
],
|
|
|
|
[Species.PINSIR]: [
|
|
|
|
new SpeciesFormChange(Species.PINSIR, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.PINSIRITE))
|
|
|
|
],
|
|
|
|
[Species.GYARADOS]: [
|
|
|
|
new SpeciesFormChange(Species.GYARADOS, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.GYARADOSITE))
|
|
|
|
],
|
2024-02-14 05:21:44 +00:00
|
|
|
[Species.LAPRAS]: [
|
|
|
|
new SpeciesFormChange(Species.LAPRAS, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.EEVEE]: [
|
|
|
|
new SpeciesFormChange(Species.EEVEE, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.SNORLAX]: [
|
|
|
|
new SpeciesFormChange(Species.SNORLAX, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
2024-01-10 04:34:43 +00:00
|
|
|
[Species.AERODACTYL]: [
|
|
|
|
new SpeciesFormChange(Species.AERODACTYL, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.AERODACTYLITE))
|
|
|
|
],
|
|
|
|
[Species.MEWTWO]: [
|
|
|
|
new SpeciesFormChange(Species.MEWTWO, '', SpeciesFormKey.MEGA_X, new SpeciesFormChangeItemTrigger(FormChangeItem.MEWTWONITE_X)),
|
|
|
|
new SpeciesFormChange(Species.MEWTWO, '', SpeciesFormKey.MEGA_Y, new SpeciesFormChangeItemTrigger(FormChangeItem.MEWTWONITE_Y))
|
|
|
|
],
|
|
|
|
[Species.AMPHAROS]: [
|
|
|
|
new SpeciesFormChange(Species.AMPHAROS, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.AMPHAROSITE))
|
|
|
|
],
|
|
|
|
[Species.STEELIX]: [
|
|
|
|
new SpeciesFormChange(Species.STEELIX, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.STEELIXITE))
|
|
|
|
],
|
|
|
|
[Species.SCIZOR]: [
|
|
|
|
new SpeciesFormChange(Species.SCIZOR, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.SCIZORITE))
|
|
|
|
],
|
|
|
|
[Species.HERACROSS]: [
|
|
|
|
new SpeciesFormChange(Species.HERACROSS, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.HERACRONITE))
|
|
|
|
],
|
|
|
|
[Species.HOUNDOOM]: [
|
|
|
|
new SpeciesFormChange(Species.HOUNDOOM, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.HOUNDOOMINITE))
|
|
|
|
],
|
|
|
|
[Species.TYRANITAR]: [
|
|
|
|
new SpeciesFormChange(Species.TYRANITAR, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.TYRANITARITE))
|
|
|
|
],
|
|
|
|
[Species.SCEPTILE]: [
|
|
|
|
new SpeciesFormChange(Species.SCEPTILE, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.SCEPTILITE))
|
|
|
|
],
|
|
|
|
[Species.BLAZIKEN]: [
|
|
|
|
new SpeciesFormChange(Species.BLAZIKEN, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.BLAZIKENITE))
|
|
|
|
],
|
|
|
|
[Species.SWAMPERT]: [
|
|
|
|
new SpeciesFormChange(Species.SWAMPERT, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.SWAMPERTITE))
|
|
|
|
],
|
|
|
|
[Species.GARDEVOIR]: [
|
|
|
|
new SpeciesFormChange(Species.GARDEVOIR, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.GARDEVOIRITE))
|
|
|
|
],
|
|
|
|
[Species.SABLEYE]: [
|
|
|
|
new SpeciesFormChange(Species.SABLEYE, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.SABLENITE))
|
|
|
|
],
|
|
|
|
[Species.MAWILE]: [
|
|
|
|
new SpeciesFormChange(Species.MAWILE, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.MAWILITE))
|
|
|
|
],
|
|
|
|
[Species.AGGRON]: [
|
|
|
|
new SpeciesFormChange(Species.AGGRON, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.AGGRONITE))
|
|
|
|
],
|
|
|
|
[Species.MEDICHAM]: [
|
|
|
|
new SpeciesFormChange(Species.MEDICHAM, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.MEDICHAMITE))
|
|
|
|
],
|
|
|
|
[Species.MANECTRIC]: [
|
|
|
|
new SpeciesFormChange(Species.MANECTRIC, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.MANECTITE))
|
|
|
|
],
|
|
|
|
[Species.SHARPEDO]: [
|
|
|
|
new SpeciesFormChange(Species.SHARPEDO, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.SHARPEDONITE))
|
|
|
|
],
|
|
|
|
[Species.CAMERUPT]: [
|
|
|
|
new SpeciesFormChange(Species.CAMERUPT, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.CAMERUPTITE))
|
|
|
|
],
|
|
|
|
[Species.ALTARIA]: [
|
|
|
|
new SpeciesFormChange(Species.ALTARIA, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.ALTARIANITE))
|
|
|
|
],
|
|
|
|
[Species.BANETTE]: [
|
|
|
|
new SpeciesFormChange(Species.BANETTE, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.BANETTITE))
|
|
|
|
],
|
|
|
|
[Species.ABSOL]: [
|
|
|
|
new SpeciesFormChange(Species.ABSOL, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.ABSOLITE))
|
|
|
|
],
|
|
|
|
[Species.GLALIE]: [
|
|
|
|
new SpeciesFormChange(Species.GLALIE, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.GLALITITE))
|
|
|
|
],
|
|
|
|
[Species.SALAMENCE]: [
|
|
|
|
new SpeciesFormChange(Species.SALAMENCE, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.SALAMENCITE))
|
|
|
|
],
|
|
|
|
[Species.METAGROSS]: [
|
|
|
|
new SpeciesFormChange(Species.METAGROSS, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.METAGROSSITE))
|
|
|
|
],
|
|
|
|
[Species.LATIAS]: [
|
|
|
|
new SpeciesFormChange(Species.LATIAS, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.LATIASITE))
|
|
|
|
],
|
|
|
|
[Species.LATIOS]: [
|
|
|
|
new SpeciesFormChange(Species.LATIOS, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.LATIOSITE))
|
|
|
|
],
|
|
|
|
[Species.KYOGRE]: [
|
|
|
|
new SpeciesFormChange(Species.KYOGRE, '', SpeciesFormKey.PRIMAL, new SpeciesFormChangeItemTrigger(FormChangeItem.BLUE_ORB))
|
|
|
|
],
|
|
|
|
[Species.GROUDON]: [
|
|
|
|
new SpeciesFormChange(Species.GROUDON, '', SpeciesFormKey.PRIMAL, new SpeciesFormChangeItemTrigger(FormChangeItem.RED_ORB))
|
|
|
|
],
|
|
|
|
[Species.RAYQUAZA]: [
|
|
|
|
new SpeciesFormChange(Species.RAYQUAZA, '', SpeciesFormKey.MEGA, new SpeciesFormChangeCompoundTrigger(new SpeciesFormChangeItemTrigger(FormChangeItem.RAYQUAZITE), new SpeciesFormChangeMoveLearnedTrigger(Moves.DRAGON_ASCENT)))
|
|
|
|
],
|
|
|
|
[Species.LOPUNNY]: [
|
|
|
|
new SpeciesFormChange(Species.LOPUNNY, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.LOPUNNITE))
|
|
|
|
],
|
|
|
|
[Species.GARCHOMP]: [
|
|
|
|
new SpeciesFormChange(Species.GARCHOMP, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.GARCHOMPITE))
|
|
|
|
],
|
|
|
|
[Species.LUCARIO]: [
|
|
|
|
new SpeciesFormChange(Species.LUCARIO, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.LUCARIONITE))
|
|
|
|
],
|
|
|
|
[Species.ABOMASNOW]: [
|
|
|
|
new SpeciesFormChange(Species.ABOMASNOW, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.ABOMASITE))
|
|
|
|
],
|
|
|
|
[Species.GALLADE]: [
|
|
|
|
new SpeciesFormChange(Species.GALLADE, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.GALLADITE))
|
|
|
|
],
|
|
|
|
[Species.AUDINO]: [
|
|
|
|
new SpeciesFormChange(Species.AUDINO, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.AUDINITE))
|
|
|
|
],
|
|
|
|
[Species.DIALGA]: [
|
|
|
|
new SpeciesFormChange(Species.DIALGA, '', SpeciesFormKey.ORIGIN, new SpeciesFormChangeItemTrigger(FormChangeItem.ADAMANT_CRYSTAL))
|
|
|
|
],
|
|
|
|
[Species.PALKIA]: [
|
|
|
|
new SpeciesFormChange(Species.PALKIA, '', SpeciesFormKey.ORIGIN, new SpeciesFormChangeItemTrigger(FormChangeItem.LUSTROUS_ORB))
|
|
|
|
],
|
|
|
|
[Species.GIRATINA]: [
|
|
|
|
new SpeciesFormChange(Species.GIRATINA, '', SpeciesFormKey.ORIGIN, new SpeciesFormChangeItemTrigger(FormChangeItem.GRISEOUS_CORE))
|
|
|
|
],
|
|
|
|
[Species.SHAYMIN]: [
|
|
|
|
new SpeciesFormChange(Species.SHAYMIN, 'land', 'sky', new SpeciesFormChangeCompoundTrigger(new SpeciesFormChangeTimeOfDayTrigger(TimeOfDay.DAY, TimeOfDay.DUSK),
|
|
|
|
new SpeciesFormChangeItemTrigger(FormChangeItem.GRACIDEA), new SpeciesFormChangeStatusEffectTrigger(StatusEffect.FREEZE, true))),
|
|
|
|
new SpeciesFormChange(Species.SHAYMIN, 'sky', 'land', new SpeciesFormChangeTimeOfDayTrigger(TimeOfDay.DAWN, TimeOfDay.NIGHT)),
|
|
|
|
new SpeciesFormChange(Species.SHAYMIN, 'sky', 'land', new SpeciesFormChangeStatusEffectTrigger(StatusEffect.FREEZE))
|
|
|
|
],
|
2024-02-14 05:21:44 +00:00
|
|
|
[Species.GARBODOR]: [
|
|
|
|
new SpeciesFormChange(Species.GARBODOR, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
2024-01-10 04:34:43 +00:00
|
|
|
[Species.TORNADUS]: [
|
|
|
|
new SpeciesFormChange(Species.TORNADUS, SpeciesFormKey.INCARNATE, SpeciesFormKey.THERIAN, new SpeciesFormChangeItemTrigger(FormChangeItem.REVEAL_GLASS))
|
|
|
|
],
|
|
|
|
[Species.THUNDURUS]: [
|
|
|
|
new SpeciesFormChange(Species.THUNDURUS, SpeciesFormKey.INCARNATE, SpeciesFormKey.THERIAN, new SpeciesFormChangeItemTrigger(FormChangeItem.REVEAL_GLASS))
|
|
|
|
],
|
|
|
|
[Species.LANDORUS]: [
|
|
|
|
new SpeciesFormChange(Species.LANDORUS, SpeciesFormKey.INCARNATE, SpeciesFormKey.THERIAN, new SpeciesFormChangeItemTrigger(FormChangeItem.REVEAL_GLASS))
|
|
|
|
],
|
|
|
|
[Species.KELDEO]: [
|
2024-01-10 04:48:23 +00:00
|
|
|
new SpeciesFormChange(Species.KELDEO, 'ordinary', 'resolute', new SpeciesFormChangeMoveLearnedTrigger(Moves.SECRET_SWORD)),
|
|
|
|
new SpeciesFormChange(Species.KELDEO, 'resolute', 'ordinary', new SpeciesFormChangeMoveLearnedTrigger(Moves.SECRET_SWORD, false))
|
2024-01-10 04:34:43 +00:00
|
|
|
],
|
|
|
|
[Species.MELOETTA]: [
|
|
|
|
new SpeciesFormChange(Species.MELOETTA, 'aria', 'pirouette', new SpeciesFormChangeMoveUsedTrigger(Moves.RELIC_SONG), true),
|
|
|
|
new SpeciesFormChange(Species.MELOETTA, 'pirouette', 'aria', new SpeciesFormChangeMoveUsedTrigger(Moves.RELIC_SONG), true),
|
|
|
|
new SpeciesFormChange(Species.MELOETTA, 'pirouette', 'aria', new SpeciesFormChangeActiveTrigger(false), true)
|
|
|
|
],
|
|
|
|
[Species.DIANCIE]: [
|
|
|
|
new SpeciesFormChange(Species.DIANCIE, '', SpeciesFormKey.MEGA, new SpeciesFormChangeItemTrigger(FormChangeItem.DIANCITE))
|
|
|
|
],
|
2024-02-22 01:59:08 +00:00
|
|
|
[Species.HOOPA]: [
|
|
|
|
new SpeciesFormChange(Species.HOOPA, '', 'unbound', new SpeciesFormChangeItemTrigger(FormChangeItem.PRISON_BOTTLE))
|
|
|
|
],
|
|
|
|
[Species.NECROZMA]: [
|
|
|
|
new SpeciesFormChange(Species.NECROZMA, '', 'dawn-wings', new SpeciesFormChangeItemTrigger(FormChangeItem.N_LUNARIZER)),
|
|
|
|
new SpeciesFormChange(Species.NECROZMA, '', 'dusk-mane', new SpeciesFormChangeItemTrigger(FormChangeItem.N_SOLARIZER))
|
|
|
|
],
|
2024-02-14 05:21:44 +00:00
|
|
|
[Species.MELMETAL]: [
|
|
|
|
new SpeciesFormChange(Species.MELMETAL, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.RILLABOOM]: [
|
|
|
|
new SpeciesFormChange(Species.RILLABOOM, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.CINDERACE]: [
|
|
|
|
new SpeciesFormChange(Species.CINDERACE, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.INTELEON]: [
|
|
|
|
new SpeciesFormChange(Species.INTELEON, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.CORVIKNIGHT]: [
|
|
|
|
new SpeciesFormChange(Species.CORVIKNIGHT, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.ORBEETLE]: [
|
|
|
|
new SpeciesFormChange(Species.ORBEETLE, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.DREDNAW]: [
|
|
|
|
new SpeciesFormChange(Species.DREDNAW, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.COALOSSAL]: [
|
|
|
|
new SpeciesFormChange(Species.COALOSSAL, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.FLAPPLE]: [
|
|
|
|
new SpeciesFormChange(Species.FLAPPLE, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.APPLETUN]: [
|
|
|
|
new SpeciesFormChange(Species.APPLETUN, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.SANDACONDA]: [
|
|
|
|
new SpeciesFormChange(Species.SANDACONDA, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.TOXTRICITY]: [
|
|
|
|
new SpeciesFormChange(Species.TOXTRICITY, 'amped', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS)),
|
|
|
|
new SpeciesFormChange(Species.TOXTRICITY, 'lowkey', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS)),
|
|
|
|
new SpeciesFormChange(Species.TOXTRICITY, SpeciesFormKey.GIGANTAMAX, 'amped', new SpeciesFormChangeCompoundTrigger(new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS, false), new SpeciesDefaultFormMatchTrigger('amped'))),
|
|
|
|
new SpeciesFormChange(Species.TOXTRICITY, SpeciesFormKey.GIGANTAMAX, 'lowkey', new SpeciesFormChangeCompoundTrigger(new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS, false), new SpeciesDefaultFormMatchTrigger('lowkey')))
|
|
|
|
],
|
|
|
|
[Species.CENTISKORCH]: [
|
|
|
|
new SpeciesFormChange(Species.CENTISKORCH, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.HATTERENE]: [
|
|
|
|
new SpeciesFormChange(Species.HATTERENE, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.GRIMMSNARL]: [
|
|
|
|
new SpeciesFormChange(Species.GRIMMSNARL, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.ALCREMIE]: [
|
|
|
|
new SpeciesFormChange(Species.ALCREMIE, 'vanilla-cream', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.COPPERAJAH]: [
|
|
|
|
new SpeciesFormChange(Species.COPPERAJAH, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
|
|
|
[Species.DURALUDON]: [
|
|
|
|
new SpeciesFormChange(Species.DURALUDON, '', SpeciesFormKey.GIGANTAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
2024-02-22 01:59:08 +00:00
|
|
|
[Species.ZACIAN]: [
|
|
|
|
new SpeciesFormChange(Species.ZACIAN, 'hero', 'crowned', new SpeciesFormChangeItemTrigger(FormChangeItem.RUSTED_SWORD))
|
|
|
|
],
|
|
|
|
[Species.ZAMAZENTA]: [
|
|
|
|
new SpeciesFormChange(Species.ZAMAZENTA, 'hero', 'crowned', new SpeciesFormChangeItemTrigger(FormChangeItem.RUSTED_SHIELD))
|
|
|
|
],
|
2024-02-20 00:37:28 +00:00
|
|
|
[Species.ETERNATUS]: [
|
|
|
|
new SpeciesFormChange(Species.ETERNATUS, '', SpeciesFormKey.ETERNAMAX, new SpeciesFormChangeManualTrigger()),
|
|
|
|
new SpeciesFormChange(Species.ETERNATUS, '', SpeciesFormKey.ETERNAMAX, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
|
|
|
],
|
2024-02-14 05:21:44 +00:00
|
|
|
[Species.URSHIFU]: [
|
|
|
|
new SpeciesFormChange(Species.URSHIFU, 'single-strike', SpeciesFormKey.GIGANTAMAX_SINGLE, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS)),
|
|
|
|
new SpeciesFormChange(Species.URSHIFU, 'rapid-strike', SpeciesFormKey.GIGANTAMAX_RAPID, new SpeciesFormChangeItemTrigger(FormChangeItem.MAX_MUSHROOMS))
|
2024-02-20 00:37:28 +00:00
|
|
|
],
|
2024-02-22 01:59:08 +00:00
|
|
|
[Species.CALYREX]: [
|
|
|
|
new SpeciesFormChange(Species.CALYREX, '', 'ice', new SpeciesFormChangeItemTrigger(FormChangeItem.ICY_REINS_OF_UNITY)),
|
|
|
|
new SpeciesFormChange(Species.CALYREX, '', 'shadow', new SpeciesFormChangeItemTrigger(FormChangeItem.SHADOW_REINS_OF_UNITY))
|
|
|
|
],
|
2024-02-20 00:37:28 +00:00
|
|
|
[Species.ENAMORUS]: [
|
|
|
|
new SpeciesFormChange(Species.ENAMORUS, SpeciesFormKey.INCARNATE, SpeciesFormKey.THERIAN, new SpeciesFormChangeItemTrigger(FormChangeItem.REVEAL_GLASS))
|
|
|
|
],
|
|
|
|
[Species.OGERPON]: [
|
|
|
|
new SpeciesFormChange(Species.OGERPON, 'teal-mask', 'wellspring-mask', new SpeciesFormChangeItemTrigger(FormChangeItem.WELLSPRING_MASK)),
|
|
|
|
new SpeciesFormChange(Species.OGERPON, 'teal-mask', 'hearthflame-mask', new SpeciesFormChangeItemTrigger(FormChangeItem.HEARTHFLAME_MASK)),
|
|
|
|
new SpeciesFormChange(Species.OGERPON, 'teal-mask', 'cornerstone-mask', new SpeciesFormChangeItemTrigger(FormChangeItem.CORNERSTONE_MASK))
|
2024-01-10 04:34:43 +00:00
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
{
|
|
|
|
const formChangeKeys = Object.keys(pokemonFormChanges);
|
|
|
|
formChangeKeys.forEach(pk => {
|
|
|
|
const formChanges = pokemonFormChanges[pk];
|
|
|
|
let newFormChanges: SpeciesFormChange[] = [];
|
|
|
|
for (let fc of formChanges) {
|
|
|
|
const itemTrigger = fc.findTrigger(SpeciesFormChangeItemTrigger) as SpeciesFormChangeItemTrigger;
|
|
|
|
if (itemTrigger && !formChanges.find(c => fc.formKey === c.preFormKey && fc.preFormKey === c.formKey))
|
|
|
|
newFormChanges.push(new SpeciesFormChange(fc.speciesId, fc.formKey, fc.preFormKey, new SpeciesFormChangeItemTrigger(itemTrigger.item, false)));
|
|
|
|
}
|
|
|
|
formChanges.push(...newFormChanges);
|
|
|
|
});
|
|
|
|
}
|