[Localization] include pokemon names, stats into battle:stat* keys (#2373)

* [Localization] include pokemon names, stats into battle:stat* keys

* [Localization(fr)] Update stat change messages

Co-Authored-By: Lugiad <adrien.grivel@hotmail.fr>

* [Localization(es)] Update stat change messages

Co-Authored-By: GoldTra <162721984+GoldTra@users.noreply.github.com>

---------

Co-authored-by: Lugiad <adrien.grivel@hotmail.fr>
Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com>
This commit is contained in:
hibiya (김종이) 2024-06-23 10:55:09 +09:00 committed by GitHub
parent db06c53693
commit cb5016d10f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 108 additions and 104 deletions

View File

@ -32,34 +32,38 @@ export function getBattleStatName(stat: BattleStat) {
} }
} }
export function getBattleStatLevelChangeDescription(levels: integer, up: boolean) { export function getBattleStatLevelChangeDescription(pokemonNameWithAffix: string, stats: string, levels: integer, up: boolean) {
if (up) { const stringKey = (() => {
switch (levels) { if (up) {
case 1: switch (levels) {
return i18next.t("battle:statRose"); case 1:
case 2: return "battle:statRose";
return i18next.t("battle:statSharplyRose"); case 2:
case 3: return "battle:statSharplyRose";
case 4: case 3:
case 5: case 4:
case 6: case 5:
return i18next.t("battle:statRoseDrastically"); case 6:
default: return "battle:statRoseDrastically";
return i18next.t("battle:statWontGoAnyHigher"); default:
return "battle:statWontGoAnyHigher";
}
} else {
switch (levels) {
case 1:
return "battle:statFell";
case 2:
return "battle:statHarshlyFell";
case 3:
case 4:
case 5:
case 6:
return "battle:statSeverelyFell";
default:
return "battle:statWontGoAnyLower";
}
} }
} else { })();
switch (levels) {
case 1: return i18next.t(stringKey, { pokemonNameWithAffix, stats });
return i18next.t("battle:statFell");
case 2:
return i18next.t("battle:statHarshlyFell");
case 3:
case 4:
case 5:
case 6:
return i18next.t("battle:statSeverelyFell");
default:
return i18next.t("battle:statWontGoAnyLower");
}
}
} }

View File

@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
"drainMessage": "{{pokemonName}} wurde Energie abgesaugt", "drainMessage": "{{pokemonName}} wurde Energie abgesaugt",
"regainHealth": "KP von {{pokemonName}} wurden wieder aufgefrischt!", "regainHealth": "KP von {{pokemonName}} wurden wieder aufgefrischt!",
"fainted": "{{pokemonNameWithAffix}} wurde besiegt!", "fainted": "{{pokemonNameWithAffix}} wurde besiegt!",
"statRose": "steigt", "statRose": "{{stats}} von {{pokemonNameWithAffix}} steigt!",
"statSharplyRose": "steigt stark", "statSharplyRose": "{{stats}} von {{pokemonNameWithAffix}} steigt stark!",
"statRoseDrastically": "steigt drastisch", "statRoseDrastically": "{{stats}} von {{pokemonNameWithAffix}} steigt drastisch!",
"statWontGoAnyHigher": "kann nicht weiter erhöht werden", "statWontGoAnyHigher": "{{stats}} von {{pokemonNameWithAffix}} kann nicht weiter erhöht werden!",
"statFell": "sinkt", "statFell": "{{stats}} von {{pokemonNameWithAffix}} sinkt!",
"statHarshlyFell": "sinkt stark", "statHarshlyFell": "{{stats}} von {{pokemonNameWithAffix}} sinkt stark!",
"statSeverelyFell": "sinkt drastisch", "statSeverelyFell": "{{stats}} von {{pokemonNameWithAffix}} sinkt drastisch!",
"statWontGoAnyLower": "kann nicht weiter sinken", "statWontGoAnyLower": "{{stats}} von {{pokemonNameWithAffix}} kann nicht weiter sinken!",
"ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!", "ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!",
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} kann sich wegen des Rückstoßes durch den Angriff nicht bewegen!", "battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} kann sich wegen des Rückstoßes durch den Angriff nicht bewegen!",
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} kann nicht mehr fliehen!", "battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} kann nicht mehr fliehen!",

View File

