Fix overlap text

Overrode the names for a couple of forms to make text readable
- Zacian and Zamazenta's uncrowned form is listed as no form/default
- Minior is simplified
 - Minior (Orange Core Form) is Minior (Orange)
 - Minior (Blue Meteor Form) is Minior (Blue)
 - etc.
This commit is contained in:
RedstonewolfX 2024-08-17 11:36:34 -04:00
parent f98bed1ee5
commit 6b73e3ba87

View File

@ -16,6 +16,7 @@ import { BattleEndPhase } from "#app/phases.js";
import { Gender } from "#app/data/gender.js";
import { getBiomeName } from "#app/data/biomes.js";
import { getLuckString } from "#app/modifier/modifier-type.js";
import { Species } from "#app/enums/species.js";
/** Enum used to differentiate {@linkcode Arena} effects */
enum ArenaEffectType {
@ -316,9 +317,12 @@ export class ArenaFlyout extends Phaser.GameObjects.Container {
var formtext = ""
if (poke[i].species.forms?.[poke[i].formIndex]?.formName) {
formtext = " (" + poke[i].species.forms?.[poke[i].formIndex]?.formName + ")"
if (formtext == " (Normal)") {
if (formtext == " (Normal)" || formtext == " (Hero of Many Battles)") {
formtext = ""
}
if (poke[i].species.speciesId == Species.MINIOR) {
formtext = " (" + poke[i].species.forms?.[poke[i].formIndex]?.formName.split(" ")[0] + ")"
}
}
this.flyoutTextPlayer.text += poke[i].name + formtext + " " + (poke[i].gender == Gender.MALE ? "♂" : (poke[i].gender == Gender.FEMALE ? "♀" : "-")) + " " + poke[i].level + "\n"
this.flyoutTextEnemy.text += poke[i].getAbility().name + " / " + (poke[i].isBoss() ? poke[i].getPassiveAbility().name + " / " : "") + getNatureName(poke[i].nature) + (getNatureIncrease(poke[i].nature) != "" ? " (+" + getNatureIncrease(poke[i].nature) + " -" + getNatureDecrease(poke[i].nature) + ")" : "") + "\n\n\n"