mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-24 17:22:20 +02:00
Compare commits
2 Commits
72afdcf0a0
...
9867151a86
Author | SHA1 | Date | |
---|---|---|---|
|
9867151a86 | ||
|
d011a3fd79 |
@ -281,7 +281,7 @@ class RunEntryContainer extends Phaser.GameObjects.Container {
|
|||||||
const genderIndex = this.scene.gameData.gender ?? PlayerGender.UNSET;
|
const genderIndex = this.scene.gameData.gender ?? PlayerGender.UNSET;
|
||||||
const genderStr = PlayerGender[genderIndex].toLowerCase();
|
const genderStr = PlayerGender[genderIndex].toLowerCase();
|
||||||
// Defeats from wild Pokemon battles will show the Pokemon responsible by the text of the run result.
|
// Defeats from wild Pokemon battles will show the Pokemon responsible by the text of the run result.
|
||||||
if (data.battleType === BattleType.WILD) {
|
if (data.battleType === BattleType.WILD || (data.battleType === BattleType.MYSTERY_ENCOUNTER && !data.trainer)) {
|
||||||
const enemyContainer = this.scene.add.container(8, 5);
|
const enemyContainer = this.scene.add.container(8, 5);
|
||||||
const gameOutcomeLabel = addTextObject(this.scene, 0, 0, `${i18next.t("runHistory:defeatedWild", { context: genderStr })}`, TextStyle.WINDOW);
|
const gameOutcomeLabel = addTextObject(this.scene, 0, 0, `${i18next.t("runHistory:defeatedWild", { context: genderStr })}`, TextStyle.WINDOW);
|
||||||
enemyContainer.add(gameOutcomeLabel);
|
enemyContainer.add(gameOutcomeLabel);
|
||||||
@ -302,7 +302,7 @@ class RunEntryContainer extends Phaser.GameObjects.Container {
|
|||||||
enemy.destroy();
|
enemy.destroy();
|
||||||
});
|
});
|
||||||
this.add(enemyContainer);
|
this.add(enemyContainer);
|
||||||
} else if (data.battleType === BattleType.TRAINER) { // Defeats from Trainers show the trainer's title and name
|
} else if (data.battleType === BattleType.TRAINER || (data.battleType === BattleType.MYSTERY_ENCOUNTER && data.trainer)) { // Defeats from Trainers show the trainer's title and name
|
||||||
const tObj = data.trainer.toTrainer(this.scene);
|
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
|
// Because of the interesting mechanics behind rival names, the rival name and title have to be retrieved differently
|
||||||
const RIVAL_TRAINER_ID_THRESHOLD = 375;
|
const RIVAL_TRAINER_ID_THRESHOLD = 375;
|
||||||
|
@ -93,6 +93,7 @@ export default class RunInfoUiHandler extends UiHandler {
|
|||||||
const run = args[0];
|
const run = args[0];
|
||||||
// Assigning information necessary for the UI's creation
|
// Assigning information necessary for the UI's creation
|
||||||
this.runInfo = this.scene.gameData.parseSessionData(JSON.stringify(run.entry));
|
this.runInfo = this.scene.gameData.parseSessionData(JSON.stringify(run.entry));
|
||||||
|
console.log(this.runInfo);
|
||||||
this.isVictory = run.isVictory;
|
this.isVictory = run.isVictory;
|
||||||
this.pageMode = RunInfoUiMode.MAIN;
|
this.pageMode = RunInfoUiMode.MAIN;
|
||||||
|
|
||||||
@ -211,7 +212,7 @@ export default class RunInfoUiHandler extends UiHandler {
|
|||||||
if (!this.isVictory) {
|
if (!this.isVictory) {
|
||||||
const enemyContainer = this.scene.add.container(0, 0);
|
const enemyContainer = this.scene.add.container(0, 0);
|
||||||
// Wild - Single and Doubles
|
// Wild - Single and Doubles
|
||||||
if (this.runInfo.battleType === BattleType.WILD) {
|
if (this.runInfo.battleType === BattleType.WILD || (this.runInfo.battleType === BattleType.MYSTERY_ENCOUNTER && !this.runInfo.trainer)) {
|
||||||
switch (this.runInfo.enemyParty.length) {
|
switch (this.runInfo.enemyParty.length) {
|
||||||
case 1:
|
case 1:
|
||||||
// Wild - Singles
|
// Wild - Singles
|
||||||
@ -222,7 +223,7 @@ export default class RunInfoUiHandler extends UiHandler {
|
|||||||
this.parseWildDoubleDefeat(enemyContainer);
|
this.parseWildDoubleDefeat(enemyContainer);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (this.runInfo.battleType === BattleType.TRAINER) {
|
} else if (this.runInfo.battleType === BattleType.TRAINER || (this.runInfo.battleType === BattleType.MYSTERY_ENCOUNTER && this.runInfo.trainer)) {
|
||||||
this.parseTrainerDefeat(enemyContainer);
|
this.parseTrainerDefeat(enemyContainer);
|
||||||
}
|
}
|
||||||
this.runResultContainer.add(enemyContainer);
|
this.runResultContainer.add(enemyContainer);
|
||||||
|
Loading…
Reference in New Issue
Block a user