Minor changes to forms

pull/14/head
Flashfyre 2024-01-12 20:16:29 -05:00
parent 2d5dcaf835
commit ea6c547af1
6 changed files with 7 additions and 8 deletions

View File

@ -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];

View File

@ -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));

View File

@ -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);

View File

@ -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

View File

@ -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 = [];

View File

@ -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;
}