From 68c7434a20c0ee281276353f540ac11c5a663585 Mon Sep 17 00:00:00 2001
From: Quintine <15965533+Quintine@users.noreply.github.com>
Date: Thu, 29 Oct 2026 08:57:58 +1100
Subject: [PATCH] Support Truthtrance in ordered Charity
---
components/charity-claim.tsx | 5 +-
components/truth-charity-promise.tsx | 3 +
docs/CURRENT_STATUS.md | 13 ++
docs/RULE_DECISIONS.md | 11 +-
docs/TRUTHTRANCE_CHARITY.md | 16 ++
game/engine.ts | 29 ++-
game/reference.ts | 10 +-
game/truthtrance.ts | 6 +-
tests/truth-charity-ordered-bg.test.ts | 74 ++++++++
tests/truth-charity-ordered-controls.test.tsx | 99 ++++++++++
tests/truth-charity-ordered-runtime.test.ts | 178 ++++++++++++++++++
11 files changed, 425 insertions(+), 19 deletions(-)
create mode 100644 tests/truth-charity-ordered-bg.test.ts
create mode 100644 tests/truth-charity-ordered-controls.test.tsx
create mode 100644 tests/truth-charity-ordered-runtime.test.ts
diff --git a/components/charity-claim.tsx b/components/charity-claim.tsx
index f75b7af7..29163268 100644
--- a/components/charity-claim.tsx
+++ b/components/charity-claim.tsx
@@ -22,7 +22,9 @@ export function CharityClaim(props: Props) {
!!game.response || !!game.decision || !!game.phaseOpening || !!game.automaticContinuationPending ||
!ownTurn || !!game.charity.orderBlocked;
const canClaim = !blocked && !game.charity.truthBlocked && !me.charityClaimed && game.charity.amount > 0;
- const canFinish = !!order && !blocked;
+ const charityYes = !!order && !!game.truthCharityGuide && game.truthCharityPromises.some(promise =>
+ promise.player === actor && promise.turn === turn && promise.answer && !promise.fulfilled && !promise.released);
+ const canFinish = !!order && !blocked && !charityYes;
return (
<>
{order &&
@@ -65,6 +67,7 @@ export function CharityClaim(props: Props) {
: 'Claim charity'}
+ {charityYes &&
Complete your Truthtrance Charity Yes before finishing your turn.
}
{order &&