[Localization] add missed move trigger and remove getPokemonMessage (#3281)

* localize missed move-trigger message and remove redundant getPokemonMessage

* Update src/locales/zh_CN/move-trigger.ts

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/zh_TW/move-trigger.ts

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/de/move-trigger.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Update src/data/move.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Update src/locales/de/move-trigger.ts

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/zh_TW/move-trigger.ts

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/zh_CN/move-trigger.ts

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update src/locales/fr/move-trigger.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Update src/locales/it/move-trigger.ts

Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>

* Revert "Update src/data/move.ts"

This reverts commit 4dd6130c39.

* fix italian param error

* Update src/locales/de/move-trigger.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Update src/locales/de/move-trigger.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Update src/locales/pt_BR/move-trigger.ts

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

---------

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
This commit is contained in:
Enoch 2024-08-03 11:41:55 +09:00 committed by GitHub
parent 3055d4500f
commit ec27c14035
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 91 additions and 30 deletions

View File

@ -2,7 +2,7 @@ import { ChargeAnim, MoveChargeAnim, initMoveAnim, loadMoveAnimAssets } from "./
import { BattleEndPhase, MoveEndPhase, MovePhase, NewBattlePhase, PartyStatusCurePhase, PokemonHealPhase, StatChangePhase, SwitchSummonPhase } from "../phases";
import { BattleStat, getBattleStatName } from "./battle-stat";
import { EncoreTag, HelpingHandTag, SemiInvulnerableTag, StockpilingTag, TypeBoostTag } from "./battler-tags";
import { getPokemonMessage, getPokemonNameWithAffix } from "../messages";
import { getPokemonNameWithAffix } from "../messages";
import Pokemon, { AttackMoveResult, EnemyPokemon, HitResult, MoveResult, PlayerPokemon, PokemonMove, TurnMove } from "../field/pokemon";
import { StatusEffect, getStatusEffectHealText, isNonVolatileStatusEffect, getNonVolatileStatusEffects} from "./status-effect";
import { getTypeResistances, Type } from "./type";
@ -1388,7 +1388,7 @@ export class HealAttr extends MoveEffectAttr {
*/
addHealPhase(target: Pokemon, healRatio: number) {
target.scene.unshiftPhase(new PokemonHealPhase(target.scene, target.getBattlerIndex(),
Math.max(Math.floor(target.getMaxHp() * healRatio), 1), getPokemonMessage(target, " \nhad its HP restored."), true, !this.showAnim));
Math.max(Math.floor(target.getMaxHp() * healRatio), 1), i18next.t("moveTriggers:healHp", {pokemonName: getPokemonNameWithAffix(target)}), true, !this.showAnim));
}
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
@ -1482,7 +1482,7 @@ export class SacrificialFullRestoreAttr extends SacrificialAttr {
const maxPartyMemberHp = user.scene.getParty().map(p => p.getMaxHp()).reduce((maxHp: integer, hp: integer) => Math.max(hp, maxHp), 0);
user.scene.pushPhase(new PokemonHealPhase(user.scene, user.getBattlerIndex(),
maxPartyMemberHp, getPokemonMessage(user, "'s Healing Wish\nwas granted!"), true, false, false, true), true);
maxPartyMemberHp, i18next.t("moveTriggers:sacrificialFullRestore", {pokemonName: getPokemonNameWithAffix(user)}), true, false, false, true), true);
return true;
}
@ -2712,7 +2712,7 @@ export class InvertStatsAttr extends MoveEffectAttr {
target.updateInfo();
user.updateInfo();
target.scene.queueMessage(getPokemonMessage(target, "'s stat changes\nwere all reversed!"));
target.scene.queueMessage(i18next.t("moveTriggers:invertStats", {pokemonName: getPokemonNameWithAffix(target)}));
return true;
}
@ -2730,7 +2730,7 @@ export class ResetStatsAttr extends MoveEffectAttr {
target.updateInfo();
user.updateInfo();
target.scene.queueMessage(getPokemonMessage(target, "'s stat changes\nwere eliminated!"));
target.scene.queueMessage(i18next.t("moveTriggers:resetStats", {pokemonName: getPokemonNameWithAffix(target)}));
return true;
}
@ -4138,7 +4138,7 @@ export class DisableMoveAttr extends MoveEffectAttr {
target.summonData.disabledMove = disabledMove.moveId;
target.summonData.disabledTurns = 4;
user.scene.queueMessage(getPokemonMessage(target, `'s ${disabledMove.getName()}\nwas disabled!`));
user.scene.queueMessage(i18next.t("abilityTriggers:postDefendMoveDisable", { pokemonNameWithAffix: getPokemonNameWithAffix(target), moveName: disabledMove.getName()}));
return true;
}
@ -4445,7 +4445,7 @@ export class FaintCountdownAttr extends AddBattlerTagAttr {
return false;
}
user.scene.queueMessage(getPokemonMessage(target, `\nwill faint in ${this.turnCountMin - 1} turns.`));
user.scene.queueMessage(i18next.t("moveTriggers:faintCountdown", {pokemonName: getPokemonNameWithAffix(target), turnCount: this.turnCountMin - 1}));
return true;
}
@ -4685,7 +4685,7 @@ export class SwapArenaTagsAttr extends MoveEffectAttr {
}
user.scene.queueMessage( `${getPokemonNameWithAffix(user)} swapped the battle effects affecting each side of the field!`);
user.scene.queueMessage( i18next.t("moveTriggers:swapArenaTags", {pokemonName: getPokemonNameWithAffix(user)}));
return true;
}
}
@ -4917,7 +4917,7 @@ export class CopyTypeAttr extends MoveEffectAttr {
user.summonData.types = target.getTypes(true);
user.updateInfo();
user.scene.queueMessage(getPokemonMessage(user, `'s type\nchanged to match ${getPokemonNameWithAffix(target)}'s!`));
user.scene.queueMessage(i18next.t("moveTriggers:copyType", {pokemonName: getPokemonNameWithAffix(user), targetPokemonName: getPokemonNameWithAffix(target)}));
return true;
}
@ -5598,7 +5598,7 @@ export class SuppressAbilitiesAttr extends MoveEffectAttr {
target.summonData.abilitySuppressed = true;
target.scene.queueMessage(getPokemonMessage(target, "'s ability\nwas suppressed!"));
target.scene.queueMessage(i18next.t("moveTriggers:suppressAbilities", {pokemonName: getPokemonNameWithAffix(target)}));
return true;
}

