mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-06 18:09:10 +00:00
[Bug][UI/UX] Starter select screen now looks for and displays form-specific abilities (#5454)
This commit is contained in:
parent
c7df847e66
commit
5c73a1ea46
@ -8,6 +8,7 @@ import i18next from "i18next";
|
||||
import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
||||
import { starterColors } from "#app/battle-scene";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
import type { Ability } from "#app/data/ability";
|
||||
import { allAbilities } from "#app/data/ability";
|
||||
import { speciesEggMoves } from "#app/data/balance/egg-moves";
|
||||
import { GrowthRate, getGrowthRateColor } from "#app/data/exp";
|
||||
@ -3364,7 +3365,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
}
|
||||
|
||||
if (dexEntry.caughtAttr) {
|
||||
const ability = allAbilities[this.lastSpecies.getAbility(abilityIndex!)]; // TODO: is this bang correct?
|
||||
let ability: Ability;
|
||||
if (this.lastSpecies.forms?.length > 1) {
|
||||
ability = allAbilities[this.lastSpecies.forms[formIndex ?? 0].getAbility(abilityIndex!)];
|
||||
} else {
|
||||
ability = allAbilities[this.lastSpecies.getAbility(abilityIndex!)]; // TODO: is this bang correct?
|
||||
}
|
||||
this.pokemonAbilityText.setText(ability.name);
|
||||
|
||||
const isHidden = abilityIndex === (this.lastSpecies.ability2 ? 2 : 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user