@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
"drainMessage": "{{pokemonName}} had its\nenergy drained!", "drainMessage": "{{pokemonName}} had its\nenergy drained!",
"regainHealth": "{{pokemonName}} regained\nhealth!", "regainHealth": "{{pokemonName}} regained\nhealth!",
"fainted": "{{pokemonNameWithAffix}} fainted!", "fainted": "{{pokemonNameWithAffix}} fainted!",
"statRose": "rose", "statRose": "{{pokemonNameWithAffix}}'s {{stats}} rose!",
"statSharplyRose": "sharply rose", "statSharplyRose": "{{pokemonNameWithAffix}}'s {{stats}} sharply rose!",
"statRoseDrastically": "rose drastically", "statRoseDrastically": "{{pokemonNameWithAffix}}'s {{stats}} rose drastically!",
"statWontGoAnyHigher": "won't go any higher", "statWontGoAnyHigher": "{{pokemonNameWithAffix}}'s {{stats}} won't go any higher!",
"statFell": "fell", "statFell": "{{pokemonNameWithAffix}}'s {{stats}} fell!",
"statHarshlyFell": "harshly fell", "statHarshlyFell": "{{pokemonNameWithAffix}}'s {{stats}} harshly fell!",
"statSeverelyFell": "severely fell", "statSeverelyFell": "{{pokemonNameWithAffix}}'s {{stats}} severely fell!",
"statWontGoAnyLower": "won't go any lower", "statWontGoAnyLower": "{{pokemonNameWithAffix}}'s {{stats}} won't go any lower!",
"ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!", "ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!",
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} must\nrecharge!", "battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} must\nrecharge!",
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} can no\nlonger escape!", "battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} can no\nlonger escape!",

View File

@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
"drainMessage": "¡{{pokemonName}} tuvo su\nenergía absorbida!", "drainMessage": "¡{{pokemonName}} tuvo su\nenergía absorbida!",
"regainHealth": "¡{{pokemonName}} recuperó\nPS!", "regainHealth": "¡{{pokemonName}} recuperó\nPS!",
"fainted": "¡{{pokemonNameWithAffix}} se debilitó!", "fainted": "¡{{pokemonNameWithAffix}} se debilitó!",
"statRose": "rose", "statRose": "¡El {{stats}} de {{pokemonNameWithAffix}} ha subido!",
"statSharplyRose": "sharply rose", "statSharplyRose": "¡El {{stats}} de {{pokemonNameWithAffix}} ha subido mucho!",
"statRoseDrastically": "rose drastically", "statRoseDrastically": "¡El {{stats}} de {{pokemonNameWithAffix}} ha subido muchísimo!",
"statWontGoAnyHigher": "won't go any higher", "statWontGoAnyHigher": "¡El {{stats}} de {{pokemonNameWithAffix}} no puede subir más!",
"statFell": "fell", "statFell": "¡El {{stats}} de {{pokemonNameWithAffix}} ha bajado!",
"statHarshlyFell": "harshly fell", "statHarshlyFell": "¡El {{stats}} de {{pokemonNameWithAffix}}} ha bajado mucho!",
"statSeverelyFell": "severely fell", "statSeverelyFell": "¡El {{stats}} de {{pokemonNameWithAffix}} ha bajado muchísimo!",
"statWontGoAnyLower": "won't go any lower", "statWontGoAnyLower": "¡El {{stats}} de {{pokemonNameWithAffix}} no puede bajar más!",
"ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!", "ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!",
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} must\nrecharge!", "battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} must\nrecharge!",
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} can no\nlonger escape!", "battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} can no\nlonger escape!",

View File

