big version with draft order and weather cards

This commit is contained in:
2026-04-08 17:46:42 -04:00
parent 4034ca55cf
commit a99a1f32e3
8 changed files with 966 additions and 59 deletions

View File

@@ -22,6 +22,12 @@ export type SetupState = {
seedInputs: string[];
paletteOrder: number[];
shuffleTurnOrder: boolean;
initiativeMode: "fixed" | "bid";
biddingOrderRule: "rotating" | "lowest_growth_income";
weatherDraftEnabled: boolean;
winCondition: "rounds" | "top_leaves";
maxRounds: number;
topLeafTarget: number;
};
export type Player = {
@@ -34,6 +40,7 @@ export type Player = {
growthPoints: number;
bankedPoints: number;
bonusPoints: number;
lifetimeGrowthIncome: number;
passed: boolean;
};
@@ -43,6 +50,12 @@ export type GameConfig = {
playerCount: number;
startingNodesPerPlayer: number;
playerPaletteOrder: number[];
initiativeMode: SetupState["initiativeMode"];
biddingOrderRule: SetupState["biddingOrderRule"];
weatherDraftEnabled: boolean;
winCondition: SetupState["winCondition"];
maxRounds: number;
topLeafTarget: number;
};
export type NodeState = {
@@ -149,10 +162,10 @@ export type RoundSummary = {
};
export type ScoreSnapshot = {
totalScore: number;
roundScore: number;
currentExposure: number;
growthPoints: number;
bankedPoints: number;
lifetimeGrowthIncome: number;
};
export type ColumnLeader = {
@@ -166,6 +179,39 @@ export type RandomEffects = {
diseaseChance: number;
};
export type GamePhase = "initiative" | "turn" | "round_end" | "game_over";
export type WeatherCardId =
| "leaf_surge"
| "branching_season"
| "west_light"
| "east_light"
| "high_noon"
| "edge_bloom"
| "wide_reach"
| "tall_reward";
export type WeatherCardDefinition = {
id: WeatherCardId;
title: string;
description: string;
};
export type InitiativeDraftState = {
biddingOrder: PlayerId[];
biddingIndex: number;
seatAssignments: Array<PlayerId | null>;
seatBonuses: number[];
};
export type WeatherDraftState = {
playerOrder: PlayerId[];
draftIndex: number;
row: WeatherCardId[];
drafted: WeatherCardId[];
banned: WeatherCardId[];
};
export type GameState = {
config: GameConfig;
players: Player[];
@@ -173,10 +219,16 @@ export type GameState = {
edges: Edge[];
round: number;
activePlayerId: PlayerId;
turnOrder: PlayerId[];
phase: GamePhase | "weather";
turnMoves: TurnMove[];
selectedSource: NodeKey | null;
availableTargets: GrowTarget[];
animation: RoundAnimation | null;
initiativeAnchorPlayerId: PlayerId;
initiativeDraft: InitiativeDraftState | null;
weatherDraft: WeatherDraftState | null;
activeRoundEffects: WeatherCardId[];
randomEffects: RandomEffects;
gameOver: boolean;
history: string[];