Pacts are honored; Swap Meet trades items, not card names (rev 26)
The pact fix: a clockwork no longer attacks a wizard it holds a BUDDY pact on — Eric watched one sign the pact and punch him the next turn. A pact is torn up for exactly one thing: a kill. And the post-attack pact is signed only by a wizard who wants OUT of the fight (hauling gold, bleeding, or with other enemies left) — a healthy duelist keeps its options, and mutual-pact stalemates stay out of bot wars. Swap Meet drops the 'name a card' prompt for a real trade picker: click the other trader, choose one of your carried items, then claim one of their displayed items. Rules rev 26 widens the engine's match from object-typed cards to every movable object (daggers, rocks, wands, stones); older games matched narrowly and replay so. 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
06faea0c79
commit
00517e08b1
@@ -2153,8 +2153,15 @@ const CARD_EFFECTS: Record<string, AttackEffect | NeutralEffect | CounterEffect>
|
||||
onResolved: (ctx) => {
|
||||
if (ctx.fullyStopped) return;
|
||||
const [mineId, theirsId] = (ctx.stack.params!.cardId ?? "").split(";");
|
||||
const mine = ctx.attacker.hand.findIndex((c) => c.cardId === mineId && cardDef(c.cardId).cardType === "object");
|
||||
const theirs = ctx.defender.hand.findIndex((c) => c.cardId === theirsId && cardDef(c.cardId).cardType === "object");
|
||||
// "Swap any two carried items": every movable object trades — daggers,
|
||||
// rocks, wands, stones (rules rev 26; earlier games matched only
|
||||
// object-typed cards and replay so).
|
||||
const tradable = (id: string) =>
|
||||
(ctx.state.config.deckRev ?? 1) >= 26
|
||||
? isMovableObject(id)
|
||||
: cardDef(id).cardType === "object";
|
||||
const mine = ctx.attacker.hand.findIndex((c) => c.cardId === mineId && tradable(c.cardId));
|
||||
const theirs = ctx.defender.hand.findIndex((c) => c.cardId === theirsId && tradable(c.cardId));
|
||||
if (mine === -1 || theirs === -1) return;
|
||||
const [a] = ctx.attacker.hand.splice(mine, 1);
|
||||
const [b] = ctx.defender.hand.splice(theirs, 1);
|
||||
|
||||
Reference in New Issue
Block a user