generated from nhcarrigan/template
feat: initial elysium idle game prototype
Sets up the full monorepo with pnpm workspaces. Includes shared types package, Hono API with Discord OAuth/JWT auth, Prisma v6 + MongoDB Atlas, and React + Vite frontend with game loop, five tabs, and Discord-linked save/load.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import type { GameState, Player, PrestigeData } from "@elysium/types";
|
||||
import { DEFAULT_ADVENTURERS } from "./adventurers.js";
|
||||
import { DEFAULT_BOSSES } from "./bosses.js";
|
||||
import { DEFAULT_QUESTS } from "./quests.js";
|
||||
import { DEFAULT_UPGRADES } from "./upgrades.js";
|
||||
|
||||
export const INITIAL_PRESTIGE: PrestigeData = {
|
||||
count: 0,
|
||||
runestones: 0,
|
||||
productionMultiplier: 1,
|
||||
purchasedUpgradeIds: [],
|
||||
};
|
||||
|
||||
export const INITIAL_GAME_STATE = (player: Player, characterName: string): GameState => ({
|
||||
player: {
|
||||
...player,
|
||||
characterName,
|
||||
totalGoldEarned: 0,
|
||||
totalClicks: 0,
|
||||
},
|
||||
resources: {
|
||||
gold: 0,
|
||||
essence: 0,
|
||||
crystals: 0,
|
||||
runestones: 0,
|
||||
},
|
||||
adventurers: structuredClone(DEFAULT_ADVENTURERS),
|
||||
upgrades: structuredClone(DEFAULT_UPGRADES),
|
||||
quests: structuredClone(DEFAULT_QUESTS),
|
||||
bosses: structuredClone(DEFAULT_BOSSES),
|
||||
prestige: INITIAL_PRESTIGE,
|
||||
baseClickPower: 1,
|
||||
lastTickAt: Date.now(),
|
||||
});
|
||||
Reference in New Issue
Block a user