Implement revised Advanced Family Atomics rules
This commit is contained in:
1 parent
dff0c77a5b
commit
e1596dbcee
16 files changed
+683
-29
No files matched your search
@@ -18,6 +18,7 @@ import { ForceInspector } from './force-inspector';
|
||||
import { FactionInspector } from './faction-inspector';
|
||||
import { EcazLoyaltyCard } from './ecaz-loyalty';
|
||||
import { DrawPiles } from './draw-piles';
|
||||
import { RemovedTreachery } from './removed-treachery';
|
||||
import { HandBrowser } from './hand-browser';
|
||||
import { LobbyBotControls } from './lobby-bot-controls';
|
||||
import { AdvancedPreviewNotice, RulesetControls } from './ruleset-controls';
|
||||
@@ -1692,6 +1693,7 @@ export function GameTable({
|
||||
<section className="board-column">
|
||||
<SpiceBankerIncome game={g} />
|
||||
<DrawPiles piles={g.drawPiles} />
|
||||
<RemovedTreachery cards={g.removedTreachery ?? []} />
|
||||
<div className="board-toolbar">
|
||||
<span>
|
||||
<Wind size={15} />
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import type { Card } from '@/game/cards';
|
||||
import { CardInspector } from './card-inspector';
|
||||
|
||||
/** Only receives the public faces of cards already removed from the game. */
|
||||
export function RemovedTreachery({ cards }: { cards: readonly Card[] }) {
|
||||
if (cards.length === 0) return null;
|
||||
|
||||
return (
|
||||
<details className="rounded-lg border border-[#454b3c] p-3" aria-label="Removed Treachery cards">
|
||||
<summary className="cursor-pointer font-semibold">
|
||||
Removed from game ({cards.length} {cards.length === 1 ? 'card' : 'cards'})
|
||||
</summary>
|
||||
<p className="mt-3 text-sm">
|
||||
These used cards cannot be drawn, reshuffled or recovered from discard.
|
||||
</p>
|
||||
<ul className="mt-3 grid list-none gap-3 p-0 sm:grid-cols-2">
|
||||
{cards.map((card) => (
|
||||
<li className="flex flex-col gap-2 rounded-md border border-[#454b3c] p-3" key={card.id}>
|
||||
<strong>{card.name}</strong>
|
||||
<CardInspector card={card} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</details>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user