feat: stat distribution UI + rest button + xpToNextLevel from backend
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 34s

Dashboard: stat distributor with +/- buttons when statPoints > 0,
rest button (+50% HP, -20 endurance) when HP < max,
XP bar uses xpToNextLevel from backend instead of local formula.
API: distributeStats + rest endpoints added to client.
This commit is contained in:
2026-03-24 16:09:55 +01:00
parent 214045c7ce
commit 93b34b1f7b
2 changed files with 95 additions and 4 deletions

View File

@@ -17,6 +17,9 @@ export const characterApi = {
create: (name: string, stats: Record<string, number>) =>
api.post<Character>('/characters', { name, ...stats }),
me: () => api.get<Character>('/characters/me'),
distributeStats: (stats: Record<string, number>) =>
api.post<Character>('/characters/stats', stats),
rest: () => api.post<{ hpBefore: number; hpAfter: number; hpMax: number; healed: number }>('/characters/rest'),
};
// Combat