plz make a hearthstone-like card game for me.
- User
plz make a hearthstone-like card game for me.
Assistant
Now let me build a complete Hearthstone-like card game. I'll create the types, game engine, card data, and UI components.
Let me fix the type errors. First, update the Minion interface:
Now let me create the UI components. First, the Card component:
The build succeeds. Let me fix an issue where opponent minions aren't clickable as attack targets:
The build succeeds cleanly. Let me now verify the overall game by quickly reviewing all the key files for correctness:
The game looks solid. Let me do a final build to confirm everything is clean:
The Hearthstone-like card game is ready! Here's what was built:
StoneForge - Card Game
Game Features
- Two-player combat: You vs an AI opponent, each with 30 HP heroes
- Mana system: Start with 0 mana, gain 1 crystal per turn (max 10). Mana refills each turn
- Card mechanics: 25 different cards across mana costs 1-7 with Taunt, Charge, Divine Shield, and Battlecry keywords
- Combat: Minions can attack once per turn (after summoning sickness, unless Charge). Taunt minions must be attacked first. Divine Shield absorbs one hit
- Hero Power: 2 mana — deal 1 damage + gain 1 Armor
- AI opponent: Plays cards (highest cost first), attacks strategically (clears board then goes face), uses hero power
- Fatigue system: Taking damage when your deck runs out
How to Play
- Play cards by clicking them in your hand (bottom)
- Attack by clicking one of your minions (green glow), then clicking an enemy minion (red glow) or the enemy hero
- Hero Power with the ⚡ button costs 2 mana
- End Turn passes to the AI opponent
- Win by reducing the opponent's health to 0!
File Structure
src/game/types.ts— Type definitions (Card, Minion, Hero, Player, GameState)src/game/data.ts— 25-card collection + deck buildersrc/game/engine.ts— All game logic including AIsrc/components/GameBoard.tsx— Main game UI with board, hands, combat flowsrc/components/CardView.tsx— Card rendering (hand & small mode)src/components/BoardUnit.tsx— Minion rendering on battlefieldsrc/components/HeroView.tsx— Hero portrait with health/mana
Files built:
index.html,src/game/types.ts,src/game/data.ts,src/game/engine.ts,src/components/CardView.tsx,src/components/BoardUnit.tsx,src/components/HeroView.tsx,src/components/GameBoard.tsx,src/App.tsx
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.