View File

@ -50,5 +50,13 @@ export const moveTriggers: SimpleTranslationEntries = {
"transformedIntoTarget": "{{pokemonName}} verwandelt sich in {{targetName}}!",
"tryingToTakeFoeDown": "{{pokemonName}} versucht, den Angreifer mit sich zu nehmen!",
"addType": "{{pokemonName}} nimmt zusätzlich den Typ {{typeName}} an!",
"cannotUseMove": "{{pokemonName}} kann {{moveName}} nicht einsetzen!"
"cannotUseMove": "{{pokemonName}} kann {{moveName}} nicht einsetzen!",
"healHp": "KP von {{pokemonName}} wurden aufgefrischt!",
"sacrificialFullRestore": "Das Heilopfer von {{pokemonName}} erreicht sein Ziel!",
"invertStats": "Alle Statusveränderungen von {{pokemonName}} wurden invertiert!",
"resetStats": "Die Statusveränderungen von {{pokemonName}} wurden aufgehoben!",
"faintCountdown": "{{pokemonName}} geht nach {{turnCount}} Runden K.O.!",
"copyType": "{{pokemonName}} hat den Typ von {{targetPokemonName}} angenommen!",
"suppressAbilities": "Die Fähigkeit von {{pokemonName}} wirkt nicht mehr!",
"swapArenaTags": "{{pokemonName}} hat die Effekte, die auf den beiden Seiten des Kampffeldes wirken, miteinander getauscht!",
} as const;

