30 lines
569 B
TypeScript
30 lines
569 B
TypeScript
/**
|
|
* Fundamental stats of umas.
|
|
*/
|
|
export enum Stat {
|
|
speed,
|
|
stamina,
|
|
power,
|
|
guts,
|
|
wit,
|
|
}
|
|
|
|
/**
|
|
* Stats as a list for easy iteration.
|
|
*/
|
|
export const LIST = [Stat.speed, Stat.stamina, Stat.power, Stat.guts, Stat.wit] as const;
|
|
|
|
declare const __stage: unique symbol;
|
|
|
|
export type Stage = 'raw' | 'base' | 'adjusted' | 'final' | 'skills';
|
|
|
|
export type StatValue<T extends Stage> = number & { [__stage]: T };
|
|
|
|
export interface Stats<T extends Stage> {
|
|
speed: StatValue<T>;
|
|
stamina: StatValue<T>;
|
|
power: StatValue<T>;
|
|
guts: StatValue<T>;
|
|
wit: StatValue<T>;
|
|
}
|