Moved overrideModifiers and overrideHeldItems to after generateEnemyModifiers

This commit is contained in:
frutescens 2024-11-19 12:49:58 -08:00
parent 6442b8345f
commit 7c607d3bc4

View File

@ -34,6 +34,7 @@ import { Biome } from "#enums/biome";
import { MysteryEncounterMode } from "#enums/mystery-encounter-mode";
import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species";
import { overrideHeldItems, overrideModifiers } from "#app/modifier/modifier";
import i18next from "i18next";
import { WEIGHT_INCREMENT_ON_SPAWN_MISS } from "#app/data/mystery-encounters/mystery-encounters";
@ -216,6 +217,11 @@ export class EncounterPhase extends BattlePhase {
if (!this.loaded && battle.battleType !== BattleType.MYSTERY_ENCOUNTER) {
regenerateModifierPoolThresholds(this.scene.getEnemyField(), battle.battleType === BattleType.TRAINER ? ModifierPoolType.TRAINER : ModifierPoolType.WILD);
this.scene.generateEnemyModifiers();
overrideModifiers(this.scene, false);
this.scene.getEnemyField().forEach(enemy => {
overrideHeldItems(this.scene, enemy, false);
});
}
this.scene.ui.setMode(Mode.MESSAGE).then(() => {