diff --git a/components/game-table.tsx b/components/game-table.tsx index a375c2dd..91faa954 100644 --- a/components/game-table.tsx +++ b/components/game-table.tsx @@ -1167,7 +1167,8 @@ export function GameTable({ Semuta Drug with Homeworlds development preview · original Richese, CHOAM and classic occupation setup, with no other optional modules. Paid high-Kaitain closing discards, occupied Tupile lost-slot cleanup, - a completed paid Nullentropy Box search, an ordinary used special + a completed paid Nullentropy Box search, a clean Distrans transfer, + an ordinary used special card played in this profile and printed Karama canceling native Guild, Emperor auction or Richese purchase income offer Semuta here. Private discarded faces remain hidden until commitment; a simultaneous group requires one selection. diff --git a/docs/CURRENT_STATUS.md b/docs/CURRENT_STATUS.md index 77e9ae48..a0980d23 100644 --- a/docs/CURRENT_STATUS.md +++ b/docs/CURRENT_STATUS.md @@ -29,6 +29,15 @@ optional skill bands, combinations and public expansion starts remain open. Rules implementation continues; comprehensive assurance and administration remain deferred until all rules are implemented. +**Semuta / Homeworld Distrans reaction — 11 October.** +`distransDiscard` is now admitted in the same envelope, so a completed +private Distrans transfer offers its used card. A genuine original Homeworld +state plays Distrans, delivers the private card to a real seat, then offers +the used Distrans; the transferred card is never a candidate. Claim recovers +the exact Distrans, pass leaves it discarded, and the gift, wallets, +occupation authority and original Movement are unchanged. The claim/pass +pair and all four legal bots pass alongside the existing Homeworld cases. + **Semuta / Homeworld paid Box reaction — 11 October.** The same envelope also admitted no paid Nullentropy Box reaction, so a completed Box search produced no Semuta offer. `semutaOfferSupported` now diff --git a/docs/HOMEWORLD_TUPILE_INTELLIGENCE_RUNTIME.md b/docs/HOMEWORLD_TUPILE_INTELLIGENCE_RUNTIME.md index c1116957..97ed91c2 100644 --- a/docs/HOMEWORLD_TUPILE_INTELLIGENCE_RUNTIME.md +++ b/docs/HOMEWORLD_TUPILE_INTELLIGENCE_RUNTIME.md @@ -8,10 +8,10 @@ The separate fresh `semuta --homeworlds` entry reuses original occupation setup for native Richese/CHOAM and classics, exact CHOAM, with no other optional modules. It does not convert played profiles or widen the Basic epoch ruling. Besides the three dedicated producers, a completed paid Nullentropy Box -search and an ordinary used special card played in this roster also offer -Semuta: the used card is the same public fresh batch, claim recovers it and -pass leaves it discarded, and the card's own committed effect, payment, -wallets, custody and occupation history are unchanged. +search, a clean Distrans transfer and an ordinary used special card played in +this roster also offer Semuta: the used card is the same public fresh batch, +claim recovers it and pass leaves it discarded, and the card's own committed +effect, payment, gift, wallets, custody and occupation history are unchanged. Actual selected original cleanup cards are privately discarded first. The typed receipt retains only that cleanup's event, original held-ID commitment diff --git a/docs/IMPLEMENTATION_STATUS.md b/docs/IMPLEMENTATION_STATUS.md index 8dd2fa01..0b9549c3 100644 --- a/docs/IMPLEMENTATION_STATUS.md +++ b/docs/IMPLEMENTATION_STATUS.md @@ -1,5 +1,22 @@ # Dune implementation status +## 11 October 2026 — Homeworld Distrans Semuta reaction + +`distransDiscard` is now admitted in the same Homeworld envelope, so a +completed private Distrans transfer offers its used card. The continuation +already binds both hands and the shared parent signature (now Homeworld-aware +when the module is present), so no new custody or price rule was added. + +A genuine original Homeworld state plays Distrans, delivers the chosen private +card to a real seat, and offers the used Distrans. The transferred card is +never a candidate; the gift has already completed. Claim recovers the exact +Distrans, pass leaves it discarded, and the gift, wallets, occupation +authority and original Movement are unchanged; replaying the transfer is +rejected. The claim/pass pair and all four legal bot profiles pass alongside +the existing Homeworld cases. Nineteen consumer cases and the frozen +six-file union pass with types/lint. Truthtrance, battle and other Homeworld +producers remain guarded. + ## 11 October 2026 — Homeworld paid Box Semuta reaction The Homeworld envelope also admitted no paid Nullentropy Box reaction, so a diff --git a/docs/SEMUTA_SOURCE_UPDATE_20260907.md b/docs/SEMUTA_SOURCE_UPDATE_20260907.md index eaed4244..b0e82875 100644 --- a/docs/SEMUTA_SOURCE_UPDATE_20260907.md +++ b/docs/SEMUTA_SOURCE_UPDATE_20260907.md @@ -857,9 +857,9 @@ module entry, public gate or complete-mode certification follows. **11 October 2026 — Homeworld ordinary-card reaction.** The bounded Homeworld entry now also offers Semuta for an ordinary used special card played in its -roster and for the used card of a completed paid Nullentropy Box search, not -only paid Kaitain disposal, Tupile cleanup and printed Karama canceling -income. The used card is the same public fresh batch; claim recovers it and +roster, a clean Distrans transfer and the used card of a completed paid +Nullentropy Box search, not only paid Kaitain disposal, Tupile cleanup and +printed Karama canceling income. The used card is the same public fresh batch; claim recovers it and pass leaves it discarded, with Homeworld custody, occupation history, the percentage ledger, wallets, the two-spice Box payment and the card's own committed effect unchanged. The shared parent signature additionally binds diff --git a/game/engine.ts b/game/engine.ts index 4347fa58..771a5af3 100644 --- a/game/engine.ts +++ b/game/engine.ts @@ -6956,7 +6956,8 @@ function semutaOfferSupported( continuation.kind !== 'tupileCleanupDiscard' && continuation.kind !== 'karamaIncomeDiscard' && continuation.kind !== 'ordinaryCardDiscard' && - continuation.kind !== 'nullentropyDiscard') return false; + continuation.kind !== 'nullentropyDiscard' && + continuation.kind !== 'distransDiscard') return false; if (continuation.kind === 'battleResolved' && !g.lastBattleContext?.mandatoryDiscard) return false; if ((continuation.kind === 'battleCleanup' || diff --git a/game/reference.ts b/game/reference.ts index 48322edd..e1dbca38 100644 --- a/game/reference.ts +++ b/game/reference.ts @@ -1186,7 +1186,7 @@ export const RULE_TOPICS: RuleTopic[] = [ 'A distinct printed Karama canceling those five ordinary native CHOAM printed or Cunning powers also offers its public cost before the original denial completes. CHOAM retains the declared fuel; a Cunning Nexus remains spent. Claim or Continue restores the same saved response and one original movement, free-revival, storm or closing-Mentat suffix. Acquiring Karama cannot return the canceled force, grant range, stop the original request, protect the storm or restore Nexus. The retained CHOAM fuel is not a discard candidate; Kull and unsupported arrival/flight parents remain separate.', 'A printed Karama canceling the Emperor’s shared gift or extra allied revival also offers that exact public cost before the denial completes. The canceled share moves no spice, forces or revival; the Emperor’s ally and extra-revival ledger are unchanged. Claim or Continue restores the saved response and finishes the cancellation once. Only the actual Semuta holder sees the private claimant choice; other seats see the neutral offer.', 'A printed Karama canceling original paid Guild shipment income, non-Ambassador Emperor auction income or Richese special-purchase income also offers its exact public cost before the native denial. The price and physical transaction have already committed: claim or Continue cannot refund spice, re-ship forces, undo cache acquisition or replay a purchase. Original Movement, next-lot inspection or the Richese purchase’s suspended controls resume once. A winner may spend the very Karama it just bought; claiming that identity does not reverse its payment. Homeworld and Ambassador payment compositions remain separate.', - 'The separate fresh semuta --homeworlds entry retains original Richese/CHOAM and classic Homeworld occupation setup with exact CHOAM and no other modules. A completed paid Nullentropy Box search, an ordinary used special card played in this profile, paid high-Kaitain disposal, occupied Tupile lost-slot cleanup and printed Karama canceling original Guild/Emperor auction/Richese-purchase income offer Semuta in this envelope. Kaitain pays two spice per card; its private group requires commitment before one selection. Each lost Tupile holder has a separate private cost before the next cleanup or saved opening. Native income cancellation retains the full original price and acquisition/forces but does not cancel the printed occupied portion; its original receiver still allocates it once before Movement, the next lot or saved purchase controls. Low-native rounding, paid invoice and occupation source remain original. Basic unresolved epochs, other Homeworld producers, module mixtures and public starts stay guarded.', + 'The separate fresh semuta --homeworlds entry retains original Richese/CHOAM and classic Homeworld occupation setup with exact CHOAM and no other modules. A completed paid Nullentropy Box search, a clean Distrans transfer, an ordinary used special card played in this profile, paid high-Kaitain disposal, occupied Tupile lost-slot cleanup and printed Karama canceling original Guild/Emperor auction/Richese-purchase income offer Semuta in this envelope. Kaitain pays two spice per card; its private group requires commitment before one selection. Each lost Tupile holder has a separate private cost before the next cleanup or saved opening. Native income cancellation retains the full original price and acquisition/forces but does not cancel the printed occupied portion; its original receiver still allocates it once before Movement, the next lot or saved purchase controls. Low-native rounding, paid invoice and occupation source remain original. Basic unresolved epochs, other Homeworld producers, module mixtures and public starts stay guarded.', 'An ordinary Ghola played during battle also offers its consumed card after revival. Claim or Continue preserves the revived leader or forces and the opposing sealed plan, then normal planning resumes. It cannot revive again by resuming the receipt.', 'A completed paid Nullentropy Box search during battle offers only the used Box. Claim or Continue preserves the two-spice payment, private recovered card, already-shuffled pile and sealed opposing plan. The recovered card may be used in normal legal planning; the search is not repeated.', 'A clean Distrans transfer during battle also offers only the used Distrans. The private card has already reached its recipient; claim or Continue cannot repeat the gift or change a sealed plan. A recipient holding Semuta may claim the used Distrans and keep the already-transferred card.', diff --git a/tests/fixture-semuta-homeworld-ordinary.ts b/tests/fixture-semuta-homeworld-ordinary.ts index 196bc6cc..544d0b72 100644 --- a/tests/fixture-semuta-homeworld-ordinary.ts +++ b/tests/fixture-semuta-homeworld-ordinary.ts @@ -30,6 +30,40 @@ export function createSemutaHomeworldOrdinaryFixture(): SemutaHomeworldOrdinaryF action: { type: 'card', card: hajr } }; } +export type SemutaHomeworldDistransFixture = { + game: Game; holder: string; owner: string; distrans: string; given: string; + recipient: string; action: Action; +}; + +/** Genuine original Homeworld occupation state; the Distrans transfer and its + * given card are conserved physical cards, not minted, and the recipient is a + * real seat. No clock, wallet or occupation value is assigned. */ +export function createSemutaHomeworldDistransFixture(): SemutaHomeworldDistransFixture { + const income = createSemutaHomeworldGuildIncomeFixture({ advanced: false }); + const game = income.game; + assert.equal(game.phase, 5); + assert.equal(game.active, 'a'); + const holder = income.holder, owner = 'a', recipient = 'e'; + const distrans = moveSemutaEmperorCard(game, + semutaEmperorCardId(game, card => card.effect === 'distrans'), owner); + const given = moveSemutaEmperorCard(game, semutaEmperorCardId(game, card => + card.effect !== 'distrans' && card.kind !== 'special' && card.effect !== 'karama' && + card.effect !== 'nullentropyBox'), owner); + return { game, holder, owner, distrans, given, recipient, + action: { type: 'card', card: distrans, target: recipient, give: given } }; +} + +export function reactSemutaHomeworldDistrans( + state: Game, fixture: SemutaHomeworldDistransFixture, claim: boolean, +): Game { + const event = state.pendingTreacheryDiscard!.batch.event; + if (claim) return applyAction(state, fixture.holder, { type: 'semutaCommit', event }); + let game = state; + for (const player of state.players) + game = applyAction(game, player.id, { type: 'semutaPass', event }); + return game; +} + export type SemutaHomeworldBoxFixture = { game: Game; source: Game; holder: string; box: string; owner: string; action: Action; cost: number; diff --git a/tests/semuta-homeworld-ordinary.test.ts b/tests/semuta-homeworld-ordinary.test.ts index 27e4d63e..19bfbc38 100644 --- a/tests/semuta-homeworld-ordinary.test.ts +++ b/tests/semuta-homeworld-ordinary.test.ts @@ -5,8 +5,9 @@ import { botActions } from '../game/bots'; import { SEMUTA_DRUG_ID } from '../game/semuta-drug'; import { semutaEmperorPlayer } from './fixture-semuta-emperor-share'; import { - createSemutaHomeworldBoxFixture, createSemutaHomeworldOrdinaryFixture, - reactSemutaHomeworldBox, reactSemutaHomeworldOrdinary, + createSemutaHomeworldBoxFixture, createSemutaHomeworldDistransFixture, + createSemutaHomeworldOrdinaryFixture, reactSemutaHomeworldBox, + reactSemutaHomeworldDistrans, reactSemutaHomeworldOrdinary, semutaHomeworldOrdinaryState, } from './fixture-semuta-homeworld-ordinary'; @@ -103,6 +104,60 @@ for (const difficulty of ['Easy', 'Medium', 'Hard', 'Brutal'] as const) void tes }, ); +for (const claim of [false, true]) void test( + `Homeworld Distrans transfer Semuta ${claim ? 'claims' : 'passes'} the used Distrans without repeating the gift`, () => { + const f = createSemutaHomeworldDistransFixture(); + const played = applyAction(f.game, f.owner, f.action); + const pending = played.pendingTreacheryDiscard; + assert.ok(pending, 'The used Distrans must offer its printed Semuta cost'); + assert.equal(pending.batch.cause, 'distrans'); + assert.deepEqual(pending.batch.entries.map(entry => ({ + id: entry.card.id, by: entry.discardedBy, face: entry.publicFace, + })), [{ id: f.distrans, by: f.owner, face: true }]); + const recipient = semutaEmperorPlayer(played, f.recipient); + assert.equal(recipient.hand.some(card => card.id === f.given), true, + 'The private transfer has already completed'); + assert.equal(recipient.hand.some(card => card.id === f.distrans), false); + assert.equal(played.discard.some(card => card.id === f.distrans), true); + for (const player of played.players) viewGame(played, player.id); + const before = semutaHomeworldOrdinaryState(played); + const event = pending.batch.event; + assert.throws(() => applyAction(played, f.holder, { type: 'semutaSelect', event, card: f.given }), + 'The already-transferred card is not a candidate'); + const done = reactSemutaHomeworldDistrans(played, f, claim); + assert.equal(done.pendingTreacheryDiscard, null); + assert.equal(done.resolvedTreacheryDiscardSequence, pending.sequence); + const holder = semutaEmperorPlayer(done, f.holder); + assert.equal(holder.hand.some(card => card.id === f.distrans), claim); + assert.equal(holder.hand.some(card => card.id === SEMUTA_DRUG_ID), !claim); + assert.equal(semutaEmperorPlayer(done, f.recipient).hand.some(card => card.id === f.given), true); + assert.deepEqual(semutaHomeworldOrdinaryState(done), before, + 'The private gift, wallets and occupation authority are unchanged'); + assert.throws(() => applyAction(done, f.owner, f.action)); + const suffix = applyAction(done, f.owner, { type: 'endMovement' }); + assert.ok(!suffix.movementRemaining?.includes(f.owner)); + assert.equal(suffix.phase, 5); + }, +); + +for (const difficulty of ['Easy', 'Medium', 'Hard', 'Brutal'] as const) void test( + `the ${difficulty} bot settles the Homeworld Distrans Semuta cost`, () => { + const f = createSemutaHomeworldDistransFixture(); + const played = applyAction(f.game, f.owner, f.action); + const view = viewGame(played, f.holder); + view.players.find(player => player.id === f.holder)!.bot = difficulty; + const action = botActions(view)[0]; + assert.ok(action); + const done = applyAction(played, f.holder, action); + assert.equal(done.pendingTreacheryDiscard, null); + const holder = done.players.find(player => player.id === f.holder)!; + const claimed = holder.hand.some(card => card.id === f.distrans); + assert.equal(claimed || done.discard.some(card => card.id === f.distrans), true); + assert.equal(holder.hand.some(card => card.id === SEMUTA_DRUG_ID), !claimed); + assert.equal(semutaEmperorPlayer(done, f.recipient).hand.some(card => card.id === f.given), true); + }, +); + void test('a full-hand Homeworld Richese exchanges Semuta for the used ordinary card', () => { const f = createSemutaHomeworldOrdinaryFixture(); const holder = semutaEmperorPlayer(f.game, f.holder); diff --git a/tools/start-prototype.ts b/tools/start-prototype.ts index 7e37b3bb..504d7c15 100644 --- a/tools/start-prototype.ts +++ b/tools/start-prototype.ts @@ -30,7 +30,7 @@ async function main() { '\nSemuta with CHOAM and optional Ix preserves original unused Tech Tokens in fresh 3–6-seat Basic/Advanced Richese lobbies under existing native prerequisites. Advanced additionally retains original unused Stronghold Cards at2–6; both modules require3–6. Native setup, first-Storm Tech and final-Mentat Stronghold assignment remain original. Mandatory/winner discards react before the original winner takes one loser-owned token, before Face Dance. Closing Gamont reacts before the original CHOAM finish and changed-board claim. Optional original skills require --leader-skills as described below; other modules, the separate CHOAM/Ecaz Moritani entry, retrofit and public starts remain excluded.', '\n--profile semuta --leader-skills explicitly composes original all14 skills with fresh native Basic Richese/CHOAM and classics using exact CHOAM, or Advanced native E1/E2 with Richese and selected required CHOAM/optional Ix decks, at2–6 seats. Optional original Tech requires3+; Strongholds requires Advanced. Original private offers/training, Auditor exclusion, normal Mentat question, typed Suk rescue and Rihani inspection/exchange remain. Traitor/Face Dancer movement is not a Treachery discard. Basic Ix mixtures without their original Nexus envelope, E3/Moritani, Homeworld/Discovery/Banker overlays, public starts and played-game conversion are not opened.', '\n--profile semuta --nexus-cards retains original all12 Nexus in fresh native Richese CHOAM/optional Ix lobbies, optionally --leader-skills, original Tech3+ and Advanced Strongholds2+. Single/paired CHOAM or both selected E1/E2 native families retain original prerequisites. No starting Nexus hand is added: a qualifying actual end-Spice draw follows a Nexus and settled alliance. CHOAM Secret Ally spends a Worthless for two bank spice only with CHOAM absent; CHOAM Betrayal spends its Nexus to discard one server-sampled native CHOAM hand card without compensation. Semuta claim/pass retires the original receipt once, after the committed fresh discard. No Homeworld, Discovery, E3, retrofit or public gate opens.', - '\n--profile semuta --homeworlds uses original fresh Basic/Advanced Richese with CHOAM and classic factions, exact CHOAM deck, at2–6 seats. Native occupation setup and source history remain original. A completed paid Nullentropy Box search, ordinary used special cards, paid high-Kaitain disposal, occupied-Tupile lost-slot cleanup and printed Karama canceling original Guild/Emperor auction/Richese-purchase income offer Semuta before their original suffix. Canceling native income does not cancel the printed occupied portion: its original receiver still allocates it once before Movement, the next lot or saved purchase controls. Other Homeworld producers, Nexus, Skills, Tech, Strongholds, Discovery, Ix/E3 mixing, retrofit and public starts remain guarded.', + '\n--profile semuta --homeworlds uses original fresh Basic/Advanced Richese with CHOAM and classic factions, exact CHOAM deck, at2–6 seats. Native occupation setup and source history remain original. A completed paid Nullentropy Box search, a clean Distrans transfer, ordinary used special cards, paid high-Kaitain disposal, occupied-Tupile lost-slot cleanup and printed Karama canceling original Guild/Emperor auction/Richese-purchase income offer Semuta before their original suffix. Canceling native income does not cancel the printed occupied portion: its original receiver still allocates it once before Movement, the next lot or saved purchase controls. Other Homeworld producers, Nexus, Skills, Tech, Strongholds, Discovery, Ix/E3 mixing, retrofit and public starts remain guarded.', '\nEcaz-occupy (--profile ecaz-occupy) opts only a fresh ready 2–6-seat lobby with native Ecaz and classic/Ixian/Tleilaxu/CHOAM/Richese opponents (optional native Moritani). Advanced uses distinct selected ecaz/ix/choam decks; Basic uses the exact ecaz deck with classic/optional Moritani opponents. Ordinary33/47/35 cards retain real original offers/HMS/Auditor/Face Dancers and Richese cache. Explicit --ecaz-treachery independently adds the three physical variant cards, making36/50/38 (Advanced only). Basic combined battles require an even Ecaz force count; the preserved publisher odd-force casualty-rounding conflict rejects before any lead choice. Native Richese ordinary and marker-only pools compose with selected lead plans; original own mixed No-Field dialing, whole-plan disclosure and optional overlays remain guarded.' + '\nLeader-skills retains existing classic and Basic native entries and adds native Basic Richese/CHOAM. Advanced Ixians, Tleilaxu, CHOAM and/or Richese plus classic rosters use distinct required family decks and all fourteen skills, with original cache, Face Dancers, Auditor exclusion and typed aftermath. Foreign revival grants no new skill. Separate non-Harkonnen Advanced Moritani uses the ecaz deck and original skill-first assassination preview. Native Ecaz supports its five ordinary discs, original Ambassador/Duke custody and ecaz deck with classic opponents in Basic/Advanced; Advanced Harkonnen retains its existing Duke capture exclusion. Normal Mentat questions use a uniform private card-show step in supported Leader Skills games. Banker-income additionally supports native Richese and Ecaz, never ordinary seller/allowed Emperor income or a bank grant as a payer cost. Basic auction recipients remain unchanged. Public activation, exhausted-cache counts, native Ixian Technology on Richese lots, own mixed No-Field, captured replacement, shared-Duke assignment, combined Occupy skills and other pending module/rulings remain guarded.', '\nStronghold-factions additionally admits standalone Advanced Ecaz OR Moritani with classic opponents and the exact ecaz deck, six Stronghold Cards with optional unused Tech Tokens at 3–6 seats. Original setup and actual end-Mentat claims remain. Ecaz holds shared-control cards and only the actual selected holder-plan benefits. Native Moritani retains original assassination with printed bounty and one private Mentat replacement; Harkonnen is excluded there. An E3 pair, E1/E2/E3 mixtures and other modules remain separate.' +