No movement number is spent on a turn that ends at a grab
Room M9QJ, seq 190: a berserker played a 5 to charge a distant enemy, walked two squares, crossed a treasure, and the gold-underfoot rung — which outranks everything — ended its actions with six paid moves unwalked. Before spending a number, the march now checks whether any goal treasure lies within the free legs: if the turn is going to end at a grab, the number stays in hand. (Even a charging berserker stoops for loot; it just shouldn't pay toll first.) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138A8CjeQRpvzKxuMfz1Bqc
This commit is contained in:
co-authored by
Claude Fable 5
parent
63e8d4c545
commit
5310fbdca9
@@ -1396,7 +1396,15 @@ export function automatonCommand(
|
||||
(c.cardId === "blaster-wand" && view.wandCharges[c.instanceId] == null);
|
||||
});
|
||||
const spendable = wantsNumber ? numbers.slice(0, -1) : numbers;
|
||||
if (!view.turn.numberPlayedForMovement && path.distance > movesLeft) {
|
||||
// A treasure within free walking ends this turn at the grab (the
|
||||
// gold-underfoot rung outranks everything) — a number played first
|
||||
// would evaporate. Even a charging berserker stoops for loot.
|
||||
const goldWithinLegs = !self.carriedTreasureId &&
|
||||
(() => {
|
||||
const dHere = distancesFrom(view, [self.position], canUnlock);
|
||||
return [...treasureGoals(view)].some((k) => (dHere.get(k) ?? Infinity) <= movesLeft);
|
||||
})();
|
||||
if (!view.turn.numberPlayedForMovement && path.distance > movesLeft && !goldWithinLegs) {
|
||||
const helper = spendable.find(
|
||||
(n) => movesLeft + (cardDef(n.cardId).value ?? 0) >= path.distance,
|
||||
) ?? (path.distance > movesLeft + 2 ? spendable[spendable.length - 1] : undefined);
|
||||
|
||||
Reference in New Issue
Block a user