Update Healer Man server

This commit is contained in:
phenom committed 2026-09-28 22:46:45 -04:00
1 parent 9d7e0e2f9e
commit 35dfdaed61
94 files changed
+17034 -418

No files matched your search

+4 -1
View File
@@ -22,12 +22,15 @@ export function healingRecipientIds(
if (!center) return [];
const candidates = Object.values(actors)
.filter(actor => actor.kind !== "enemy" && actor.alive && actor.health > 0)
.filter(actor => !effect.excludeCaster || actor.id !== sourceId)
.filter(actor => {
const position = positionFor(actor.id);
return position && position.reduce((sum, value, index) => sum + (value - center[index]) ** 2, 0) <= (effect.radius ?? 30) ** 2
&& hasLineOfSight(center, position);
})
.sort((a, b) => a.health / a.maxHealth - b.health / b.maxHealth || a.id.localeCompare(b.id));
.sort((a, b) => effect.selection === "lowest-max-health"
? a.maxHealth - b.maxHealth || a.id.localeCompare(b.id)
: a.health / a.maxHealth - b.health / b.maxHealth || a.id.localeCompare(b.id));
if (effect.selection === "random" && candidates.length > 0) {
let hash = 2166136261;
for (const value of `${seed}:${sourceId}:${targetId}`) hash = Math.imul(hash ^ value.charCodeAt(0), 16777619);