Files
Dune/game/ecaz-cards.ts
T
Quintine 04501567d0 Connect Harass & Withdraw to the battle preview
The independent Ecaz Treachery variant now supports Harass in either physical battle-card slot. A category-null Prescience answer keeps its identity private without erasing the selected card. Exact undialed normal/elite counters return before battle losses; opposing successful Traitors cancel withdrawal, ordinary leader deaths still resolve, and the card is discarded exactly once. Controls, all four AI profiles and saved continuation share the same physical quote. Existing Planetologist inspection and literal Truthtrance slot promises retain their meanings.

Unique Basic/Advanced physical allocations are supported. Ambiguous allocations, co-present Ecaz allied armies on either side, Richese card-family configurations and other optional modules remain gated before sealing from public/own context. The pending Stone Burner timing question is not assumed answered. Reveal-before-explosion order and mandatory disposal on an own-Traitor win are explicit source-timing/specificity inferences, consistent with existing Planetologist precedence. Reinforcements and full variant/public mode acceptance remain unfinished.

Independent rules/privacy/persistence review fixed asymmetric selector legality, misleading blocked-card guidance, invalid restored battle pairs, native-only inspection bypass and unsupported allied-army admission. Ixian fixtures preserve all seven physical cyborgs. The first broad run caught a semantic-status lint error in the blocked guidance; replacing the paragraph role with an output element fixed it. A subsequent broad run passed 4,775 of 4,776 tests and exposed an old UI assertion requiring category-null slots to be disabled. The updated regression verifies enabled category-null selectors exclude ordinary held cards, while exact leader/dial locks and submitted values remain bound; focused controls pass 14/14. No game source changed after the eight samples or browser replay. Types, lint, 4776 offline tests, build and 43 HTTP tests pass with unchanged source. Authenticated SQLite cases verify sealed private restoration and competing duplicate traitor actions with one physical resolution.

Eight fixed genuine six-seat games finish: basic/Easy: 1803 actions, 0 Harass plans, 0 withdrawals, 48 periodic restores; basic/Medium: 225 actions, 0 Harass plans, 0 withdrawals, 6 periodic restores; basic/Hard: 2184 actions, 1 Harass plans, 1 withdrawals, 59 periodic restores; basic/Brutal: 2073 actions, 1 Harass plans, 1 withdrawals, 56 periodic restores; advanced/Easy: 2057 actions, 1 Harass plans, 1 withdrawals, 55 periodic restores; advanced/Medium: 532 actions, 0 Harass plans, 0 withdrawals, 14 periodic restores; advanced/Hard: 538 actions, 0 Harass plans, 0 withdrawals, 14 periodic restores; advanced/Brutal: 544 actions, 0 Harass plans, 0 withdrawals, 14 periodic restores. All 218 game-source files match their source-stable runs; exact card/traitor/force custody and periodic/terminal private views are checked. Browser controls verify the full card, category None, Defense-first legality, actual sealing/reveal, four returned forces, ordinary leader death, disposal and refresh. A separate final-source replay verifies the conserved browser fixture and opposing continuation, including Face Dancer replacement. This is bounded playability evidence, not full compliance or AI calibration.

All 936 opening games and their original seat/recovery records remain unchanged (970 after checks); all 937 present immediately before checks are also preserved. Database integrity and foreign keys pass. The healthy server was reused after the power failure without restart, reset or recurring automation.

Verified source tree: be193613c455c5b76b49800fe3a7400504ea879af34c59621ade3d44f0fe019d
2026-09-14 04:41:30 +10:00

