Fix json error.

This commit is contained in:
Greyson Parrelli
2026-07-23 00:32:57 -04:00
parent 10ac457e2e
commit 1c457c602a
+6 -4
View File
@@ -82,8 +82,10 @@ type BattleEvent struct {
// "eat": Seat's pet ate apples; Bonus is its new total.
// "heal": Seat's pet healed; DamageAfter is its new damage total.
Type string `json:"type"`
Seat int `json:"seat,omitempty"`
Target int `json:"target,omitempty"`
// Seat/Target must NOT be omitempty: 0 is a valid seat (the first
// player) and dropping it makes the client read sides[undefined].
Seat int `json:"seat"`
Target int `json:"target"`
Card *Card `json:"card,omitempty"`
Count int `json:"count,omitempty"`
// clash: per-seat damage totals / deaths after the exchange.
@@ -91,10 +93,10 @@ type BattleEvent struct {
Died []bool `json:"died,omitempty"`
// rock: dice total rolled; rock/strip/steal: target pet's fate.
Roll int `json:"roll"`
DamageAfter int `json:"damageAfter,omitempty"`
DamageAfter int `json:"damageAfter"`
TargetDied bool `json:"targetDied,omitempty"`
// 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