From ddf97fd8f6129dfc1bab54da15f8c41655ed7380 Mon Sep 17 00:00:00 2001 From: damocleas Date: Sun, 15 Sep 2024 03:55:17 -0400 Subject: [PATCH] [Balance] Pokerus Starter Count 3 -> 5, made pokerus count a constant as to only require one line change (#4268) * Update pokemon-species.ts Pokerus starters 3 -> 5 * Update starter-select-ui-handler.ts * Updated pokemon-species.ts, changes from frutescens to make Pokerus # a constant that imports into starter select ui * Update starter-select-ui-handler.ts to continue the other changes * Update src/data/pokemon-species.ts --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/data/pokemon-species.ts | 4 ++-- src/ui/starter-select-ui-handler.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 633150c62f2..4eb526eeb2b 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -3348,6 +3348,7 @@ export function getStarterValueFriendshipCap(value: integer): integer { } } +export const POKERUS_STARTER_COUNT = 5; //adjust here! /** * Method to get the daily list of starters with Pokerus. * @param scene {@linkcode BattleScene} used as part of RNG @@ -3356,10 +3357,9 @@ export function getStarterValueFriendshipCap(value: integer): integer { export function getPokerusStarters(scene: BattleScene): PokemonSpecies[] { const pokerusStarters: PokemonSpecies[] = []; const date = new Date(); - const starterCount = 3; //for easy future adjustment! date.setUTCHours(0, 0, 0, 0); scene.executeWithSeedOffset(() => { - while (pokerusStarters.length < starterCount) { + while (pokerusStarters.length < POKERUS_STARTER_COUNT) { const randomSpeciesId = parseInt(Utils.randSeedItem(Object.keys(speciesStarters)), 10); const species = getPokemonSpecies(randomSpeciesId); if (!pokerusStarters.includes(species)) { diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index ac6af5cbb04..ee56a3631dd 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -13,7 +13,7 @@ import { allMoves } from "../data/move"; import { Nature, getNatureName } from "../data/nature"; import { pokemonFormChanges } from "../data/pokemon-forms"; import { LevelMoves, pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "../data/pokemon-level-moves"; -import PokemonSpecies, { allSpecies, getPokemonSpeciesForm, getStarterValueFriendshipCap, speciesStarters, starterPassiveAbilities, getPokerusStarters } from "../data/pokemon-species"; +import PokemonSpecies, { allSpecies, getPokemonSpeciesForm, getStarterValueFriendshipCap, speciesStarters, starterPassiveAbilities, POKERUS_STARTER_COUNT, getPokerusStarters } from "../data/pokemon-species"; import { Type } from "../data/type"; import { GameModes } from "../game-mode"; import { AbilityAttr, DexAttr, DexAttrProps, DexEntry, StarterMoveset, StarterAttributes, StarterPreferences, StarterPrefs } from "../system/game-data"; @@ -631,7 +631,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { starterBoxContainer.add(this.starterSelectScrollBar); - this.pokerusCursorObjs = new Array(3).fill(null).map(() => { + this.pokerusCursorObjs = new Array(POKERUS_STARTER_COUNT).fill(null).map(() => { const cursorObj = this.scene.add.image(0, 0, "select_cursor_pokerus"); cursorObj.setVisible(false); cursorObj.setOrigin(0, 0);