feat: stat distribution UI + rest button + xpToNextLevel from backend
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 34s
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user