Support Fremen special Karama truth commitments
Verify and publish checkpoint container / container (push) Successful in 10m22s

This commit is contained in:
Quintine committed 2026-10-29 18:26:33 +11:00
1 parent 5079ab556f
commit 5b8d510470
14 files changed
+418 -18

No files matched your search

+8 -3
View File
@@ -9,7 +9,7 @@ import { parseBattleActionClaim } from '@/game/mixed-battle-question';
import { battlePowerOf, nativeBattlePowerOpportunity, type BattlePowerClaim } from '@/game/battle-power-question';
import { battleCardLabel, voiceChoices } from '@/game/battle-cards';
import { nativeStormDialOpportunity } from '@/game/storm-dial-question';
import { karamaBattleCancelOpportunity, parseKaramaHarkonnenSpecialSource, parseKaramaEmperorSpecialSource, parseKaramaAtreidesSpecialSource, WINDOW_CARD_EFFECTS, windowCardOpportunity, type WindowCardEffect } from '@/game/window-card-play';
import { karamaBattleCancelOpportunity, parseKaramaHarkonnenSpecialSource, parseKaramaEmperorSpecialSource, parseKaramaAtreidesSpecialSource, parseKaramaFremenSpecialSource, WINDOW_CARD_EFFECTS, windowCardOpportunity, type WindowCardEffect } from '@/game/window-card-play';
import { parseTurnActionLeaf, TURN_ACTION_MAX_DEPTH, TURN_ACTION_MAX_LEAVES, type TurnActionLeaf } from '@/game/turn-action-promises';
import { BattleClaimFields } from './battle-promises';
import { MixedActionFields, mixedActionInputError, type MixedActionConfig } from './mixed-action-fields';
@@ -58,6 +58,7 @@ const windowRoleNames: Record<WindowCardEffect, string> = { weather: 'Weather Co
karamaHarkonnenSpecial: 'Use Harkonnen’s special Karama during Bidding',
karamaEmperorSpecial: 'Use Emperor’s special Karama during Revival',
karamaAtreidesSpecial: 'Use Atreides’ special Karama in this battle',
karamaFremenSpecial: 'Use Fremen’s special Karama during Spice Blow',
thumper: 'Play Thumper before this turn’s first spice reveal', amal: 'Play Amal in this original phase opening' };
const battleCancelOpportunity = karamaBattleCancelOpportunity;
/** Harkonnen is public; do not inspect that player's hand or target's cards. */
@@ -70,6 +71,8 @@ const windowOpportunity = (game: GameView, target: string, effect: WindowCardEff
(!opportunity || parseKaramaEmperorSpecialSource(opportunity.source)?.owner !== target)) return null;
if (effect === 'karamaAtreidesSpecial' &&
(!opportunity || parseKaramaAtreidesSpecialSource(opportunity.source)?.owner !== target)) return null;
if (effect === 'karamaFremenSpecial' &&
(!opportunity || parseKaramaFremenSpecialSource(opportunity.source)?.owner !== target)) return null;
return opportunity;
};
const config: MixedActionConfig<TurnActionLeaf> = {
@@ -275,11 +278,11 @@ const config: MixedActionConfig<TurnActionLeaf> = {
<select id={`${id}-window-effect`} value={WINDOW_CARD_EFFECTS.includes(value.effect) ? value.effect : ''}
disabled={disabled} aria-invalid={!WINDOW_CARD_EFFECTS.includes(value.effect)} onChange={event => {
const effect = event.currentTarget.value;
if (effect === 'weather' || effect === 'atomics' || effect === 'harvester' || effect === 'karamaAuction' || effect === 'karamaShipment' || effect === 'karamaBattleCancel' || effect === 'karamaHarkonnenSpecial' || effect === 'karamaEmperorSpecial' || effect === 'karamaAtreidesSpecial' || effect === 'thumper' || effect === 'amal')
if (effect === 'weather' || effect === 'atomics' || effect === 'harvester' || effect === 'karamaAuction' || effect === 'karamaShipment' || effect === 'karamaBattleCancel' || effect === 'karamaHarkonnenSpecial' || effect === 'karamaEmperorSpecial' || effect === 'karamaAtreidesSpecial' || effect === 'karamaFremenSpecial' || effect === 'thumper' || effect === 'amal')
onChange({ kind: 'windowCardPlay', effect, source: windowOpportunity(game, target, effect)?.source ?? '' });
}}>
<option value="">Choose a printed role</option>
{WINDOW_CARD_EFFECTS.filter(effect => (effect !== 'karamaBattleCancel' && effect !== 'karamaHarkonnenSpecial' && effect !== 'karamaEmperorSpecial' && effect !== 'karamaAtreidesSpecial') || !!windowOpportunity(game, target, effect) || value.effect === effect)
{WINDOW_CARD_EFFECTS.filter(effect => (effect !== 'karamaBattleCancel' && effect !== 'karamaHarkonnenSpecial' && effect !== 'karamaEmperorSpecial' && effect !== 'karamaAtreidesSpecial' && effect !== 'karamaFremenSpecial') || !!windowOpportunity(game, target, effect) || value.effect === effect)
.map(effect => <option key={effect} value={effect}>{windowRoleNames[effect]}</option>)}
</select>
<label htmlFor={`${id}-window-source`}>Original native window</label>
@@ -298,11 +301,13 @@ const config: MixedActionConfig<TurnActionLeaf> = {
: value.effect === 'karamaHarkonnenSpecial' ? `Turn ${currentWindow.turn} · Harkonnen special Karama during Bidding`
: value.effect === 'karamaEmperorSpecial' ? `Turn ${currentWindow.turn} · Emperor special Karama during Revival`
: value.effect === 'karamaAtreidesSpecial' ? `Turn ${currentWindow.turn} · Atreides special Karama in this battle`
: value.effect === 'karamaFremenSpecial' ? `Turn ${currentWindow.turn} · Fremen special Karama during Spice Blow`
: value.effect === 'karamaBattleCancel' ? `Turn ${currentWindow.turn} · ${game.response?.kind === 'voice' ? 'Voice' : 'Prescience'} declared by ${game.players.find(player => player.id === game.response?.owner)?.name ?? game.response?.owner} · ${game.combatLocations.find(location => location.id === game.battle?.territory)?.name ?? game.battle?.territory}`
: currentWindow.effect === 'karamaShipment' ? `Turn ${currentWindow.turn} · ${game.players.find(player => player.id === currentWindow.recipient)?.name ?? currentWindow.recipient}’s current native shipment price`
: `Turn ${currentWindow.turn} · Before this Storm movement`}</option>}
</select>
{!currentWindow && <p className="fine">This printed role has no current original open native window.</p>}
{value.effect === 'karamaFremenSpecial' && <p className="fine">The current guide uses empty sand without spice. Other active commitments may restrict the chosen territory.</p>}
{value.effect === 'thumper' && game.turn === 1 && <p className="notice">On turn 1, playing Thumper still discards the card,
but its worm encounter is ignored and the normal Spice Card draw continues.</p>}
</> : value.kind === 'battlePower' ? <>