
A classic turn-based game
A classic turn-based game
Prompt
Task: Create a fully functional, playable "Minimum Viable Product" (MVP) of a hex-based tactical strategy game in a single code block. The output must be a single HTML5 file containing all necessary CSS and JavaScript. No external dependencies or images are allowed (use Canvas API or SVG for graphics). Core Requirements to Include in the Single Code Output: Hexagonal Engine: A procedurally generated 10x10 hex grid. At least 3 terrain types with different defense/move costs (e.g., Plains, Forest, Mountain). Interactive selection: click a unit to show move range, click a target to move or attack. Combat & Stats System: Implement 2 factions (Blue vs Red) with at least 2 unit types each (e.g., Soldier, Archer). Units must have: HP, Movement Points, Attack Power, and Accuracy. Elevation Mechanic: Implement a "Height" value (0-2) for each hex. Attacking from higher ground grants a +20% hit chance. Combat must be resolved and logged in an on-screen UI. Turn-Based Logic: "End Turn" button that toggles between Player 1 and a basic AI (or Player 2). Reset of Movement Points at the start of each turn. Victory condition: Eliminate all enemy units. Aether Cycle (The Twist): A counter that tracks turns. Every 2 turns, the "Aether Tide" changes (High/Low). High Tide: Archers get +1 Range. Low Tide: Melee units get +2 Attack. Visuals: Units represented by colored shapes/icons. A sidebar showing the selected unit's stats and the current Aether phase. Technical Constraint: Do not explain the code. Do not apologize for limitations. Write the full, production-ready HTML/JS logic immediately. Go.
A system prompt was added to support web rendering
Response not available