[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>
This commit is contained in:
parent
e32d1612d9
commit
ddf97fd8f6
|
@ -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.
|
* Method to get the daily list of starters with Pokerus.
|
||||||
* @param scene {@linkcode BattleScene} used as part of RNG
|
* @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[] {
|
export function getPokerusStarters(scene: BattleScene): PokemonSpecies[] {
|
||||||
const pokerusStarters: PokemonSpecies[] = [];
|
const pokerusStarters: PokemonSpecies[] = [];
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
const starterCount = 3; //for easy future adjustment!
|
|
||||||
date.setUTCHours(0, 0, 0, 0);
|
date.setUTCHours(0, 0, 0, 0);
|
||||||
scene.executeWithSeedOffset(() => {
|
scene.executeWithSeedOffset(() => {
|
||||||
while (pokerusStarters.length < starterCount) {
|
while (pokerusStarters.length < POKERUS_STARTER_COUNT) {
|
||||||
const randomSpeciesId = parseInt(Utils.randSeedItem(Object.keys(speciesStarters)), 10);
|
const randomSpeciesId = parseInt(Utils.randSeedItem(Object.keys(speciesStarters)), 10);
|
||||||
const species = getPokemonSpecies(randomSpeciesId);
|
const species = getPokemonSpecies(randomSpeciesId);
|
||||||
if (!pokerusStarters.includes(species)) {
|
if (!pokerusStarters.includes(species)) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import { allMoves } from "../data/move";
|
||||||
import { Nature, getNatureName } from "../data/nature";
|
import { Nature, getNatureName } from "../data/nature";
|
||||||
import { pokemonFormChanges } from "../data/pokemon-forms";
|
import { pokemonFormChanges } from "../data/pokemon-forms";
|
||||||
import { LevelMoves, pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "../data/pokemon-level-moves";
|
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 { Type } from "../data/type";
|
||||||
import { GameModes } from "../game-mode";
|
import { GameModes } from "../game-mode";
|
||||||
import { AbilityAttr, DexAttr, DexAttrProps, DexEntry, StarterMoveset, StarterAttributes, StarterPreferences, StarterPrefs } from "../system/game-data";
|
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);
|
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");
|
const cursorObj = this.scene.add.image(0, 0, "select_cursor_pokerus");
|
||||||
cursorObj.setVisible(false);
|
cursorObj.setVisible(false);
|
||||||
cursorObj.setOrigin(0, 0);
|
cursorObj.setOrigin(0, 0);
|
||||||
|
|
Loading…
Reference in New Issue