mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 08:22:16 +02:00
Sirfetch'd and Gholdengo, pause any evolutions
This commit is contained in:
parent
76e9b9948b
commit
6e57fe5ed1
@ -11,7 +11,6 @@ import { Biome } from "#enums/biome";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import { TimeOfDay } from "#enums/time-of-day";
|
||||
import { ExtraModifierModifier, MoneyMultiplierModifier } from "#app/modifier/modifier.js";
|
||||
|
||||
export enum SpeciesWildEvolutionDelay {
|
||||
NONE,
|
||||
@ -1097,7 +1096,7 @@ export const pokemonEvolutions: PokemonEvolutions = {
|
||||
new SpeciesEvolution(Species.GALAR_RAPIDASH, 40, null, null)
|
||||
],
|
||||
[Species.GALAR_FARFETCHD]: [
|
||||
new SpeciesEvolution(Species.SIRFETCHD, 30, null, null)
|
||||
new SpeciesEvolution(Species.SIRFETCHD, 1, null, new SpeciesEvolutionCondition(p => p.evoCounter > 2), SpeciesWildEvolutionDelay.LONG)
|
||||
],
|
||||
[Species.GALAR_SLOWPOKE]: [
|
||||
new SpeciesEvolution(Species.GALAR_SLOWBRO, 1, EvolutionItem.GALARICA_CUFF, null, SpeciesWildEvolutionDelay.VERY_LONG),
|
||||
@ -1632,7 +1631,7 @@ 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 SpeciesEvolution(Species.GHOLDENGO, 1, null, new SpeciesEvolutionCondition( p => p.scene.money >= 15000 ), SpeciesWildEvolutionDelay.VERY_LONG)
|
||||
new SpeciesEvolution(Species.GHOLDENGO, 1, null, new SpeciesEvolutionCondition( p => p.evoCounter > 9 ), SpeciesWildEvolutionDelay.VERY_LONG)
|
||||
]
|
||||
};
|
||||
|
||||
|
@ -85,6 +85,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
public luck: integer;
|
||||
public pauseEvolutions: boolean;
|
||||
public pokerus: boolean;
|
||||
public evoCounter: integer;
|
||||
|
||||
public fusionSpecies: PokemonSpecies;
|
||||
public fusionFormIndex: integer;
|
||||
@ -162,6 +163,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
this.metBiome = dataSource.metBiome;
|
||||
this.pauseEvolutions = dataSource.pauseEvolutions;
|
||||
this.pokerus = !!dataSource.pokerus;
|
||||
this.evoCounter = dataSource.evoCounter || 0;
|
||||
this.fusionSpecies = dataSource.fusionSpecies instanceof PokemonSpecies ? dataSource.fusionSpecies : getPokemonSpecies(dataSource.fusionSpecies);
|
||||
this.fusionFormIndex = dataSource.fusionFormIndex;
|
||||
this.fusionAbilityIndex = dataSource.fusionAbilityIndex;
|
||||
@ -1989,8 +1991,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
this.battleData.hitCount++;
|
||||
const attackResult = { move: move.id, result: result as DamageResult, damage: damage.value, critical: isCritical, sourceId: source.id };
|
||||
this.turnData.attacksReceived.unshift(attackResult);
|
||||
if (source.isPlayer() && !this.isPlayer()) {
|
||||
this.scene.applyModifiers(DamageMoneyRewardModifier, true, source, damage);
|
||||
if (source.isPlayer()) {
|
||||
if (!this.isPlayer()) {
|
||||
this.scene.applyModifiers(DamageMoneyRewardModifier, true, source, damage);
|
||||
}
|
||||
if (isCritical && source.species.speciesId === Species.GALAR_FARFETCHD) {
|
||||
source.evoCounter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -990,11 +990,11 @@ class EvolutionItemModifierTypeGenerator extends ModifierTypeGenerator {
|
||||
}
|
||||
|
||||
const evolutionItemPool = [
|
||||
party.filter(p => pokemonEvolutions.hasOwnProperty(p.species.speciesId)).map(p => {
|
||||
party.filter(p => pokemonEvolutions.hasOwnProperty(p.species.speciesId) && !p.pauseEvolutions).map(p => {
|
||||
const evolutions = pokemonEvolutions[p.species.speciesId];
|
||||
return evolutions.filter(e => e.item !== EvolutionItem.NONE && (e.evoFormKey === null || (e.preFormKey || "") === p.getFormKey()) && (!e.condition || e.condition.predicate(p)));
|
||||
}).flat(),
|
||||
party.filter(p => p.isFusion() && pokemonEvolutions.hasOwnProperty(p.fusionSpecies.speciesId)).map(p => {
|
||||
party.filter(p => p.isFusion() && pokemonEvolutions.hasOwnProperty(p.fusionSpecies.speciesId) && !p.pauseEvolutions).map(p => {
|
||||
const evolutions = pokemonEvolutions[p.fusionSpecies.speciesId];
|
||||
return evolutions.filter(e => e.item !== EvolutionItem.NONE && (e.evoFormKey === null || (e.preFormKey || "") === p.getFusionFormKey()) && (!e.condition || e.condition.predicate(p)));
|
||||
}).flat()
|
||||
|
@ -1941,6 +1941,8 @@ export class MoneyRewardModifier extends ConsumableModifier {
|
||||
|
||||
scene.addMoney(moneyAmount.value);
|
||||
|
||||
scene.getParty().filter(p => p.species.speciesId === Species.GIMMIGHOUL).map(p => p.evoCounter++);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ export default class PokemonData {
|
||||
public luck: integer;
|
||||
public pauseEvolutions: boolean;
|
||||
public pokerus: boolean;
|
||||
public evoCounter: integer;
|
||||
|
||||
public fusionSpecies: Species;
|
||||
public fusionFormIndex: integer;
|
||||
|
@ -375,8 +375,8 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||
} else if (option === PartyOption.UNPAUSE_EVOLUTION) {
|
||||
this.clearOptions();
|
||||
ui.playSelect();
|
||||
pokemon.pauseEvolutions = false;
|
||||
this.showText(`Evolutions have been unpaused for ${pokemon.name}.`, null, () => this.showText(null, 0), null, true);
|
||||
pokemon.pauseEvolutions = !pokemon.pauseEvolutions;
|
||||
this.showText(`Evolutions have been ${pokemon.pauseEvolutions?"un":""}paused for ${pokemon.name}.`, null, () => this.showText(null, 0), null, true);
|
||||
} else if (option === PartyOption.UNSPLICE) {
|
||||
this.clearOptions();
|
||||
ui.playSelect();
|
||||
@ -761,7 +761,7 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||
|
||||
this.options.push(PartyOption.SUMMARY);
|
||||
|
||||
if (pokemon.pauseEvolutions && pokemonEvolutions.hasOwnProperty(pokemon.species.speciesId)) {
|
||||
if (pokemonEvolutions.hasOwnProperty(pokemon.species.speciesId)) {
|
||||
this.options.push(PartyOption.UNPAUSE_EVOLUTION);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user