Initial commit

This commit is contained in:
Quintine committed 2026-09-08 07:37:52 +10:00
commit 8c709fb52f
771 files changed
+222983

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import type { Leader } from './cards';
import type { FactionId } from './catalog';
/** Original identity is permanent; capture temporarily overrides ghola control. */
export function controlsLeader(
player: { id: string; faction: FactionId },
leader: Leader,
) {
if (leader.capturedBy) return leader.capturedBy === player.id;
if (leader.gholaBy) return leader.gholaBy === player.id;
if (leader.controller !== undefined) return leader.controller === player.id;
return leader.faction === player.faction;
}
export function nativeAvailable(leader: Leader) {
return !leader.dead && !leader.capturedBy && !leader.gholaBy;
}