Connect Spice Banker sealed battle spending and saved settlement
Prototype one through three own spice as a separate sealed battle commitment. Reserve funds alongside actual force support, add strength only for the surviving skilled leader, and settle once through existing versioned writes. Apply the documented card/core-rule interpretation: payment survives leader death or loss, except for the sole successful traitor caller. Keep printed disc strength and bounty unchanged. Normal income awaits its deferred-custody ruling; combined modules remain gated. Validation: 54 focused tests; typecheck, lint, 4490 offline tests, production build and 43 HTTP tests passed. Independent rules, privacy, persistence and UI review completed. SQLite tests cover reserved-spice diversion, concurrent settlement, traitor waiver and legacy plans. Browser exercised a three-spice commitment, pending refresh, actual +3 strength and payment, and restored private cards and the next decision. Two genuine four-profile Basic/Advanced samples completed without rejected candidates but did not use Banker spending. Following another reported outage, the server remained healthy. Preserved all 461 opening rooms and original seat/recovery rows (495 rooms after QA/HTTP). SQLite integrity and foreign keys passed. A fresh online backup captured all 495 rooms, and browser refresh restored the QA seat. No restart or reset was needed. Verified source tree: 208bf9324ab994b5e59ed50d78998b4dbf8810b3b6799b1a577ef3b84479335f
This commit is contained in:
1 parent
9381ef140d
commit
1380271bb6
22 files changed
+1166
-25
No files matched your search
@@ -24,7 +24,7 @@ export type BattleLeaderSkill = {
|
||||
};
|
||||
|
||||
export type AppliedLeaderSkill = {
|
||||
skill: DirectLeaderSkillId | 'planetologist' | 'mentat';
|
||||
skill: DirectLeaderSkillId | 'planetologist' | 'mentat' | 'spice-banker';
|
||||
amount: 1 | 2 | 3;
|
||||
mode: 'normal' | 'skilled';
|
||||
};
|
||||
@@ -165,9 +165,13 @@ export function leaderSkillBattleBonus(input: {
|
||||
weapon: Card | undefined;
|
||||
defense: Card | undefined;
|
||||
skilledLeaderSurvives: boolean;
|
||||
bankerSpice?: number;
|
||||
}): LeaderSkillBattleBonus {
|
||||
if (!input.selectedLeader) return { bonus: 0, applied: [] };
|
||||
const applied: AppliedLeaderSkill[] = [];
|
||||
if (input.bankerSpice && Number.isSafeInteger(input.bankerSpice) && input.bankerSpice >= 1 && input.bankerSpice <= 3 &&
|
||||
input.selectedLeader.kind === 'disc' && usesSurvivingSkilledLeader(input.assignments, 'spice-banker', input.selectedLeader.id, input.skilledLeaderSurvives))
|
||||
applied.push({ skill: 'spice-banker', amount: input.bankerSpice as 1 | 2 | 3, mode: 'skilled' });
|
||||
if (input.selectedLeader.kind === 'disc' && usesSurvivingSkilledLeader(
|
||||
input.assignments, 'mentat', input.selectedLeader.id, input.skilledLeaderSurvives,
|
||||
)) applied.push({ skill: 'mentat', amount: 2, mode: 'skilled' });
|
||||
|
||||
Reference in new issue
Block a user