Merge branch 'beta' into doubles-run-away-spd-boost-fix

This commit is contained in:
Jonathan Bankston 2025-06-17 15:34:48 -05:00 committed by GitHub
commit 7cc64a9dae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 5 deletions

@ -1 +1 @@
Subproject commit 4dab23d6a78b6cf32db43c9953e3c2000f448007
Subproject commit fade123e20ff951e199d7c0466686fe8c5511643

View File

@ -291,13 +291,18 @@ export class SpeciesFormEvolution {
);
}
/**
* Checks if this evolution is item-based and any conditions for it are fulfilled
* @param pokemon {@linkcode Pokemon} who wants to evolve
* @param forFusion defaults to False. Whether this evolution is meant for the secondary fused mon. In that case, use their form key.
* @returns whether this evolution uses an item and can apply to the Pokemon
*/
public isValidItemEvolution(pokemon: Pokemon, forFusion = false): boolean {
return (
// If an item is given, check if it's the right one
!isNullOrUndefined(this.item) &&
pokemon.level >= this.level &&
// Check form key, using the fusion's form key if we're checking the fusion
(isNullOrUndefined(this.preFormKey) || (forFusion ? pokemon.getFormKey() : pokemon.getFusionFormKey()) === this.preFormKey) &&
(isNullOrUndefined(this.preFormKey) || (forFusion ? pokemon.getFusionFormKey() : pokemon.getFormKey()) === this.preFormKey) &&
(isNullOrUndefined(this.condition) || this.condition.conditionsFulfilled(pokemon))
);
}

View File

@ -1603,12 +1603,12 @@ class EvolutionItemModifierTypeGenerator extends ModifierTypeGenerator {
)
.flatMap(p => {
const evolutions = pokemonEvolutions[p.fusionSpecies!.speciesId];
return evolutions.filter(e => e.validate(p, true));
return evolutions.filter(e => e.isValidItemEvolution(p, true));
}),
]
.flat()
.flatMap(e => e.evoItem)
.filter(i => (!!i && i > 50) === rare);
.filter(i => !!i && i > 50 === rare);
if (!evolutionItemPool.length) {
return null;

View File

@ -101,6 +101,7 @@ const namespaceMap = {
doubleBattleDialogue: "dialogue-double-battle",
splashMessages: "splash-texts",
mysteryEncounterMessages: "mystery-encounter-texts",
biome: "biomes",
};
//#region Functions