Prototype Tleilaxu special Karama Truthtrance
Verify and publish checkpoint container / container (push) Successful in 11m6s

This commit is contained in:
Quintine committed 2026-10-29 18:35:24 +11:00
1 parent 5b8d510470
commit cfccfe5acb
15 files changed
+391 -20

No files matched your search

+7 -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, parseKaramaFremenSpecialSource, WINDOW_CARD_EFFECTS, windowCardOpportunity, type WindowCardEffect } from '@/game/window-card-play';
import { karamaBattleCancelOpportunity, parseKaramaHarkonnenSpecialSource, parseKaramaEmperorSpecialSource, parseKaramaAtreidesSpecialSource, parseKaramaFremenSpecialSource, parseKaramaTleilaxuSpecialSource, 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';
@@ -59,6 +59,7 @@ const windowRoleNames: Record<WindowCardEffect, string> = { weather: 'Weather Co
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',
karamaTleilaxuSpecial: 'Use Tleilaxu’s special Karama during Revival',
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. */
@@ -73,6 +74,8 @@ const windowOpportunity = (game: GameView, target: string, effect: WindowCardEff
(!opportunity || parseKaramaAtreidesSpecialSource(opportunity.source)?.owner !== target)) return null;
if (effect === 'karamaFremenSpecial' &&
(!opportunity || parseKaramaFremenSpecialSource(opportunity.source)?.owner !== target)) return null;
if (effect === 'karamaTleilaxuSpecial' &&
(!opportunity || parseKaramaTleilaxuSpecialSource(opportunity.source)?.owner !== target)) return null;
return opportunity;
};
const config: MixedActionConfig<TurnActionLeaf> = {
@@ -278,11 +281,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 === 'karamaFremenSpecial' || 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 === 'karamaTleilaxuSpecial' || 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' && effect !== 'karamaFremenSpecial') || !!windowOpportunity(game, target, effect) || value.effect === effect)
{WINDOW_CARD_EFFECTS.filter(effect => (effect !== 'karamaBattleCancel' && effect !== 'karamaHarkonnenSpecial' && effect !== 'karamaEmperorSpecial' && effect !== 'karamaAtreidesSpecial' && effect !== 'karamaFremenSpecial' && effect !== 'karamaTleilaxuSpecial') || !!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>
@@ -302,6 +305,7 @@ const config: MixedActionConfig<TurnActionLeaf> = {
: 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 === 'karamaTleilaxuSpecial' ? `Turn ${currentWindow.turn} · Tleilaxu special Karama during Revival`
: 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>}