mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-19 14:52:19 +02:00
Sanitize overrides before tests
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
This commit is contained in:
parent
1d96f00d96
commit
93f261257e
@ -1403,7 +1403,10 @@ export default class BattleScene extends SceneBase {
|
||||
this.field.add(newTrainer);
|
||||
}
|
||||
} else {
|
||||
if (!this.gameMode.hasTrainers) {
|
||||
if (
|
||||
!this.gameMode.hasTrainers ||
|
||||
(Overrides.DISABLE_STANDARD_TRAINERS_OVERRIDE && isNullOrUndefined(trainerData))
|
||||
) {
|
||||
newBattleType = BattleType.WILD;
|
||||
} else if (battleType === undefined) {
|
||||
newBattleType = this.gameMode.isWaveTrainer(newWaveIndex, this.arena) ? BattleType.TRAINER : BattleType.WILD;
|
||||
|
@ -227,7 +227,7 @@ export class OverridesHelper extends GameManagerHelper {
|
||||
* @returns `this`
|
||||
*/
|
||||
public disableTrainerWaves(): this {
|
||||
vi.spyOn(Overrides, "DISABLE_STANDARD_TRAINERS_OVERRIDE");
|
||||
vi.spyOn(Overrides, "DISABLE_STANDARD_TRAINERS_OVERRIDE", "get").mockReturnValue(true);
|
||||
this.log("Standard trainer waves are disabled!");
|
||||
return this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user