mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-21 17:12:44 +02:00
Fixed held item evolution condition
This commit is contained in:
parent
68a9db5a6b
commit
74349d431b
@ -15,7 +15,6 @@ import { speciesStarterCosts } from "./starters";
|
|||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { allMoves } from "#app/data/data-lists";
|
import { allMoves } from "#app/data/data-lists";
|
||||||
import { getPokemonSpecies } from "#app/utils/pokemon-utils";
|
import { getPokemonSpecies } from "#app/utils/pokemon-utils";
|
||||||
import { allHeldItems } from "#app/items/all-held-items";
|
|
||||||
import { HeldItemId } from "#enums/held-item-id";
|
import { HeldItemId } from "#enums/held-item-id";
|
||||||
|
|
||||||
export enum SpeciesWildEvolutionDelay {
|
export enum SpeciesWildEvolutionDelay {
|
||||||
@ -111,7 +110,7 @@ type EvolutionConditionData =
|
|||||||
{key: typeof EvoCondKey.GENDER, gender: Gender} |
|
{key: typeof EvoCondKey.GENDER, gender: Gender} |
|
||||||
{key: typeof EvoCondKey.MOVE_TYPE | typeof EvoCondKey.PARTY_TYPE, pkmnType: PokemonType} |
|
{key: typeof EvoCondKey.MOVE_TYPE | typeof EvoCondKey.PARTY_TYPE, pkmnType: PokemonType} |
|
||||||
{key: typeof EvoCondKey.SPECIES_CAUGHT, speciesCaught: SpeciesId} |
|
{key: typeof EvoCondKey.SPECIES_CAUGHT, speciesCaught: SpeciesId} |
|
||||||
{key: typeof EvoCondKey.HELD_ITEM, itemKey: SpeciesStatBoosterItem} |
|
{key: typeof EvoCondKey.HELD_ITEM, itemKey: HeldItemId} |
|
||||||
{key: typeof EvoCondKey.NATURE, nature: Nature[]} |
|
{key: typeof EvoCondKey.NATURE, nature: Nature[]} |
|
||||||
{key: typeof EvoCondKey.WEATHER, weather: WeatherType[]} |
|
{key: typeof EvoCondKey.WEATHER, weather: WeatherType[]} |
|
||||||
{key: typeof EvoCondKey.TYROGUE, move: TyrogueMove} |
|
{key: typeof EvoCondKey.TYROGUE, move: TyrogueMove} |
|
||||||
@ -202,7 +201,7 @@ export class SpeciesEvolutionCondition {
|
|||||||
case EvoCondKey.SPECIES_CAUGHT:
|
case EvoCondKey.SPECIES_CAUGHT:
|
||||||
return !!globalScene.gameData.dexData[cond.speciesCaught].caughtAttr;
|
return !!globalScene.gameData.dexData[cond.speciesCaught].caughtAttr;
|
||||||
case EvoCondKey.HELD_ITEM:
|
case EvoCondKey.HELD_ITEM:
|
||||||
return pokemon.getHeldItems().some(m => m.is("SpeciesStatBoosterModifier") && (m.type as SpeciesStatBoosterModifierType).key === cond.itemKey)
|
return pokemon.heldItemManager.hasItem(cond.itemKey);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1761,8 +1760,8 @@ export const pokemonEvolutions: PokemonEvolutions = {
|
|||||||
new SpeciesEvolution(SpeciesId.DUSKNOIR, 1, EvolutionItem.REAPER_CLOTH, null, SpeciesWildEvolutionDelay.VERY_LONG)
|
new SpeciesEvolution(SpeciesId.DUSKNOIR, 1, EvolutionItem.REAPER_CLOTH, null, SpeciesWildEvolutionDelay.VERY_LONG)
|
||||||
],
|
],
|
||||||
[SpeciesId.CLAMPERL]: [
|
[SpeciesId.CLAMPERL]: [
|
||||||
new SpeciesEvolution(SpeciesId.HUNTAIL, 1, EvolutionItem.LINKING_CORD, {key: EvoCondKey.HELD_ITEM, itemKey: "DEEP_SEA_TOOTH"}, SpeciesWildEvolutionDelay.VERY_LONG),
|
new SpeciesEvolution(SpeciesId.HUNTAIL, 1, EvolutionItem.LINKING_CORD, {key: EvoCondKey.HELD_ITEM, itemKey: HeldItemId.DEEP_SEA_TOOTH}, SpeciesWildEvolutionDelay.VERY_LONG),
|
||||||
new SpeciesEvolution(SpeciesId.GOREBYSS, 1, EvolutionItem.LINKING_CORD, {key: EvoCondKey.HELD_ITEM, itemKey: "DEEP_SEA_SCALE"}, SpeciesWildEvolutionDelay.VERY_LONG)
|
new SpeciesEvolution(SpeciesId.GOREBYSS, 1, EvolutionItem.LINKING_CORD, {key: EvoCondKey.HELD_ITEM, itemKey: HeldItemId.DEEP_SEA_SCALE}, SpeciesWildEvolutionDelay.VERY_LONG)
|
||||||
],
|
],
|
||||||
[SpeciesId.BOLDORE]: [
|
[SpeciesId.BOLDORE]: [
|
||||||
new SpeciesEvolution(SpeciesId.GIGALITH, 1, EvolutionItem.LINKING_CORD, null, SpeciesWildEvolutionDelay.VERY_LONG)
|
new SpeciesEvolution(SpeciesId.GIGALITH, 1, EvolutionItem.LINKING_CORD, null, SpeciesWildEvolutionDelay.VERY_LONG)
|
||||||
|
Loading…
Reference in New Issue
Block a user