mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-15 06:15:20 +01:00
[Balance] Add functionality for Daily Run starting item event bonus (#6698)
This commit is contained in:
parent
416c9336b6
commit
1b33f0d8e3
@ -1,5 +1,6 @@
|
||||
import { loggedInUser } from "#app/account";
|
||||
import { GameMode, getGameMode } from "#app/game-mode";
|
||||
import { timedEventManager } from "#app/global-event-manager";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
import Overrides from "#app/overrides";
|
||||
import { Phase } from "#app/phase";
|
||||
@ -259,6 +260,9 @@ export class TitlePhase extends Phase {
|
||||
for (const m of modifiers) {
|
||||
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);
|
||||
|
||||
Promise.all(loadPokemonAssets).then(() => {
|
||||
|
||||
@ -75,6 +75,7 @@ interface TimedEvent extends EventBanner {
|
||||
readonly trainerShinyChance?: number; // Odds over 65536 of trainer mon generating as shiny
|
||||
readonly music?: readonly EventMusicReplacement[];
|
||||
readonly dailyRunChallenges?: readonly EventChallenge[];
|
||||
readonly dailyRunStartingItems?: readonly ModifierTypeKeys[];
|
||||
}
|
||||
|
||||
const timedEvents: readonly TimedEvent[] = [
|
||||
@ -387,6 +388,7 @@ const timedEvents: readonly TimedEvent[] = [
|
||||
{ wave: 8, type: "CATCHING_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);
|
||||
}
|
||||
}
|
||||
|
||||
getEventDailyStartingItems(): readonly ModifierTypeKeys[] {
|
||||
return this.activeEvent()?.dailyRunStartingItems ?? [];
|
||||
}
|
||||
}
|
||||
|
||||
export class TimedEventDisplay extends Phaser.GameObjects.Container {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user