mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-16 14:01:52 +00:00
1a8c9d472a
* Localized the statname in the X Item description * Added french thanks to sangara42 * Changed french by Lugiadrien
39 lines
925 B
TypeScript
39 lines
925 B
TypeScript
import { BattleStat, getBattleStatName } from "./battle-stat";
|
|
import i18next from "i18next";
|
|
|
|
export enum TempBattleStat {
|
|
ATK,
|
|
DEF,
|
|
SPATK,
|
|
SPDEF,
|
|
SPD,
|
|
ACC,
|
|
CRIT
|
|
}
|
|
|
|
export function getTempBattleStatName(tempBattleStat: TempBattleStat) {
|
|
if (tempBattleStat === TempBattleStat.CRIT) {
|
|
return i18next.t("modifierType:TempBattleStatBoosterStatName.CRIT");
|
|
}
|
|
return getBattleStatName(tempBattleStat as integer as BattleStat);
|
|
}
|
|
|
|
export function getTempBattleStatBoosterItemName(tempBattleStat: TempBattleStat) {
|
|
switch (tempBattleStat) {
|
|
case TempBattleStat.ATK:
|
|
return "X Attack";
|
|
case TempBattleStat.DEF:
|
|
return "X Defense";
|
|
case TempBattleStat.SPATK:
|
|
return "X Sp. Atk";
|
|
case TempBattleStat.SPDEF:
|
|
return "X Sp. Def";
|
|
case TempBattleStat.SPD:
|
|
return "X Speed";
|
|
case TempBattleStat.ACC:
|
|
return "X Accuracy";
|
|
case TempBattleStat.CRIT:
|
|
return "Dire Hit";
|
|
}
|
|
}
|