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