Integrate private Mentat questions with native Basic skill profiles

This commit is contained in:
Quintine committed 2026-10-02 19:36:07 +10:00
1 parent 3fc070fcfa
commit 589e1b9df2
16 files changed
+237 -45

No files matched your search

+5 -18
View File
@@ -1,6 +1,7 @@
import { treacheryDeck, type Card } from './cards';
import { richeseCards } from './richese-cards';
import { quoteTupileIntelligenceAnswer } from './tupile-intelligence-answer';
import {basicExpansionLeaderSkillsProfile,noOtherLeaderSkillModules,type LeaderSkillProfile} from './leader-skill-profile';
export class MentatQuestionError extends Error {}
export const MENTAT_EMPTY_HAND =
@@ -38,25 +39,11 @@ export type MentatView = {
};
history: Omit<MentatObservation, 'signature'>[];
};
export function mentatQuestionModeSupported(game: {
expansions: readonly string[];
homeworlds?: unknown;
nexusCards?: unknown;
discoveries?: unknown;
discoveryEnabled?: unknown;
strongholdCards?: unknown;
techTokens?: unknown;
}): boolean {
return (
export function mentatQuestionModeSupported(game: LeaderSkillProfile): boolean {
return noOtherLeaderSkillModules(game) &&
(!game.expansions.length ||
(game.expansions.length === 1 && game.expansions[0] === 'choam')) &&
!game.homeworlds &&
!game.nexusCards &&
!game.discoveries &&
!game.discoveryEnabled &&
!game.strongholdCards &&
!game.techTokens
);
(game.expansions.length === 1 && game.expansions[0] === 'choam') ||
basicExpansionLeaderSkillsProfile(game));
}
function inventory(expansions: readonly string[]): Card[] {
return [