View File

@ -50,5 +50,13 @@ export const moveTriggers: SimpleTranslationEntries = {
"transformedIntoTarget": "{{pokemonName}} transformed\ninto {{targetName}}!",
"tryingToTakeFoeDown": "{{pokemonName}} is hoping to take its attacker down with it!",
"addType": "{{typeName}} was added to\n{{pokemonName}}!",
"cannotUseMove": "{{pokemonName}} cannot use {{moveName}}!"
"cannotUseMove": "{{pokemonName}} cannot use {{moveName}}!",
"healHp": "{{pokemonName}} had its HP restored.",
"sacrificialFullRestore": "{{pokemonName}}'s Healing Wish\nwas granted!",
"invertStats": "{{pokemonName}}'s stat changes\nwere all reversed!",
"resetStats": "{{pokemonName}}'s stat changes\nwere eliminated!",
"faintCountdown": "{{pokemonName}}\nwill faint in {{turnCount}} turns.",
"copyType": "{{pokemonName}}'s type became the same as\n{{targetPokemonName}}'s type!",
"suppressAbilities": "{{pokemonName}}'s ability\nwas suppressed!",
"swapArenaTags": "{{pokemonName}} swapped the battle effects affecting each side of the field!",
} as const;

View File

@ -50,5 +50,13 @@ export const moveTriggers: SimpleTranslationEntries = {
"transformedIntoTarget": "{{pokemonName}} transformed\ninto {{targetName}}!",
"tryingToTakeFoeDown": "{{pokemonName}} is hoping to take its attacker down with it!",
"addType": "{{typeName}} was added to\n{{pokemonName}}!",
"cannotUseMove": "{{pokemonName}} cannot use {{moveName}}!"
"cannotUseMove": "{{pokemonName}} cannot use {{moveName}}!",
"healHp": "{{pokemonName}} had its HP restored.",
"sacrificialFullRestore": "{{pokemonName}}'s Healing Wish\nwas granted!",
"invertStats": "{{pokemonName}}'s stat changes\nwere all reversed!",
"resetStats": "{{pokemonName}}'s stat changes\nwere eliminated!",
"faintCountdown": "{{pokemonName}}\nwill faint in {{turnCount}} turns.",
"copyType": "{{pokemonName}}'s type\nchanged to match {{targetPokemonName}}'s!",
"suppressAbilities": "{{pokemonName}}'s ability\nwas suppressed!",
"swapArenaTags": "{{pokemonName}} swapped the battle effects affecting each side of the field!",
} as const;

View File

@ -50,5 +50,13 @@ export const moveTriggers: SimpleTranslationEntries = {
"transformedIntoTarget": "{{pokemonName}} prend\nlapparence de {{targetName}} !",
"tryingToTakeFoeDown": "{{pokemonName}} veut entrainer\nson assaillant dans sa chute !",
"addType": "{{pokemonName}} gagne\nle type {{typeName}}.",
"cannotUseMove": "{{pokemonName}} ne peut pas\nutiliser la capacité {{moveName}} !"
"cannotUseMove": "{{pokemonName}} ne peut pas\nutiliser la capacité {{moveName}} !",
"healHp": "{{pokemonName}}\nrécupère des PV !",
"sacrificialFullRestore": "Le Vœu Soin est exaucé et profite\nà {{pokemonName}} !",
"invertStats": "Les changements de stats\nde {{pokemonName}} sont inversés !",
"resetStats": "Les changements de stats\nde {{pokemonName}} ont tous été annulés !",
"faintCountdown": "{{pokemonName}}\nsera K.O. dans {{turnCount}} tours !",
"copyType": "{{pokemonName}} prend le type\nde {{targetPokemonName}} !",
"suppressAbilities": "Le talent de {{pokemonName}}\na été rendu inactif !",
"swapArenaTags": "Les effets affectant chaque côté du terrain\nont été échangés par {{pokemonName}} !",
} as const;

