1 import { Profession } from './profession';
2 import { Stat } from './stats';
3 import { SkillDefinition, Skill } from './skills';
7 account_type: 'session' | 'auth',
9 profession: Profession,
24 export type PlayerWithSkills = Player & {
25 skills: (SkillDefinition & Skill)[]
28 export function maxHp(constitution: number, playerLevel: number): number {
29 return Math.ceil((constitution * 1.7) + (playerLevel * 1.3));
32 export function expToLevel(level: number): number {
34 return level * 10 - 10;
42 export type StatDisplay = {
48 export const StatDef: Map<Stat, StatDisplay> = new Map<Stat, StatDisplay>();
50 StatDef.set(Stat.strength, {
56 StatDef.set(Stat.constitution, {
57 id: Stat.constitution,
58 display: 'Constitution',
62 StatDef.set(Stat.dexterity, {
68 StatDef.set(Stat.intelligence, {
69 id: Stat.intelligence,
70 display: 'Intelligence',