@ -64,15 +64,15 @@ export const battle: SimpleTranslationEntries = {
"drainMessage": "Lénergie de {{pokemonName}}\nest drainée !", "drainMessage": "Lénergie de {{pokemonName}}\nest drainée !",
"regainHealth": "{{pokemonName}} récupère\ndes PV !", "regainHealth": "{{pokemonName}} récupère\ndes PV !",
"fainted": "{{pokemonNameWithAffix}}\nest K.O. !", "fainted": "{{pokemonNameWithAffix}}\nest K.O. !",
"statRose": "augmente", "statRose": "{{stats}} de {{pokemonNameWithAffix}}\naugmente !",
"statSharplyRose": "augmente beaucoup", "statSharplyRose": "{{stats}} de {{pokemonNameWithAffix}}\naugmente beaucoup !",
"statRoseDrastically": "augmente énormément", "statRoseDrastically": "{{stats}} de {{pokemonNameWithAffix}}\naugmente énormément !",
"statWontGoAnyHigher": "ne peut plus augmenter", "statWontGoAnyHigher": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus augmenter !",
"statFell": "baisse", "statFell": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse !",
"statHarshlyFell": "baisse beaucoup", "statHarshlyFell": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse beaucoup !",
"statSeverelyFell": "baisse énormément", "statSeverelyFell": "{{stats}} de {{pokemonNameWithAffix}}\nbaisse énormément !",
"statWontGoAnyLower": "ne peut plus baisser", "statWontGoAnyLower": "{{stats}} de {{pokemonNameWithAffix}}\nne peut plus baisser !",
"ppReduced": "Les PP de la capacité {{moveName}}\nde {{targetName}} sont réduits de {{reduction}} !", "ppReduced": "Les PP de la capacité {{moveName}}\nde {{targetName}} baissent de {{reduction}} !",
"battlerTagsRechargingLapse": "Le contrecoup empêche {{pokemonNameWithAffix}}\n de bouger !", "battlerTagsRechargingLapse": "Le contrecoup empêche {{pokemonNameWithAffix}}\n de bouger !",
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}}\nne peut plus séchapper !", "battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}}\nne peut plus séchapper !",
"battlerTagsTrappedOnRemove": "{{pokemonNameWithAffix}} est libéré\nde la capacité {{moveName}} !", "battlerTagsTrappedOnRemove": "{{pokemonNameWithAffix}} est libéré\nde la capacité {{moveName}} !",

View File

@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
"drainMessage": "Viene prelevata energia\n da{{pokemonName}}!", "drainMessage": "Viene prelevata energia\n da{{pokemonName}}!",
"regainHealth": "{{pokemonName}} ha rigenerato\npunti salute!", "regainHealth": "{{pokemonName}} ha rigenerato\npunti salute!",
"fainted": "{{pokemonNameWithAffix}} non è più in\ngrado di combattere!", "fainted": "{{pokemonNameWithAffix}} non è più in\ngrado di combattere!",
"statRose": "è aumentato/a", "statRose": "{{pokemonNameWithAffix}}'s {{stats}} è aumentato/a!",
"statSharplyRose": "è aumentato/a molto", "statSharplyRose": "{{pokemonNameWithAffix}}'s {{stats}} è aumentato/a molto!",
"statRoseDrastically": "è aumentato/a drasticamente", "statRoseDrastically": "{{pokemonNameWithAffix}}'s {{stats}} è aumentato/a drasticamente!",
"statWontGoAnyHigher": "non può aumentare più di così", "statWontGoAnyHigher": "{{pokemonNameWithAffix}}'s {{stats}} non può aumentare più di così!",
"statFell": "è diminuito/a", "statFell": "{{pokemonNameWithAffix}}'s {{stats}} è diminuito/a!",
"statHarshlyFell": "è diminuito/a molto", "statHarshlyFell": "{{pokemonNameWithAffix}}'s {{stats}} è diminuito/a molto!",
"statSeverelyFell": "è diminuito/a drasticamente", "statSeverelyFell": "{{pokemonNameWithAffix}}'s {{stats}} è diminuito/a drasticamente!",
"statWontGoAnyLower": "non può diminuire più di così", "statWontGoAnyLower": "{{pokemonNameWithAffix}}'s {{stats}} non può diminuire più di così!",
"ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!", "ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!",
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} deve\nricaricarsi!", "battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} deve\nricaricarsi!",
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} non può\npiù fuggire!", "battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} non può\npiù fuggire!",

View File

