From d0a0de2de9e92c17e2da7b7ee855abbf2ca50da4 Mon Sep 17 00:00:00 2001 From: xangelo Date: Wed, 13 Mar 2024 13:32:53 -0400 Subject: [PATCH] fix: give players max vigor on character creation --- src/server/player.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/player.ts b/src/server/player.ts index b957969..82118e1 100644 --- a/src/server/player.ts +++ b/src/server/player.ts @@ -1,5 +1,5 @@ import { db } from './lib/db'; -import {Player, maxHp} from "../shared/player"; +import {Player, maxHp, maxVigor} from "../shared/player"; import { random } from 'lodash'; import { Skills } from '../shared/skills'; import {Profession} from 'shared/profession'; @@ -64,9 +64,11 @@ export async function createPlayer(): Promise { constitution: random(3, 5), dexterity: random(3, 5), intelligence: random(3, 5), + stat_points: 4 }; raw.hp = maxHp(raw.constitution, 1); + raw.vigor = maxVigor(raw.constitution, 1); const res = await db('players').insert(raw).returning('*'); const player = res.pop(); -- 2.25.1