[Localize(en)] Add EN locale keys to Costar (#2517)

* Add unthaw to moves that are missing it

Add unthaw to all damaging fire moves

Add Status Effect overrides for easier testing

clean up comments and readd status cure before fainting

* implement Costar ability, refactor TraceAbAttr to be more generic

* format code, clean up comments

* Revert "Add unthaw to moves that are missing it"

This reverts commit 89494fa0c8.

* clean up comments, remove unused call

* ability now copies negatives changes as well

* separate PostSummonCopy into two different classes

* small refactor of copy ability attrs

* add costar to test suite

* remove abstract declaration from comments

* remove broken import statement

* actually fix broken imports

* add i18n calls

* add en keys to other locales and sort by alpha
This commit is contained in:
Dmitriy K 2024-06-22 12:09:35 -04:00 committed by GitHub
parent 77d25d18f9
commit f84fedd588
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 43 additions and 21 deletions

View File

@ -1987,7 +1987,7 @@ export class PostSummonFormChangeAbAttr extends PostSummonAbAttr {
/** Attempts to copy a pokemon's ability */
export class PostSummonCopyAbilityAbAttr extends PostSummonAbAttr {
private targetName: string;
private target: Pokemon;
private targetAbilityName: string;
applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
@ -2011,7 +2011,7 @@ export class PostSummonCopyAbilityAbAttr extends PostSummonAbAttr {
return false;
}
this.targetName = target.name;
this.target = target;
this.targetAbilityName = allAbilities[target.getAbility().id].name;
pokemon.summonData.ability = target.getAbility().id;
setAbilityRevealed(target);
@ -2021,15 +2021,17 @@ export class PostSummonCopyAbilityAbAttr extends PostSummonAbAttr {
}
getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]): string {
return getPokemonMessage(pokemon, ` copied ${this.targetName}'s\n${this.targetAbilityName}!`);
return i18next.t("abilityTriggers:trace", {
pokemonName: getPokemonNameWithAffix(pokemon),
targetName: getPokemonNameWithAffix(this.target),
abilityName: this.targetAbilityName,
});
}
}
/** Attempt to copy the stat changes on an ally pokemon */
export class PostSummonCopyAllyStatsAbAttr extends PostSummonAbAttr {
private allyName: string;
applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
if (!pokemon.scene.currentBattle.double) {
return false;
@ -2040,7 +2042,6 @@ export class PostSummonCopyAllyStatsAbAttr extends PostSummonAbAttr {
return false;
}
this.allyName = ally.name;
pokemon.summonData.battleStats = ally.summonData.battleStats;
pokemon.updateInfo();
@ -2048,7 +2049,10 @@ export class PostSummonCopyAllyStatsAbAttr extends PostSummonAbAttr {
}
getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]): string {
return getPokemonMessage(pokemon, ` copied ${this.allyName}'s stat changes!`);
return i18next.t("abilityTriggers:costar", {
pokemonName: getPokemonNameWithAffix(pokemon),
allyName: getPokemonNameWithAffix(pokemon.getAlly()),
});
}
}

View File

@ -3,6 +3,8 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const abilityTriggers: SimpleTranslationEntries = {
"blockRecoilDamage" : "{{pokemonName}} wurde durch {{abilityName}}\nvor Rückstoß geschützt!",
"badDreams": "{{pokemonName}} ist in einem Alptraum gefangen!",
"windPowerCharged": "Der Treffer durch {{moveName}} läd die Stärke von {{pokemonName}} auf!",
"costar": "{{pokemonName}} copied {{allyName}}'s stat changes!",
"iceFaceAvoidedDamage": "{{pokemonName}} wehrt Schaden\nmit {{abilityName}} ab!",
"trace": "{{pokemonName}} copied {{targetName}}'s\n{{abilityName}}!",
"windPowerCharged": "Der Treffer durch {{moveName}} läd die Stärke von {{pokemonName}} auf!",
} as const;

View File

