feat: multi-combat ×5/×10 + cooldown anti-spam
Some checks failed
CI/CD — Build & Deploy / Build & Deploy (push) Failing after 30s

- Backend: startMultiCombat boucle séquentielle, arrêt sur défaite
- Frontend: cooldown 1.5s entre combats, boutons ×1/×5/×10
- Frontend: résumé multi-combat (wins/losses, XP/Or/loot totaux)
- Fix: lock contention par spam de clics résolu
This commit is contained in:
2026-03-24 20:21:44 +01:00
parent ec6d91b0f9
commit efe4b4e372
6 changed files with 136 additions and 19 deletions

View File

@@ -27,7 +27,7 @@ export const characterApi = {
export const combatApi = {
zones: () => api.get<any[]>('/monsters/zones'),
monsters: () => api.get<Monster[]>('/monsters'),
start: (monsterId: string, attackType: string) => api.post<CombatResult>('/combat/start', { monsterId, attackType }),
start: (monsterId: string, attackType: string, count?: number) => api.post<any>('/combat/start', { monsterId, attackType, ...(count && count > 1 ? { count } : {}) }),
history: () => api.get<CombatLog[]>('/combat/history'),
};