# 502 bad gateway **Repository Path**: roxy3203325037/game ## Basic Information - **Project Name**: 502 bad gateway - **Description**: :):):):):) - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-04-08 - **Last Updated**: 2026-01-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Group name:502 Bad Gateway #### Group members Leo1 周逸朗 id :2023905934 Leo2 吴思远 id :2023905932 Alex 牛远兮 id :2023903990 Bonjour! # 🕯️ Dungeon Descent - Roguelike RPG Adventure **Dungeon Descent** is a dark fantasy roguelike RPG where players traverse procedurally generated dungeons, engage in strategic turn-based combat, and survive increasing psychological pressure. The game blends character building, tactical decision-making, and unpredictable exploration in a perilous, immersive world. ## ✅ Project Feature Checklist – *DungeonRPG: A Text-Based Adventure* ### 📦 General Submission Requirements | Requirement | Status | Notes | |-----------------------------------|--------|-----------------------------------------------------------------------| | Gitee repository created | ✅ | Repository with source files and documentation is uploaded | | Team member names in README | ✅ | Listed clearly at the top of the file | | Complete source code | ✅ | Includes `.cpp` and `.hh` files | | Documentation of classes | ✅ | Class descriptions and method summaries provided | | Game description + win condition | ✅ | Outlined in README | | Compilation & execution guide | ✅ | Instructions using `CMake + g++` | --- ### 🎮 Core Game Requirements | Feature | Status | Implementation Details | |-------------------------------------------------------|--------|-----------------------------------------------------------------------------------------| | 4+ interconnected rooms | ✅ | Map generates 8–14 connected rooms, all traversable | | 3+ distinct enemy types | ✅ | Includes BruteEnemy, ArbalestEnemy, CultistMage, Cultist | | 4+ stat-boosting collectible items | ✅ | Accessories like LuckyCharm, RustyRing, BloodCharm, etc. | | Clear win condition | ✅ | Player chooses: explore 90% rooms or defeat all enemies | | Menu-based user interface | ✅ | `move`, `attack`, `take`, `inventory`, `equip`, `unequip`, `stats`, etc. | | Dynamic memory usage (new/delete) | ✅ | Properly allocates and frees enemies/items with `ownedByRoom` logic | | Game loop until win or player death | ✅ | Fully implemented | --- ### ✨ Bonus Features Implemented | Bonus Feature | Status | Description | |-----------------------------------------------------|--------|-------------------------------------------------------------------------------------------| | Random loot system | ✅ | Items and scrolls drop randomly from enemies and in rooms | | Enemy subclasses with unique traits | ✅ | Brute = tanky, Mage = fragile but strong, Arbalest = ranged | | Special room effects | ✅ | Includes `Shop` and `Treasure` rooms | | Skill system | ✅ | Player learns skills, uses them in battle (with cooldown) | | Scroll system | ✅ | Scrolls drop randomly, teaching new skills | | Torchlight system | ✅ | Light level affects stress, loot, and combat | | Accessory system | ✅ | Player equips up to 4 accessories | | Victory condition selection | ✅ | Choose “Explore” or “Combat” at game start | | Full map visibility + markers | ✅ | `P` = player, `?` = unexplored, `X` = visited, `S` = shop, `T` = treasure | | Namespace usage | ✅ | All classes and files organized under `DungeonRPG` namespace | | Detailed inline comments | ✅ | Core logic and complex methods explained where necessary | --- ## 📁 Project Structure include/ ├── Accessory.hh ├── Character.hh ├── DungeonGenerator.hh ├── DungeonMap.hh ├── Enemy.hh ├── GameManager.hh ├── ICharacter.hh ├── Item.hh ├── Player.hh ├── Room.hh └── Skill.hh sources/ ├── Accessory.cpp ├── Character.cpp ├── DungeonGenerator.cpp ├── DungeonMap.cpp ├── Enemy.cpp ├── GameManager.cpp ├── ICharacter.cpp ├── Item.cpp ├── main.cpp ├── Player.cpp ├── Room.cpp └── Skill.cpp - ICharacter: Base interface for all characters (HP, attack, defense, inventory). - Character: Implements core player logic, combat, stress, buffs, and accessories. - Player: Manages player-specific logic (gold, skills, inventory, combat growth). - Enemy: Base enemy behavior; derived types override unique actions. - Accessory: Special items that grant bonus stats (HP/ATK/DEF). - Item: General item logic (consumables, equipment, cloning, use behavior). - Skill / CharacterWithSkills: Skill system (active/passive effects, cooldowns, slots). - Room: Dungeon room logic (combat/shop/treasure handling, exploration state). - DungeonGenerator: Generates dungeon layout (up to 14 rooms). - DungeonMap: Displays dungeon with symbols (P, ?, X, $, *) and tracks player. - GameManager: Central controller; manages game loop, combat, and progression. --- ## 🎮 Game Features ### ⚔️ Core Combat Mechanics - **Attributes**: Every character has core stats—Health (HP), Attack, and Defense. - **Combat System**: Supports normal and skill-based attacks, temporary buffs/debuffs, crowd control, and environmental effects. - **Damage Handling**: Considers defense, stun states, skill modifiers, and randomness. - **Temporary Effects**: Includes shields, poison, marked states, and skill cooldowns. ### 🧠 Stress and Mental Breakdown - Characters accumulate **Stress** through combat, traps, and events. - High stress levels can trigger **Mental Breakdowns**, leading to erratic behavior, self-harm, debuffs, or rare bursts of power. - Stress management is crucial to long-term survival. ### 🎒 Inventory & Accessories - Items include **consumables**, **equipment**, **accessories**, and **scrolls**. - Accessories provide passive stat bonuses (e.g., +10 HP, +3 ATK, +2 DEF). - The inventory supports item use, equipping, and cloning (deep copy) for safe management. ### 🌀 Skill System - Characters may learn and equip up to **4 active skills**, each with unique effects and cooldowns. - Skill types: - **Attack**: e.g., *RapidShot* (double hit) - **Healing**: e.g., *HealWounds* - **Buff/Debuff**: e.g., *BuffArmor* - **Crowd Control**: e.g., *ShieldBash* (stun) - **Special**: e.g., *DarkPact* (sacrifice HP for immense power) - Skills interact dynamically with combat states, enabling tactical plays and combos. --- ## 🗺️ Dungeon Exploration ### 🔨 Procedural Dungeon Generation - Dungeons are created using `DungeonGenerator`, generating up to **14 interconnected rooms** with consistent size (5x5). - Room connectivity varies each playthrough, ensuring replayability. ### 🧭 Map Mechanics - `DungeonMap` tracks room exploration and renders the map with symbols: - `?` = Unexplored - `X` = Generic Room - `$` = Shop - `*` = Treasure - `P` = Player Position ### 🧩 Room Types - **Combat Room**: Contains enemies. Must be cleared before proceeding. - **Shop Room**: Allows players to buy predefined or static items. - **Treasure Room**: Triggers reward selection after events. - Room states include: *explored*, *cleared*, and *connected*. --- ## 🧟 Enemy System ### Enemy Classes - All enemies inherit from `Enemy` and override `interact()` for unique behaviors: - **BruteEnemy**: Performs powerful charge attacks after a delay. - **ArbalestEnemy**: Marks the player and fires precision shots. - **CultistMage**: Channels dark spells with delayed AoE effects and stress infliction. ### Attributes and Effects - Enemies have HP, Attack, Defense, and stun resistance. - Can apply status effects, trigger phase changes, or react to player skills. --- ## 👤 Player Character ### Growth and Progression - Managed by `Player` class. - Gains gold, equipment, and unlocks new skills (e.g., *DarkPact* unlocked after 3 wins). - Can equip accessories and skills for customized builds. ### Inventory and Economy - Earn and spend gold via shops and events. - Use `useItem()`, `addGold()`, and `equipAccessory()` to manage power and resources. --- ## 📜 Victory and Defeat Conditions ### Victory Conditions - Defeat the dungeon's **final boss room**. - Clear all rooms or meet special unlock criteria (e.g., collect three Sacred Relics). ### Defeat Conditions - Player HP reaches 0. - Mental breakdown causes irreversible damage (in hardcore mode). - Key event failure (e.g., failing to dispel a curse in a ritual room). --- ## 🧱 Expandability ### Architecture Overview - Modular OOP design using inheritance and interfaces: - `ICharacter`: Abstract base for all characters. - `CharacterWithSkills`: Adds skill functionality. - `Room`, `Item`, `Skill`, and `Enemy` can be extended freely. ### Suggestions for Expansion - Add new skill classes (e.g., area denial, healing over time). - Introduce elite enemy variants or minibosses. - Expand room types: trap rooms, event rooms, puzzles. - Implement saving/loading with serialization for persistent progress. - Support graphical rendering (e.g., SFML or SDL for map/combat). --- ## 🧾 Inspirations Dungeon Descent draws inspiration from: - **Darkest Dungeon** – Stress, turn-based combat, mental breakdown. - **Slay the Spire** – Deckbuilding-like skill selection. - **Traditional Roguelikes** – Procedural dungeons and permadeath. --- ## 🚧 Development Notes - All item and room memory handling uses smart or custom managed pointers. - Skills are designed to be pluggable via the `Skill` interface. - The system supports easy addition of new content (skills, enemies, accessories). --- For bugs, contributions, or design discussions, feel free to open an issue or pull request!