Remove unnecessary waveIndex addition to battle scene

This commit is contained in:
AJ Fontaine 2025-02-24 09:41:50 -05:00
parent b3fff775e4
commit dd544b041d
2 changed files with 2 additions and 4 deletions

View File

@ -388,7 +388,6 @@ export default class BattleScene extends SceneBase {
public inputMethod: string;
private infoToggles: InfoToggle[] = [];
public waveIndex: number | null;
public eventManager: TimedEventManager;
@ -1555,7 +1554,6 @@ export default class BattleScene extends SceneBase {
this.resetSeed(newWaveIndex);
const playerField = this.getPlayerField();
this.waveIndex = newWaveIndex; // temporary wave index so it can be accessed by trainer constructor
if (
this.gameMode.isFixedBattle(newWaveIndex) &&

View File

@ -70,7 +70,7 @@ export default class Trainer extends Phaser.GameObjects.Container {
}
}
if (this.config.trainerAI.teraMode === TeraAIMode.INSTANT_TERA && globalScene.waveIndex && globalScene.waveIndex >= this.config.minTeraWave) {
if (this.config.trainerAI.teraMode === TeraAIMode.INSTANT_TERA) {
this.teraIndexes.push(...this.config.trainerAI.instantTeras.map(i => i < 0 ? this.getPartyTemplate().size + i : i));
console.log("Tera index %d", this.teraIndexes[0]);
if (this.teraIndexes.length === 0) {
@ -444,7 +444,7 @@ export default class Trainer extends Phaser.GameObjects.Container {
while (retry && evoAttempt++ < 10) {
ret = getPokemonSpecies(baseSpecies.getTrainerSpeciesForLevel(level, true, strength, globalScene.currentBattle.waveIndex));
console.log(ret.name);
if (!ret.isOfType(this.config.specialtyType)) {
if (ret.isOfType(this.config.specialtyType)) {
retry = false;
}
}