[Balance] Add functionality for Daily Run starting item event bonus (#6698)

This commit is contained in:
Austin Fontaine 2025-10-27 23:06:06 -04:00 committed by GitHub
parent 416c9336b6
commit 1b33f0d8e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import { loggedInUser } from "#app/account"; import { loggedInUser } from "#app/account";
import { GameMode, getGameMode } from "#app/game-mode"; import { GameMode, getGameMode } from "#app/game-mode";
import { timedEventManager } from "#app/global-event-manager";
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import Overrides from "#app/overrides"; import Overrides from "#app/overrides";
import { Phase } from "#app/phase"; import { Phase } from "#app/phase";
@ -259,6 +260,9 @@ export class TitlePhase extends Phase {
for (const m of modifiers) { for (const m of modifiers) {
globalScene.addModifier(m, true, false, false, true); globalScene.addModifier(m, true, false, false, true);
} }
for (const m of timedEventManager.getEventDailyStartingItems()) {
globalScene.addModifier(modifierTypes[m]().newModifier(), true, false, false, true);
}
globalScene.updateModifiers(true, true); globalScene.updateModifiers(true, true);
Promise.all(loadPokemonAssets).then(() => { Promise.all(loadPokemonAssets).then(() => {

View File

@ -75,6 +75,7 @@ interface TimedEvent extends EventBanner {
readonly trainerShinyChance?: number; // Odds over 65536 of trainer mon generating as shiny readonly trainerShinyChance?: number; // Odds over 65536 of trainer mon generating as shiny
readonly music?: readonly EventMusicReplacement[]; readonly music?: readonly EventMusicReplacement[];
readonly dailyRunChallenges?: readonly EventChallenge[]; readonly dailyRunChallenges?: readonly EventChallenge[];
readonly dailyRunStartingItems?: readonly ModifierTypeKeys[];
} }
const timedEvents: readonly TimedEvent[] = [ const timedEvents: readonly TimedEvent[] = [
@ -387,6 +388,7 @@ const timedEvents: readonly TimedEvent[] = [
{ wave: 8, type: "CATCHING_CHARM" }, { wave: 8, type: "CATCHING_CHARM" },
{ wave: 25, type: "SHINY_CHARM" }, { wave: 25, type: "SHINY_CHARM" },
], ],
dailyRunStartingItems: ["SHINY_CHARM", "ABILITY_CHARM"],
}, },
]; ];
@ -566,6 +568,10 @@ export class TimedEventManager {
globalScene.gameMode.setChallengeValue(eventChal.challenge, eventChal.value); globalScene.gameMode.setChallengeValue(eventChal.challenge, eventChal.value);
} }
} }
getEventDailyStartingItems(): readonly ModifierTypeKeys[] {
return this.activeEvent()?.dailyRunStartingItems ?? [];
}
} }
export class TimedEventDisplay extends Phaser.GameObjects.Container { export class TimedEventDisplay extends Phaser.GameObjects.Container {