Support multiple travel terms in public deals
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
13c337a24a
commit
d7d0f89625
13 files changed
+790
-51
No files matched your search
@@ -108,20 +108,26 @@ export function TravelPromises(props: TravelProps) {
|
||||
return <section className="notice space-y-3" aria-label={own.some(promise => promise.sourceDeal)
|
||||
? 'Your shipment and movement commitments' : 'Your Truthtrance shipment and movement promises'} id="travel-promise-guidance">
|
||||
<h3>Your shipment and movement promises</h3>
|
||||
<ul>{own.map(promise => <li key={promise.event}>
|
||||
<ul>{own.map(promise => {
|
||||
const index = (promise as typeof promise & {sourceDealIndex?:number}).sourceDealIndex;
|
||||
const extraStatus = (game as typeof game & {dealAdditionalTravelStatus?:Record<string, string[]>}).dealAdditionalTravelStatus;
|
||||
const dealStatus = promise.sourceDeal ? index === undefined ? game.dealTravelStatus[promise.sourceDeal]
|
||||
: extraStatus?.[promise.sourceDeal]?.[index] : undefined;
|
||||
return <li key={promise.event}>
|
||||
Turn {promise.turn}: {promise.sourceDeal ? `Public deal: agreed ${promise.answer ? 'Yes' : 'No'} to` : `You answered ${promise.answer ? 'Yes' : 'No'} to`} {truthQuestionText({ kind: 'travel', target: promise.player,
|
||||
turn: promise.turn, mixed: promise.mixed }, id => id === CHEAP_HERO_TRAITOR ? 'Cheap Hero / Heroine'
|
||||
: game.allLeaders.find(leader => leader.id === id)?.name ?? id,
|
||||
id => game.combatLocations.find(location => location.id === id)?.name ?? id,
|
||||
id => game.players.find(player => player.id === id)?.name ?? id)}.
|
||||
{promise.released ? promise.sourceDeal
|
||||
? game.dealTravelStatus[promise.sourceDeal] === 'void'
|
||||
? dealStatus === 'void'
|
||||
? ' Void: this agreement is no longer possible.' : ' Released: this whole commitment is no longer binding.'
|
||||
: ' Released: this whole commitment is no longer possible.'
|
||||
: promise.fulfilled ? ' Fulfilled: this whole commitment is complete.'
|
||||
: promise.sourceDeal ? ' This commitment is binding until your Movement turn ends this round.'
|
||||
: ' This whole answer is binding until your Movement turn ends this round.'}
|
||||
</li>)}</ul>
|
||||
</li>;
|
||||
})}</ul>
|
||||
{own.some(promise => !promise.sourceDeal) && <p>AND requires every condition; OR requires at least one. No negates the whole expression, not each condition separately.
|
||||
Legal alternatives remain available; no fixed branch is selected for you.
|
||||
Current facts are evaluated at the answer. They create no promise to keep cards, spice or forces afterward.
|
||||
|
||||
Reference in new issue
Block a user