Removed RewardOverride

This commit is contained in:
Wlowscha 2025-08-04 01:39:19 +02:00
parent 93ca6482d7
commit 93ea5749c7
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04
3 changed files with 2 additions and 11 deletions

View File

@ -288,7 +288,6 @@ function getNewRewardOption(
/**
* Replaces the {@linkcode Reward} of the entries within {@linkcode options} with any
* {@linkcode RewardOverride} entries listed in {@linkcode Overrides.REWARD_OVERRIDE}
* up to the smallest amount of entries between {@linkcode options} and the override array.
* @param options Array of naturally rolled {@linkcode RewardOption}s
* @param party Array of the player's current party

View File

@ -22,7 +22,6 @@ import { Unlockables } from "#enums/unlockables";
import { VariantTier } from "#enums/variant-tier";
import { WeatherType } from "#enums/weather-type";
import { HeldItemConfiguration } from "#items/held-item-data-types";
import { type RewardOverride } from "#items/reward";
import { TrainerItemConfiguration } from "#items/trainer-item-data-types";
import { Variant } from "#sprites/variant";
import { RewardSpecs } from "#types/rewards";
@ -274,19 +273,12 @@ class DefaultOverrides {
* STARTING_HELD_ITEM_OVERRIDE = [{name: "BERRY"}]
* ```
*/
/** Override array of {@linkcode RewardOverride}s used to provide held items to first party member when starting a new game. */
readonly STARTING_TRAINER_ITEMS_OVERRIDE: TrainerItemConfiguration = [];
/** Override array of {@linkcode RewardOverride}s used to provide held items to enemies on spawn. */
readonly OPP_TRAINER_ITEMS_OVERRIDE: TrainerItemConfiguration = [];
/** Override array of {@linkcode RewardOverride}s used to provide held items to first party member when starting a new game. */
readonly STARTING_HELD_ITEMS_OVERRIDE: HeldItemConfiguration = [];
/** Override array of {@linkcode RewardOverride}s used to provide held items to enemies on spawn. */
readonly OPP_HELD_ITEMS_OVERRIDE: HeldItemConfiguration = [];
/**
* Override array of {@linkcode RewardOverride}s used to replace the generated reward rolls after a wave.
*
* If less entries are listed than rolled, only those entries will be used to replace the corresponding items while the rest randomly generated.
* If more entries are listed than rolled, only the first X entries will be used, where X is the number of items rolled.
*

View File

@ -18,10 +18,10 @@ import { StatusEffect } from "#enums/status-effect";
import type { Unlockables } from "#enums/unlockables";
import { WeatherType } from "#enums/weather-type";
import type { HeldItemConfiguration } from "#items/held-item-data-types";
import type { RewardOverride } from "#items/reward";
import type { TrainerItemConfiguration } from "#items/trainer-item-data-types";
import type { Variant } from "#sprites/variant";
import { GameManagerHelper } from "#test/test-utils/helpers/game-manager-helper";
import type { RewardSpecs } from "#types/rewards";
import { coerceArray, shiftCharCodes } from "#utils/common";
import { vi } from "vitest";
@ -557,7 +557,7 @@ export class OverridesHelper extends GameManagerHelper {
* @param items - The items to be rolled
* @returns `this`
*/
public itemRewards(items: RewardOverride[]): this {
public rewards(items: RewardSpecs[]): this {
vi.spyOn(Overrides, "REWARD_OVERRIDE", "get").mockReturnValue(items);
this.log("Item allRewards set to:", items);
return this;