Minor changes to forms
parent
2d5dcaf835
commit
ea6c547af1
|
@ -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;
|
return this.speciesId;
|
||||||
|
|
||||||
const evolutions = pokemonEvolutions[this.speciesId];
|
const evolutions = pokemonEvolutions[this.speciesId];
|
||||||
|
|
|
@ -114,7 +114,6 @@ export class FormChangePhase extends EvolutionPhase {
|
||||||
this.pokemon.cry();
|
this.pokemon.cry();
|
||||||
this.scene.time.delayedCall(1250, () => {
|
this.scene.time.delayedCall(1250, () => {
|
||||||
const isMega = this.formChange.formKey.indexOf(SpeciesFormKey.MEGA) > -1;
|
const isMega = this.formChange.formKey.indexOf(SpeciesFormKey.MEGA) > -1;
|
||||||
const isRevert = !isMega && this.formChange.formKey === this.pokemon.species.forms[0].formKey;
|
|
||||||
let playEvolutionFanfare = false;
|
let playEvolutionFanfare = false;
|
||||||
if (isMega) {
|
if (isMega) {
|
||||||
this.scene.validateAchv(achvs.MEGA_EVOLVE);
|
this.scene.validateAchv(achvs.MEGA_EVOLVE);
|
||||||
|
|
|
@ -588,7 +588,7 @@ class FormChangeItemModifierTypeGenerator extends ModifierTypeGenerator {
|
||||||
|
|
||||||
const formChangeItemPool = party.filter(p => pokemonFormChanges.hasOwnProperty(p.species.speciesId)).map(p => {
|
const formChangeItemPool = party.filter(p => pokemonFormChanges.hasOwnProperty(p.species.speciesId)).map(p => {
|
||||||
const formChanges = pokemonFormChanges[p.species.speciesId];
|
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);
|
.map(fc => fc.findTrigger(SpeciesFormChangeItemTrigger) as SpeciesFormChangeItemTrigger).filter(t => t && t.active);
|
||||||
}).flat().flatMap(fc => fc.item);
|
}).flat().flatMap(fc => fc.item);
|
||||||
|
|
||||||
|
|
|
@ -784,7 +784,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
|
|
||||||
const filter = !forStarter ? this.species.getCompatibleFusionSpeciesFilter()
|
const filter = !forStarter ? this.species.getCompatibleFusionSpeciesFilter()
|
||||||
: species => {
|
: 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)
|
&& !pokemonPrevolutions.hasOwnProperty(species.speciesId)
|
||||||
&& !species.pseudoLegendary
|
&& !species.pseudoLegendary
|
||||||
&& !species.legendary
|
&& !species.legendary
|
||||||
|
|
|
@ -62,7 +62,6 @@ interface SessionSaveData {
|
||||||
gameMode: GameMode;
|
gameMode: GameMode;
|
||||||
party: PokemonData[];
|
party: PokemonData[];
|
||||||
enemyParty: PokemonData[];
|
enemyParty: PokemonData[];
|
||||||
enemyField: PokemonData[];
|
|
||||||
modifiers: PersistentModifierData[];
|
modifiers: PersistentModifierData[];
|
||||||
enemyModifiers: PersistentModifierData[];
|
enemyModifiers: PersistentModifierData[];
|
||||||
arena: ArenaData;
|
arena: ArenaData;
|
||||||
|
@ -524,7 +523,7 @@ export class GameData {
|
||||||
const [ versionNumbers, oldVersionNumbers ] = versions.map(ver => ver.split('.').map(v => parseInt(v)));
|
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[] = [];
|
const ret: PokemonData[] = [];
|
||||||
if (v === null)
|
if (v === null)
|
||||||
v = [];
|
v = [];
|
||||||
|
|
|
@ -16,6 +16,7 @@ import { StatsContainer } from "./stats-container";
|
||||||
import { addWindow } from "./window";
|
import { addWindow } from "./window";
|
||||||
import { Nature, getNatureName } from "../data/nature";
|
import { Nature, getNatureName } from "../data/nature";
|
||||||
import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
||||||
|
import { pokemonFormChanges } from "../data/pokemon-forms";
|
||||||
|
|
||||||
export type StarterSelectCallback = (starters: Starter[]) => void;
|
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.canCycleShiny = !!(dexEntry.caughtAttr & DexAttr.NON_SHINY && dexEntry.caughtAttr & DexAttr.SHINY);
|
||||||
this.canCycleGender = !!(dexEntry.caughtAttr & DexAttr.MALE && dexEntry.caughtAttr & DexAttr.FEMALE);
|
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.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;
|
.map((_, f) => dexEntry.caughtAttr & this.scene.gameData.getFormAttr(f)).filter(a => a).length > 1;
|
||||||
this.canCycleNature = this.scene.gameData.getNaturesForAttr(dexEntry.natureAttr).length > 1;
|
this.canCycleNature = this.scene.gameData.getNaturesForAttr(dexEntry.natureAttr).length > 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue