Fuller banter pools, and the blow's own names decide who dealt pain and who killed
Damage lands on the defender's step, so a trigger keyed to the actor never credited the attacker: across thirty three-bot games the kill line fired zero times and the dealt-pain line five, against 328 takes. Both now read the attackResolved, punched, and died events themselves. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
be96dd6047
commit
c4a555f8df
@@ -617,15 +617,17 @@ function banterTrigger(
|
||||
if (actor === seat) {
|
||||
if (e.type === "treasurePickedUp" && e.player === seat) return "grabGold";
|
||||
if (e.type === "treasureDropped" && e.player === seat && e.onHomeOf != null) return "deliverGold";
|
||||
if (e.type === "damaged" && e.player !== seat) return "dealPain";
|
||||
if (e.type === "died" && e.killedBy === seat && e.player !== seat) return "kill";
|
||||
if (e.type === "creatureCreated" && e.controller === seat) return "summon";
|
||||
if (e.type === "wallCreated" && e.caster === seat) return "buildWall";
|
||||
if (e.type === "trapSprung" && e.player === seat) return "springTrap";
|
||||
}
|
||||
// A counter-teleport escape resolves during the ATTACKER's step, and a
|
||||
// last-standing win can land on the victim's turn: self-referential
|
||||
// triggers hold whoever acted.
|
||||
// Blows land on the DEFENDER's step (their pass or counter resolves the
|
||||
// stack), a counter-teleport escape resolves during the attacker's, and
|
||||
// a last-standing win can land on the victim's turn: these triggers
|
||||
// read the event's own names, not whoever acted.
|
||||
if (e.type === "attackResolved" && e.attacker === seat && e.defender !== seat && (e.damageDealt as number) > 0) return "dealPain";
|
||||
if (e.type === "punched" && e.attacker === seat) return "dealPain";
|
||||
if (e.type === "died" && e.killedBy === seat && e.player !== seat) return "kill";
|
||||
if (e.type === "teleported" && e.player === seat && e.by === seat) return "escape";
|
||||
if (e.type === "gameWon" && e.player === seat) return "win";
|
||||
if (e.type === "damaged" && e.player === seat) return "takePain";
|
||||
|
||||
Reference in New Issue
Block a user