View File

@ -50,5 +50,13 @@ export const moveTriggers: SimpleTranslationEntries = {
"transformedIntoTarget": "{{pokemonName}} assume le sembianze\ndi {{targetName}}!",
"tryingToTakeFoeDown": "{{pokemonName}} tenta di far subire a chi lo manda KO la sua stessa sorte!",
"addType": "Adesso {{pokemonName}} è anche\ndi tipo {{typeName}}!",
"cannotUseMove": "{{pokemonName}} non può usare {{moveName}}!"
"cannotUseMove": "{{pokemonName}} non può usare {{moveName}}!",
"healHp": "{{pokemonName}} ha recuperato dei PS.",
"sacrificialFullRestore": "{{pokemonName}} riceve i benefici\neffetti di Curardore!",
"invertStats": "Le modifiche alle statistiche di {{pokemonName}}\nvengono invertite!",
"resetStats": "Tutte le modifiche alle statistiche sono state annullate!",
"faintCountdown": "{{pokemonName}}\nandrà KO dopo {{turnCount}} turni.",
"copyType": "{{pokemonName}} assume il tipo\ndi {{targetPokemonName}}!",
"suppressAbilities": "Labilità di {{pokemonName}}\nperde ogni efficacia!",
"swapArenaTags": "{{pokemonName}} ha invertito gli effetti attivi\nnelle due metà del campo!",
} as const;

View File

@ -50,5 +50,13 @@ export const moveTriggers: SimpleTranslationEntries = {
"transformedIntoTarget": "{{pokemonName}}[[는]]\n{{targetName}}[[로]] 변신했다!",
"tryingToTakeFoeDown": "{{pokemonName}}[[는]] 상대를\n길동무로 삼으려 하고 있다!",
"addType": "{{pokemonName}}에게\n{{typeName}}타입이 추가되었다!",
"cannotUseMove": "{{pokemonName}}[[는]]\n{{moveName}}[[를]] 쓸 수 없다!"
"cannotUseMove": "{{pokemonName}}[[는]]\n{{moveName}}[[를]] 쓸 수 없다!",
"healHp": "{{pokemonName}}의\n체력이 회복되었다!",
"sacrificialFullRestore": "{{pokemonName}}의\n치유소원이 이루어졌다!",
"invertStats": "{{pokemonName}}[[는]]\n능력 변화가 뒤집혔다!",
"resetStats": "{{pokemonName}}의 모든 상태가\n원래대로 되돌아왔다!",
"faintCountdown": "{{pokemonName}}[[는]]\n{{turnCount}}턴 후에 쓰러져 버린다!",
"copyType": "{{pokemonName}}[[는]]\n{{targetPokemonName}}[[와]] 같은 타입이 되었다!",
"suppressAbilities": "{{pokemonName}}의\n특성이 효과를 발휘하지 못하게 되었다!",
"swapArenaTags": "{{pokemonName}}[[는]]\n서로의 필드 효과를 교체했다!",
} as const;

View File

@ -50,5 +50,13 @@ export const moveTriggers: SimpleTranslationEntries = {
"transformedIntoTarget": "{{pokemonName}} se transformou\nem um(a) {{targetName}}!",
"tryingToTakeFoeDown": "{{pokemonName}} está tentando derrubar o atacante com ele!",
"addType": "{{pokemonName}} recebeu\no tipo {{typeName}}!",
"cannotUseMove": "{{pokemonName}} não pode usar {{moveName}}!"
"cannotUseMove": "{{pokemonName}} não pode usar {{moveName}}!",
"healHp": "{{pokemonName}} teve seus PS recuperados.",
"sacrificialFullRestore": "O Healing Wish de {{pokemonName}}\nfoi concedido!",
"invertStats": "As mudanças de atributo de {{pokemonName}}\nforam revertidas!",
"resetStats": "As mudanças de atributo de {{pokemonName}}\nforam eliminadas!",
"faintCountdown": "{{pokemonName}}\nirá desmaiar em {{turnCount}} turnos.",
"copyType": "O tipo de {{pokemonName}}\nmudou para combinar com {{targetPokemonName}}!",
"suppressAbilities": "A habilidade de {{pokemonName}}\nfoi suprimida!",
"swapArenaTags": "{{pokemonName}} trocou os efeitos de batalha que afetam cada lado do campo!",
} as const;