@ -1,10 +1,12 @@
import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const abilityTriggers: SimpleTranslationEntries = {
"blockRecoilDamage" : "{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!",
"blockRecoilDamage": "{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!",
"badDreams": "{{pokemonName}} is tormented!",
"windPowerCharged": "Being hit by {{moveName}} charged {{pokemonName}} with power!",
"costar": "{{pokemonName}} copied {{allyName}}'s stat changes!",
"iceFaceAvoidedDamage": "{{pokemonName}} avoided\ndamage with {{abilityName}}!",
"perishBody": "{{pokemonName}}'s {{abilityName}}\nwill faint both pokemon in 3 turns!",
"poisonHeal": "{{pokemonName}}'s {{abilityName}}\nrestored its HP a little!",
"iceFaceAvoidedDamage": "{{pokemonName}} avoided\ndamage with {{abilityName}}!"
"trace": "{{pokemonName}} copied {{targetName}}'s\n{{abilityName}}!",
"windPowerCharged": "Being hit by {{moveName}} charged {{pokemonName}} with power!",
} as const;

View File

@ -3,6 +3,8 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const abilityTriggers: SimpleTranslationEntries = {
"blockRecoilDamage" : "¡{{abilityName}} de {{pokemonName}}\nlo protegió del daño de retroceso!",
"badDreams": "¡{{pokemonName}} está atormentado!",
"costar": "{{pokemonName}} copied {{allyName}}'s stat changes!",
"iceFaceAvoidedDamage": "¡{{pokemonNameWithAffix}} evitó\ndaño con {{abilityName}}!",
"trace": "{{pokemonName}} copied {{targetName}}'s\n{{abilityName}}!",
"windPowerCharged": "¡{{pokemonName}} se ha cargado de electricidad gracias a {{moveName}}!",
"iceFaceAvoidedDamage": "¡{{pokemonNameWithAffix}} evitó\ndaño con {{abilityName}}!"
} as const;

View File

@ -3,8 +3,10 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const abilityTriggers: SimpleTranslationEntries = {
"blockRecoilDamage" : "{{abilityName}}\nde {{pokemonName}} le protège du contrecoup !",
"badDreams": "{{pokemonName}} a le sommeil agité !",
"windPowerCharged": "{{pokemonName}} a été touché par la capacité {{moveName}} et se charge en électricité !",
"costar": "{{pokemonName}} copied {{allyName}}'s stat changes!",
"iceFaceAvoidedDamage": "{{pokemonName}} évite les dégâts\navec {{abilityName}} !",
"perishBody": "{{abilityName}} de {{pokemonName}}\nmettra les deux Pokémon K.O. dans trois tours !",
"poisonHeal": "{{abilityName}} de {{pokemonName}}\nrestaure un peu ses PV !",
"iceFaceAvoidedDamage": "{{pokemonName}} évite les dégâts\navec {{abilityName}} !"
"trace": "{{pokemonName}} copied {{targetName}}'s\n{{abilityName}}!",
"windPowerCharged": "{{pokemonName}} a été touché par la capacité {{moveName}} et se charge en électricité !",
} as const;

View File

@ -3,6 +3,8 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const abilityTriggers: SimpleTranslationEntries = {
"blockRecoilDamage" : "{{abilityName}} di {{pokemonName}}\nl'ha protetto dal contraccolpo!",
"badDreams": "{{pokemonName}} è tormentato dagli incubi!",
"costar": "{{pokemonName}} copied {{allyName}}'s stat changes!",
"iceFaceAvoidedDamage": "{{pokemonName}} ha evitato\ni danni grazie a {{abilityName}}!",
"trace": "{{pokemonName}} copied {{targetName}}'s\n{{abilityName}}!",
"windPowerCharged": "Venire colpito da {{moveName}} ha caricato {{pokemonName}}!",
"iceFaceAvoidedDamage": "{{pokemonName}} ha evitato\ni danni grazie a {{abilityName}}!"
} as const;

View File

