mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-09 08:59:29 +02:00
Removed RewardOverride
This commit is contained in:
parent
93ca6482d7
commit
93ea5749c7
@ -288,7 +288,6 @@ function getNewRewardOption(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Replaces the {@linkcode Reward} of the entries within {@linkcode options} with any
|
* 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.
|
* up to the smallest amount of entries between {@linkcode options} and the override array.
|
||||||
* @param options Array of naturally rolled {@linkcode RewardOption}s
|
* @param options Array of naturally rolled {@linkcode RewardOption}s
|
||||||
* @param party Array of the player's current party
|
* @param party Array of the player's current party
|
||||||
|
@ -22,7 +22,6 @@ import { Unlockables } from "#enums/unlockables";
|
|||||||
import { VariantTier } from "#enums/variant-tier";
|
import { VariantTier } from "#enums/variant-tier";
|
||||||
import { WeatherType } from "#enums/weather-type";
|
import { WeatherType } from "#enums/weather-type";
|
||||||
import { HeldItemConfiguration } from "#items/held-item-data-types";
|
import { HeldItemConfiguration } from "#items/held-item-data-types";
|
||||||
import { type RewardOverride } from "#items/reward";
|
|
||||||
import { TrainerItemConfiguration } from "#items/trainer-item-data-types";
|
import { TrainerItemConfiguration } from "#items/trainer-item-data-types";
|
||||||
import { Variant } from "#sprites/variant";
|
import { Variant } from "#sprites/variant";
|
||||||
import { RewardSpecs } from "#types/rewards";
|
import { RewardSpecs } from "#types/rewards";
|
||||||
@ -274,19 +273,12 @@ class DefaultOverrides {
|
|||||||
* STARTING_HELD_ITEM_OVERRIDE = [{name: "BERRY"}]
|
* 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 = [];
|
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 = [];
|
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 = [];
|
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 = [];
|
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 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.
|
* If more entries are listed than rolled, only the first X entries will be used, where X is the number of items rolled.
|
||||||
*
|
*
|
||||||
|
@ -18,10 +18,10 @@ import { StatusEffect } from "#enums/status-effect";
|
|||||||
import type { Unlockables } from "#enums/unlockables";
|
import type { Unlockables } from "#enums/unlockables";
|
||||||
import { WeatherType } from "#enums/weather-type";
|
import { WeatherType } from "#enums/weather-type";
|
||||||
import type { HeldItemConfiguration } from "#items/held-item-data-types";
|
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 { TrainerItemConfiguration } from "#items/trainer-item-data-types";
|
||||||
import type { Variant } from "#sprites/variant";
|
import type { Variant } from "#sprites/variant";
|
||||||
import { GameManagerHelper } from "#test/test-utils/helpers/game-manager-helper";
|
import { GameManagerHelper } from "#test/test-utils/helpers/game-manager-helper";
|
||||||
|
import type { RewardSpecs } from "#types/rewards";
|
||||||
import { coerceArray, shiftCharCodes } from "#utils/common";
|
import { coerceArray, shiftCharCodes } from "#utils/common";
|
||||||
import { vi } from "vitest";
|
import { vi } from "vitest";
|
||||||
|
|
||||||
@ -557,7 +557,7 @@ export class OverridesHelper extends GameManagerHelper {
|
|||||||
* @param items - The items to be rolled
|
* @param items - The items to be rolled
|
||||||
* @returns `this`
|
* @returns `this`
|
||||||
*/
|
*/
|
||||||
public itemRewards(items: RewardOverride[]): this {
|
public rewards(items: RewardSpecs[]): this {
|
||||||
vi.spyOn(Overrides, "REWARD_OVERRIDE", "get").mockReturnValue(items);
|
vi.spyOn(Overrides, "REWARD_OVERRIDE", "get").mockReturnValue(items);
|
||||||
this.log("Item allRewards set to:", items);
|
this.log("Item allRewards set to:", items);
|
||||||
return this;
|
return this;
|
||||||
|
Loading…
Reference in New Issue
Block a user