Cleaning up

This commit is contained in:
AJ Fontaine 2024-12-19 13:20:53 -05:00
parent 8b34370639
commit ccef051f61
2 changed files with 7 additions and 9 deletions

View File

@ -46,14 +46,10 @@ const doEventReward = (scene: BattleScene) => {
})); }));
if (candidates.length > 0) { if (candidates.length > 0) {
scene.unshiftPhase(new ModifierRewardPhase(scene, modifierTypes[randSeedItem(candidates)])); scene.unshiftPhase(new ModifierRewardPhase(scene, modifierTypes[randSeedItem(candidates)]));
} else {
// At max stacks, give a Voucher instead
scene.unshiftPhase(new ModifierRewardPhase(scene, modifierTypes.VOUCHER));
} }
// else {
// // At max stacks, give the first party pokemon a Soothe Bell instead
// const sootheBell = generateModifierType(scene, modifierTypes.SOOTHE_BELL) as PokemonHeldItemModifierType;
// await applyModifierTypeToPlayerPokemon(scene, scene.getPlayerPokemon()!, sootheBell);
// scene.playSound("item_fanfare");
// await showEncounterText(scene, i18next.t("battle:rewardGain", { modifierName: sootheBell.name }), null, undefined, true);
// }
} }
}; };
@ -64,6 +60,7 @@ const doEventReward = (scene: BattleScene) => {
*/ */
export const DelibirdyEncounter: MysteryEncounter = export const DelibirdyEncounter: MysteryEncounter =
MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.DELIBIRDY) MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.DELIBIRDY)
.withMaxAllowedEncounters(4)
.withEncounterTier(MysteryEncounterTier.COMMON) //Change back after event! .withEncounterTier(MysteryEncounterTier.COMMON) //Change back after event!
.withSceneWaveRangeRequirement(...CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES) .withSceneWaveRangeRequirement(...CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES)
.withSceneRequirement(new MoneyRequirement(0, DELIBIRDY_MONEY_PRICE_MULTIPLIER)) // Must have enough money for it to spawn at the very least .withSceneRequirement(new MoneyRequirement(0, DELIBIRDY_MONEY_PRICE_MULTIPLIER)) // Must have enough money for it to spawn at the very least

View File

@ -23,7 +23,7 @@ import { BerryModifier } from "#app/modifier/modifier";
import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase";
import { Stat } from "#enums/stat"; import { Stat } from "#enums/stat";
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode"; import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/game-mode";
import PokemonSpecies from "#app/data/pokemon-species"; import PokemonSpecies, { allSpecies } from "#app/data/pokemon-species";
/** the i18n namespace for the encounter */ /** the i18n namespace for the encounter */
const namespace = "mysteryEncounters/uncommonBreed"; const namespace = "mysteryEncounters/uncommonBreed";
@ -35,6 +35,7 @@ const namespace = "mysteryEncounters/uncommonBreed";
*/ */
export const UncommonBreedEncounter: MysteryEncounter = export const UncommonBreedEncounter: MysteryEncounter =
MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.UNCOMMON_BREED) MysteryEncounterBuilder.withEncounterType(MysteryEncounterType.UNCOMMON_BREED)
.withMaxAllowedEncounters(4)
.withEncounterTier(MysteryEncounterTier.COMMON) .withEncounterTier(MysteryEncounterTier.COMMON)
.withSceneWaveRangeRequirement(...CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES) .withSceneWaveRangeRequirement(...CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES)
.withCatchAllowed(true) .withCatchAllowed(true)
@ -55,7 +56,7 @@ export const UncommonBreedEncounter: MysteryEncounter =
let species: PokemonSpecies; let species: PokemonSpecies;
if (scene.eventManager.isEventActive() && scene.eventManager.activeEvent()?.uncommonBreedEncounters && randSeedInt(2) === 1) { if (scene.eventManager.isEventActive() && scene.eventManager.activeEvent()?.uncommonBreedEncounters && randSeedInt(2) === 1) {
const eventEncounter = randSeedItem(scene.eventManager.activeEvent()!.uncommonBreedEncounters!); const eventEncounter = randSeedItem(scene.eventManager.activeEvent()!.uncommonBreedEncounters!);
species = eventEncounter.species; species = allSpecies[eventEncounter.species];
species.speciesId = species.getSpeciesForLevel(level, eventEncounter.allowEvolution); species.speciesId = species.getSpeciesForLevel(level, eventEncounter.allowEvolution);
} else { } else {
species = scene.arena.randomSpecies(scene.currentBattle.waveIndex, level, 0, getPartyLuckValue(scene.getPlayerParty()), true); species = scene.arena.randomSpecies(scene.currentBattle.waveIndex, level, 0, getPartyLuckValue(scene.getPlayerParty()), true);