183 lines
8.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { Card } from './cards';
export type EcazTreacheryEffect =
| 'recruits'
| 'reinforcements'
| 'harassWithdraw';
export type EcazTreacheryCardId =
| 'ecaz-recruits'
| 'ecaz-reinforcements'
| 'ecaz-harass-withdraw';
export type EcazTreacheryCard = Card & {
id: EcazTreacheryCardId;
kind: 'special';
effect: EcazTreacheryEffect;
};
export type EcazTreacheryDefinition = Readonly<{
card: Readonly<EcazTreacheryCard>;
quantity: 1;
timing: 'revival' | 'battle-plan';
battleSlots: readonly ('weapon' | 'defense')[];
weaponCategory: false;
defenseCategory: false;
discard: 'after-use';
summary: string;
gameplay: readonly string[];
verification: Readonly<{
inventory: 'verified';
sourceRules: 'verified';
runtime: 'prototype' | 'not-implemented';
combinedInteractions: 'incomplete';
unresolved: readonly string[];
}>;
}>;
/** Metadata only. Selecting an expansion faction must never activate this module implicitly. */
export const ECAZ_TREACHERY_VARIANT = Object.freeze({
id: 'ecaz-treachery',
name: 'Ecaz & Moritani treachery cards',
physicalCards: 3,
independentOfFactions: true,
independentOfOtherVariants: true,
activation: 'audit-prototype',
audit: 'docs/ECAZ_TREACHERY_RULES.md',
} as const);
const define = (definition: EcazTreacheryDefinition): EcazTreacheryDefinition =>
Object.freeze({
...definition,
card: Object.freeze({ ...definition.card }),
battleSlots: Object.freeze([...definition.battleSlots]),
gameplay: Object.freeze([...definition.gameplay]),
verification: Object.freeze({
...definition.verification,
unresolved: Object.freeze([...definition.verification.unresolved]),
}),
});
/**
* One physical copy of each verified identity. Text below is an original gameplay
* guide, not a transcription or artwork reproduction. Unresolved source questions
* are developer metadata and must not become guessed gameplay instructions.
*/
export const ECAZ_TREACHERY_DEFINITIONS: readonly EcazTreacheryDefinition[] =
Object.freeze([
define({
card: {
id: 'ecaz-recruits',
name: 'Recruits',
kind: 'special',
effect: 'recruits',
},
quantity: 1,
timing: 'revival',
battleSlots: [],
weaponCategory: false,
defenseCategory: false,
discard: 'after-use',
summary:
'During Revival, double every faction’s current free-revival rate for this turn and raise the ordinary force-revival limit to seven.',
gameplay: [
'Play during the Revival phase. Every faction receives twice its current free-revival rate for this turn; the effect applies across the table.',
'The ordinary limit on force revival becomes seven for the turn. A doubled free allowance still respects that limit where it applies: a current free rate of four doubles to eight, but an ordinary faction can revive only seven forces.',
'The doubled rate changes how many revivals are free. It does not make additional paid revivals free or state a separate spice payment to play this card.',
'Discard Recruits after use. Its change lasts for this turn and does not permanently alter faction revival rates.',
],
verification: {
inventory: 'verified',
sourceRules: 'verified',
runtime: 'prototype',
combinedInteractions: 'incomplete',
unresolved: [
'Timing after earlier completed revivals, refunds, reopening opportunities and any already pending transaction.',
'Interactions with unlimited CHOAM/Tleilaxu revival, Karama limits, prevented free revival, Fremen ally grants, special units and changing Homeworld thresholds.',
],
},
}),
define({
card: {
id: 'ecaz-reinforcements',
name: 'Reinforcements',
kind: 'special',
effect: 'reinforcements',
},
quantity: 1,
timing: 'battle-plan',
battleSlots: ['weapon', 'defense'],
weaponCategory: false,
defenseCategory: false,
discard: 'after-use',
summary:
'Commit in either battle-card slot to increase the dialed number by two, transferring three of your reserve forces to the Tanks.',
gameplay: [
'Include Reinforcements in either the weapon slot or the defense slot of your Battle Plan. You must have at least three of your own forces in reserves to use it.',
'Increase the dialed number by two and transfer three of your reserve forces to the Tanks. These forces come from reserves; the card does not ship them into the battle territory. No separate spice payment is specified by the card.',
'Although it occupies a battle-card slot, Reinforcements is neither a weapon nor a defense. If Prescience asks about the category of the slot it occupies, declare no card of that category without revealing Reinforcements’ identity.',
'Discard Reinforcements after use.',
],
verification: {
inventory: 'verified',
sourceRules: 'verified',
runtime: 'not-implemented',
combinedInteractions: 'incomplete',
unresolved: [
'Reserve-cost timing when either side calls a traitor and in explosion or instant-outcome battles.',
'Whether the additional dial number affects advanced spice support or on-board casualties, the eligible regular/elite reserve mix, and battle-loss bookkeeping.',
'Disposal when a battle effect is canceled or defeated before normal use resolution.',
],
},
}),
define({
card: {
id: 'ecaz-harass-withdraw',
name: 'Harass & Withdraw',
kind: 'special',
effect: 'harassWithdraw',
},
quantity: 1,
timing: 'battle-plan',
battleSlots: ['weapon', 'defense'],
weaponCategory: false,
defenseCategory: false,
discard: 'after-use',
summary:
'Commit in either battle-card slot to return your undialed forces to reserves when revealed. An opponent’s traitor call cancels this effect.',
gameplay: [
'Include Harass & Withdraw in either the weapon slot or the defense slot of your Battle Plan. You cannot use it on your own Homeworld.',
'When the plan is revealed, return your undialed forces to reserves. Your leader can still be killed normally. A traitor called by your opponent cancels the withdrawal effect.',
'A Face Dancer affecting your leader does not affect the undialed forces returned to reserves. When Ecaz and an ally are together, only the card user’s undialed forces return; the other ally resolves normally.',
'Harass & Withdraw is neither a weapon nor a defense, despite occupying one of those slots. If Prescience asks about that category, declare no card of that category without disclosing this card’s identity.',
'No separate spice charge is specified by the card. Discard Harass & Withdraw after use.',
],
verification: {
inventory: 'verified',
sourceRules: 'verified',
runtime: 'prototype',
combinedInteractions: 'incomplete',
unresolved: [
'Stone Burner comparison before or after withdrawal; its public card-family configuration remains guarded.',
'Ambiguous physical dialed/undialed allocations among regular/elite forces or multiple sectors, and Ecaz allied support.',
'Additional optional modules, Homeworld battles and complete integrated acceptance.',
],
},
}),
]);
/** Inventory factory only: never composes, activates or changes an existing game deck. */
export function ecazTreacheryCards(): EcazTreacheryCard[] {
return ECAZ_TREACHERY_DEFINITIONS.map(({ card }) => ({ ...card }));
}
/** Resolve a canonical physical identity, not an arbitrary special with a similar name. */
export function ecazTreacheryDefinition(
card: Pick<Card, 'id' | 'name' | 'kind' | 'effect'>,
): EcazTreacheryDefinition | undefined {
return ECAZ_TREACHERY_DEFINITIONS.find(
(definition) =>
definition.card.id === card.id &&
definition.card.name === card.name &&
definition.card.kind === card.kind &&
definition.card.effect === card.effect,
);
}