@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
"drainMessage": "{{pokemonName}}[[로]]부터\n체력을 흡수했다!", "drainMessage": "{{pokemonName}}[[로]]부터\n체력을 흡수했다!",
"regainHealth": "{{pokemonName}}[[는]]\n체력을 회복했다!", "regainHealth": "{{pokemonName}}[[는]]\n체력을 회복했다!",
"fainted": "{{pokemonNameWithAffix}}[[는]] 쓰러졌다!", "fainted": "{{pokemonNameWithAffix}}[[는]] 쓰러졌다!",
"statRose": "[[가]] 올라갔다!", "statRose": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 올라갔다!",
"statSharplyRose": "[[가]] 크게 올라갔다!", "statSharplyRose": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 크게 올라갔다!",
"statRoseDrastically": "[[가]] 매우 크게 올라갔다!", "statRoseDrastically": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 매우 크게 올라갔다!",
"statWontGoAnyHigher": "[[는]] 더 올라가지 않는다!", "statWontGoAnyHigher": "{{pokemonNameWithAffix}}의\n{{stats}}[[는]] 더 올라가지 않는다!",
"statFell": "[[가]] 떨어졌다!", "statFell": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 떨어졌다!",
"statHarshlyFell": "[[가]] 크게 떨어졌다!", "statHarshlyFell": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 크게 떨어졌다!",
"statSeverelyFell": "[[가]] 매우 크게 떨어졌다!", "statSeverelyFell": "{{pokemonNameWithAffix}}의\n{{stats}}[[가]] 매우 크게 떨어졌다!",
"statWontGoAnyLower": "[[는]] 더 떨어지지 않는다!", "statWontGoAnyLower": "{{pokemonNameWithAffix}}의\n{{stats}}[[는]] 더 떨어지지 않는다!",
"ppReduced": "{{targetName}}의\n{{moveName}}[[를]] {{reduction}} 깎았다!", "ppReduced": "{{targetName}}의\n{{moveName}}[[를]] {{reduction}} 깎았다!",
"battlerTagsRechargingLapse": "공격의 반동으로\n{{pokemonNameWithAffix}}[[는]] 움직일 수 없다!", "battlerTagsRechargingLapse": "공격의 반동으로\n{{pokemonNameWithAffix}}[[는]] 움직일 수 없다!",
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}}[[는]]\n이제 도망칠 수 없다!", "battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}}[[는]]\n이제 도망칠 수 없다!",

View File

@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
"drainMessage": "{{pokemonName}} teve sua\nenergia drenada!", "drainMessage": "{{pokemonName}} teve sua\nenergia drenada!",
"regainHealth": "{{pokemonName}} recuperou\npontos de saúde!", "regainHealth": "{{pokemonName}} recuperou\npontos de saúde!",
"fainted": "{{pokemonNameWithAffix}} desmaiou!", "fainted": "{{pokemonNameWithAffix}} desmaiou!",
"statRose": "aumentou", "statRose": "{{pokemonNameWithAffix}}'s {{stats}} aumentou!",
"statSharplyRose": "aumentou bruscamente", "statSharplyRose": "{{pokemonNameWithAffix}}'s {{stats}} aumentou bruscamente!",
"statRoseDrastically": "aumentou drasticamente", "statRoseDrastically": "{{pokemonNameWithAffix}}'s {{stats}} aumentou drasticamente!",
"statWontGoAnyHigher": "não vai mais aumentar", "statWontGoAnyHigher": "{{pokemonNameWithAffix}}'s {{stats}} não vai mais aumentar!",
"statFell": "diminuiu", "statFell": "{{pokemonNameWithAffix}}'s {{stats}} diminuiu!",
"statHarshlyFell": "diminuiu duramente", "statHarshlyFell": "{{pokemonNameWithAffix}}'s {{stats}} diminuiu duramente!",
"statSeverelyFell": "diminuiu severamente", "statSeverelyFell": "{{pokemonNameWithAffix}}'s {{stats}} diminuiu severamente!",
"statWontGoAnyLower": "não vai mais diminuir", "statWontGoAnyLower": "{{pokemonNameWithAffix}}'s {{stats}} não vai mais diminuir!",
"ppReduced": "O PP do movimento {{moveName}} de\n{{targetName}} foi reduzido em {{reduction}}!", "ppReduced": "O PP do movimento {{moveName}} de\n{{targetName}} foi reduzido em {{reduction}}!",
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} precisa\nrecarregar!", "battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} precisa\nrecarregar!",
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} não pode\nmais escapar!", "battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} não pode\nmais escapar!",

View File

