[Bug] Fix Eviolite Weight Condition (#3681)
* [Bug] Fix Eviolite Weight Condition * Break Up Conditions for Legibility --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
b70bf0f4aa
commit
cd6cee860a
|
@ -1730,8 +1730,14 @@ const modifierPool: ModifierPool = {
|
|||
new WeightedModifierType(modifierTypes.EVIOLITE, (party: Pokemon[]) => {
|
||||
const { gameMode, gameData } = party[0].scene;
|
||||
if (gameMode.isDaily || (!gameMode.isFreshStartChallenge() && gameData.isUnlocked(Unlockables.EVIOLITE))) {
|
||||
return party.some(p => ((p.getSpeciesForm(true).speciesId in pokemonEvolutions) || (p.isFusion() && (p.getFusionSpeciesForm(true).speciesId in pokemonEvolutions)))
|
||||
&& !p.getHeldItems().some(i => i instanceof EvolutionStatBoosterModifier) && !p.isMax()) ? 10 : 0;
|
||||
return party.some(p => {
|
||||
// Check if Pokemon's species (or fusion species, if applicable) can evolve or if they're G-Max'd
|
||||
if (!p.isMax() && ((p.getSpeciesForm(true).speciesId in pokemonEvolutions) || (p.isFusion() && (p.getFusionSpeciesForm(true).speciesId in pokemonEvolutions)))) {
|
||||
// Check if Pokemon is already holding an Eviolite
|
||||
return !p.getHeldItems().some(i => i.type.id === "EVIOLITE");
|
||||
}
|
||||
return false;
|
||||
}) ? 10 : 0;
|
||||
}
|
||||
return 0;
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue