Compose Advanced Tleilaxu skills and original foreign ghola lifecycle
This commit is contained in:
1 parent
d327d1943b
commit
d86d2088e6
18 files changed
+678
-72
No files matched your search
+39
-5
@@ -1,4 +1,4 @@
|
||||
import { nativeExpansionLeaderSkillsProfile, ordinaryLeaderSkillModeSupported } from './leader-skill-profile';
|
||||
import { advancedNativeLeaderSkillsProfile, nativeExpansionLeaderSkillsProfile, ordinaryLeaderSkillModeSupported } from './leader-skill-profile';
|
||||
import { bribeTimingBlock, maximumBribe, type BribeOptions } from './bribe-options';
|
||||
import { quoteSpicePlacement, stormExposesTerritory, stormSectorAfter, wormConsumesForces } from './disaster-rules';
|
||||
import { isStormCardDistance, type StormCardComponent } from './storm-cards';
|
||||
@@ -7694,10 +7694,44 @@ function leaderSkillsIntegrity(g: Game) {
|
||||
g.players.find((p) => p.id === assignment.owner)?.leaders.some((leader) => leader.id === assignment.leader && !leader.dead)),
|
||||
'A saved Leader Skill cannot remain assigned to a dead or missing leader.');
|
||||
skillRule(() => validateLeaderSkills(g.leaderSkills!, g.players));
|
||||
requireRule(
|
||||
!g.players.some((p) => p.leaders.some((l) => l.gholaBy)),
|
||||
'Leader Skills with foreign gholas await their custody integration.',
|
||||
);
|
||||
let foreignProfileAllowed: boolean | undefined;
|
||||
for (const owner of g.players)
|
||||
for (const leader of owner.leaders) {
|
||||
if (leader.gholaBy === undefined) continue;
|
||||
const controller = g.players.find((p) => p.id === leader.gholaBy);
|
||||
requireRule(
|
||||
(foreignProfileAllowed ??= advancedNativeLeaderSkillsProfile(g)) &&
|
||||
controller?.faction === 'tleilaxu' &&
|
||||
controller.id !== owner.id &&
|
||||
leader.faction === owner.faction &&
|
||||
(leader.controller === undefined || leader.controller === owner.id) &&
|
||||
!isAuditorLeader(leader) && leader.id !== DUKE_VIDAL_ID,
|
||||
'Leader Skills foreign gholas require original native Advanced Tleilaxu custody.',
|
||||
);
|
||||
const concealed = leader.concealed;
|
||||
if (leader.capturedBy !== undefined || concealed) {
|
||||
const captor = g.players.find((p) => p.id === (leader.capturedBy ?? concealed?.captor));
|
||||
// Native capture overrides, but does not erase, the Tleilaxu loan.
|
||||
// Revealing its actual plan removes secrecy; execution keeps the snapshot.
|
||||
requireRule(
|
||||
captor?.faction === 'harkonnen' &&
|
||||
(leader.capturedBy === captor.id
|
||||
? !leader.dead
|
||||
: leader.capturedBy === undefined && leader.dead) &&
|
||||
((concealed?.captor === captor.id &&
|
||||
concealed.controller === controller.id && concealed.dead === false) ||
|
||||
(leader.capturedBy === captor.id && g.battle?.revealed === true &&
|
||||
g.battle.plans[captor.id]?.leader === leader.id)),
|
||||
'A foreign ghola capture must retain its native Harkonnen captor and Tleilaxu return custody.',
|
||||
);
|
||||
}
|
||||
let copies = 0;
|
||||
for (const seat of g.players)
|
||||
for (const disc of seat.leaders)
|
||||
if (disc.id === leader.id) copies++;
|
||||
requireRule(copies === 1,
|
||||
'A foreign ghola must remain one physical disc in its original leader roster.');
|
||||
}
|
||||
if (g.battle?.leaderSkillHidden)
|
||||
requireRule(
|
||||
Object.entries(g.battle.leaderSkillHidden).every(
|
||||
|
||||
@@ -89,8 +89,8 @@ export function advancedNativeLeaderSkillsProfile(game: LeaderSkillProfile): boo
|
||||
const player = players[i];
|
||||
// Six seats at most: check prior seats without allocating per-rule quote sets.
|
||||
for (let j = 0; j < i; j++) if (players[j].faction === player.faction) return false;
|
||||
if (player.faction === 'ixians' || player.faction === 'choam') {
|
||||
if (!game.expansions.includes(player.faction === 'ixians' ? 'ix' : 'choam')) return false;
|
||||
if (player.faction === 'ixians' || player.faction === 'tleilaxu' || player.faction === 'choam') {
|
||||
if (!game.expansions.includes(player.faction === 'choam' ? 'choam' : 'ix')) return false;
|
||||
native = true;
|
||||
} else {
|
||||
let classic = false;
|
||||
|
||||
@@ -91,10 +91,15 @@ export function validateLeaderSkills(
|
||||
const originalOwners = new Set<string>();
|
||||
for (const assignment of state.assignments) {
|
||||
const owner = roster.find((p) => p.id === assignment.owner);
|
||||
const leader = owner?.leaders.find((disc) => disc.id === assignment.leader);
|
||||
ensure(
|
||||
owner?.leaders.some((leader) => leader.id === assignment.leader),
|
||||
leader,
|
||||
'A skill must remain attached to its original leader.',
|
||||
);
|
||||
ensure(
|
||||
leader.gholaBy === undefined,
|
||||
'A foreign ghola cannot carry a Leader Skill.',
|
||||
);
|
||||
ensure(
|
||||
!assignedLeaders.has(assignment.leader),
|
||||
'A leader cannot hold two skills.',
|
||||
@@ -126,7 +131,7 @@ export function validateLeaderSkills(
|
||||
offer.leader === null ||
|
||||
roster
|
||||
.find((p) => p.id === owner)
|
||||
?.leaders.some((l) => l.id === offer.leader),
|
||||
?.leaders.some((l) => l.id === offer.leader && l.gholaBy === undefined),
|
||||
'Invalid revival skill leader.',
|
||||
);
|
||||
cards.push(...offer.cards);
|
||||
|
||||
+13
-11
@@ -4458,20 +4458,22 @@ export const RULE_TOPICS: RuleTopic[] = [
|
||||
category: 'Advanced & expansions',
|
||||
coverage: 'Partial',
|
||||
developmentStage: 'Prototyped',
|
||||
summary: 'The Basic development combination preserves the full skill deck and private Face Dancers.',
|
||||
summary: 'Native Basic and bounded Advanced Tleilaxu retain fourteen skills, Face Dancers and original foreign-ghola ownership without a new skill.',
|
||||
steps: [
|
||||
'Basic Tleilaxu with base opponents uses all fourteen skills. Starting cards precede private skill choices and the native three Face Dancers. Other optional modules, Advanced foreign gholas and public starts remain unavailable.',
|
||||
'Basic Tleilaxu with base opponents retains its existing full skill deck. Fresh Advanced native Tleilaxu, optionally Ixians and/or CHOAM, plus classic tables use distinct required Ix/CHOAM decks and all fourteen skills. Starting choices, actual traitors and three native Face Dancers remain. Unrelated overlays and public starts stay gated.',
|
||||
'Rihani draws become unrevealed Face Dancers. Keep one new card by revealing and returning one unrevealed old card; the other new card returns privately. Only the owner sees the inspection history and new identities.',
|
||||
'A successful own-leader revival preserves the optional skill draw after revival responses. Winner skill and card cleanup precede Face Dance; a killed skilled leader returns its card once. Zoal copies the opposing disc value for unmodified Smuggler collection.',
|
||||
'Actual foreign revival pays its native half price and fills the controlled living pool only up to five, but never draws or assigns a skill. The original faction keeps the sole physical disc; Tleilaxu controls it. A native trainer can supply its normal role bonus to that different selected disc, not its trained lower bonus. Own revival still offers its eligible optional draw. Auditor and the Ecaz-only Duke/Ghola exclusions remain.',
|
||||
'Foreign death and negotiated original-owner buyback use original handlers. Harkonnen capture temporarily overrides Tleilaxu control without moving the disc into another physical roster. Its actual plan reveal removes the concealed snapshot; surviving use returns the ghola to Tleilaxu. Execution preserves the original dead-ghola return path. No skill attaches to a foreign disc.',
|
||||
'Other unfinished skill effects retain their stated limits. This development combination does not certify the full expansion or every optional-module interaction.',
|
||||
],
|
||||
related: ['leader-skills', 'tleilaxu-face-dancers', 'implementation-checklist'],
|
||||
checklist: [
|
||||
{ area: 'Implementation', status: 'Partial', detail: 'Full setup, response-driven own revival, Rihani Face Dancer exchanges, later death custody and copied Zoal collection are connected; remaining skill effects stay explicit.', evidence: ['game/leader-skill-profile.ts', 'game/rihani-decipherer.ts', 'game/engine.ts'] },
|
||||
{ area: 'Implementation', status: 'Partial', detail: 'Full native setup, own revival, Advanced foreign control/no-new-skill, original Harkonnen capture/revelation/use-return/execution, Rihani exchanges, death custody and copied Zoal collection compose. Other modules and pending skill rulings stay explicit.', evidence: ['game/leader-skill-profile.ts', 'game/leader-skills.ts', 'game/rihani-decipherer.ts', 'game/engine.ts'] },
|
||||
{ area: 'Player controls', status: 'Implemented', detail: 'Private offers, Face Dancer keep/reveal inspectors and saved own-revival choices reuse the table controls.', evidence: ['components/rihani-decipherer.tsx', 'components/leader-skills.tsx'] },
|
||||
{ area: 'AI', status: 'Partial', detail: 'Existing profiles follow their private legal offers. Full strategy and strength tuning wait for feature completion.', evidence: ['game/bots.ts', 'tools/faction-games.ts'] },
|
||||
{ area: 'Documentation', status: 'Implemented', detail: 'Entry, source contracts and remaining boundaries are recorded.', evidence: ['docs/TLEILAXU_LEADER_SKILLS.md'] },
|
||||
{ area: 'Verification', status: 'Partial', detail: 'Genuine setup, physical custody, revival response chains, private exchange, Face Dance aftermath, Zoal and authenticated recovery have focused checks; full acceptance remains open.', evidence: ['tests/tleilaxu-skills-integration.test.ts', 'tests/tleilaxu-skills-revival.test.ts', 'tests/tleilaxu-skills-recovery.test.ts', 'tests/rihani-face-dancers.test.ts'] },
|
||||
{ area: 'Verification', status: 'Partial', detail: 'Original native role checks remain. Advanced own/foreign revival, normal versus lower bonus, death/buyback, Face Dance and captured use/execution cases pass with all fourteen cards and current JSON. Fourteen genuine games finish6,620 accepted actions/no rejection/171 JSON continuations, including62 battles and two foreign revivals. Actual manual/four-policy revival and captive revelation/return/execution smoke pass; complete module acceptance remains open.', evidence: ['tests/advanced-tleilaxu-skills.test.ts','tests/tleilaxu-skills-integration.test.ts','tests/tleilaxu-skills-revival.test.ts','tests/rihani-face-dancers.test.ts'] },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -4505,7 +4507,7 @@ export const RULE_TOPICS: RuleTopic[] = [
|
||||
summary: 'The fresh banker-income preview gains one deferred spice once per phase when another player makes one qualifying payment to the Spice Bank, then collects automatically at native Mentat.',
|
||||
searchText: 'Spice Banker normal income bank payment four spice phase deferred front shield original owner death capture Mentat',
|
||||
steps: [
|
||||
'This separate fresh local profile admits unique two-to-six classic factions in Basic or Advanced with the base deck, supported Basic Ixian/Tleilaxu/CHOAM/Moritani skill rosters with their single required deck, or bounded Advanced native Ixians and/or CHOAM plus classic seats with distinct required family decks. All fourteen skills and native setup remain. Foreign gholas, unrelated native families, Nexus, Homeworld, Discovery, Tech Tokens and other overlays stay guarded; no public start or old-game retrofit.',
|
||||
'This separate fresh local profile admits unique two-to-six classic factions in Basic or Advanced with the base deck, supported Basic Ixian/Tleilaxu/CHOAM/Moritani skill rosters with their single required deck, or bounded Advanced native Ixians, Tleilaxu and/or CHOAM plus classic seats with distinct required family decks. All fourteen skills and native setup remain. Native foreign revival never assigns a skill. Unrelated native families, Nexus, Homeworld, Discovery, Tech Tokens and other overlays stay guarded; no public start or old-game retrofit.',
|
||||
'The printed normal band is mandatory once per phase: when another player makes a payment of at least four spice to the Spice Bank, gain one spice and place it in front of the shield. It is an additional bank grant, not a reduction of the payer’s payment or another player’s income.',
|
||||
'Only an actual completed positive bank payment qualifies. A payment to a player, zero/free/waived cost, self-payment, invalid declaration or unfinished possible payment supplies no income. Several smaller payments do not combine to reach four.',
|
||||
'Use the original actual bank portion after recipient and counter settlement, not a quoted fee or guessed wallet change. Paid auctions, funded shipments, paid revival and eligible resolved battle support keep their native continuation once. Canceled Emperor, Guild or Tleilaxu revival income can leave a real bank payment. Tleilaxu self-revival pays the Bank; other-player revival normally pays Tleilaxu. Its separate free-revival bank award is not payer debit: three paid plus that one reward never becomes four paid to the Bank. A stopped shipment supplies no payment.',
|
||||
@@ -4520,7 +4522,7 @@ export const RULE_TOPICS: RuleTopic[] = [
|
||||
],
|
||||
related: ['leader-skills', 'battle', 'bidding', 'revival', 'implementation-checklist'],
|
||||
checklist: [
|
||||
{ area: 'Implementation', status: 'Implemented', detail: 'Actual final bank payer legs, native skill eligibility, one physical Banker phase grant and original-owner automatic Mentat collection connect through fresh classic, supported Basic native and bounded Advanced Ixian/CHOAM skill profiles. Tleilaxu self-revival and canceled revival income preserve actual payer cost separately from the free award.', evidence: ['game/engine.ts', 'game/spice-banker-income.ts'] },
|
||||
{ area: 'Implementation', status: 'Implemented', detail: 'Actual final bank payer legs, native skill eligibility, one physical Banker phase grant and original-owner automatic Mentat collection connect through fresh classic, supported Basic native and bounded Advanced Ixian/Tleilaxu/CHOAM skill profiles. Tleilaxu self-revival and canceled revival income preserve actual payer cost separately from the free award.', evidence: ['game/engine.ts', 'game/spice-banker-income.ts'] },
|
||||
{ area: 'Player controls', status: 'Implemented', detail: 'A full-width read-only public front-shield notice explains unavailable spice and automatic collection; genuine original payment and final Collection controls work at 390px through refresh. No new income action or confirmation.', evidence: ['components/spice-banker-income.tsx', 'components/game-table.tsx'] },
|
||||
{ area: 'AI', status: 'Partial', detail: 'All four minimal legal policies preserve identical available-budget actions with deferred income present or absent. Original wallets exclude front-shield currency; strategy/calibration remain deferred.', evidence: ['game/bots.ts', 'game/spice-banker.ts'] },
|
||||
{ area: 'Documentation', status: 'Partial', detail: 'Printed gain/threshold/one-payment/phase/collection, original payment separation, provisional earned custody and per-payer split composition are explicit without universal rulings.', evidence: ['docs/LEADER_SKILLS_RULES.md', 'docs/SPICE_BANKER_RUNTIME.md', 'docs/RULE_DECISIONS.md'] },
|
||||
@@ -4536,7 +4538,7 @@ export const RULE_TOPICS: RuleTopic[] = [
|
||||
summary: 'Fourteen physical skills, private assignment choices, five battle disciplines, Planetologist movement/battle effects and Suk Graduate rescues, Mentat/Bureaucrat scoring and Bureaucrat payment redirection, Sandmaster victory spice, Rihani exchanges, optional Smuggler shipping and unmodified battle collection, Sandmaster route and worm-ride collection, sealed Spice Banker battle spending and optional Diplomat base-defense copying in development tables. Other effects and combined-module acceptance remain unfinished.',
|
||||
steps: [
|
||||
'A development profile also connects Basic Moritani with base opponents and no other optional modules. It keeps the full deck and existing unfinished-effect boundaries; see Moritani with Leader Skills.',
|
||||
'Fresh Advanced development profiles now compose native Ixians and/or CHOAM with classic opponents, two through six unique seats and their distinct required Ix/CHOAM decks. All fourteen skills and original native starting choices remain. Auditor never receives a skill. Typed cyborg support flows through Suk rescue before native substitution; CHOAM keeps original payer/income and Smuggler-before-Collection order. Existing Basic entries are unchanged; foreign gholas, captured replacement, Advanced Atreides Suk/KH and unrelated overlays remain guarded.',
|
||||
'Fresh Advanced development profiles compose native Ixians, Tleilaxu and/or CHOAM with classic opponents, two through six unique seats and distinct required Ix/CHOAM decks. All fourteen skills and original native starting choices remain. Auditor never receives a skill. Typed cyborg support flows through Suk rescue before native substitution; CHOAM keeps original payer/income and Smuggler-before-Collection order. Foreign-ghola revival gives control without a new skill. Basic entries are unchanged; captured replacement, Advanced Atreides Suk/KH and unrelated overlays remain guarded.',
|
||||
'With this optional module, starting Treachery Cards are dealt after prediction and before skill assignment. Every faction privately receives two skills, keeps one, returns the other to the shuffled deck, and assigns its chosen card to an eligible leader. Skill and leader become public before traitor selection.',
|
||||
'Before Battle Plans, leave the skilled leader face up to keep its normal effect, or move it behind the shield for possible use. A face-up leader cannot be selected for the plan. Concealing it while choosing another leader gives neither effect. A leader that must be used because no alternative remains moves behind the shield automatically.',
|
||||
'Warmaster, Master of Assassins, Swordmaster of Ginaz, Killer Medic and Prana-Bindu Adept are connected. They give another leader +1 for the matching physical card role, or the surviving assigned leader +3. These bonuses do not stack to +4. They change battle strength, not the printed disc value or leader bounty.',
|
||||
@@ -4549,12 +4551,12 @@ export const RULE_TOPICS: RuleTopic[] = [
|
||||
'A surviving skilled Sandmaster victory automatically adds three board spice to an existing pile in the battle territory, even with no surviving forces. Multiple piles await a placement ruling.',
|
||||
'Rihani normally inspects two random Traitor Deck cards privately, then reshuffles them. A surviving selected native Rihani also offers a separate optional draw of two. Decide before seeing them: once drawn, keep one new card and publicly reveal and return one unused old card. The other new card returns secretly. A captured Rihani grants only the optional exchange. Your private history records both samples; a card just called to win is already used.',
|
||||
'Smuggler can include one free accompanying force in an off-planet shipment into an empty territory. Select the entire physical total; three forces cost the ordinary price of two. The checkbox can decline this optional benefit. Guild rounding follows the free force. Richese may instead ship one separate free reserve force beside its owned No-Field into an empty territory; the marker retains its ordinary price and hidden value. Existing forces, including advisors, prevent the bonus; ordinary Fremen on-planet reinforcement has no bonus.',
|
||||
'Spice Banker can commit one through three own spice with its Battle Plan, separate from force support. Only the surviving selected skilled disc gains that strength. The amount stays private until authorized plan inspection or public reveal. It is paid on win or loss, including leader death, except a sole traitor-call winner spends nothing. Normal deferred income connects only in the separate fresh classic, supported Basic native or bounded Advanced Ixian/CHOAM banker-income profile; ordinary/default starts are unchanged.',
|
||||
'Spice Banker can commit one through three own spice with its Battle Plan, separate from force support. Only the surviving selected skilled disc gains that strength. The amount stays private until authorized plan inspection or public reveal. It is paid on win or loss, including leader death, except a sole traitor-call winner spends nothing. Normal deferred income connects only in the separate fresh classic, supported Basic native or bounded Advanced Ixian/Tleilaxu/CHOAM banker-income profile; ordinary/default starts are unchanged.',
|
||||
'Diplomat may use one committed Worthless card as the opponent’s base Shield or Snooper if you played no defense. After both plans reveal, choose the card or decline before traitor decisions. A native Diplomat may protect its own selected trained leader this way; a captive grants no upper effect. The chosen Worthless must be discarded afterward, even if you win. A surviving trained leader that loses a supported battle may retreat selected undialed physical counters up to its printed/copied disc strength into one empty adjacent non-stronghold territory before ordinary loser losses; modified defenses remain unfinished.',
|
||||
'Mentat has an explicit private developer preview for naming a specific weapon before posture and faction powers, including supported Basic Ixian/Tleilaxu/CHOAM/Moritani and bounded Advanced Ixian/CHOAM skill starts. The target privately shows the named held card or chooses another held card. Weirding Way is a nameable default weapon; Chemistry is not. The card stays held and need not enter a Battle Plan. Every answer uses the same private response step; ordinary activation awaits the user’s timing-design decision. Empty hands skip without an answer. Private history is an observation, not a later hand guarantee.',
|
||||
'Bureaucrat may redirect two spice from a payment of at least five between two other players, once per phase. The payer still pays in full; the recipient receives two less. Declining keeps the use available for a later payment. Paid bribes qualify when transferred, with the remaining share still unavailable until Mentat Pause. Ordinary auctions, Guild income, Richese sales and actual paid Tleilaxu revival income in the Basic Tleilaxu skill profile have connected payment paths. A separate free-revival award is not part of the paid price and stays with Tleilaxu. Split funding, gifts, other payment families and combined modules remain unfinished.',
|
||||
'Mentat has an explicit private developer preview for naming a specific weapon before posture and faction powers, including supported Basic Ixian/Tleilaxu/CHOAM/Moritani and bounded Advanced Ixian/Tleilaxu/CHOAM skill starts. The target privately shows the named held card or chooses another held card. Weirding Way is a nameable default weapon; Chemistry is not. The card stays held and need not enter a Battle Plan. Every answer uses the same private response step; ordinary activation awaits the user’s timing-design decision. Empty hands skip without an answer. Private history is an observation, not a later hand guarantee.',
|
||||
'Bureaucrat may redirect two spice from a payment of at least five between two other players, once per phase. The payer still pays in full; the recipient receives two less. Declining keeps the use available for a later payment. Paid bribes qualify when transferred, with the remaining share still unavailable until Mentat Pause. Ordinary auctions, Guild income, Richese sales and actual paid Tleilaxu revival income in supported Basic or bounded Advanced native skill profiles have connected payment paths. A separate free-revival award is not part of the paid price and stays with Tleilaxu. Split funding, gifts, other payment families and combined modules remain unfinished.',
|
||||
'Smuggler records the existing battle-territory spice when plans reveal, capped by the selected leader’s unmodified strength. If that leader survives, it collects automatically even when losing or no forces remain. A captive pays its controller. Pending spice cannot fund the plan. Collection precedes Sandmaster’s addition; a drained pile receives none. Modified strength, multiple positive piles and combined modules remain guarded. Older saved battles keep their original behavior.',
|
||||
'Other special Sandmaster relocation remains missing. Normal Banker income has a separate fresh classic, supported Basic native or bounded Advanced Ixian/CHOAM source-to-Mentat preview with provisional original-earned-faction custody, not general activation. Diplomat retreat uses a documented conservative outcome-order interpretation in standalone Leader Skills play. Foreign gholas, Face Dancers and combined modules remain unfinished. This development prototype does not enable public module starts.',
|
||||
'Other special Sandmaster relocation remains missing. Normal Banker income has a separate fresh classic, supported Basic native or bounded Advanced Ixian/Tleilaxu/CHOAM source-to-Mentat preview with provisional original-earned-faction custody, not general activation. Diplomat retreat uses a documented conservative outcome-order interpretation in standalone Leader Skills play. Native Advanced foreign gholas and Face Dancers follow the bounded Tleilaxu contract; other combined modules remain unfinished. This development prototype does not enable public module starts.',
|
||||
...LEADER_SKILL_CARDS.map(card => `${card.name}. Normal: ${card.normal.join(' ')} Skilled battle: ${card.battle.join(' ')}`),
|
||||
],
|
||||
related: ['spice-banker-income', 'choam-leader-skills', 'ixian-leader-skills', 'tleilaxu-leader-skills', 'moritani-leader-skills', 'setup','choam-modules','implementation-checklist'],
|
||||
|
||||
Reference in new issue
Block a user