Rev 16: empathy mirrors the blows that resolve by their own hand

A believed ILLUSIONARY ATTACK, the goat's ram, and the hurled
treasure all deal their damage inside the attack's own resolution
hook — past the pipeline where the empathy mirror lived, so a linked
caster walked away unbloodied. One resolvedBlow helper now carries
the mirror to all three: "any attack done in ANY form" means these
too. Rev-gated: proactive empathy predates this, so stored ledgers
may hold unmirrored blows and replay them as struck.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Eric Wagoner
2026-08-17 13:37:37 -04:00
co-authored by Claude Fable 5
parent 89ba225fe5
commit 94ec714e35
4 changed files with 42 additions and 5 deletions
+17 -3
View File
@@ -1905,7 +1905,7 @@ const CARD_EFFECTS: Record<string, AttackEffect | NeutralEffect | CounterEffect>
if (d === 0) return;
ctx.attacker.position = { ...ctx.defender.position };
ctx.events.push({ type: "rammed", attacker: ctx.attacker.id, target: ctx.defender.id, distance: d });
applyDamage(ctx.state, ctx.events, ctx.defender, d, "goat ram", ctx.attacker.id, "physical");
resolvedBlow(ctx, d, "goat ram", "physical");
},
},
"heave-ho": {
@@ -1927,7 +1927,7 @@ const CARD_EFFECTS: Record<string, AttackEffect | NeutralEffect | CounterEffect>
ctx.attacker.carriedTreasureId = null;
ctx.events.push({ type: "treasureThrown", attacker: ctx.attacker.id, at: ctx.defender.position, distance: d });
if (!ctx.fullyStopped && ctx.defender.alive && d > 0) {
applyDamage(ctx.state, ctx.events, ctx.defender, d, "hurled treasure", ctx.attacker.id, "physical");
resolvedBlow(ctx, d, "hurled treasure", "physical");
}
ctx.events.push({
type: "treasureDropped", player: ctx.attacker.id, treasureId: t.id,
@@ -1998,7 +1998,7 @@ const CARD_EFFECTS: Record<string, AttackEffect | NeutralEffect | CounterEffect>
if (!believed) return;
const dmg = fx.baseDamage(ctx.stack.numberValue, ctx.stack.params ?? null);
if (dmg > 0) {
applyDamage(ctx.state, ctx.events, ctx.defender, dmg, `illusionary ${chosen}`, ctx.attacker.id);
resolvedBlow(ctx, dmg, `illusionary ${chosen}`);
}
},
},
@@ -4628,6 +4628,20 @@ function checkAmbushes(
}
}
/** Damage dealt inside an attack's own resolution hook still honors
* EMPATHY — "Any attack done in ANY form against you acts against both you
* and the caster" (rules rev 16; earlier ledgers resolved these blows
* unmirrored and replay so). */
function resolvedBlow(
ctx: ResolutionContext, dmg: number, source: string, kind?: "physical",
): void {
applyDamage(ctx.state, ctx.events, ctx.defender, dmg, source, ctx.attacker.id, kind);
if ((ctx.state.config.deckRev ?? 1) >= 16 && dmg > 0 && ctx.attacker.alive &&
sustainedOn(ctx.state, ctx.defender.id, "empathy").length > 0) {
applyDamage(ctx.state, ctx.events, ctx.attacker, dmg, `${source} (empathy)`, ctx.defender.id, kind);
}
}
/** A NUMBER card riding a counteraction sets the raised spell's duration. */
function counterDuration(state: GameState, player: PlayerState, numberInstanceIds?: string[]): number {
const num = (numberInstanceIds ?? [])