mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-12 11:22:17 +02:00
Remove Cosmoem time conditions, add Gimmighoul tracker
This commit is contained in:
parent
3e2150d6d1
commit
1325ea3132
@ -992,8 +992,8 @@ export const pokemonEvolutions: PokemonEvolutions = {
|
|||||||
new SpeciesEvolution(Species.COSMOEM, 23, null, null)
|
new SpeciesEvolution(Species.COSMOEM, 23, null, null)
|
||||||
],
|
],
|
||||||
[Species.COSMOEM]: [
|
[Species.COSMOEM]: [
|
||||||
new SpeciesEvolution(Species.SOLGALEO, 53, EvolutionItem.SUN_FLUTE, new SpeciesEvolutionCondition(p => p.scene.arena.getTimeOfDay() === TimeOfDay.DAWN || p.scene.arena.getTimeOfDay() === TimeOfDay.DAY), SpeciesWildEvolutionDelay.VERY_LONG),
|
new SpeciesEvolution(Species.SOLGALEO, 53, EvolutionItem.SUN_FLUTE, null, SpeciesWildEvolutionDelay.VERY_LONG),
|
||||||
new SpeciesEvolution(Species.LUNALA, 53, EvolutionItem.MOON_FLUTE, new SpeciesEvolutionCondition(p => p.scene.arena.getTimeOfDay() === TimeOfDay.DUSK || p.scene.arena.getTimeOfDay() === TimeOfDay.NIGHT), SpeciesWildEvolutionDelay.VERY_LONG)
|
new SpeciesEvolution(Species.LUNALA, 53, EvolutionItem.MOON_FLUTE, null, SpeciesWildEvolutionDelay.VERY_LONG)
|
||||||
],
|
],
|
||||||
[Species.MELTAN]: [
|
[Species.MELTAN]: [
|
||||||
new SpeciesEvolution(Species.MELMETAL, 48, null, null)
|
new SpeciesEvolution(Species.MELMETAL, 48, null, null)
|
||||||
|
@ -222,6 +222,8 @@
|
|||||||
"TOXIC_ORB": { "name": "Toxic Orb", "description": "It's a bizarre orb that exudes toxins when touched and will badly poison the holder during battle." },
|
"TOXIC_ORB": { "name": "Toxic Orb", "description": "It's a bizarre orb that exudes toxins when touched and will badly poison the holder during battle." },
|
||||||
"FLAME_ORB": { "name": "Flame Orb", "description": "It's a bizarre orb that gives off heat when touched and will affect the holder with a burn during battle." },
|
"FLAME_ORB": { "name": "Flame Orb", "description": "It's a bizarre orb that gives off heat when touched and will affect the holder with a burn during battle." },
|
||||||
|
|
||||||
|
"EVOLUTION_TRACKER_GIMMIGHOUL": { "name": "Treasures", "description": "This Pokémon loves treasure! Keep collecting treasure and something might happen!"},
|
||||||
|
|
||||||
"BATON": { "name": "Baton", "description": "Allows passing along effects when switching Pokémon, which also bypasses traps." },
|
"BATON": { "name": "Baton", "description": "Allows passing along effects when switching Pokémon, which also bypasses traps." },
|
||||||
|
|
||||||
"SHINY_CHARM": { "name": "Shiny Charm", "description": "Dramatically increases the chance of a wild Pokémon being Shiny." },
|
"SHINY_CHARM": { "name": "Shiny Charm", "description": "Dramatically increases the chance of a wild Pokémon being Shiny." },
|
||||||
|
@ -1313,6 +1313,8 @@ export const modifierTypes = {
|
|||||||
FORM_CHANGE_ITEM: () => new FormChangeItemModifierTypeGenerator(false),
|
FORM_CHANGE_ITEM: () => new FormChangeItemModifierTypeGenerator(false),
|
||||||
RARE_FORM_CHANGE_ITEM: () => new FormChangeItemModifierTypeGenerator(true),
|
RARE_FORM_CHANGE_ITEM: () => new FormChangeItemModifierTypeGenerator(true),
|
||||||
|
|
||||||
|
EVOLUTION_TRACKER_GIMMIGHOUL: () => new PokemonHeldItemModifierType("modifierType:ModifierType.EVOLUTION_TRACKER_GIMMIGHOUL", "nugget", (type, _args) => new Modifiers.EvoTrackerModifier(type, (_args[0] as Pokemon).id, Species.GIMMIGHOUL, 10)),
|
||||||
|
|
||||||
MEGA_BRACELET: () => new ModifierType("modifierType:ModifierType.MEGA_BRACELET", "mega_bracelet", (type, _args) => new Modifiers.MegaEvolutionAccessModifier(type)),
|
MEGA_BRACELET: () => new ModifierType("modifierType:ModifierType.MEGA_BRACELET", "mega_bracelet", (type, _args) => new Modifiers.MegaEvolutionAccessModifier(type)),
|
||||||
DYNAMAX_BAND: () => new ModifierType("modifierType:ModifierType.DYNAMAX_BAND", "dynamax_band", (type, _args) => new Modifiers.GigantamaxAccessModifier(type)),
|
DYNAMAX_BAND: () => new ModifierType("modifierType:ModifierType.DYNAMAX_BAND", "dynamax_band", (type, _args) => new Modifiers.GigantamaxAccessModifier(type)),
|
||||||
TERA_ORB: () => new ModifierType("modifierType:ModifierType.TERA_ORB", "tera_orb", (type, _args) => new Modifiers.TerastallizeAccessModifier(type)),
|
TERA_ORB: () => new ModifierType("modifierType:ModifierType.TERA_ORB", "tera_orb", (type, _args) => new Modifiers.TerastallizeAccessModifier(type)),
|
||||||
|
@ -830,6 +830,41 @@ export class BaseStatModifier extends PokemonHeldItemModifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class EvoTrackerModifier extends PokemonHeldItemModifier {
|
||||||
|
protected species: Species;
|
||||||
|
protected required: integer;
|
||||||
|
readonly isTransferrable: boolean = false;
|
||||||
|
|
||||||
|
constructor(type: ModifierType, pokemonId: integer, species: Species, required: integer, stackCount?: integer) {
|
||||||
|
super(type, pokemonId, stackCount);
|
||||||
|
this.species = species;
|
||||||
|
this.required = required;
|
||||||
|
}
|
||||||
|
|
||||||
|
matchType(modifier: Modifier): boolean {
|
||||||
|
if (modifier instanceof EvoTrackerModifier) {
|
||||||
|
return (modifier as EvoTrackerModifier).species === this.species;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
clone(): PersistentModifier {
|
||||||
|
return new EvoTrackerModifier(this.type, this.pokemonId, this.species, this.stackCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
getArgs(): any[] {
|
||||||
|
return super.getArgs().concat(this.species);
|
||||||
|
}
|
||||||
|
|
||||||
|
apply(args: any[]): boolean {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
getMaxHeldItemCount(_pokemon: Pokemon): integer {
|
||||||
|
return this.required;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modifier used for held items that apply {@linkcode Stat} boost(s)
|
* Modifier used for held items that apply {@linkcode Stat} boost(s)
|
||||||
* using a multiplier.
|
* using a multiplier.
|
||||||
@ -2202,6 +2237,9 @@ export class MoneyRewardModifier extends ConsumableModifier {
|
|||||||
scene.getParty().map(p => {
|
scene.getParty().map(p => {
|
||||||
if (p.species?.speciesId === Species.GIMMIGHOUL || p.fusionSpecies?.speciesId === Species.GIMMIGHOUL) {
|
if (p.species?.speciesId === Species.GIMMIGHOUL || p.fusionSpecies?.speciesId === Species.GIMMIGHOUL) {
|
||||||
p.evoCounter++;
|
p.evoCounter++;
|
||||||
|
const modifierType: ModifierType = modifierTypes.EVOLUTION_TRACKER_GIMMIGHOUL();
|
||||||
|
const modifier = modifierType!.newModifier(p);
|
||||||
|
scene.addModifier(modifier);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user