diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 40f1e83fc60..6ec7477fa54 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -355,7 +355,7 @@ export default class PokemonSpecies extends PokemonSpeciesForm { } } - if (!allowEvolving || !pokemonEvolutions.hasOwnProperty(this.speciesId) || !pokemonEvolutions[this.speciesId].find(e => !e.evoFormKey || e.evoFormKey.indexOf(SpeciesFormKey.MEGA) === -1)) + if (!allowEvolving || !pokemonEvolutions.hasOwnProperty(this.speciesId)) return this.speciesId; const evolutions = pokemonEvolutions[this.speciesId]; diff --git a/src/form-change-phase.ts b/src/form-change-phase.ts index 73886da5a5d..b6e98f71b51 100644 --- a/src/form-change-phase.ts +++ b/src/form-change-phase.ts @@ -114,7 +114,6 @@ export class FormChangePhase extends EvolutionPhase { this.pokemon.cry(); this.scene.time.delayedCall(1250, () => { const isMega = this.formChange.formKey.indexOf(SpeciesFormKey.MEGA) > -1; - const isRevert = !isMega && this.formChange.formKey === this.pokemon.species.forms[0].formKey; let playEvolutionFanfare = false; if (isMega) { this.scene.validateAchv(achvs.MEGA_EVOLVE); @@ -179,7 +178,7 @@ export class QuietFormChangePhase extends BattlePhase { if (this.pokemon.formIndex === this.pokemon.species.forms.findIndex(f => f.formKey === this.formChange.formKey)) return this.end(); - + const preName = this.pokemon.name; this.pokemon.changeForm(this.formChange).then(() => { this.scene.ui.showText(getSpeciesFormChangeMessage(this.pokemon, this.formChange, preName), null, () => this.end(), Utils.fixedInt(1500)); diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index f2588535b41..53409d1ea78 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -588,7 +588,7 @@ class FormChangeItemModifierTypeGenerator extends ModifierTypeGenerator { const formChangeItemPool = party.filter(p => pokemonFormChanges.hasOwnProperty(p.species.speciesId)).map(p => { const formChanges = pokemonFormChanges[p.species.speciesId]; - return formChanges.filter(fc => fc.formKey.indexOf(SpeciesFormKey.MEGA) === -1 || party[0].scene.getModifiers(Modifiers.MegaEvolutionAccessModifier).length) + return formChanges.filter(fc => (fc.formKey.indexOf(SpeciesFormKey.MEGA) === -1 && fc.formKey.indexOf(SpeciesFormKey.PRIMAL) === -1) || party[0].scene.getModifiers(Modifiers.MegaEvolutionAccessModifier).length) .map(fc => fc.findTrigger(SpeciesFormChangeItemTrigger) as SpeciesFormChangeItemTrigger).filter(t => t && t.active); }).flat().flatMap(fc => fc.item); diff --git a/src/pokemon.ts b/src/pokemon.ts index 857627d599f..feaffef5f7e 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -784,7 +784,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const filter = !forStarter ? this.species.getCompatibleFusionSpeciesFilter() : species => { - return (pokemonEvolutions.hasOwnProperty(species.speciesId) && pokemonEvolutions[species.speciesId].find(e => !e.evoFormKey || e.evoFormKey.indexOf(SpeciesFormKey.MEGA) === -1)) + return pokemonEvolutions.hasOwnProperty(species.speciesId) && !pokemonPrevolutions.hasOwnProperty(species.speciesId) && !species.pseudoLegendary && !species.legendary diff --git a/src/system/game-data.ts b/src/system/game-data.ts index cacbcd23f2e..dd64ad10cd3 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -62,7 +62,6 @@ interface SessionSaveData { gameMode: GameMode; party: PokemonData[]; enemyParty: PokemonData[]; - enemyField: PokemonData[]; modifiers: PersistentModifierData[]; enemyModifiers: PersistentModifierData[]; arena: ArenaData; @@ -524,7 +523,7 @@ export class GameData { const [ versionNumbers, oldVersionNumbers ] = versions.map(ver => ver.split('.').map(v => parseInt(v))); }*/ - if (k === 'party' || k === 'enemyParty' || k === 'enemyField') { + if (k === 'party' || k === 'enemyParty') { const ret: PokemonData[] = []; if (v === null) v = []; diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 1d0d61bba7c..ff34c9db890 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -16,6 +16,7 @@ import { StatsContainer } from "./stats-container"; import { addWindow } from "./window"; import { Nature, getNatureName } from "../data/nature"; import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; +import { pokemonFormChanges } from "../data/pokemon-forms"; export type StarterSelectCallback = (starters: Starter[]) => void; @@ -830,7 +831,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.canCycleShiny = !!(dexEntry.caughtAttr & DexAttr.NON_SHINY && dexEntry.caughtAttr & DexAttr.SHINY); this.canCycleGender = !!(dexEntry.caughtAttr & DexAttr.MALE && dexEntry.caughtAttr & DexAttr.FEMALE); this.canCycleAbility = [ dexEntry.caughtAttr & DexAttr.ABILITY_1, dexEntry.caughtAttr & DexAttr.ABILITY_2, dexEntry.caughtAttr & DexAttr.ABILITY_HIDDEN ].filter(a => a).length > 1; - this.canCycleForm = species.forms.filter(f => !f.formKey || f.formKey.indexOf(SpeciesFormKey.MEGA) === -1) + this.canCycleForm = species.forms.filter(f => !f.formKey || !pokemonFormChanges[species.speciesId].find(fc => fc.formKey)) .map((_, f) => dexEntry.caughtAttr & this.scene.gameData.getFormAttr(f)).filter(a => a).length > 1; this.canCycleNature = this.scene.gameData.getNaturesForAttr(dexEntry.natureAttr).length > 1; }