Compare commits

..

No commits in common. "9867151a860e53e0aa67a696ed6ad728509e99c8" and "72afdcf0a0abce0793111f42c417a1e8ec6ee05a" have entirely different histories.

2 changed files with 4 additions and 5 deletions

View File

@ -281,7 +281,7 @@ class RunEntryContainer extends Phaser.GameObjects.Container {
const genderIndex = this.scene.gameData.gender ?? PlayerGender.UNSET;
const genderStr = PlayerGender[genderIndex].toLowerCase();
// Defeats from wild Pokemon battles will show the Pokemon responsible by the text of the run result.
if (data.battleType === BattleType.WILD || (data.battleType === BattleType.MYSTERY_ENCOUNTER && !data.trainer)) {
if (data.battleType === BattleType.WILD) {
const enemyContainer = this.scene.add.container(8, 5);
const gameOutcomeLabel = addTextObject(this.scene, 0, 0, `${i18next.t("runHistory:defeatedWild", { context: genderStr })}`, TextStyle.WINDOW);
enemyContainer.add(gameOutcomeLabel);
@ -302,7 +302,7 @@ class RunEntryContainer extends Phaser.GameObjects.Container {
enemy.destroy();
});
this.add(enemyContainer);
} else if (data.battleType === BattleType.TRAINER || (data.battleType === BattleType.MYSTERY_ENCOUNTER && data.trainer)) { // Defeats from Trainers show the trainer's title and name
} else if (data.battleType === BattleType.TRAINER) { // Defeats from Trainers show the trainer's title and name
const tObj = data.trainer.toTrainer(this.scene);
// Because of the interesting mechanics behind rival names, the rival name and title have to be retrieved differently
const RIVAL_TRAINER_ID_THRESHOLD = 375;

View File

@ -93,7 +93,6 @@ export default class RunInfoUiHandler extends UiHandler {
const run = args[0];
// Assigning information necessary for the UI's creation
this.runInfo = this.scene.gameData.parseSessionData(JSON.stringify(run.entry));
console.log(this.runInfo);
this.isVictory = run.isVictory;
this.pageMode = RunInfoUiMode.MAIN;
@ -212,7 +211,7 @@ export default class RunInfoUiHandler extends UiHandler {
if (!this.isVictory) {
const enemyContainer = this.scene.add.container(0, 0);
// Wild - Single and Doubles
if (this.runInfo.battleType === BattleType.WILD || (this.runInfo.battleType === BattleType.MYSTERY_ENCOUNTER && !this.runInfo.trainer)) {
if (this.runInfo.battleType === BattleType.WILD) {
switch (this.runInfo.enemyParty.length) {
case 1:
// Wild - Singles
@ -223,7 +222,7 @@ export default class RunInfoUiHandler extends UiHandler {
this.parseWildDoubleDefeat(enemyContainer);
break;
}
} else if (this.runInfo.battleType === BattleType.TRAINER || (this.runInfo.battleType === BattleType.MYSTERY_ENCOUNTER && this.runInfo.trainer)) {
} else if (this.runInfo.battleType === BattleType.TRAINER) {
this.parseTrainerDefeat(enemyContainer);
}
this.runResultContainer.add(enemyContainer);