Fix json error.

This commit is contained in:
Greyson Parrelli
2026-07-23 00:32:57 -04:00
parent 10ac457e2e
commit 1c457c602a
+9 -7
View File
@@ -81,20 +81,22 @@ type BattleEvent struct {
// "steal": Seat's pet stole Count apples from Target's pet (Wolverine). // "steal": Seat's pet stole Count apples from Target's pet (Wolverine).
// "eat": Seat's pet ate apples; Bonus is its new total. // "eat": Seat's pet ate apples; Bonus is its new total.
// "heal": Seat's pet healed; DamageAfter is its new damage total. // "heal": Seat's pet healed; DamageAfter is its new damage total.
Type string `json:"type"` Type string `json:"type"`
Seat int `json:"seat,omitempty"` // Seat/Target must NOT be omitempty: 0 is a valid seat (the first
Target int `json:"target,omitempty"` // player) and dropping it makes the client read sides[undefined].
Card *Card `json:"card,omitempty"` Seat int `json:"seat"`
Count int `json:"count,omitempty"` Target int `json:"target"`
Card *Card `json:"card,omitempty"`
Count int `json:"count,omitempty"`
// clash: per-seat damage totals / deaths after the exchange. // clash: per-seat damage totals / deaths after the exchange.
Damage []int `json:"damage,omitempty"` Damage []int `json:"damage,omitempty"`
Died []bool `json:"died,omitempty"` Died []bool `json:"died,omitempty"`
// rock: dice total rolled; rock/strip/steal: target pet's fate. // rock: dice total rolled; rock/strip/steal: target pet's fate.
Roll int `json:"roll"` Roll int `json:"roll"`
DamageAfter int `json:"damageAfter,omitempty"` DamageAfter int `json:"damageAfter"`
TargetDied bool `json:"targetDied,omitempty"` TargetDied bool `json:"targetDied,omitempty"`
// eat: the pet's power bonus after eating. // eat: the pet's power bonus after eating.
Bonus int `json:"bonus,omitempty"` Bonus int `json:"bonus"`
} }
// BattleResult is the full, public record of one round's battle. Only what // BattleResult is the full, public record of one round's battle. Only what