feat: historique combat enrichi — loot affiché + 10 entrées
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 33s

- Ajout loot_material_id + loot_quantity sur combat_logs
- Historique passe de 5 à 10 entrées
- Affichage loot (🎁×N) dans l'historique récent
- Fix scope variables multi-combat loot tracking
This commit is contained in:
2026-03-24 21:08:49 +01:00
parent 74938dd35f
commit 4fc8be9ea0
4 changed files with 21 additions and 2 deletions

View File

@@ -131,7 +131,10 @@ function HistoryEntry({ h }: { h: CombatLog }) {
{h.winner === 'player' ? '' : ''} {h.monster.name}
</span>
<span style={{ color: '#6b7a99' }}>
{h.winner === 'player' ? `+${h.xpEarned}xp +${h.goldEarned}or` : `${h.totalRounds} tours`}
{h.winner === 'player'
? `+${h.xpEarned}xp +${h.goldEarned}or${h.lootQuantity > 0 ? ` 🎁×${h.lootQuantity}` : ''}`
: `${h.totalRounds} tours`
}
</span>
</div>
);
@@ -333,7 +336,7 @@ export function CombatPage() {
<Clock size={11} /> Historique récent
</p>
<div className="card" style={{ padding: '0.75rem' }}>
{history.slice(0, 5).map(h => <HistoryEntry key={h.id} h={h} />)}
{history.slice(0, 10).map(h => <HistoryEntry key={h.id} h={h} />)}
</div>
</div>
)}