Use message directly instead of as key in tag

This commit is contained in:
Dean 2025-08-02 16:55:41 -07:00
parent d798ebb545
commit 6018e11233

View File

@ -1556,8 +1556,8 @@ interface PendingHealEffect {
readonly moveId: MoveId; readonly moveId: MoveId;
/** If `true`, also restores the target's PP when the effect activates. */ /** If `true`, also restores the target's PP when the effect activates. */
readonly restorePP: boolean; readonly restorePP: boolean;
/** The `i18n` key for the message to display when the effect activates */ /** The message to display when the effect activates */
readonly healMessageKey: string; readonly healMessage: string;
} }
/** /**
@ -1627,7 +1627,7 @@ export class PendingHealTag extends ArenaTag {
const healEffect = targetEffects?.find(effect => this.canApply(effect, pokemon)); const healEffect = targetEffects?.find(effect => this.canApply(effect, pokemon));
if (targetEffects && healEffect) { if (targetEffects && healEffect) {
const { sourceId, moveId, restorePP, healMessageKey } = healEffect; const { sourceId, moveId, restorePP, healMessage } = healEffect;
const sourcePokemon = globalScene.getPokemonById(sourceId); const sourcePokemon = globalScene.getPokemonById(sourceId);
if (!sourcePokemon) { if (!sourcePokemon) {
console.warn(`Source of pending ${allMoves[moveId].name} effect is undefined!`); console.warn(`Source of pending ${allMoves[moveId].name} effect is undefined!`);
@ -1640,7 +1640,7 @@ export class PendingHealTag extends ArenaTag {
"PokemonHealPhase", "PokemonHealPhase",
targetIndex, targetIndex,
pokemon.getMaxHp(), pokemon.getMaxHp(),
i18next.t(healMessageKey, { pokemonName: getPokemonNameWithAffix(sourcePokemon) }), healMessage,
true, true,
false, false,
false, false,