# OOP_Final_project **Repository Path**: fusion_3/oop_-final_project ## Basic Information - **Project Name**: OOP_Final_project - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-17 - **Last Updated**: 2025-10-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # League of Chang'an League of Chang'an is a data-driven, turn-based battle game built with Python and the Tk/ttk GUI toolkit. It highlights object-oriented design, JSON-authored content, and a compact desktop interface for hero selection, combat, and equipment management. --- ## Project Layout ``` OOP_-_final_project/ ├── docs/ │ ├── architecture.png ← architecture overview (Interface ⇄ Core ⇄ Data) │ └── readme.md ← this document ├── league-of-changan/ │ ├── __init__.py │ ├── core/ ← combat logic (Champion, Battle, Item, status effects) │ ├── data/ ← JSON definitions (champions.json, items.json) │ ├── interface/ ← Tk/ttk GUI (GameApp, Menu, assets) │ └── main.py ← application entry point ├── Project_1_League_Of_ChangAn.pdf ├── Project_2_GT_-_OOP_Management.pdf └── Project_3_Ali_Bao_Bao.pdf ``` - **Core** encapsulates all combat mechanics (damage flow, skills, items, rewards). - **Interface** renders the GUI, hero cards, battle log, and menu buttons. - **Data** hosts every tunable value so new heroes/items require only JSON edits. --- ## Installation > Tested on Windows 11 with Python 3.11. Any platform with Python 3.9+ and Tk support should work. 1. **Open the provided repository** The instructor already placed the project in your workspace. Open the root folder (`OOP_-_final_project/`) in VS Code or a terminal. 2. **Install dependencies (if any)** The game relies on the Python standard library only. If a `requirements.txt` is present, install it with: ```powershell pip install -r requirements.txt ``` --- ## Running the Game Preferred approach: open `league-of-changan/src/main.py` in VS Code and run it directly (F5 or the Run button). Alternatively, from the repository root: ```powershell python -m league-of-changan.main ``` ### In-Game Highlights - **Start Game**: opens the hero selection grid (portraits, stats, descriptions, select button). - **Battle Log**: shows turn-by-turn details (incoming damage, blocked, shield absorption, gold gain). - **Action Buttons**: choose basic attacks or hero-specific skills each turn. - **Equipment Shop**: spend battle gold to boost attack, defense, or heal. - **Settings**: adjust difficulty; modifiers alter enemy health and attack. --- ## Data-Driven Content - **Heroes** live in `league-of-changan/data/champions.json`. Add a new entry with `name`, `description`, `health`, `attack`, `defense`, and `skills`. Drop a matching portrait (e.g., `hero_.png`) into `league-of-changan/interface/assets/`. - **Items** live in `league-of-changan/data/items.json`. Define `item_type`, numerical bonuses, and price to extend the equipment shop. - **Assets** are PNG sprites stored in `league-of-changan/interface/assets/`. --- ## Architecture Overview See `docs/architecture.png` for the simplified Boundary–Logic–Model diagram: - **Interface layer** (`gui.py`, `menu.py`) drives user events and display. - **Core layer** (`battle.py`, `champion.py`, `item.py`) performs damage, skill, and reward calculations. - **Data layer** (JSON files) supplies all hero and item parameters. --- ## Future Extensions - Activate skill cooldowns using the JSON placeholder field. - Implement the `status_effects.py` hooks for buffs and debuffs with durations. - Add save/load services for long-term progression. - Enhance the GUI with animations, sound, or alternative themes via `ui_manager.py`. --- ## Team Fusion - Li Yufei - Zhou Tianrui - Jia Qili - Yu Siyuan