@ -3,8 +3,10 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const abilityTriggers: SimpleTranslationEntries = {
"blockRecoilDamage" : "{{pokemonName}}[[는]] {{abilityName}} 때문에\n반동 데미지를 받지 않는다!",
"badDreams": "{{pokemonName}}[[는]]\n나이트메어 때문에 시달리고 있다!",
"windPowerCharged": "{{pokemonName}}[[는]]\n{{moveName}}에 맞아 충전되었다!",
"costar": "{{pokemonName}} copied {{allyName}}'s stat changes!",
"iceFaceAvoidedDamage": "{{pokemonName}}[[는]] {{abilityName}} 때문에\n데미지를 받지 않는다!",
"perishBody": "{{pokemonName}}의 {{abilityName}} 때문에\n양쪽 포켓몬 모두는 3턴 후에 쓰러져 버린다!",
"poisonHeal": "{{pokemonName}}[[는]] {{abilityName}}[[로]]인해\n조금 회복했다.",
"iceFaceAvoidedDamage": "{{pokemonName}}[[는]] {{abilityName}} 때문에\n데미지를 받지 않는다!",
"trace": "{{pokemonName}} copied {{targetName}}'s\n{{abilityName}}!",
"windPowerCharged": "{{pokemonName}}[[는]]\n{{moveName}}에 맞아 충전되었다!",
} as const;

View File

@ -3,8 +3,10 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const abilityTriggers: SimpleTranslationEntries = {
"blockRecoilDamage" : "{{abilityName}} de {{pokemonName}}\nprotegeu-o do dano de recuo!",
"badDreams": "{{pokemonName}} está tendo pesadelos!",
"windPowerCharged": "Ser atingido por {{moveName}} carregou {{pokemonName}} com poder!",
"costar": "{{pokemonName}} copied {{allyName}}'s stat changes!",
"iceFaceAvoidedDamage": "{{pokemonName}} evitou\ndanos com sua {{abilityName}}!",
"perishBody": "{{abilityName}} de {{pokemonName}}\nirá desmaiar ambos os Pokémon em 3 turnos!",
"poisonHeal": "{{abilityName}} de {{pokemonName}}\nrestaurou seus PS um pouco!",
"iceFaceAvoidedDamage": "{{pokemonName}} evitou\ndanos com sua {{abilityName}}!"
"trace": "{{pokemonName}} copied {{targetName}}'s\n{{abilityName}}!",
"windPowerCharged": "Ser atingido por {{moveName}} carregou {{pokemonName}} com poder!",
} as const;

View File

@ -3,6 +3,8 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const abilityTriggers: SimpleTranslationEntries = {
"blockRecoilDamage" : "{{pokemonName}} 的 {{abilityName}}\n抵消了反作用力",
"badDreams": "{{pokemonName}} 被折磨着!",
"costar": "{{pokemonName}} copied {{allyName}}'s stat changes!",
"iceFaceAvoidedDamage": "{{pokemonName}} 因为 {{abilityName}}\n避免了伤害",
"trace": "{{pokemonName}} copied {{targetName}}'s\n{{abilityName}}!",
"windPowerCharged": "受 {{moveName}} 的影响, {{pokemonName}} 提升了能力!",
"iceFaceAvoidedDamage": "{{pokemonName}} 因为 {{abilityName}}\n避免了伤害"
} as const;

View File

@ -3,6 +3,8 @@ import { SimpleTranslationEntries } from "#app/interfaces/locales";
export const abilityTriggers: SimpleTranslationEntries = {
"blockRecoilDamage" : "{{pokemonName}} 的 {{abilityName}}\n抵消了反作用力!",
"badDreams": "{{pokemonName}} 被折磨着!",
"costar": "{{pokemonName}} copied {{allyName}}'s stat changes!",
"iceFaceAvoidedDamage": "{{pokemonName}} avoided\ndamage with {{abilityName}}!",
"trace": "{{pokemonName}} copied {{targetName}}'s\n{{abilityName}}!",
"windPowerCharged": "Being hit by {{moveName}} charged {{pokemonName}} with power!",
"iceFaceAvoidedDamage": "{{pokemonName}} avoided\ndamage with {{abilityName}}!"
} as const;