Support Truthtrance in ordered Charity
Verify and publish checkpoint container / container (push) Canceled after 0s
Verify and publish checkpoint container / container (push) Canceled after 0s
This commit is contained in:
1 parent
31c6e79c80
commit
68c7434a20
11 files changed
+425
-19
No files matched your search
@@ -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 && <div className="fine" data-testid="charity-turn-status">
|
||||
@@ -65,6 +67,7 @@ export function CharityClaim(props: Props) {
|
||||
: 'Claim charity'}
|
||||
<ArrowRight size={15} />
|
||||
</Button>
|
||||
{charityYes && <p className="fine">Complete your Truthtrance Charity Yes before finishing your turn.</p>}
|
||||
{order && <Button
|
||||
data-testid="charity-turn-finish"
|
||||
className="game-action"
|
||||
|
||||
@@ -27,6 +27,7 @@ export function TruthCharityPromise({ game, busy, send }: Props) {
|
||||
game.truthCharityPromises.some(promise => promise.player === actor && promise.turn === turn &&
|
||||
promise.event === event && promise.answer && !promise.fulfilled && !promise.released) &&
|
||||
game.status === 'playing' && game.phase === 2 && game.me === actor && game.turn === turn &&
|
||||
(!game.charityOrder || game.charityOrder.turn === turn && game.charityOrder.remaining[0] === actor) &&
|
||||
!!me && !me.autopilot && (payment || claim) && !game.truthtrance && !game.response &&
|
||||
!game.decision && !game.phaseOpening && !game.automaticContinuationPending &&
|
||||
!game.roomControl?.paused && !game.roomControl?.closed;
|
||||
@@ -41,6 +42,8 @@ export function TruthCharityPromise({ game, busy, send }: Props) {
|
||||
</li>)}</ul>
|
||||
<p>Yes requires an actual eligible claim after the answer; No forbids claiming during this Charity phase. Earlier claims do not count.</p>
|
||||
{game.phase < 2 && <p className="fine">Charity has not opened yet. The current turn and its original decisions continue; any claim guide appears only when Charity is available.</p>}
|
||||
{game.phase === 2 && game.charityOrder?.remaining.includes(actor) && game.charityOrder.remaining[0] !== actor &&
|
||||
<p className="fine">Wait for your Charity turn. The guide appears when your turn begins.</p>}
|
||||
{guide && action?.type === 'bribe' && <p className="fine">The quoted payment can make you eligible for Charity. You pay immediately; the other player receives the bribe at the start of Mentat Pause.</p>}
|
||||
{guide && action && <Button className="game-action min-h-11 whitespace-normal" data-testid="charity-promise-guide"
|
||||
disabled={!canAct()} onClick={() => { if (canAct()) send(action); }}>
|
||||
|
||||
Reference in new issue
Block a user