View File

@ -50,5 +50,13 @@ export const moveTriggers: SimpleTranslationEntries = {
"transformedIntoTarget": "{{pokemonName}}\n变身成了{{targetName}}",
"tryingToTakeFoeDown": "{{pokemonName}}\n想和对手同归于尽",
"addType": "{{pokemonName}}\n增加了{{typeName}}属性!",
"cannotUseMove": "{{pokemonName}}\n无法使用{{moveName}}"
"cannotUseMove": "{{pokemonName}}\n无法使用{{moveName}}",
"healHp": "{{pokemonName}}的\n体力回复了",
"sacrificialFullRestore": "{{pokemonName}}的\n治愈之愿实现了",
"invertStats": "{{pokemonName}}的\n能力变化颠倒过来了",
"resetStats": "{{pokemonName}}的\n能力变化复原了",
"faintCountdown": "{{pokemonName}}\n将在{{turnCount}}回合后灭亡!",
"copyType": "{{pokemonName}}\n变成了{{targetPokemonName}}的属性!",
"suppressAbilities": "{{pokemonName}}的特性\n变得无效了",
"swapArenaTags": "{{pokemonName}}\n交换了双方的场地效果",
} as const;

View File

@ -50,5 +50,13 @@ export const moveTriggers: SimpleTranslationEntries = {
"transformedIntoTarget": "{{pokemonName}}\n變身成了{{targetName}}",
"tryingToTakeFoeDown": "{{pokemonName}}\n想和對手同歸於盡",
"addType": "{{pokemonName}}\n增加了{{typeName}}屬性!",
"cannotUseMove": "{{pokemonName}}\n無法使用{{moveName}}"
"cannotUseMove": "{{pokemonName}}\n無法使用{{moveName}}",
"healHp": "{{pokemonName}}的\n體力回復了",
"sacrificialFullRestore": "{{pokemonName}}的\n治癒之願實現了",
"invertStats": "{{pokemonName}}的\n能力變化顛倒過來了",
"resetStats": "{{pokemonName}}的\n能力變化復原了",
"faintCountdown": "{{pokemonName}}\n將在{{turnCount}}回合後滅亡!",
"copyType": "{{pokemonName}}變成了{{targetPokemonName}}的屬性!",
"suppressAbilities": "{{pokemonName}}的特性\n變得無效了",
"swapArenaTags": "{{pokemonName}}\n交換了雙方的場地效果",
} as const;

View File

@ -2,17 +2,6 @@ import { BattleSpec } from "#enums/battle-spec";
import Pokemon from "./field/pokemon";
import i18next from "i18next";
/**
* Builds a message by concatenating the Pokemon name with its potential affix and the given text
* @param pokemon {@linkcode Pokemon} name and battle context will be retrieved from this instance for {@linkcode getPokemonNameWithAffix}
* @param {string} content any text
* @returns {string} ex: "Wild Gengar fainted!", "Ectoplasma sauvage est K.O!"
* @see {@linkcode getPokemonNameWithAffix} for the Pokemon's name and potentiel affix
*/
export function getPokemonMessage(pokemon: Pokemon, content: string): string {
return `${getPokemonNameWithAffix(pokemon)}${content}`;
}
/**
* Retrieves the Pokemon's name, potentially with an affix indicating its role (wild or foe) in the current battle context, translated
* @param pokemon {@linkcode Pokemon} name and battle context will be retrieved from this instance