Prototype Leader Skills setup, battle disciplines and capture
Connect all fourteen physical skills and private setup to five card-role battle modifiers, public posture, Harkonnen skilled capture, death return and optional own-leader revival through controls, legal AI and persisted room actions. Nine skill effects and combined-mode/publication acceptance remain unfinished. Captured replacement entitlement and foreign ghola integration stay guarded. Fresh publisher/designer research supports skilled-capture publicity through its unique known physical card; this is recorded as a component inference. Independent review found and fixed Voice/must-use-leader and invalid saved assignment/offer cases. A pre-existing Discovery privacy assertion confused card ID prefixes; the corrected deterministic physical-pair scenario was independently reviewed. The first broad run was 4410/4411; corrected final verification passes types/lint, all 4411 offline tests, build and 43 HTTP tests. Final durations: check 149741ms, build 6659ms, integration 28274ms. Source fingerprint: aef655ac1ebc0eb2f64294e13d3d27337167312cf8ab17568a166ee9c39f6a85. Private final report: 20260913-leader-skills/checks-final/report.json. Three seeded prototype games completed with no rejected bot candidates. Browser setup/card inspection/refresh passed. Another user-reported power outage stopped the server; backup and necessary restart restored the same private seat. All 292 games at restart and their original application records remain unchanged; 33 isolated HTTP-test rooms bring the current total to 325. No database reset. Efficiency: one shared setup/lifecycle implementation supports five connected role effects; selective existing agents handled catalog/UI/tests/research and independent reviews. One repeated broad check was required by the reproduced ID-prefix assertion failure. Aggregate goal counter rose from 65529766 to 67313673 through this checkpoint (1783907), including inherited context and coordination; this is not a billing or savings estimate. Full goal remains active.
This commit is contained in:
1 parent
369371671f
commit
6e6fecc9d4
28 files changed
+4196
-38
No files matched your search
@@ -1375,6 +1375,7 @@ function policyActions(g: GameView): Action[] {
|
||||
if (g.decision) {
|
||||
if (g.decision.player !== me.id) return [];
|
||||
const d = g.decision;
|
||||
if (d.kind === 'leaderSkillVisibility' || d.kind === 'leaderSkillRevival') return [];
|
||||
if (d.kind === 'choamAudit')
|
||||
return [{ type: 'decision', event: d.event, audit: true }];
|
||||
if (d.kind === 'choamAuditPayment') {
|
||||
@@ -3387,6 +3388,19 @@ function standaloneGholaAction(g: GameView, ordinary: Action[]): Action | null {
|
||||
|
||||
/** Obligations apply across policy branches, including choosing to move first. */
|
||||
export function botActions(g: GameView): Action[] {
|
||||
const skill = g.leaderSkills;
|
||||
if (skill && !g.truthtrance && !g.response && !g.phaseOpening) {
|
||||
if (skill.battleChoice)
|
||||
return [{type:'leaderSkillVisibility',event:skill.battleChoice.event,hide:true}];
|
||||
if (skill.offer && ((g.status === 'setup' && g.setupStage === 'leaderSkills') || (g.decision?.kind === 'leaderSkillRevival' && g.decision.player === g.me))) {
|
||||
const offer = skill.offer;
|
||||
if (!offer.cards.length) return [{type:'leaderSkill',event:offer.event,mode:'draw'}];
|
||||
const direct = ['warmaster','master-of-assassins','swordmaster-of-ginaz','killer-medic','prana-bindu-adept'];
|
||||
const chosen = offer.cards.find((card) => direct.includes(card)) ?? offer.cards[0];
|
||||
const leader = offer.leader ?? [...skill.eligibleLeaders].sort((a,b) => (g.allLeaders.find((l) => l.id === b.id)?.strength ?? 0) - (g.allLeaders.find((l) => l.id === a.id)?.strength ?? 0))[0]?.id;
|
||||
if (leader) return [{type:'leaderSkill',event:offer.event,skill:chosen,leader}];
|
||||
}
|
||||
}
|
||||
if (g.nexusTraitors?.pending)
|
||||
return g.truthtrance
|
||||
? policyActions({ ...g, decision: null })
|
||||
|
||||
Reference in new issue
Block a user