From 382b70ed6024a2041eadd9e0a8671488398cb69b Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Wed, 3 Apr 2024 17:18:32 -0400 Subject: [PATCH] Minor final boss tweak and color hidden ability on catch/hatch info --- src/form-change-phase.ts | 3 ++- src/ui/pokemon-info-container.ts | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/form-change-phase.ts b/src/form-change-phase.ts index 631efc980..92b405c8a 100644 --- a/src/form-change-phase.ts +++ b/src/form-change-phase.ts @@ -270,7 +270,8 @@ export class QuietFormChangePhase extends BattlePhase { end(): void { if (this.pokemon.scene.currentBattle.battleSpec === BattleSpec.FINAL_BOSS && this.pokemon instanceof EnemyPokemon) { this.scene.playBgm(); - this.scene.unshiftPhase(new PokemonHealPhase(this.scene, this.pokemon.getBattlerIndex(), this.pokemon.getMaxHp(), null, false)); + this.pokemon.summonData.battleStats = [ 0, 0, 0, 0, 0, 0, 0 ]; + this.scene.unshiftPhase(new PokemonHealPhase(this.scene, this.pokemon.getBattlerIndex(), this.pokemon.getMaxHp(), null, false, false, false, true)); this.pokemon.bossSegments = 5; this.pokemon.bossSegmentIndex = 4; this.pokemon.initBattleInfo(); diff --git a/src/ui/pokemon-info-container.ts b/src/ui/pokemon-info-container.ts index 75c394896..e07415fde 100644 --- a/src/ui/pokemon-info-container.ts +++ b/src/ui/pokemon-info-container.ts @@ -3,7 +3,7 @@ import BattleScene from "../battle-scene"; import { Gender, getGenderColor, getGenderSymbol } from "../data/gender"; import Pokemon from "../field/pokemon"; import { StatsContainer } from "./stats-container"; -import { TextStyle, addBBCodeTextObject, addTextObject } from "./text"; +import { TextStyle, addBBCodeTextObject, addTextObject, getTextColor } from "./text"; import { addWindow } from "./ui-theme"; import { getNatureName } from "../data/nature"; import * as Utils from "../utils"; @@ -120,7 +120,12 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { } else this.pokemonGenderText.setVisible(false); - this.pokemonAbilityText.setText(pokemon.getAbility(true).name); + const ability = pokemon.getAbility(true); + const abilityTextStyle = ability.id === pokemon.getSpeciesForm().abilityHidden ? TextStyle.MONEY : TextStyle.WINDOW; + this.pokemonAbilityText.setText(ability.name); + this.pokemonAbilityText.setText(getTextColor(abilityTextStyle)); + this.pokemonAbilityText.setShadowColor(getTextColor(abilityTextStyle, true)); + this.pokemonNatureText.setText(getNatureName(pokemon.getNature(), true)); const originalIvs: integer[] = this.scene.gameData.dexData[pokemon.species.speciesId].caughtAttr