mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 23:32:19 +02:00
Remove unnecessary waveIndex addition to battle scene
This commit is contained in:
parent
b3fff775e4
commit
dd544b041d
@ -388,7 +388,6 @@ export default class BattleScene extends SceneBase {
|
|||||||
|
|
||||||
public inputMethod: string;
|
public inputMethod: string;
|
||||||
private infoToggles: InfoToggle[] = [];
|
private infoToggles: InfoToggle[] = [];
|
||||||
public waveIndex: number | null;
|
|
||||||
|
|
||||||
public eventManager: TimedEventManager;
|
public eventManager: TimedEventManager;
|
||||||
|
|
||||||
@ -1555,7 +1554,6 @@ export default class BattleScene extends SceneBase {
|
|||||||
this.resetSeed(newWaveIndex);
|
this.resetSeed(newWaveIndex);
|
||||||
|
|
||||||
const playerField = this.getPlayerField();
|
const playerField = this.getPlayerField();
|
||||||
this.waveIndex = newWaveIndex; // temporary wave index so it can be accessed by trainer constructor
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.gameMode.isFixedBattle(newWaveIndex) &&
|
this.gameMode.isFixedBattle(newWaveIndex) &&
|
||||||
|
@ -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));
|
this.teraIndexes.push(...this.config.trainerAI.instantTeras.map(i => i < 0 ? this.getPartyTemplate().size + i : i));
|
||||||
console.log("Tera index %d", this.teraIndexes[0]);
|
console.log("Tera index %d", this.teraIndexes[0]);
|
||||||
if (this.teraIndexes.length === 0) {
|
if (this.teraIndexes.length === 0) {
|
||||||
@ -444,7 +444,7 @@ export default class Trainer extends Phaser.GameObjects.Container {
|
|||||||
while (retry && evoAttempt++ < 10) {
|
while (retry && evoAttempt++ < 10) {
|
||||||
ret = getPokemonSpecies(baseSpecies.getTrainerSpeciesForLevel(level, true, strength, globalScene.currentBattle.waveIndex));
|
ret = getPokemonSpecies(baseSpecies.getTrainerSpeciesForLevel(level, true, strength, globalScene.currentBattle.waveIndex));
|
||||||
console.log(ret.name);
|
console.log(ret.name);
|
||||||
if (!ret.isOfType(this.config.specialtyType)) {
|
if (ret.isOfType(this.config.specialtyType)) {
|
||||||
retry = false;
|
retry = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user