Fix ability color with duplicate ability as hidden
parent
049fa306b9
commit
92caf6059b
|
@ -128,9 +128,8 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||||
} else
|
} else
|
||||||
this.pokemonGenderText.setVisible(false);
|
this.pokemonGenderText.setVisible(false);
|
||||||
|
|
||||||
const ability = pokemon.getAbility(true);
|
const abilityTextStyle = pokemon.abilityIndex === (pokemon.species.ability2 ? 2 : 1) ? TextStyle.MONEY : TextStyle.WINDOW;
|
||||||
const abilityTextStyle = ability.id === pokemon.getSpeciesForm().abilityHidden ? TextStyle.MONEY : TextStyle.WINDOW;
|
this.pokemonAbilityText.setText(pokemon.getAbility(true).name);
|
||||||
this.pokemonAbilityText.setText(ability.name);
|
|
||||||
this.pokemonAbilityText.setColor(getTextColor(abilityTextStyle, false, this.scene.uiTheme));
|
this.pokemonAbilityText.setColor(getTextColor(abilityTextStyle, false, this.scene.uiTheme));
|
||||||
this.pokemonAbilityText.setShadowColor(getTextColor(abilityTextStyle, true, this.scene.uiTheme));
|
this.pokemonAbilityText.setShadowColor(getTextColor(abilityTextStyle, true, this.scene.uiTheme));
|
||||||
|
|
||||||
|
|
|
@ -1464,7 +1464,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
const ability = this.lastSpecies.getAbility(abilityIndex);
|
const ability = this.lastSpecies.getAbility(abilityIndex);
|
||||||
this.pokemonAbilityText.setText(allAbilities[ability].name);
|
this.pokemonAbilityText.setText(allAbilities[ability].name);
|
||||||
|
|
||||||
const isHidden = ability === this.lastSpecies.abilityHidden;
|
const isHidden = abilityIndex === (this.lastSpecies.ability2 ? 2 : 1);
|
||||||
this.pokemonAbilityText.setColor(this.getTextColor(!isHidden ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GOLD));
|
this.pokemonAbilityText.setColor(this.getTextColor(!isHidden ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GOLD));
|
||||||
this.pokemonAbilityText.setShadowColor(this.getTextColor(!isHidden ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GOLD, true));
|
this.pokemonAbilityText.setShadowColor(this.getTextColor(!isHidden ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GOLD, true));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue