Support whole AND/OR future ground moves

This commit is contained in:
Quintine committed 2026-10-26 16:09:35 +11:00
1 parent 0e3c155876
commit d524642b65
20 files changed
+1803 -63

No files matched your search

+12 -2
View File
@@ -1,3 +1,4 @@
import { liveMovementExpressionPromises } from './movement-expression-promises';
import { discoveryBotActions } from './discovery-options';
import { normalAuctionHandBlock } from './normal-auction';
import { atreidesFullPlanAction } from './atreides-full-plan';
@@ -1352,6 +1353,10 @@ function policyActions(g: GameView): Action[] {
const answer = answers.find(answer => answer === 'yes') ?? answers[0];
return answer ? [{ type: 'truthAnswer', answer }] : [];
}
if (w.question.kind === 'movementExpression') {
const answer = g.truthMovementExpressionAnswers?.[0];
return answer ? [{ type: 'truthAnswer', answer }] : [];
}
if (w.question.kind === 'movement') {
const answer = g.truthMovementAnswers?.find(answer => answer !== 'unknown') ?? g.truthMovementAnswers?.[0];
return answer ? [{ type: 'truthAnswer', answer }] : [];
@@ -2768,7 +2773,8 @@ function policyActions(g: GameView): Action[] {
];
}
if(d.kind==='advisor'&&!d.ambassadorEvent&&(liveShipmentPromises(g.shipmentPromises??[],me.id,g.turn).length ||
liveMovementPromises(g.movementPromises??[],me.id,g.turn).some(promise=>promise.answer)))
(liveMovementPromises(g.movementPromises??[],me.id,g.turn).some(promise=>promise.answer) ||
liveMovementExpressionPromises(g.movementExpressionPromises??[],me.id,g.turn).some(promise=>promise.answer))))
return [{type:'decision',accept:false}];
if (d.kind === 'advisor' && (g.spiritualAdvisorChoices??g.guildAmbassadorAdvisorChoices)) {
const choices = (g.spiritualAdvisorChoices??g.guildAmbassadorAdvisorChoices)!.choices.filter(
@@ -2787,7 +2793,8 @@ function policyActions(g: GameView): Action[] {
];
}
if (d.kind === 'advisor' && (liveShipmentPromises(g.shipmentPromises ?? [], me.id, g.turn).length ||
liveMovementPromises(g.movementPromises ?? [], me.id, g.turn).some(promise => promise.answer)))
(liveMovementPromises(g.movementPromises ?? [], me.id, g.turn).some(promise => promise.answer) ||
liveMovementExpressionPromises(g.movementExpressionPromises ?? [], me.id, g.turn).some(promise => promise.answer))))
// A waiting promise may need these reserves. Declining is the minimal
// legal policy until optional accompaniment strategy is implemented.
return [{ type: 'decision', accept: false }];
@@ -4215,6 +4222,9 @@ export function botActions(g: GameView): Action[] {
if (g.homeworldTupileBlocked) return [];
if (g.decision?.kind === 'homeworldTupileCleanup' || g.homeworldTupileCleanup)
return tupileCleanupActions(g);
if (g.movementExpressionPromiseGuide && g.status === 'playing' &&
!g.roomControl?.paused && !g.roomControl?.closed && !g.automaticContinuationPending)
return [g.movementExpressionPromiseGuide.action];
if (g.movementPromisePolicy && g.status === 'playing' &&
!g.roomControl?.paused && !g.roomControl?.closed && !g.automaticContinuationPending)
return g.movementPromisePolicy;