zenno/race/gate: new calculator
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* 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>;
|
||||
}
|
||||
Reference in New Issue
Block a user