[Bug] [Balance] Gimmighoul evolution adjustments/fixes (#4463)

* Fix Gimmighoul evolution

* Fix counter

* Less janky maxStack check

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
This commit is contained in:
AJ Fontaine 2024-09-27 16:57:46 -04:00 committed by GitHub
parent d28c77db21
commit 1a19065a45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 5 deletions

View File

@ -11,6 +11,7 @@ import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { TimeOfDay } from "#enums/time-of-day";
import { DamageMoneyRewardModifier, ExtraModifierModifier, MoneyMultiplierModifier } from "#app/modifier/modifier";
export enum SpeciesWildEvolutionDelay {
NONE,
@ -1647,8 +1648,8 @@ export const pokemonEvolutions: PokemonEvolutions = {
new SpeciesEvolution(Species.FROSMOTH, 1, null, new SpeciesFriendshipEvolutionCondition(90, p => p.scene.arena.getTimeOfDay() === TimeOfDay.DUSK || p.scene.arena.getTimeOfDay() === TimeOfDay.NIGHT), SpeciesWildEvolutionDelay.MEDIUM)
],
[Species.GIMMIGHOUL]: [
new SpeciesFormEvolution(Species.GHOLDENGO, "chest", "", 1, null, new SpeciesEvolutionCondition( p => p.evoCounter > 9 ), SpeciesWildEvolutionDelay.VERY_LONG),
new SpeciesFormEvolution(Species.GHOLDENGO, "roaming", "", 1, null, new SpeciesEvolutionCondition( p => p.evoCounter > 9 ), SpeciesWildEvolutionDelay.VERY_LONG)
new SpeciesFormEvolution(Species.GHOLDENGO, "chest", "", 1, null, new SpeciesEvolutionCondition( p => p.evoCounter > 9 - p.getHeldItems().filter(m => m instanceof DamageMoneyRewardModifier).length - p.scene.findModifiers(m => m instanceof MoneyMultiplierModifier || m instanceof ExtraModifierModifier).length ), SpeciesWildEvolutionDelay.VERY_LONG),
new SpeciesFormEvolution(Species.GHOLDENGO, "roaming", "", 1, null, new SpeciesEvolutionCondition( p => p.evoCounter > 9 - p.getHeldItems().filter(m => m instanceof DamageMoneyRewardModifier).length - p.scene.findModifiers(m => m instanceof MoneyMultiplierModifier || m instanceof ExtraModifierModifier).length ), SpeciesWildEvolutionDelay.VERY_LONG)
]
};

View File

@ -859,7 +859,7 @@ export class EvoTrackerModifier extends PokemonHeldItemModifier {
}
clone(): PersistentModifier {
return new EvoTrackerModifier(this.type, this.pokemonId, this.species, this.stackCount);
return new EvoTrackerModifier(this.type, this.pokemonId, this.species, this.required, this.stackCount);
}
getArgs(): any[] {
@ -870,8 +870,9 @@ export class EvoTrackerModifier extends PokemonHeldItemModifier {
return true;
}
getMaxHeldItemCount(_pokemon: Pokemon): integer {
return this.required;
getMaxHeldItemCount(pokemon: Pokemon): integer {
this.stackCount = pokemon.evoCounter + pokemon.getHeldItems().filter(m => m instanceof DamageMoneyRewardModifier).length + pokemon.scene.findModifiers(m => m instanceof MoneyMultiplierModifier || m instanceof ExtraModifierModifier).length;
return this.stackCount < this.required ? this.required : this.stackCount + 1;
}
}