2023-03-28 19:54:52 +01:00
|
|
|
export enum Stat {
|
|
|
|
HP = 0,
|
|
|
|
ATK,
|
|
|
|
DEF,
|
|
|
|
SPATK,
|
|
|
|
SPDEF,
|
|
|
|
SPD
|
|
|
|
};
|
|
|
|
|
2024-01-06 03:24:05 +00:00
|
|
|
export function getStatName(stat: Stat, shorten: boolean = false) {
|
2023-04-02 01:06:44 +01:00
|
|
|
let ret: string;
|
2023-03-28 19:54:52 +01:00
|
|
|
switch (stat) {
|
|
|
|
case Stat.HP:
|
2024-01-06 03:24:05 +00:00
|
|
|
ret = !shorten ? 'Max. HP' : 'MaxHP';
|
2023-03-28 19:54:52 +01:00
|
|
|
break;
|
|
|
|
case Stat.ATK:
|
2024-01-06 03:24:05 +00:00
|
|
|
ret = !shorten ? 'Attack' : 'Atk';
|
2023-03-28 19:54:52 +01:00
|
|
|
break;
|
|
|
|
case Stat.DEF:
|
2024-01-06 03:24:05 +00:00
|
|
|
ret = !shorten ? 'Defense' : 'Def';
|
2023-03-28 19:54:52 +01:00
|
|
|
break;
|
|
|
|
case Stat.SPATK:
|
2024-01-06 03:24:05 +00:00
|
|
|
ret = !shorten ? 'Sp. Atk' : 'SpAtk';
|
2023-03-28 19:54:52 +01:00
|
|
|
break;
|
|
|
|
case Stat.SPDEF:
|
2024-01-06 03:24:05 +00:00
|
|
|
ret = !shorten ? 'Sp. Def' : 'SpDef';
|
2023-03-28 19:54:52 +01:00
|
|
|
break;
|
|
|
|
case Stat.SPD:
|
2024-01-06 03:24:05 +00:00
|
|
|
ret = !shorten ? 'Speed' : 'Spd';
|
2023-03-28 19:54:52 +01:00
|
|
|
break;
|
|
|
|
}
|
2023-10-18 23:01:15 +01:00
|
|
|
return ret;
|
2023-03-28 19:54:52 +01:00
|
|
|
}
|