Add pets for tiers 1-3.

This commit is contained in:
Greyson Parrelli
2026-07-23 00:10:17 -04:00
parent 612a4e6227
commit 8d43bbf61e
14 changed files with 1915 additions and 406 deletions
+21 -17
View File
@@ -1,6 +1,6 @@
// Mirrors of the Go view types (internal/game/view.go).
export type Suit = 'sun' | 'moon' | 'star' | 'leaf'
export type Suit = 'red' | 'blue' | 'yellow'
export type CardKind = 'pet' | 'food'
export type Phase = 'lobby' | 'shop' | 'cleanup' | 'arrange' | 'battle' | 'gameover'
@@ -8,11 +8,14 @@ export interface Card {
id: string
kind: CardKind
name: string
tier: number
tier?: number
power?: number
suit?: Suit
effect?: string
effects?: unknown[]
effectText?: string
food?: string
perk?: boolean
temporary?: boolean
}
export interface PlayerView {
@@ -34,24 +37,25 @@ export interface PendingTrade {
options: [Card, Card]
}
export interface BattleUnit {
card: Card
foods: Card[] | null
bonus: number
damage: number
}
export interface BattleEvent {
type: 'clash'
units: number[]
damage: number[]
died: boolean[]
type: 'reveal' | 'summon' | 'rock' | 'clash' | 'eat'
seat?: number
target?: number
card?: Card
// clash
damage?: number[]
died?: boolean[]
// rock
roll?: number
damageAfter?: number
targetDied?: boolean
// eat
bonus?: number
}
export interface BattleResult {
round: number
lineups: BattleUnit[][]
wastedFoods: (Card[] | null)[]
stackSizes: number[]
events: BattleEvent[] | null
winnerSeat: number
trophies: number
@@ -76,7 +80,7 @@ export interface GameView {
export type ClientMessage =
| { type: 'buy'; row: number }
| { type: 'discard'; cards: string[] }
| { type: 'sell'; cards: string[] }
| { type: 'trade'; cards: string[] }
| { type: 'tradeChoose'; pick: number }
| { type: 'pass' }