# 80 **Repository Path**: Echooooooooooooo/80 ## Basic Information - **Project Name**: 80 - **Description**: League of ChangAn - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-14 - **Last Updated**: 2025-11-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # League of ChangAn - English Version ## Game Introduction League of ChangAn is a turn-based card battle game set in Chang'an during China's Tang Dynasty, combining strategic depth with role-playing elements. Players take on the role of a Chang'an hero, constructing unique decks, summoning minions, casting spells, and using hero-exclusive skills to engage in tactical duels against opponents, ultimately defeating the enemy hero to claim victory. ## Core Features - **Immersive Tang Dynasty Worldview**: Set in the prosperous Chang'an of the Tang Dynasty, with character and card designs integrating historical and cultural elements of the era - **Diverse Hero System**: 15 distinct hero characters, each with unique skills and background stories - **Rich Card System**: Two main card types (Minion and Spell) with diverse keyword mechanics - **Strategic Gameplay**: Requires rational deck building, mana management, and tactical planning combined with hero skills - **Complete Game Mechanics**: Supports battle log recording, save/load functionality, and equipment enhancement - **Chinese-Style Visual Design**: Cards and interfaces incorporate Tang Dynasty aesthetics for a unique visual experience ## Heroes ### General Li - **Health**: 30 - **Skill Type**: Damage - **Skill Description**: Deal 2 damage to the enemy hero - **Background**: The great general defending Chang'an, skilled in frontal assaults - **Image Path**: images/li_jiangjun.png ### Healer Wang - **Health**: 25 - **Skill Type**: Heal - **Skill Description**: Restore 3 health to yourself - **Background**: A wandering physician capable of reviving the dead and healing the gravely ill - **Image Path**: images/wang_shenyi.png ### Strategist Zhao - **Health**: 28 - **Skill Type**: Summon - **Skill Description**: Summon a 1/2 Bodyguard - **Summoned Minion**: Bodyguard (Attack: 1, HP: 2) - **Background**: A wise and resourceful military advisor, master of troop formations - **Image Path**: images/zhao_junshi.png ### Lady Lin - **Health**: 26 - **Skill Type**: Damage - **Skill Description**: Deal 3 damage to an enemy minion - **Background**: Known in the Jianghu as "Jade-Faced Shura", her swordplay is as fast as lightning - **Image Path**: images/lin_nvxia.png ### Chief Qian - **Health**: 32 - **Skill Type**: Gain Armor - **Skill Description**: Gain 2 Armor - **Background**: Grandmaster of the Beggar's Sect, trained in an indestructible body - **Image Path**: images/qian_bangzhu.png ### Master Sun - **Health**: 27 - **Skill Type**: Summon - **Skill Description**: Summon a 0/3 Disciple with Taunt - **Summoned Minion**: Disciple (Attack: 0, HP: 3, Taunt: True) - **Background**: A Taoist priest from Qingcheng Mountain, able to summon spirit children for protection - **Image Path**: images/sun_daozhang.png ### Alchemist Zhou - **Health**: 24 - **Skill Type**: Buff - **Skill Description**: Give a friendly minion +1 Attack - **Buff Details**: Targets minion's Attack stat, +1 value - **Background**: A master of elixirs and potions, able to enhance allies' combat strength - **Image Path**: images/zhou_yaoshi.png ### Assassin Wu - **Health**: 23 - **Skill Type**: Damage - **Skill Description**: Deal 4 damage to the enemy hero, but take 1 damage yourself - **Background**: Elite assassin of a shadow organization, specializes in mutually destructive tactics - **Image Path**: images/wu_cike.png ### Instructor Zheng - **Health**: 29 - **Skill Type**: Summon - **Skill Description**: Summon a 2/1 Trainee - **Summoned Minion**: Trainee (Attack: 2, HP: 1) - **Background**: Head instructor of the capital's martial arts school, trains brave and fierce disciples - **Image Path**: images/zheng_jiaotou.png ### Merchant Feng - **Health**: 25 - **Skill Type**: Draw Card - **Skill Description**: Draw 1 card, but lose 1 Health - **Background**: Owner of Chang'an's largest trading house, always finds the resources he needs - **Image Path**: images/feng_zhanggui.png ### Censor Chen - **Health**: 28 - **Skill Type**: Silence - **Skill Description**: Set an enemy minion's Attack to 0 - **Background**: An imperial censor who handles impeachment, capable of silencing his opponents - **Image Path**: images/chen_yushi.png ### Artisan Chu - **Health**: 31 - **Skill Type**: Buff - **Skill Description**: Give a friendly minion +2 Health - **Buff Details**: Targets minion's HP stat, +2 value - **Background**: A legendary blacksmith who forges divine weapons, can strengthen allies' defense - **Image Path**: images/zhu_gongjiang.png ### Captain Wei - **Health**: 27 - **Skill Type**: AOE Damage - **Skill Description**: Deal 1 damage to all enemy minions - **Background**: Captain of the Canal Guild, skilled in area-of-effect attacks - **Image Path**: images/wei_duozhu.png ### Scholar Jiang - **Health**: 24 - **Skill Type**: Gain Action Point - **Skill Description**: Gain 1 extra Action Point this turn - **Background**: A learned scholar, master of strategy and resource efficiency - **Image Path**: images/jiang_shusheng.png ### Miss Shen - **Health**: 26 - **Skill Type**: Summon - **Skill Description**: Summon a 1/3 Spirit Fox with Elusive - **Summoned Minion**: Spirit Fox (Attack: 1, HP: 3, Elusive: True) - **Background**: A reclusive girl from the mountains, able to communicate with spirit beasts - **Image Path**: images/shen_guniang.png #### Key Notes: - **Stat Abbreviations**: HP (Health Points), AOE (Area of Effect) - **Special Keywords**: Taunt (Forces enemies to attack this minion first), Elusive (Hard to be targeted), Silence (Disables special abilities) - **Skill Types**: Damage, Heal, Summon, Gain Armor, Buff, Draw Card, Silence, AOE Damage, Gain Action Point - All heroes have unique background stories reflecting Tang Dynasty culture and martial arts themes ## Card System ### Card Types 1. **Minion Cards** - Core combat units with Attack and HP attributes - Some minions possess special abilities that influence battlefield dynamics - Representative cards: Changan Guard, Jianghu Swordsman, Heavy Cavalry 2. **Spell Cards** - Instant-effect skill cards that require mana to cast - Categorized into four types: Damage, Healing, Utility, and Area Effect - Representative cards: Fireball, Healing Touch, Meditation, Whirlwind Slash ### Card Keywords - **Taunt**: Forces enemies to attack this minion first - **Charge**: Allows immediate attack after summoning - **Elusive**: Reduces the chance of being hit by attacks - **Freeze**: Renders target unable to act for 1 turn - **Armor**: Absorbs incoming damage ## Game Rules ### Basic Flow 1. Both players select heroes and confirm decks (default decks include basic cards) 2. At the start of the game, each player receives 3 initial cards, with both heroes starting at their base HP (varies by hero) 3. Turns alternate, with mana automatically replenished at the start of each turn (increasing with turn number) 4. During a turn, players can perform the following actions: - Play minion or spell cards (costing corresponding mana) - Activate hero skills (some skills have cooldown turns) - Command minions to attack enemy units or hero - Equip items to enhance hero attributes 5. Click the "End Turn" button to switch to the opponent's turn ### Victory/Defeat Conditions - Win by reducing the enemy hero's HP to 0 - If a player runs out of cards to draw, they take 1 "fatigue damage" per turn until HP reaches 0 - Surrender or timeout results in defeat ## Installation Guide (Gitee Access) This guide is optimized for **Gitee repository access** and provides step-by-step instructions to install and run the game on your laptop (compatible with Windows/macOS/Linux). ### Prerequisites Ensure your device meets the following requirements before installation: - **Operating System**: Windows 10/11, macOS 10.15+, or Linux (Ubuntu 20.04+/Fedora 34+) - **Python Version**: Python 3.9 or higher (3.10+ recommended for stability) - **Pygame Version**: Pygame 2.0 or higher - **Hardware Requirements**: - CPU: Intel Core i3 / AMD Ryzen 3 or equivalent - RAM: 4GB or more - Storage: 500MB free disk space (for game files and dependencies) - Graphics: Integrated graphics with 256MB VRAM (dedicated GPU optional but recommended) - Screen Resolution: 1366×768 (minimum) / 1920×1080 (optimal) - **Gitee Access**: Ensure you can access Gitee (https://gitee.com/) and have Git installed (for cloning the repo). ### Step 1: Install Git (for Cloning Gitee Repository) If you don’t have Git installed, follow these steps: 1. Download Git from the official website: [git-scm.com/downloads](https://git-scm.com/downloads) 2. Install Git with default settings (check "Add Git to PATH" during Windows installation) 3. Verify Git installation: Open Terminal (macOS/Linux) or Command Prompt/PowerShell (Windows) and run: ```bash git --version ``` - You should see output like `git version 2.40.1` (version may vary). ### Step 2: Install Python 1. Download Python 3.9+ from [python.org/downloads](https://www.python.org/downloads/) 2. **Windows**: Run the installer, check "Add Python to PATH" (critical!), and follow default steps. 3. **macOS**: Run the .pkg installer. For macOS 12+, allow installation in System Preferences > Security & Privacy. 4. **Linux**: Most distributions include Python pre-installed. Verify with: ```bash python3 --version ``` - If missing, install via package manager: - Ubuntu/Debian: `sudo apt update && sudo apt install python3 python3-pip` - Fedora: `sudo dnf install python3 python3-pip` 5. Verify Python installation: ```bash # Windows python --version # macOS/Linux python3 --version ``` - Output should show `Python 3.9.x` or higher. ### Step 3: Clone the Gitee Repository 1. Get the Gitee repository URL from your teacher (e.g., `https://gitee.com/[username]/league-of-changan.git`) 2. Open Terminal/Command Prompt and navigate to a folder where you want to store the game (e.g., `Documents/Projects`): ```bash # Windows cd Documents\Projects # macOS/Linux cd ~/Documents/Projects ``` 3. Clone the repository using Git: ```bash git clone https://gitee.com/[username]/league-of-changan.git ``` - Replace `[username]/league-of-changan.git` with the actual Gitee repo URL provided by your teacher. 4. After cloning, navigate into the game folder: ```bash cd league-of-changan ``` ### Step 4: Install Pygame Dependency 1. Ensure you’re in the game’s root folder (where `game.py` is located) 2. Install Pygame via pip (Python’s package manager): ```bash # Windows pip install pygame # macOS/Linux pip3 install pygame ``` - If you get a permission error (macOS/Linux), add `--user`: ```bash pip3 install pygame --user ``` 3. Verify Pygame installation: ```bash # Windows python -m pygame.examples.aliens # macOS/Linux python3 -m pygame.examples.aliens ``` - A Pygame demo game (Aliens) will launch if installation is successful. ### Step 5: Run the Game 1. Stay in the game’s root folder (where `game.py` is located) 2. Launch the game with Python: ```bash # Windows python game.py # macOS/Linux python3 game.py ``` 3. The game window will open. If it doesn’t launch, check the troubleshooting section below. ### Troubleshooting (Gitee-Specific & Common Issues) | Issue | Solution | |-------|----------| | "fatal: could not read from remote repository" (Git clone error) | 1. Ensure the Gitee repo URL is correct. 2. Check your internet connection. 3. If the repo is private, log in to Gitee via Git (use `git config --global user.name "Your Gitee Username"` and `git config --global user.email "Your Gitee Email"`). | | "Python is not recognized as an internal or external command" | Reinstall Python and confirm "Add Python to PATH" was checked. On Windows, restart Command Prompt after installation. | | Pygame installation fails | Update pip first: `pip install --upgrade pip` (Windows) or `pip3 install --upgrade pip` (macOS/Linux), then retry installing Pygame. | | Game crashes on launch | 1. Ensure all game files (images/, alliance_cards.json, characters.json) are present (do not modify the repo’s folder structure). 2. Check that your screen resolution meets the minimum requirement. 3. Close other resource-heavy apps. | | Missing card/character data | Re-clone the repo to restore missing files: `git pull origin main` (or your repo’s default branch name). | ## Game Controls - Left-click to select and play cards from your hand - Click on battlefield minions to choose attack targets - Click the "Hero Skill" button to activate your hero’s exclusive ability - Click the "Equip Item" button to use backpack items - Click the "End Turn" button to pass your turn to the opponent - Click the "Save/Load" button to save or restore game progress - Battle logs (top/bottom of the screen) show real-time action records ## Data Structure ### Card Data (alliance_cards.json) ```json { "name": "Card Name", "type": "minion/spell", "cost": 2, "attack": 3, // Exclusive to minion cards "hp": 2, // Exclusive to minion cards "effect": "Deal 3 damage to target", // Exclusive to spell cards "target": "enemy_minion/hero/all", // Exclusive to spell cards "keywords": ["Charge"], "description": "Summon a swordsman to attack immediately" } ``` ### Character Data (characters.json) ```json { "name": "General Li", "health": 30, "skill": { "type": "damage", "value": 2, "cooldown": 1, "description": "Deal 2 damage directly to enemy hero" }, "background": "A famous general defending Chang'an", "image": "assets/characters/general_li.png" } ``` ## Notes for Gitee Users 1. **Repo Integrity**: Do not modify or delete any files in the cloned repository (especially `images/`, `save/`, `alliance_cards.json`, and `characters.json`)—this may break the game. 2. **Update the Game**: To get the latest version from Gitee, run `git pull origin main` (or your repo’s default branch) in the game folder. 3. **Save Files**: Game progress is stored in the `save/` folder (auto-created on first save). These files are not synced to Gitee—back them up locally if needed. 4. **Screen Resolution**: For the best experience, set your laptop to 1920×1080 resolution before launching. 5. **macOS Gatekeeper**: If the game is blocked, go to System Preferences > Security & Privacy > General and click "Open Anyway". ## Future Update Plans - Add 5+ new hero characters with exclusive card sets - Develop local multiplayer mode (2 players on one device) - Introduce Tang Dynasty-themed story campaigns - Add card crafting and disenchanting systems - Optimize UI/UX for better mobile compatibility (future) - Launch leaderboard and achievement systems