pokerogue/src/data/pokemon-stat.ts
2024-01-05 22:31:13 -05:00

33 lines
645 B
TypeScript

export enum Stat {
HP = 0,
ATK,
DEF,
SPATK,
SPDEF,
SPD
};
export function getStatName(stat: Stat, shorten: boolean = false) {
let ret: string;
switch (stat) {
case Stat.HP:
ret = !shorten ? 'Max. HP' : 'MaxHP';
break;
case Stat.ATK:
ret = !shorten ? 'Attack' : 'Atk';
break;
case Stat.DEF:
ret = !shorten ? 'Defense' : 'Def';
break;
case Stat.SPATK:
ret = !shorten ? 'Sp. Atk' : 'SpAtk';
break;
case Stat.SPDEF:
ret = !shorten ? 'Sp. Def' : 'SpDef';
break;
case Stat.SPD:
ret = !shorten ? 'Speed' : 'Spd';
break;
}
return ret;
}