pokerogue/src/data/status-effect.ts

161 lines
4.9 KiB
TypeScript
Raw Normal View History

2023-04-20 15:46:05 -04:00
import * as Utils from "../utils";
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
import i18next, { ParseKeys } from "i18next";
2023-04-11 19:08:03 -04:00
2023-04-03 23:38:31 -04:00
export enum StatusEffect {
NONE,
POISON,
TOXIC,
PARALYSIS,
SLEEP,
FREEZE,
2023-04-16 18:40:32 -04:00
BURN,
FAINT
2023-04-03 23:38:31 -04:00
}
export class Status {
2023-04-11 19:08:03 -04:00
public effect: StatusEffect;
2023-04-03 23:38:31 -04:00
public turnCount: integer;
2023-04-11 19:08:03 -04:00
public cureTurn: integer;
constructor(effect: StatusEffect, turnCount: integer = 0, cureTurn?: integer) {
2023-04-11 19:08:03 -04:00
this.effect = effect;
2023-04-28 15:03:42 -04:00
this.turnCount = turnCount === undefined ? 0 : turnCount;
this.cureTurn = cureTurn;
2023-04-11 19:08:03 -04:00
}
2023-04-03 23:38:31 -04:00
2023-04-11 19:08:03 -04:00
incrementTurn(): void {
this.turnCount++;
2023-04-03 23:38:31 -04:00
}
2023-04-11 19:08:03 -04:00
isPostTurn(): boolean {
return this.effect === StatusEffect.POISON || this.effect === StatusEffect.TOXIC || this.effect === StatusEffect.BURN;
}
}
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
function getStatusEffectMessageKey(statusEffect: StatusEffect): string {
2023-04-11 19:08:03 -04:00
switch (statusEffect) {
case StatusEffect.POISON:
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
return "statusEffect:poison";
case StatusEffect.TOXIC:
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
return "statusEffect:toxic";
case StatusEffect.PARALYSIS:
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
return "statusEffect:paralysis";
case StatusEffect.SLEEP:
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
return "statusEffect:sleep";
case StatusEffect.FREEZE:
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
return "statusEffect:freeze";
case StatusEffect.BURN:
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
return "statusEffect:burn";
default:
return "statusEffect:none";
2023-04-11 19:08:03 -04:00
}
}
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
export function getStatusEffectObtainText(statusEffect: StatusEffect, pokemonNameWithAffix: string, sourceText?: string): string {
if (!sourceText) {
const i18nKey = `${getStatusEffectMessageKey(statusEffect)}.obtain`as ParseKeys;
return i18next.t(i18nKey, { pokemonNameWithAffix: pokemonNameWithAffix });
2023-04-11 19:08:03 -04:00
}
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
const i18nKey = `${getStatusEffectMessageKey(statusEffect)}.obtainSource`as ParseKeys;
return i18next.t(i18nKey, { pokemonNameWithAffix: pokemonNameWithAffix, sourceText: sourceText });
2023-04-11 19:08:03 -04:00
}
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
export function getStatusEffectActivationText(statusEffect: StatusEffect, pokemonNameWithAffix: string): string {
const i18nKey = `${getStatusEffectMessageKey(statusEffect)}.activation` as ParseKeys;
return i18next.t(i18nKey, { pokemonNameWithAffix: pokemonNameWithAffix });
2023-04-11 19:08:03 -04:00
}
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
export function getStatusEffectOverlapText(statusEffect: StatusEffect, pokemonNameWithAffix: string): string {
const i18nKey = `${getStatusEffectMessageKey(statusEffect)}.overlap` as ParseKeys;
return i18next.t(i18nKey, { pokemonNameWithAffix: pokemonNameWithAffix });
}
2023-04-11 19:08:03 -04:00
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
export function getStatusEffectHealText(statusEffect: StatusEffect, pokemonNameWithAffix: string): string {
const i18nKey = `${getStatusEffectMessageKey(statusEffect)}.heal` as ParseKeys;
return i18next.t(i18nKey, { pokemonNameWithAffix: pokemonNameWithAffix });
}
2023-04-20 19:44:56 -04:00
export function getStatusEffectDescriptor(statusEffect: StatusEffect): string {
[Localization] localized status-effect.ts and translate. (#2528) * make postposition not to dynamic for localize * localize status-effect.ts * added test code, modified english postposition, modifed toxic_orb test to make it always fix in English. * Update src/locales/zh_CN/status-effect.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/de/status-effect.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/status-effect.ts * added test code for check message key * remove multi-language tests (except english) * Update src/locales/pt_BR/status-effect.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * remove language and change test code to check method call and parameter * Update src/locales/es/status-effect.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update src/locales/en/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Apply review suggestion * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * add Test with empty string parameter * Update src/locales/es/status-effect.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update src/locales/fr/status-effect.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> --------- Co-authored-by: 송지원 <jiwsong@gmarket.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-02 23:22:46 +09:00
const i18nKey = `${getStatusEffectMessageKey(statusEffect)}.description` as ParseKeys;
return i18next.t(i18nKey);
2023-04-19 16:52:14 -04:00
}
2023-04-20 19:44:56 -04:00
export function getStatusEffectCatchRateMultiplier(statusEffect: StatusEffect): number {
switch (statusEffect) {
case StatusEffect.POISON:
case StatusEffect.TOXIC:
case StatusEffect.PARALYSIS:
case StatusEffect.BURN:
return 1.5;
case StatusEffect.SLEEP:
case StatusEffect.FREEZE:
return 2.5;
}
return 1;
}
/**
* Returns a random non-volatile StatusEffect
*/
export function generateRandomStatusEffect(): StatusEffect {
return Utils.randIntRange(1, 6);
}
/**
* Returns a random non-volatile StatusEffect between the two provided
* @param statusEffectA The first StatusEffect
* @param statusEffectA The second StatusEffect
*/
export function getRandomStatusEffect(statusEffectA: StatusEffect, statusEffectB: StatusEffect): StatusEffect {
if (statusEffectA === StatusEffect.NONE || statusEffectA === StatusEffect.FAINT) {
return statusEffectB;
}
if (statusEffectB === StatusEffect.NONE || statusEffectB === StatusEffect.FAINT) {
return statusEffectA;
}
return Utils.randIntRange(0, 2) ? statusEffectA : statusEffectB;
}
/**
* Returns a random non-volatile StatusEffect between the two provided
* @param statusA The first Status
* @param statusB The second Status
*/
2024-05-24 01:45:04 +02:00
export function getRandomStatus(statusA: Status, statusB: Status): Status {
if (statusA === undefined || statusA.effect === StatusEffect.NONE || statusA.effect === StatusEffect.FAINT) {
return statusB;
}
if (statusB === undefined || statusB.effect === StatusEffect.NONE || statusB.effect === StatusEffect.FAINT) {
return statusA;
}
2024-05-24 01:45:04 +02:00
return Utils.randIntRange(0, 2) ? statusA : statusB;
}
/**
* Gets all non volatile status effects
* @returns A list containing all non volatile status effects
*/
export function getNonVolatileStatusEffects():Array<StatusEffect> {
return [
StatusEffect.POISON,
StatusEffect.TOXIC,
StatusEffect.PARALYSIS,
StatusEffect.SLEEP,
StatusEffect.FREEZE,
StatusEffect.BURN
];
}
/**
* Returns whether a statuss effect is non volatile.
* Non-volatile status condition is a status that remains after being switched out.
* @param status The status to check
*/
export function isNonVolatileStatusEffect(status: StatusEffect): boolean {
return getNonVolatileStatusEffects().includes(status);
}