@ -64,14 +64,14 @@ export const battle: SimpleTranslationEntries = {
"drainMessage": "{{pokemonName}} 吸取了体力!", "drainMessage": "{{pokemonName}} 吸取了体力!",
"regainHealth": "{{pokemonName}} 回复了体力!", "regainHealth": "{{pokemonName}} 回复了体力!",
"fainted": "{{pokemonNameWithAffix}} 倒下了!", "fainted": "{{pokemonNameWithAffix}} 倒下了!",
"statRose": "提高了!", "statRose": "{{pokemonNameWithAffix}}'s {{stats}} 提高了!",
"statSharplyRose": "大幅提高了!", "statSharplyRose": "{{pokemonNameWithAffix}}'s {{stats}} 大幅提高了!",
"statRoseDrastically": "极大幅提高了!", "statRoseDrastically": "{{pokemonNameWithAffix}}'s {{stats}} 极大幅提高了!",
"statWontGoAnyHigher": "已经无法再提高了!", "statWontGoAnyHigher": "{{pokemonNameWithAffix}}'s {{stats}} 已经无法再提高了!",
"statFell": "降低了!", "statFell": "{{pokemonNameWithAffix}}'s {{stats}} 降低了!",
"statHarshlyFell": "大幅降低了!", "statHarshlyFell": "{{pokemonNameWithAffix}}'s {{stats}} 大幅降低了!",
"statSeverelyFell": "极大幅降低了!", "statSeverelyFell": "{{pokemonNameWithAffix}}'s {{stats}} 极大幅降低了!",
"statWontGoAnyLower": "已经无法再降低了!", "statWontGoAnyLower": "{{pokemonNameWithAffix}}'s {{stats}} 已经无法再降低了!",
"ppReduced": "降低了 {{targetName}} 的\n{{moveName}} 的PP{{reduction}}点!", "ppReduced": "降低了 {{targetName}} 的\n{{moveName}} 的PP{{reduction}}点!",
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}}因攻击的反作用力而无法动弹!", "battlerTagsRechargingLapse": "{{pokemonNameWithAffix}}因攻击的反作用力而无法动弹!",
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}}不能逃跑!", "battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}}不能逃跑!",

View File

@ -61,14 +61,14 @@ export const battle: SimpleTranslationEntries = {
"drainMessage": "{{pokemonName}} had its\nenergy drained!", "drainMessage": "{{pokemonName}} had its\nenergy drained!",
"regainHealth": "{{pokemonName}} regained\nhealth!", "regainHealth": "{{pokemonName}} regained\nhealth!",
"fainted": "{{pokemonNameWithAffix}} fainted!", "fainted": "{{pokemonNameWithAffix}} fainted!",
"statRose": "rose", "statRose": "{{pokemonNameWithAffix}}'s {{stats}} rose!",
"statSharplyRose": "sharply rose", "statSharplyRose": "{{pokemonNameWithAffix}}'s {{stats}} sharply rose!",
"statRoseDrastically": "rose drastically", "statRoseDrastically": "{{pokemonNameWithAffix}}'s {{stats}} rose drastically!",
"statWontGoAnyHigher": "won't go any higher", "statWontGoAnyHigher": "{{pokemonNameWithAffix}}'s {{stats}} won't go any higher!",
"statFell": "fell", "statFell": "{{pokemonNameWithAffix}}'s {{stats}} fell!",
"statHarshlyFell": "harshly fell", "statHarshlyFell": "{{pokemonNameWithAffix}}'s {{stats}} harshly fell!",
"statSeverelyFell": "severely fell", "statSeverelyFell": "{{pokemonNameWithAffix}}'s {{stats}} severely fell!",
"statWontGoAnyLower": "won't go any lower", "statWontGoAnyLower": "{{pokemonNameWithAffix}}'s {{stats}} won't go any lower!",
"ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!", "ppReduced": "It reduced the PP of {{targetName}}'s\n{{moveName}} by {{reduction}}!",
"battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} must\nrecharge!", "battlerTagsRechargingLapse": "{{pokemonNameWithAffix}} must\nrecharge!",
"battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} can no\nlonger escape!", "battlerTagsTrappedOnAdd": "{{pokemonNameWithAffix}} can no\nlonger escape!",

View File

@ -3380,7 +3380,7 @@ export class StatChangePhase extends PokemonPhase {
} else { } else {
statsFragment = getBattleStatName(relLevelStats[0]); statsFragment = getBattleStatName(relLevelStats[0]);
} }
messages.push(getPokemonMessage(this.getPokemon(), `'s ${statsFragment} ${getBattleStatLevelChangeDescription(Math.abs(parseInt(rl)), levels >= 1)}!`)); messages.push(getBattleStatLevelChangeDescription(getPokemonNameWithAffix(this.getPokemon()), statsFragment, Math.abs(parseInt(rl)), levels >= 1));
}); });
return messages; return messages;

View File

@ -41,7 +41,7 @@ function testBattleStatName(stat: BattleStat, expectMessage: string) {
} }
function testBattleStatLevelChangeDescription(levels: integer, up: boolean, expectMessage: string) { function testBattleStatLevelChangeDescription(levels: integer, up: boolean, expectMessage: string) {
const message = getBattleStatLevelChangeDescription(levels, up); const message = getBattleStatLevelChangeDescription("{{pokemonNameWithAffix}}", "{{stats}}", levels, up);
console.log(`message ${message}, expected ${expectMessage}`); console.log(`message ${message}, expected ${expectMessage}`);
expect(message).toBe(expectMessage); expect(message).toBe(expectMessage);
} }