Initial pass at unicorn pack.
This commit is contained in:
+20
-1
@@ -1,7 +1,7 @@
|
||||
// Mirrors of the Go view types (internal/game/view.go).
|
||||
|
||||
export type Suit = 'red' | 'blue' | 'yellow'
|
||||
export type CardKind = 'pet' | 'food'
|
||||
export type CardKind = 'pet' | 'food' | 'ailment'
|
||||
export type Phase = 'lobby' | 'shop' | 'arrange' | 'battle' | 'gameover'
|
||||
|
||||
export interface Card {
|
||||
@@ -16,6 +16,7 @@ export interface Card {
|
||||
food?: string
|
||||
perk?: boolean
|
||||
temporary?: boolean
|
||||
ailment?: string // 'spooked' | 'exposed' (Unicorn pack; kind === 'ailment')
|
||||
}
|
||||
|
||||
export interface PlayerView {
|
||||
@@ -33,6 +34,8 @@ export interface PlayerView {
|
||||
firstBuyFree?: boolean // Manta Ray: next buy is free (self only)
|
||||
buysThisRound?: number // Blue-Ringed Octopus counter (self only)
|
||||
trumpets?: number // banked Trumpets for next battle (Bird of Paradise, self only)
|
||||
mana?: number // persistent Mana pool (Unicorn pack; public)
|
||||
shopPeek?: Card // Bigfoot's look at the top of the shop deck (self only)
|
||||
deck?: Card[]
|
||||
}
|
||||
|
||||
@@ -47,6 +50,16 @@ export interface PendingReveal {
|
||||
playerId: string
|
||||
source: string
|
||||
options?: string[] // eligible pet card ids (buyer only)
|
||||
apples?: number // fixed apple reward (Quetzalcoatl); 0 = revealed pet's power (Cockatoo)
|
||||
}
|
||||
|
||||
// Water of Youth (Unicorn pack): the buyer must sacrifice one of their pets to
|
||||
// upgrade into a next-tier card.
|
||||
export interface PendingSacrifice {
|
||||
playerId: string
|
||||
source: string
|
||||
tier: number
|
||||
options?: string[] // eligible pet card ids to sacrifice (buyer only)
|
||||
}
|
||||
|
||||
export interface BattleEvent {
|
||||
@@ -66,6 +79,9 @@ export interface BattleEvent {
|
||||
| 'release'
|
||||
| 'trumpet' // a side gains (+) or spends/loses (-) Trumpets (Golden pack)
|
||||
| 'prevent' // a Cone Snail shaves damage off a hit (Golden pack)
|
||||
| 'mana' // a side gains (+) or spends (-) Mana (Unicorn pack)
|
||||
| 'ailment' // a pet gains Ailment cards (Unicorn pack)
|
||||
| 'bounce' // a pet is sent to the bottom of its deck (Unicorn: Loveland Frogman)
|
||||
seat?: number
|
||||
target?: number
|
||||
card?: Card
|
||||
@@ -131,6 +147,7 @@ export interface GameView {
|
||||
players: PlayerView[]
|
||||
pending?: PendingTrade
|
||||
pendingReveal?: PendingReveal
|
||||
pendingSacrifice?: PendingSacrifice
|
||||
battle?: BattleResult
|
||||
winnerSeat: number
|
||||
log?: LogEntry[]
|
||||
@@ -148,6 +165,8 @@ export type ClientMessage =
|
||||
| { type: 'trade'; cards: string[] }
|
||||
| { type: 'tradeChoose'; pick: number }
|
||||
| { type: 'revealChoose'; card: string }
|
||||
| { type: 'sacrificeChoose'; card: string }
|
||||
| { type: 'peek' }
|
||||
| { type: 'pass' }
|
||||
| { type: 'arrange'; order: string[] }
|
||||
| { type: 'ready' }
|
||||
|
||||
Reference in New Issue
Block a user