Fix catching bugs

Actions now log in the correct order when you catch something
Log adding/skipping Pokemon when your party is full
Fix a small spelling error
This commit is contained in:
RedstonewolfX 2024-07-13 11:14:46 -04:00
parent 3bae3fd302
commit 8c89200422
2 changed files with 10 additions and 4 deletions

View File

@ -2996,6 +2996,11 @@ export class TurnStartPhase extends FieldPhase {
this.scene.arenaFlyout.updateFieldText()
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.logActions(this.scene, this.scene.currentBattle.waveIndex, LoggerTools.Actions.join(" | "))
this.end();
}
}
@ -3097,8 +3102,6 @@ export class TurnEndPhase extends FieldPhase {
this.scene.arena.trySetTerrain(TerrainType.NONE, false);
}
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, LoggerTools.Actions.join(" | "))
this.end();
}
}
@ -5094,7 +5097,7 @@ export class SwitchPhase extends BattlePhase {
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, "Pre-switch " + (option == PartyOption.PASS_BATON ? "+ Baton" : "") + " to " + LoggerTools.playerPokeName(this.scene, slotIndex))
}
if (LoggerTools.isFaintSwitch.value) {
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, (option == PartyOption.PASS_BATON ? "Baton" : "Switch") + "in " + LoggerTools.playerPokeName(this.scene, slotIndex))
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, (option == PartyOption.PASS_BATON ? "Baton" : "Switch") + " in " + LoggerTools.playerPokeName(this.scene, slotIndex))
}
this.scene.unshiftPhase(new SwitchSummonPhase(this.scene, fieldIndex, slotIndex, this.doReturn, option === PartyOption.PASS_BATON));
}
@ -5668,6 +5671,7 @@ export class AttemptCapturePhase extends PokemonPhase {
this.scene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, this.fieldIndex, (slotIndex: integer, _option: PartyOption) => {
this.scene.ui.setMode(Mode.MESSAGE).then(() => {
if (slotIndex < 6) {
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, "Release " + LoggerTools.playerPokeName(this.scene, slotIndex))
addToParty();
} else {
promptRelease();
@ -5675,6 +5679,7 @@ export class AttemptCapturePhase extends PokemonPhase {
});
});
}, () => {
LoggerTools.logActions(this.scene, this.scene.currentBattle.waveIndex, "Do Not Keep")
this.scene.ui.setMode(Mode.MESSAGE).then(() => {
removePokemon();
end();

View File

@ -269,9 +269,10 @@ export default class ArenaFlyout extends Phaser.GameObjects.Container {
this.flyoutTextPlayer.text = ""
this.flyoutTextField.text = ""
this.flyoutTextEnemy.text = ""
this.flyoutTextHeaderField.text = "Stats"
this.flyoutTextHeaderField.text = ""
this.flyoutTextHeaderPlayer.text = ""
this.flyoutTextHeaderEnemy.text = ""
this.flyoutTextHeader.text = "Game Logs"
this.flyoutTextPlayer.setPosition(6, 4)
this.flyoutTextPlayer.setFontSize(30);
var instructions = []