pokerogue/src/data/battle-stat.ts

63 lines
1.1 KiB
TypeScript
Raw Normal View History

2023-04-11 04:15:06 +01:00
export enum BattleStat {
ATK,
DEF,
SPATK,
SPDEF,
SPD,
ACC,
EVA,
RAND
}
export function getBattleStatName(stat: BattleStat) {
switch (stat) {
case BattleStat.ATK:
return 'Attack';
2023-04-11 04:15:06 +01:00
case BattleStat.DEF:
return 'Defense';
2023-04-11 04:15:06 +01:00
case BattleStat.SPATK:
return 'Sp. Atk';
2023-04-11 04:15:06 +01:00
case BattleStat.SPDEF:
return 'Sp. Def';
2023-04-11 04:15:06 +01:00
case BattleStat.SPD:
return 'Speed';
2023-04-11 04:15:06 +01:00
case BattleStat.ACC:
return 'Accuracy';
2023-04-11 04:15:06 +01:00
case BattleStat.EVA:
return 'Evasiveness';
2023-04-11 04:15:06 +01:00
default:
return '???';
}
}
export function getBattleStatLevelChangeDescription(levels: integer, up: boolean) {
if (up) {
switch (levels) {
case 1:
return 'rose';
case 2:
return 'sharply rose';
case 3:
case 4:
case 5:
case 6:
return 'rose drastically';
default:
return 'won\'t go any higher';
}
} else {
switch (levels) {
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';
}
}
}