Player display animations, death visual, upstream merge #5

Merged
robert merged 7 commits from single-source into main 2026-07-07 11:21:24 -04:00
Showing only changes of commit dbe018825b - Show all commits
+10 -10
View File
@@ -1474,11 +1474,6 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters, camp
/> />
</span> </span>
<span>HP: {p.currentHp}/{p.maxHp}</span> <span>HP: {p.currentHp}/{p.maxHp}</span>
{hasDeathSaves && (participantStatus === 'dying' || participantStatus === 'stable') && encounter.isStarted && (
<button onClick={() => handleCritDamage(p.id)} className="ml-auto px-2 py-0.5 text-xs rounded bg-red-900 hover:bg-red-800 text-red-100 border border-red-700" title="Critical hit at 0 HP: +2 death-save failures">
<Crosshair size={12} className="inline mr-1" />Crit
</button>
)}
</div> </div>
{participantStatus === 'dead' && ( {participantStatus === 'dead' && (
@@ -1521,19 +1516,19 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters, camp
))} ))}
</div> </div>
<div className="flex gap-2 mt-1"> <div className="flex gap-2 mt-1">
<button onClick={() => handleDeathSaveChange(p.id, 'success')} className="px-2 py-1 text-xs rounded bg-emerald-700 hover:bg-emerald-600 text-white" title="Death save success"> <button onClick={() => handleDeathSaveChange(p.id, 'success')} className="inline-flex items-center gap-1 px-2 py-1 text-xs rounded bg-emerald-700 hover:bg-emerald-600 text-white" title="Death save success">
Success Success
</button> </button>
<button onClick={() => handleDeathSaveChange(p.id, 'fail')} className="px-2 py-1 text-xs rounded bg-red-700 hover:bg-red-600 text-white" title="Death save failure"> <button onClick={() => handleDeathSaveChange(p.id, 'fail')} className="inline-flex items-center gap-1 px-2 py-1 text-xs rounded bg-red-700 hover:bg-red-600 text-white" title="Death save failure">
Fail Fail
</button> </button>
<button onClick={() => handleNat1(p.id)} className="px-2 py-1 text-xs rounded bg-red-800 hover:bg-red-700 text-white" title="Natural 1: +2 failures"> <button onClick={() => handleNat1(p.id)} className="inline-flex items-center gap-1 px-2 py-1 text-xs rounded bg-red-800 hover:bg-red-700 text-white" title="Natural 1: +2 failures">
<AlertTriangle size={12} /> Nat1 <AlertTriangle size={12} /> Nat1
</button> </button>
<button onClick={() => handleNat20(p.id)} className="px-2 py-1 text-xs rounded bg-yellow-600 hover:bg-yellow-500 text-white" title="Natural 20: 1 HP + conscious"> <button onClick={() => handleNat20(p.id)} className="inline-flex items-center gap-1 px-2 py-1 text-xs rounded bg-yellow-600 hover:bg-yellow-500 text-white" title="Natural 20: 1 HP + conscious">
<Zap size={12} /> Nat20 <Zap size={12} /> Nat20
</button> </button>
<button onClick={() => handleStabilize(p.id)} className="px-2 py-1 text-xs rounded bg-emerald-700 hover:bg-emerald-600 text-white" title="Stabilize at 0 HP"> <button onClick={() => handleStabilize(p.id)} className="inline-flex items-center gap-1 px-2 py-1 text-xs rounded bg-emerald-700 hover:bg-emerald-600 text-white" title="Stabilize at 0 HP">
<HeartPulse size={12} /> Stabilize <HeartPulse size={12} /> Stabilize
</button> </button>
</div> </div>
@@ -1617,6 +1612,11 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters, camp
</div> </div>
<div className="flex flex-wrap items-center space-x-2 mt-2 sm:mt-0"> <div className="flex flex-wrap items-center space-x-2 mt-2 sm:mt-0">
{hasDeathSaves && (participantStatus === 'dying' || participantStatus === 'stable') && encounter.isStarted && (
<button onClick={() => handleCritDamage(p.id)} className="inline-flex items-center gap-1 px-2 py-1 text-xs rounded bg-red-900 hover:bg-red-800 text-red-100 border border-red-700" title="Critical hit at 0 HP: +2 death-save failures">
<Crosshair size={12} />Crit
</button>
)}
{encounter.isStarted && ( {encounter.isStarted && (
<div className="flex items-center space-x-1 bg-stone-800 p-1 rounded-md"> <div className="flex items-center space-x-1 bg-stone-800 p-1 rounded-md">
<input <input