Compose classic Homeworld Skills and Discovery with physical custody

This commit is contained in:
Quintine committed 2026-10-06 18:07:41 +11:00
1 parent 4a3bd8fe90
commit e2dcebca35
24 files changed
+1426 -54

No files matched your search

+13 -1
View File
@@ -2697,7 +2697,19 @@ function policyActions(g: GameView): Action[] {
score: option.normal + option.elite * (level > 0 ? 2.5 : 1) +
(option.kept ? 1 + (option.kept.kind === 'elite' && level > 0 ? 0.5 : 0) : 0),
})).sort((a, b) => b.score - a.score)
.map(({ choice }) => ({ type: 'decision', event: d.event, choice }));
.map(({ choice }) => {
const option = d.options[choice];
const normal = option.normal - (option.kept?.kind === 'normal' ? 1 : 0);
const elite = option.elite - (option.kept?.kind === 'elite' ? 1 : 0);
if (!d.reserveHomes || normal + elite === 0) return { type: 'decision', event: d.event, choice };
const primary = d.reserveHomes.find(home => !home.secondary)!;
const destinations: Record<string, { normal: number; elite: number }> = {};
for (const home of d.reserveHomes) destinations[home.id] = {
normal: home.id === primary.id ? normal : 0,
elite: home.id === primary.id ? elite : 0,
};
return { type: 'decision', event: d.event, choice, destinations };
});
}
if (d.kind === 'rihani') {
if (d.stage === 'offer') return [{ type: 'decision', event: d.event, draw: true }];