From cc51ae411b0da1cec5fd1b5a119f10357f6d7842 Mon Sep 17 00:00:00 2001 From: Sophie Kujo Date: Mon, 6 May 2024 14:41:42 -0400 Subject: [PATCH] Removed debug code and reverted const -> let changes in battle-scene.ts --- src/battle-scene.ts | 10 ++++++---- src/modifier/modifier-type.ts | 5 ++--- src/overrides.ts | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 9db0cd967..2db56e18c 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -821,11 +821,12 @@ export default class BattleScene extends SceneBase { if (trainerConfigs[trainerType].doubleOnly) doubleTrainer = true; else if (trainerConfigs[trainerType].hasDouble) { - let doubleChance = new Utils.IntegerHolder(newWaveIndex % 10 === 0 ? 32 : 8); + const doubleChance = new Utils.IntegerHolder(newWaveIndex % 10 === 0 ? 32 : 8); this.applyModifiers(DoubleBattleChanceBoosterModifier, true, doubleChance); playerField.forEach(p => applyAbAttrs(DoubleBattleChanceAbAttr, p, null, doubleChance)); doubleTrainer = !Utils.randSeedInt(doubleChance.value); - if (this.getModifiers(DoubleBattleChancePreventerModifier).length != 0) doubleTrainer = false; + if (this.getModifiers(DoubleBattleChancePreventerModifier).length != 0) + doubleTrainer = false; } newTrainer = trainerData !== undefined ? trainerData.toTrainer(this) : new Trainer(this, trainerType, doubleTrainer ? TrainerVariant.DOUBLE : Utils.randSeedInt(2) ? TrainerVariant.FEMALE : TrainerVariant.DEFAULT); this.field.add(newTrainer); @@ -834,11 +835,12 @@ export default class BattleScene extends SceneBase { if (double === undefined && newWaveIndex > 1) { if (newBattleType === BattleType.WILD && !this.gameMode.isWaveFinal(newWaveIndex)) { - let doubleChance = new Utils.IntegerHolder(newWaveIndex % 10 === 0 ? 32 : 8); + const doubleChance = new Utils.IntegerHolder(newWaveIndex % 10 === 0 ? 32 : 8); this.applyModifiers(DoubleBattleChanceBoosterModifier, true, doubleChance); playerField.forEach(p => applyAbAttrs(DoubleBattleChanceAbAttr, p, null, doubleChance)); newDouble = !Utils.randSeedInt(doubleChance.value); - if (this.getModifiers(DoubleBattleChancePreventerModifier).length != 0) newDouble = false; + if (this.getModifiers(DoubleBattleChancePreventerModifier).length != 0) + newDouble = false; } else if (newBattleType === BattleType.TRAINER) newDouble = newTrainer.variant === TrainerVariant.DOUBLE; } else if (!battleConfig) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 0639e2f0c..b13a3961e 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -336,7 +336,7 @@ export class DoubleBattleChancePreventerModifierType extends ModifierType { public battleCount: integer; constructor(name: string, battleCount: integer) { - super(name, `Prevents the chance of an encounter being a double battle for ${battleCount} battles`, (_type, _args) => new Modifiers.DoubleBattleChancePreventerModifier(this, this.battleCount), + super(name, `Prevents double battles for ${battleCount} battles`, (_type, _args) => new Modifiers.DoubleBattleChancePreventerModifier(this, this.battleCount), null, 'repel'); this.battleCount = battleCount; @@ -996,8 +996,7 @@ const modifierPool: ModifierPool = { }, 3), new WeightedModifierType(modifierTypes.REPEL, (party: Pokemon[]) => { const existingItem = party[0].scene.findModifier(m => m.type instanceof DoubleBattleChancePreventerModifierType || m.type instanceof DoubleBattleChanceBoosterModifierType); - //return existingItem ? 0 : 2; - return 10000 + return existingItem ? 0 : 2; }), new WeightedModifierType(modifierTypes.LURE, (party: Pokemon[]) => { const existingItem = party[0].scene.findModifier(m => m.type instanceof DoubleBattleChancePreventerModifierType || m.type instanceof DoubleBattleChanceBoosterModifierType); diff --git a/src/overrides.ts b/src/overrides.ts index 731a095c8..4b9bcaa0b 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -4,7 +4,7 @@ import { Biome } from "./data/enums/biome"; import { Moves } from "./data/enums/moves"; import { WeatherType } from "./data/weather"; -export const SEED_OVERRIDE = 'b3DoubDG5i4izShAO06Z2V2y'; +export const SEED_OVERRIDE = ''; export const STARTER_SPECIES_OVERRIDE = 0; export const STARTER_FORM_OVERRIDE = 0; export const STARTING_LEVEL_OVERRIDE = 0;