From 5263b843785f73e5cc13bfaab1013754f5699d79 Mon Sep 17 00:00:00 2001 From: RedstonewolfX <108761527+RedstonewolfX@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:13:20 -0400 Subject: [PATCH] Reapply "Simpler Shop" This reverts commit b4d069db4bfc12f10bc1ac399759427c5fdc96ef. --- src/logger.ts | 5 ++++- src/phases.ts | 2 -- src/ui/fight-ui-handler.ts | 17 ++++++++++++----- src/ui/log-select-ui-handler.ts | 3 +-- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/logger.ts b/src/logger.ts index 80a78a20c2d..c3c0d3d287b 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -759,7 +759,10 @@ export function getWave(drpd: DRPD, floor: integer, scene: BattleScene): Wave { } } if (wv == undefined) { - if (scene.gameMode.modeId != GameModes.DAILY) { + if (scene.gameMode.modeId != GameModes.DAILY || true) { + if (scene.gameMode.modeId == GameModes.DAILY) { + console.log(";-;") + } drpd.waves.push({ id: floor, reload: false, diff --git a/src/phases.ts b/src/phases.ts index 3c60d3288bc..2c8aad0b09d 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -703,7 +703,6 @@ export class TitlePhase extends Phase { handler: () => { this.scene.biomeChangeMode = false //return this.logRenameMenu() - // this.scene.ui.setOverlayMode(Mode.LOG_HANDLER, (k: string) => { if (k === undefined) { @@ -715,7 +714,6 @@ export class TitlePhase extends Phase { this.showOptions(); }); return true; - // } }) options.push({ diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index bc7cc0a15d0..26749827aff 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -671,6 +671,15 @@ export default class FightUiHandler extends UiHandler { } dmgLow = out[0] * minHits dmgHigh = out[1] * maxHits + var qSuffix = "" + if (target.isBoss()) { + var bossSegs = (target as EnemyPokemon).bossSegments + //dmgLow /= bossSegs + //dmgHigh /= bossSegs + //qSuffix = "?" + } + var dmgLowP = Math.round((dmgLow)/target.getBattleStat(Stat.HP)*100) + var dmgHighP = Math.round((dmgHigh)/target.getBattleStat(Stat.HP)*100) /* if (user.hasAbility(Abilities.PARENTAL_BOND)) { // Second hit deals 0.25x damage @@ -689,13 +698,11 @@ export default class FightUiHandler extends UiHandler { return "---" } if (scene.damageDisplay == "Value") - return target.getMoveEffectiveness(user, move) + "x - " + (Math.round(dmgLow) == Math.round(dmgHigh) ? Math.round(dmgLow).toString() : Math.round(dmgLow) + "-" + Math.round(dmgHigh)) + koText - dmgLow = Math.round((dmgLow)/target.getBattleStat(Stat.HP)*100) - dmgHigh = Math.round((dmgHigh)/target.getBattleStat(Stat.HP)*100) + return target.getMoveEffectiveness(user, move) + "x - " + (Math.round(dmgLow) == Math.round(dmgHigh) ? Math.round(dmgLow).toString() + qSuffix : Math.round(dmgLow) + "-" + Math.round(dmgHigh) + qSuffix) + koText if (scene.damageDisplay == "Percent") - return target.getMoveEffectiveness(user, move) + "x - " + (dmgLow == dmgHigh ? dmgLow + "%" : dmgLow + "%-" + dmgHigh + "%") + koText + return target.getMoveEffectiveness(user, move) + "x - " + (dmgLowP == dmgHighP ? dmgLowP + "%" + qSuffix : dmgLowP + "%-" + dmgHighP + "%" + qSuffix) + koText if (scene.damageDisplay == "Off") - return target.getMoveEffectiveness(user, move) + "x" + return target.getMoveEffectiveness(user, move) + "x" + ((Math.floor(dmgLow) >= target.hp) ? " (KO)" : "") } setCursor(cursor: integer): boolean { diff --git a/src/ui/log-select-ui-handler.ts b/src/ui/log-select-ui-handler.ts index 777d0d9cbd9..fe564163362 100644 --- a/src/ui/log-select-ui-handler.ts +++ b/src/ui/log-select-ui-handler.ts @@ -310,7 +310,6 @@ class SessionSlot extends Phaser.GameObjects.Container { return; const iconContainer = this.scene.add.container(26 * i, 0); iconContainer.setScale(0.75); - console.log(p.id, Utils.getEnumKeys(Species)[Utils.getEnumValues(Species).indexOf(p.id)]) //if (Utils.getEnumValues(Species)[p.id] == undefined) //return; @@ -318,7 +317,7 @@ class SessionSlot extends Phaser.GameObjects.Container { //if (getPokemonSpecies(Utils.getEnumValues(Species)[p.id]) == undefined) //return; - const icon = this.scene.addPkIcon(allSpecies[Utils.getEnumValues(Species).indexOf(p.id)], 0, 0, 0, 0, 0); + const icon = this.scene.addPkIcon(getPokemonSpecies(Utils.getEnumValues(Species)[allSpecies[Utils.getEnumValues(Species).indexOf(p.id)].speciesId]), 0, 0, 0, 0, 0); const text = addTextObject(this.scene, 32, 20, ``, TextStyle.PARTY, { fontSize: "54px", color: "#f8f8f8" }); text.setShadow(0, 0, null);