Support Sapho replay and public cache questions

This commit is contained in:
Quintine committed 2026-10-28 19:28:19 +11:00
1 parent 7d71647a90
commit 26be6fd8ee
17 files changed
+393 -22

No files matched your search

+3 -1
View File
@@ -67,6 +67,7 @@ export function TruthFactFields({ value: fact, game, target, onChange }: {
stormForecast: { kind: 'stormForecast', compare: 'gte', value: 1 },
spicePeek: { kind: 'spicePeek', value: 'worm' },
auctionPeek: { kind: 'auctionPeek', name: 'Shield' },
cacheLot: { kind: 'cacheLot', name: 'Shield' },
ixPoolPeek: { kind: 'ixPoolPeek', name: 'Shield' },
presciencePeek: { kind: 'presciencePeek', field: 'leader', name: 'None' },
spice: { kind: 'spice', compare: 'gte', value: 6 },
@@ -89,6 +90,7 @@ export function TruthFactFields({ value: fact, game, target, onChange }: {
<option value="stormForecast">Known storm forecast</option>
<option value="spicePeek">Known next Spice Blow card</option>
<option value="auctionPeek">Inspected ordinary auction card</option>
<option value="cacheLot">Public Basic Richese cache auction card</option>
<option value="ixPoolPeek">Recorded Ixian inspected auction pool includes a card</option>
<option value="presciencePeek">Inspected battle plan field</option>
<option value="spice">Current personal spice</option>
@@ -106,7 +108,7 @@ export function TruthFactFields({ value: fact, game, target, onChange }: {
<FaceDancerFactFields value={fact} leaders={game.allLeaders} onChange={onChange} /> : fact.kind === 'noFieldValue' ?
<NoFieldValueFields value={fact} onChange={onChange} /> : fact.kind === 'forceCount' ?
<ForceCountFields value={fact} game={game} player={game.players.find(player => player.id === target)!} onChange={onChange} /> :
fact.kind === 'prediction' || fact.kind === 'stormDial' || fact.kind === 'stormForecast' || fact.kind === 'spicePeek' || fact.kind === 'auctionPeek' || fact.kind === 'ixPoolPeek' || fact.kind === 'presciencePeek' ?
fact.kind === 'prediction' || fact.kind === 'stormDial' || fact.kind === 'stormForecast' || fact.kind === 'spicePeek' || fact.kind === 'auctionPeek' || fact.kind === 'cacheLot' || fact.kind === 'ixPoolPeek' || fact.kind === 'presciencePeek' ?
<KnowledgeFactFields value={fact} onChange={onChange} /> : fact.kind === 'spice' ? <>
<label>
Compare current personal spice
+12 -2
View File
@@ -7,9 +7,9 @@ import { knowledgeFactInputError, PRESCIENCE_LEADER_NAMES, SPICE_PEEK_VALUES, ty
import { TRUTH_CARD_NAMES } from '@/game/truthtrance-card-names';
import { Input } from '@/components/ui/input';
type NumericKnowledgeFact = Exclude<KnowledgeFact, { kind: 'prediction'; field: 'faction' } | { kind: 'spicePeek' } | { kind: 'auctionPeek' } | { kind: 'ixPoolPeek' } | { kind: 'presciencePeek' }>;
type NumericKnowledgeFact = Exclude<KnowledgeFact, { kind: 'prediction'; field: 'faction' } | { kind: 'spicePeek' } | { kind: 'auctionPeek' } | { kind: 'cacheLot' } | { kind: 'ixPoolPeek' } | { kind: 'presciencePeek' }>;
function isNumericKnowledgeFact(fact: KnowledgeFact): fact is NumericKnowledgeFact {
return fact.kind !== 'spicePeek' && fact.kind !== 'auctionPeek' && fact.kind !== 'ixPoolPeek' && fact.kind !== 'presciencePeek' && (fact.kind !== 'prediction' || fact.field === 'turn');
return fact.kind !== 'spicePeek' && fact.kind !== 'auctionPeek' && fact.kind !== 'cacheLot' && fact.kind !== 'ixPoolPeek' && fact.kind !== 'presciencePeek' && (fact.kind !== 'prediction' || fact.field === 'turn');
}
export function KnowledgeFactFields({
@@ -72,6 +72,16 @@ export function KnowledgeFactFields({
</label>
<p className="fine">In Basic Bidding, this asks whether the named card is in the Ixian’s recorded inspected auction pool. If that knowledge is unavailable, the answer is I don’t know. Only the answer is published; the pool itself remains private.</p>
</>
) : value.kind === 'cacheLot' ? (
<>
<label>
Public Basic Richese cache auction card
<select value={value.name} onChange={(event) => onChange({ kind: 'cacheLot', name: event.target.value })}>
{TRUTH_CARD_NAMES.map((name) => <option key={name} value={name}>{name}</option>)}
</select>
</label>
<p className="fine">This asks about the current public Richese cache auction card in Basic play. If that auction is unavailable, the answer is I don’t know. Only the answer is published.</p>
</>
) : value.kind === 'auctionPeek' ? (
<>
<label>