[Dev] Generate moveset when using player Species override

This commit is contained in:
NightKev 2025-06-26 18:36:41 -07:00
parent 1bd152a738
commit 76a4fc40b5
2 changed files with 25 additions and 33 deletions

View File

@ -5628,7 +5628,10 @@ export class PlayerPokemon extends Pokemon {
} }
if (!dataSource) { if (!dataSource) {
if (globalScene.gameMode.isDaily) { if (
globalScene.gameMode.isDaily ||
(Overrides.STARTER_SPECIES_OVERRIDE && Overrides.STARTER_SPECIES_OVERRIDE !== SpeciesId.KELDEO)
) {
this.generateAndPopulateMoveset(); this.generateAndPopulateMoveset();
} else { } else {
this.moveset = []; this.moveset = [];

View File

@ -78,15 +78,19 @@ class DefaultOverrides {
readonly ARENA_TINT_OVERRIDE: TimeOfDay | null = null; readonly ARENA_TINT_OVERRIDE: TimeOfDay | null = null;
/** Multiplies XP gained by this value including 0. Set to null to ignore the override. */ /** Multiplies XP gained by this value including 0. Set to null to ignore the override. */
readonly XP_MULTIPLIER_OVERRIDE: number | null = null; readonly XP_MULTIPLIER_OVERRIDE: number | null = null;
/** Sets the level cap to this number during experience gain calculations. Set to `0` to disable override & use normal wave-based level caps, /**
or any negative number to set it to 9 quadrillion (effectively disabling it). */ * Sets the level cap to this number during experience gain calculations.
*
* Set to `0` to disable override & use normal wave-based level caps,
* or any negative number to disable level caps entirely.
*/
readonly LEVEL_CAP_OVERRIDE: number = 0; readonly LEVEL_CAP_OVERRIDE: number = 0;
/** /**
* If defined, overrides random critical hit rolls to always or never succeed. * If defined, overrides random critical hit rolls to always or never succeed.
* Ignored if the move is guaranteed to always/never crit. * Ignored if the move is guaranteed to always/never crit.
*/ */
readonly CRITICAL_HIT_OVERRIDE: boolean | null = null; readonly CRITICAL_HIT_OVERRIDE: boolean | null = null;
/** default 1000 */ /** @defaultValue `1000` */
readonly STARTING_MONEY_OVERRIDE: number = 0; readonly STARTING_MONEY_OVERRIDE: number = 0;
/** Sets all shop item prices to 0 */ /** Sets all shop item prices to 0 */
readonly WAIVE_SHOP_FEES_OVERRIDE: boolean = false; readonly WAIVE_SHOP_FEES_OVERRIDE: boolean = false;
@ -124,8 +128,8 @@ class DefaultOverrides {
// PLAYER OVERRIDES // PLAYER OVERRIDES
// ---------------- // ----------------
/** /**
* Set the form index of any starter in the party whose `speciesId` is inside this override * Set the form index of any starter in the party whose {@linkcode SpeciesId} is inside this override
* @see {@link allSpecies} in `src/data/pokemon-species.ts` for form indexes * @see `src/data/pokemon-species.ts` for form indexes
* @example * @example
* ``` * ```
* const STARTER_FORM_OVERRIDES = { * const STARTER_FORM_OVERRIDES = {
@ -135,23 +139,14 @@ class DefaultOverrides {
*/ */
readonly STARTER_FORM_OVERRIDES: Partial<Record<SpeciesId, number>> = {}; readonly STARTER_FORM_OVERRIDES: Partial<Record<SpeciesId, number>> = {};
/** default 5 or 20 for Daily */ /** @defaultValue `20` for Daily and `5` for all other modes */
readonly STARTING_LEVEL_OVERRIDE: number = 0; readonly STARTING_LEVEL_OVERRIDE: number = 0;
/** /** Will override the species of your pokemon when starting a new run */
* SPECIES OVERRIDE readonly STARTER_SPECIES_OVERRIDE: SpeciesId | 0 = 0;
* will only apply to the first starter in your party or each enemy pokemon /** This will force your starter to be a random fusion */
* default is 0 to not override
* @example SPECIES_OVERRIDE = SpeciesId.Bulbasaur;
*/
readonly STARTER_SPECIES_OVERRIDE: SpeciesId | number = 0;
/**
* This will force your starter to be a random fusion
*/
readonly STARTER_FUSION_OVERRIDE: boolean = false; readonly STARTER_FUSION_OVERRIDE: boolean = false;
/** /** This will override the species of the fusion */
* This will override the species of the fusion readonly STARTER_FUSION_SPECIES_OVERRIDE: SpeciesId | 0 = 0;
*/
readonly STARTER_FUSION_SPECIES_OVERRIDE: SpeciesId | number = 0;
readonly ABILITY_OVERRIDE: AbilityId = AbilityId.NONE; readonly ABILITY_OVERRIDE: AbilityId = AbilityId.NONE;
readonly PASSIVE_ABILITY_OVERRIDE: AbilityId = AbilityId.NONE; readonly PASSIVE_ABILITY_OVERRIDE: AbilityId = AbilityId.NONE;
readonly HAS_PASSIVE_ABILITY_OVERRIDE: boolean | null = null; readonly HAS_PASSIVE_ABILITY_OVERRIDE: boolean | null = null;
@ -175,13 +170,9 @@ class DefaultOverrides {
// -------------------------- // --------------------------
// TODO: rename `OPP_` to `ENEMY_` // TODO: rename `OPP_` to `ENEMY_`
readonly OPP_SPECIES_OVERRIDE: SpeciesId | number = 0; readonly OPP_SPECIES_OVERRIDE: SpeciesId | number = 0;
/** /** This will make all opponents fused Pokemon */
* This will make all opponents fused Pokemon
*/
readonly OPP_FUSION_OVERRIDE: boolean = false; readonly OPP_FUSION_OVERRIDE: boolean = false;
/** /** This will override the species of the fusion only when the opponent is already a fusion */
* This will override the species of the fusion only when the opponent is already a fusion
*/
readonly OPP_FUSION_SPECIES_OVERRIDE: SpeciesId | number = 0; readonly OPP_FUSION_SPECIES_OVERRIDE: SpeciesId | number = 0;
readonly OPP_LEVEL_OVERRIDE: number = 0; readonly OPP_LEVEL_OVERRIDE: number = 0;
readonly OPP_ABILITY_OVERRIDE: AbilityId = AbilityId.NONE; readonly OPP_ABILITY_OVERRIDE: AbilityId = AbilityId.NONE;
@ -205,9 +196,9 @@ class DefaultOverrides {
/** /**
* Override to give the enemy Pokemon a given amount of health segments * Override to give the enemy Pokemon a given amount of health segments
* *
* 0 (default): the health segments will be handled normally based on wave, level and species * - `0` (default): the health segments will be handled normally based on wave, level and species
* 1: the Pokemon will have a single health segment and therefore will not be a boss * - `1`: the Pokemon will have a single health segment and therefore will not be a boss
* 2+: the Pokemon will be a boss with the given number of health segments * - `2+`: the Pokemon will be a boss with the given number of health segments
*/ */
readonly OPP_HEALTH_SEGMENTS_OVERRIDE: number = 0; readonly OPP_HEALTH_SEGMENTS_OVERRIDE: number = 0;
@ -288,9 +279,7 @@ class DefaultOverrides {
*/ */
readonly ITEM_REWARD_OVERRIDE: ModifierOverride[] = []; readonly ITEM_REWARD_OVERRIDE: ModifierOverride[] = [];
/** /** If `true`, disable all non-scripted opponent trainer encounters. */
* If `true`, disable all non-scripted opponent trainer encounters.
*/
readonly DISABLE_STANDARD_TRAINERS_OVERRIDE: boolean = false; readonly DISABLE_STANDARD_TRAINERS_OVERRIDE: boolean = false;
/** /**