2024-06-16 03:54:53 +02:00
|
|
|
import i18next from "i18next";
|
|
|
|
|
2023-04-10 23:15:06 -04:00
|
|
|
export enum BattleStat {
|
|
|
|
ATK,
|
|
|
|
DEF,
|
|
|
|
SPATK,
|
|
|
|
SPDEF,
|
|
|
|
SPD,
|
|
|
|
ACC,
|
|
|
|
EVA,
|
|
|
|
RAND
|
|
|
|
}
|
|
|
|
|
|
|
|
export function getBattleStatName(stat: BattleStat) {
|
|
|
|
switch (stat) {
|
2024-05-23 17:03:10 +02:00
|
|
|
case BattleStat.ATK:
|
2024-06-16 03:54:53 +02:00
|
|
|
return i18next.t("modifierType:TempBattleStatBoosterStatName.ATK");
|
2024-05-23 17:03:10 +02:00
|
|
|
case BattleStat.DEF:
|
2024-06-16 03:54:53 +02:00
|
|
|
return i18next.t("modifierType:TempBattleStatBoosterStatName.DEF");
|
2024-05-23 17:03:10 +02:00
|
|
|
case BattleStat.SPATK:
|
2024-06-16 03:54:53 +02:00
|
|
|
return i18next.t("modifierType:TempBattleStatBoosterStatName.SPATK");
|
2024-05-23 17:03:10 +02:00
|
|
|
case BattleStat.SPDEF:
|
2024-06-16 03:54:53 +02:00
|
|
|
return i18next.t("modifierType:TempBattleStatBoosterStatName.SPDEF");
|
2024-05-23 17:03:10 +02:00
|
|
|
case BattleStat.SPD:
|
2024-06-16 03:54:53 +02:00
|
|
|
return i18next.t("modifierType:TempBattleStatBoosterStatName.SPD");
|
2024-05-23 17:03:10 +02:00
|
|
|
case BattleStat.ACC:
|
2024-06-16 03:54:53 +02:00
|
|
|
return i18next.t("modifierType:TempBattleStatBoosterStatName.ACC");
|
2024-05-23 17:03:10 +02:00
|
|
|
case BattleStat.EVA:
|
2024-06-16 03:54:53 +02:00
|
|
|
return i18next.t("modifierType:TempBattleStatBoosterStatName.EVA");
|
2024-05-23 17:03:10 +02:00
|
|
|
default:
|
2024-06-16 03:54:53 +02:00
|
|
|
return i18next.t("modifierType:TempBattleStatBoosterStatName.DEFAULT");
|
2023-04-10 23:15:06 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export function getBattleStatLevelChangeDescription(levels: integer, up: boolean) {
|
|
|
|
if (up) {
|
|
|
|
switch (levels) {
|
2024-05-23 17:03:10 +02:00
|
|
|
case 1:
|
|
|
|
return "rose";
|
|
|
|
case 2:
|
|
|
|
return "sharply rose";
|
|
|
|
case 3:
|
|
|
|
case 4:
|
|
|
|
case 5:
|
|
|
|
case 6:
|
2024-05-24 01:45:04 +02:00
|
|
|
return "rose drastically";
|
2024-05-23 17:03:10 +02:00
|
|
|
default:
|
|
|
|
return "won't go any higher";
|
2023-04-10 23:15:06 -04:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
switch (levels) {
|
2024-05-23 17:03:10 +02:00
|
|
|
case 1:
|
|
|
|
return "fell";
|
|
|
|
case 2:
|
|
|
|
return "harshly fell";
|
|
|
|
case 3:
|
|
|
|
case 4:
|
|
|
|
case 5:
|
|
|
|
case 6:
|
|
|
|
return "severely fell";
|
|
|
|
default:
|
|
|
|
return "won't go any lower";
|
2023-04-10 23:15:06 -04:00
|
|
|
}
|
|
|
|
}
|
2024-05-23 17:03:10 +02:00
|
|
|
}
|