Replaces instances of SpeciesEvolution with SpeciesFormEvolution

pull/16/head
Flashfyre 2024-02-26 13:50:55 -05:00
parent 74e9b95e13
commit 12b1d23110
4 changed files with 12 additions and 12 deletions

View File

@ -5,7 +5,7 @@ import beautify from 'json-beautify';
import { TrainerType } from "./enums/trainer-type";
import { TimeOfDay } from "./enums/time-of-day";
import { Biome } from "./enums/biome";
import { SpeciesEvolution } from "./pokemon-evolutions";
import { SpeciesFormEvolution } from "./pokemon-evolutions";
export function getBiomeName(biome: Biome | -1) {
if (biome === -1)
@ -7659,7 +7659,7 @@ export const biomeTrainerPools: BiomeTrainerPools = {
const speciesId = pb[0] as Species;
const biomeEntries = pb[3] as (Biome | BiomePoolTier)[][];
const speciesEvolutions: SpeciesEvolution[] = pokemonEvolutions.hasOwnProperty(speciesId)
const speciesEvolutions: SpeciesFormEvolution[] = pokemonEvolutions.hasOwnProperty(speciesId)
? pokemonEvolutions[speciesId]
: [];
@ -7688,7 +7688,7 @@ export const biomeTrainerPools: BiomeTrainerPools = {
const existingSpeciesIds = biomeTierPool[t] as unknown as Species[];
for (let es = 0; es < existingSpeciesIds.length; es++) {
const existingSpeciesId = existingSpeciesIds[es];
if (pokemonEvolutions.hasOwnProperty(existingSpeciesId) && (pokemonEvolutions[existingSpeciesId] as SpeciesEvolution[]).find(ese => ese.speciesId === speciesId)) {
if (pokemonEvolutions.hasOwnProperty(existingSpeciesId) && (pokemonEvolutions[existingSpeciesId] as SpeciesFormEvolution[]).find(ese => ese.speciesId === speciesId)) {
treeIndex = t;
arrayIndex = es + 1;
break;

View File

@ -100,7 +100,7 @@ export class SpeciesFriendshipEvolutionCondition extends SpeciesEvolutionConditi
}
interface PokemonEvolutions {
[key: string]: SpeciesEvolution[]
[key: string]: SpeciesFormEvolution[]
}
export const pokemonEvolutions: PokemonEvolutions = {

View File

@ -1,7 +1,7 @@
import SoundFade from "phaser3-rex-plugins/plugins/soundfade";
import { Phase } from "./phase";
import BattleScene from "./battle-scene";
import { SpeciesEvolution } from "./data/pokemon-evolutions";
import { SpeciesFormEvolution } from "./data/pokemon-evolutions";
import EvolutionSceneHandler from "./ui/evolution-scene-handler";
import * as Utils from "./utils";
import { Mode } from "./ui/ui";
@ -14,7 +14,7 @@ export class EvolutionPhase extends Phase {
protected pokemon: PlayerPokemon;
protected lastLevel: integer;
private evolution: SpeciesEvolution;
private evolution: SpeciesFormEvolution;
protected evolutionContainer: Phaser.GameObjects.Container;
protected evolutionBaseBg: Phaser.GameObjects.Image;
@ -26,7 +26,7 @@ export class EvolutionPhase extends Phase {
protected pokemonEvoSprite: Phaser.GameObjects.Sprite;
protected pokemonEvoTintSprite: Phaser.GameObjects.Sprite;
constructor(scene: BattleScene, pokemon: PlayerPokemon, evolution: SpeciesEvolution, lastLevel: integer) {
constructor(scene: BattleScene, pokemon: PlayerPokemon, evolution: SpeciesFormEvolution, lastLevel: integer) {
super(scene);
this.pokemon = pokemon;

View File

@ -14,7 +14,7 @@ import { Gender } from './data/gender';
import { initMoveAnim, loadMoveAnimAssets } from './data/battle-anims';
import { Status, StatusEffect } from './data/status-effect';
import { reverseCompatibleTms, tmSpecies } from './data/tms';
import { pokemonEvolutions, pokemonPrevolutions, SpeciesEvolution, SpeciesEvolutionCondition } from './data/pokemon-evolutions';
import { pokemonEvolutions, pokemonPrevolutions, SpeciesFormEvolution, SpeciesEvolutionCondition } from './data/pokemon-evolutions';
import { DamagePhase, FaintPhase, StatChangePhase, SwitchSummonPhase } from './phases';
import { BattleStat } from './data/battle-stat';
import { BattlerTag, BattlerTagLapseType, EncoreTag, TypeBoostTag, getBattlerTag } from './data/battler-tags';
@ -726,7 +726,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return (atkScore + defScore) * hpDiffRatio;
}
getEvolution(): SpeciesEvolution {
getEvolution(): SpeciesFormEvolution {
if (!pokemonEvolutions.hasOwnProperty(this.species.speciesId))
return null;
@ -1950,7 +1950,7 @@ export class PlayerPokemon extends Pokemon {
});
}
getPossibleEvolution(evolution: SpeciesEvolution): Promise<Pokemon> {
getPossibleEvolution(evolution: SpeciesFormEvolution): Promise<Pokemon> {
return new Promise(resolve => {
const species = getPokemonSpecies(evolution.speciesId);
const formIndex = evolution.evoFormKey !== null ? Math.max(this.species.forms.findIndex(f => f.formKey === evolution.evoFormKey), 0) : this.formIndex;
@ -1959,7 +1959,7 @@ export class PlayerPokemon extends Pokemon {
});
}
evolve(evolution: SpeciesEvolution): Promise<void> {
evolve(evolution: SpeciesFormEvolution): Promise<void> {
return new Promise(resolve => {
this.pauseEvolutions = false;
this.handleSpecialEvolutions(evolution);
@ -1981,7 +1981,7 @@ export class PlayerPokemon extends Pokemon {
});
}
private handleSpecialEvolutions(evolution: SpeciesEvolution) {
private handleSpecialEvolutions(evolution: SpeciesFormEvolution) {
if (this.species.speciesId === Species.NINCADA && evolution.speciesId === Species.NINJASK) {
const newEvolution = pokemonEvolutions[this.species.speciesId][1];
if (newEvolution.condition.predicate(this)) {