mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 17:29:30 +02:00
Fix enemy actions being logged
Adds a couple of checks to try to stop the game from logging enemy switches as if you were doing it
This commit is contained in:
parent
10bb348451
commit
a6ca7e38a4
@ -3630,7 +3630,9 @@ export class TurnStartPhase extends FieldPhase {
|
|||||||
this.scene.unshiftPhase(new AttemptCapturePhase(this.scene, turnCommand.targets[0] % 2, turnCommand.cursor));
|
this.scene.unshiftPhase(new AttemptCapturePhase(this.scene, turnCommand.targets[0] % 2, turnCommand.cursor));
|
||||||
break;
|
break;
|
||||||
case Command.POKEMON:
|
case Command.POKEMON:
|
||||||
|
if (pokemon.isPlayer()) {
|
||||||
LoggerTools.Actions[pokemon.getBattlerIndex()] = ((turnCommand.args[0] as boolean) ? "Baton" : "Switch") + " " + LoggerTools.playerPokeName(this.scene, pokemon) + " to " + LoggerTools.playerPokeName(this.scene, turnCommand.cursor)
|
LoggerTools.Actions[pokemon.getBattlerIndex()] = ((turnCommand.args[0] as boolean) ? "Baton" : "Switch") + " " + LoggerTools.playerPokeName(this.scene, pokemon) + " to " + LoggerTools.playerPokeName(this.scene, turnCommand.cursor)
|
||||||
|
}
|
||||||
this.scene.unshiftPhase(new SwitchSummonPhase(this.scene, pokemon.getFieldIndex(), turnCommand.cursor, true, turnCommand.args[0] as boolean, pokemon.isPlayer()));
|
this.scene.unshiftPhase(new SwitchSummonPhase(this.scene, pokemon.getFieldIndex(), turnCommand.cursor, true, turnCommand.args[0] as boolean, pokemon.isPlayer()));
|
||||||
break;
|
break;
|
||||||
case Command.RUN:
|
case Command.RUN:
|
||||||
@ -3671,9 +3673,11 @@ export class TurnStartPhase extends FieldPhase {
|
|||||||
|
|
||||||
this.scene.arenaFlyout.updateFieldText()
|
this.scene.arenaFlyout.updateFieldText()
|
||||||
|
|
||||||
|
if (LoggerTools.Actions.length > 1 && !this.scene.currentBattle.double) {
|
||||||
|
LoggerTools.Actions.pop() // If this is a single battle, but we somehow have two actions, delete the second
|
||||||
|
}
|
||||||
if (LoggerTools.Actions.length > 1 && (LoggerTools.Actions[0] == "" || LoggerTools.Actions[0] == undefined || LoggerTools.Actions[0] == null))
|
if (LoggerTools.Actions.length > 1 && (LoggerTools.Actions[0] == "" || LoggerTools.Actions[0] == undefined || LoggerTools.Actions[0] == null))
|
||||||
LoggerTools.Actions.shift() // If the left slot isn't doing anything, delete its entry
|
LoggerTools.Actions.shift() // If the left slot isn't doing anything, delete its entry
|
||||||
|
|
||||||
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, LoggerTools.Actions.join(" & "))
|
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, LoggerTools.Actions.join(" & "))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user