Apply kev's suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
Sirz Benjie 2025-04-14 10:07:17 -05:00
parent a25e9b776f
commit 3459b77c84
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -30,7 +30,7 @@ export class OverridesHelper extends GameManagerHelper {
/** /**
* Override the starting biome * Override the starting biome
* @warning Any event listeners that are attached to [NewArenaEvent](events\battle-scene.ts) may need to be handled down the line * @warning Any event listeners that are attached to [NewArenaEvent](events\battle-scene.ts) may need to be handled down the line
* @param biome the biome to set * @param biome - The biome to set
*/ */
public startingBiome(biome: Biome): this { public startingBiome(biome: Biome): this {
this.game.scene.newArena(biome); this.game.scene.newArena(biome);
@ -39,8 +39,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the starting wave (index) * Override the starting wave index
* @param wave the wave (index) to set. Classic: `1`-`200` * @param wave - The wave to set. Classic: `1`-`200`
* @returns `this` * @returns `this`
*/ */
public startingWave(wave: number): this { public startingWave(wave: number): this {
@ -50,8 +50,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the player (pokemon) starting level * Override the player pokemon's starting level
* @param level the (pokemon) level to set * @param level - The level to set
* @returns `this` * @returns `this`
*/ */
public startingLevel(level: Species | number): this { public startingLevel(level: Species | number): this {
@ -62,7 +62,7 @@ export class OverridesHelper extends GameManagerHelper {
/** /**
* Override the XP Multiplier * Override the XP Multiplier
* @param value the XP multiplier to set * @param value - The XP multiplier to set
* @returns `this` * @returns `this`
*/ */
public xpMultiplier(value: number): this { public xpMultiplier(value: number): this {
@ -73,7 +73,7 @@ export class OverridesHelper extends GameManagerHelper {
/** /**
* Override the wave level cap * Override the wave level cap
* @param cap the level cap value to set; 0 uses normal level caps and negative values * @param cap - The level cap value to set; 0 uses normal level caps and negative values
* disable it completely * disable it completely
* @returns `this` * @returns `this`
*/ */
@ -92,8 +92,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the player (pokemon) starting held items * Override the player pokemon's starting held items
* @param items the items to hold * @param items - The items to hold
* @returns `this` * @returns `this`
*/ */
public startingHeldItems(items: ModifierOverride[]): this { public startingHeldItems(items: ModifierOverride[]): this {
@ -103,8 +103,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the player (pokemon) {@linkcode Species species} * Override the player pokemon's {@linkcode Species | species}
* @param species the (pokemon) {@linkcode Species species} to set * @param species - The {@linkcode Species | species} to set
* @returns `this` * @returns `this`
*/ */
public starterSpecies(species: Species | number): this { public starterSpecies(species: Species | number): this {
@ -114,7 +114,7 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the player (pokemon) to be a random fusion * Override the player pokemon to be a random fusion
* @returns `this` * @returns `this`
*/ */
public enableStarterFusion(): this { public enableStarterFusion(): this {
@ -124,8 +124,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the player (pokemon) fusion species * Override the player pokemon's fusion species
* @param species the fusion species to set * @param species - The fusion species to set
* @returns `this` * @returns `this`
*/ */
public starterFusionSpecies(species: Species | number): this { public starterFusionSpecies(species: Species | number): this {
@ -135,8 +135,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the player (pokemons) forms * Override the player pokemon's forms
* @param forms the (pokemon) forms to set * @param forms - The forms to set
* @returns `this` * @returns `this`
*/ */
public starterForms(forms: Partial<Record<Species, number>>): this { public starterForms(forms: Partial<Record<Species, number>>): this {
@ -150,7 +150,7 @@ export class OverridesHelper extends GameManagerHelper {
/** /**
* Override the player's starting modifiers * Override the player's starting modifiers
* @param modifiers the modifiers to set * @param modifiers - The modifiers to set
* @returns `this` * @returns `this`
*/ */
public startingModifier(modifiers: ModifierOverride[]): this { public startingModifier(modifiers: ModifierOverride[]): this {
@ -160,8 +160,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the player (pokemon) {@linkcode Abilities ability}. * Override the player pokemon's {@linkcode Abilities | ability}.
* @param ability the (pokemon) {@linkcode Abilities ability} to set * @param ability - The {@linkcode Abilities | ability} to set
* @returns `this` * @returns `this`
*/ */
public ability(ability: Abilities): this { public ability(ability: Abilities): this {
@ -171,8 +171,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the player (pokemon) **passive** {@linkcode Abilities ability} * Override the player pokemon's **passive** {@linkcode Abilities | ability}
* @param passiveAbility the (pokemon) **passive** {@linkcode Abilities ability} to set * @param passiveAbility - The **passive** {@linkcode Abilities | ability} to set
* @returns `this` * @returns `this`
*/ */
public passiveAbility(passiveAbility: Abilities): this { public passiveAbility(passiveAbility: Abilities): this {
@ -182,8 +182,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Forces the status of the player (pokemon) **passive** {@linkcode Abilities | ability} * Forces the status of the player pokemon **passive** {@linkcode Abilities | ability}
* @param hasPassiveAbility forces the passive to be active if `true`, inactive if `false` * @param hasPassiveAbility - Forces the passive to be active if `true`, inactive if `false`
* @returns `this` * @returns `this`
*/ */
public hasPassiveAbility(hasPassiveAbility: boolean | null): this { public hasPassiveAbility(hasPassiveAbility: boolean | null): this {
@ -196,8 +196,8 @@ export class OverridesHelper extends GameManagerHelper {
return this; return this;
} }
/** /**
* Override the player (pokemon) {@linkcode Moves moves}set * Override the player pokemon's {@linkcode Moves | moves}set
* @param moveset the {@linkcode Moves moves}set to set * @param moveset - The {@linkcode Moves | moves}set to set
* @returns `this` * @returns `this`
*/ */
public moveset(moveset: Moves | Moves[]): this { public moveset(moveset: Moves | Moves[]): this {
@ -211,8 +211,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the player (pokemon) {@linkcode StatusEffect status-effect} * Override the player pokemon's {@linkcode StatusEffect | status-effect}
* @param statusEffect the {@linkcode StatusEffect status-effect} to set * @param statusEffect - The {@linkcode StatusEffect | status-effect} to set
* @returns * @returns
*/ */
public statusEffect(statusEffect: StatusEffect): this { public statusEffect(statusEffect: StatusEffect): this {
@ -255,8 +255,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the {@linkcode WeatherType | weather (type)} * Override the {@linkcode WeatherType | weather type}
* @param type {@linkcode WeatherType | weather type} to set * @param type - The {@linkcode WeatherType | weather type} to set
* @returns `this` * @returns `this`
*/ */
public weather(type: WeatherType): this { public weather(type: WeatherType): this {
@ -267,7 +267,7 @@ export class OverridesHelper extends GameManagerHelper {
/** /**
* Override the seed * Override the seed
* @param seed the seed to set * @param seed - The seed to set
* @returns `this` * @returns `this`
*/ */
public seed(seed: string): this { public seed(seed: string): this {
@ -307,8 +307,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the enemy (pokemon) {@linkcode Species species} * Override the {@linkcode Species | species} of enemy pokemon
* @param species the (pokemon) {@linkcode Species species} to set * @param species - The {@linkcode Species | species} to set
* @returns `this` * @returns `this`
*/ */
public enemySpecies(species: Species | number): this { public enemySpecies(species: Species | number): this {
@ -318,7 +318,7 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the enemy (pokemon) to be a random fusion * Override the enemy pokemon to be a random fusion
* @returns `this` * @returns `this`
*/ */
public enableEnemyFusion(): this { public enableEnemyFusion(): this {
@ -328,8 +328,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the enemy (pokemon) fusion species * Override the enemy pokemon fusion species
* @param species the fusion species to set * @param species - The fusion species to set
* @returns `this` * @returns `this`
*/ */
public enemyFusionSpecies(species: Species | number): this { public enemyFusionSpecies(species: Species | number): this {
@ -339,8 +339,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the enemy (pokemon) {@linkcode Abilities ability} * Override the {@linkcode Abilities | ability} of enemy pokemon
* @param ability the (pokemon) {@linkcode Abilities ability} to set * @param ability - The {@linkcode Abilities | ability} to set
* @returns `this` * @returns `this`
*/ */
public enemyAbility(ability: Abilities): this { public enemyAbility(ability: Abilities): this {
@ -350,8 +350,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the enemy (pokemon) **passive** {@linkcode Abilities ability} * Override the **passive** {@linkcode Abilities | ability} of enemy pokemon
* @param passiveAbility the (pokemon) **passive** {@linkcode Abilities ability} to set * @param passiveAbility - The **passive** {@linkcode Abilities | ability} to set
* @returns `this` * @returns `this`
*/ */
public enemyPassiveAbility(passiveAbility: Abilities): this { public enemyPassiveAbility(passiveAbility: Abilities): this {
@ -361,8 +361,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Forces the status of the enemy (pokemon) **passive** {@linkcode Abilities ability} * Forces the status of the enemy pokemon **passive** {@linkcode Abilities | ability}
* @param hasPassiveAbility forces the passive to be active if `true`, inactive if `false` * @param hasPassiveAbility - Forces the passive to be active if `true`, inactive if `false`
* @returns `this` * @returns `this`
*/ */
public enemyHasPassiveAbility(hasPassiveAbility: boolean | null): this { public enemyHasPassiveAbility(hasPassiveAbility: boolean | null): this {
@ -376,8 +376,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the enemy (pokemon) {@linkcode Moves moves}set * Override the {@linkcode Moves | move}set of enemy pokemon
* @param moveset the {@linkcode Moves moves}set to set * @param moveset - The {@linkcode Moves | move}set to set
* @returns `this` * @returns `this`
*/ */
public enemyMoveset(moveset: Moves | Moves[]): this { public enemyMoveset(moveset: Moves | Moves[]): this {
@ -391,8 +391,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the enemy (pokemon) level * Override the level of enemy pokemon
* @param level the level to set * @param level - The level to set
* @returns `this` * @returns `this`
*/ */
public enemyLevel(level: number): this { public enemyLevel(level: number): this {
@ -402,8 +402,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the enemy (pokemon) {@linkcode StatusEffect status-effect} * Override the enemy {@linkcode StatusEffect | status-effect} for enemy pokemon
* @param statusEffect the {@linkcode StatusEffect status-effect} to set * @param statusEffect - The {@linkcode StatusEffect | status-effect} to set
* @returns * @returns
*/ */
public enemyStatusEffect(statusEffect: StatusEffect): this { public enemyStatusEffect(statusEffect: StatusEffect): this {
@ -425,7 +425,7 @@ export class OverridesHelper extends GameManagerHelper {
/** /**
* Gives the player access to an Unlockable. * Gives the player access to an Unlockable.
* @param unlockable The Unlockable(s) to enable. * @param unlockable - The Unlockable(s) to enable.
* @returns `this` * @returns `this`
*/ */
public enableUnlockable(unlockable: Unlockables[]): this { public enableUnlockable(unlockable: Unlockables[]): this {
@ -436,7 +436,7 @@ export class OverridesHelper extends GameManagerHelper {
/** /**
* Override the items rolled at the end of a battle * Override the items rolled at the end of a battle
* @param items the items to be rolled * @param items - The items to be rolled
* @returns `this` * @returns `this`
*/ */
public itemRewards(items: ModifierOverride[]): this { public itemRewards(items: ModifierOverride[]): this {
@ -494,8 +494,8 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Override the enemy (Pokemon) to have the given amount of health segments * Override the enemy Pokemon to have the given amount of health segments
* @param healthSegments the number of segments to give * @param healthSegments - The number of segments to give
* - `0` (default): the health segments will be handled like in the game based on wave, level and species * - `0` (default): the health segments will be handled like in the game based on wave, level and species
* - `1`: the Pokemon will not be a boss * - `1`: the Pokemon 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
@ -524,7 +524,7 @@ export class OverridesHelper extends GameManagerHelper {
/** /**
* Override the encounter chance for a mystery encounter. * Override the encounter chance for a mystery encounter.
* @param percentage the encounter chance in % * @param percentage - The encounter chance in %
* @returns `this` * @returns `this`
*/ */
public mysteryEncounterChance(percentage: number): this { public mysteryEncounterChance(percentage: number): this {