# Group name **Repository Path**: zhao2596989641/group-name ## Basic Information - **Project Name**: Group name - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-04-08 - **Last Updated**: 2025-05-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: Cpp ## README # GROUP INFO ## GROUP NAME `๐Ÿ“˜ Group name` ## GROUP MEMBER - ๐ŸŒŸ member 1: `Peggy`๏ผˆๆฑช็ดซๅฆ๏ผ‰ - ๐ŸŒŸ member 2: `Mercury`๏ผˆ่ฐขๅฐ็‚œ๏ผ‰ - ๐ŸŒŸ member 3: `Landy`๏ผˆ่ตตไนฆ็‚œ๏ผ‰ # Class Hierarchy ## Project Structure - ๐Ÿ“ group-name/ - ๐Ÿ“‚ code(code_en, code_zh, code_en_crack)/ - ๐Ÿ“‚ include/ - ๐Ÿ“‚ character/ - ๐Ÿ“„ PageGuardian.hh - ๐Ÿ“„ ScrollMage.hh - ๐Ÿ“‚ enemy/ - ๐Ÿ“„ BookThief.hh - ๐Ÿ“„ ScrollGuard.hh - ๐Ÿ“„ LibraryElder.hh - ๐Ÿ“„ ScrollMaster.hh - ๐Ÿ“„ KnowledgeDragon.hh - ๐Ÿ“„ ICharacter.hh - ๐Ÿ“„ Character.hh - ๐Ÿ“„ Enemy.hh - ๐Ÿ“„ Item.hh - ๐Ÿ“„ Room.hh - ๐Ÿ“„ IO.hh - ๐Ÿ“„ Game.hh - ๐Ÿ“„ main.hh - ๐Ÿ“‚ sources/ - ๐Ÿ“œ Character.cpp - ๐Ÿ“œ Enemy.cpp - ๐Ÿ“œ Item.cpp - ๐Ÿ“œ Room.cpp - ๐Ÿ“œ IO.cpp - ๐Ÿ“œ Game.cpp - ๐Ÿ“œ main.cpp - ๐Ÿ“„ CMakeLists.txt - ๐Ÿ“„ README.md - ๐Ÿ“„ outline.md - ๐Ÿ“„ Classes_Documentation.md - ๐Ÿ“„ update_logs.md - ๐Ÿ“„ LICENSE --- ## ICharacter Class - **๐Ÿ” getName()**: Returns the character's name. - **โค๏ธ getHealth()**: Gets the current health value. - **๐Ÿ› ๏ธ setHealth(unsigned newHealth)**: Sets the character's health value. - **๐Ÿ—ก๏ธ takeDamage(unsigned damage)**: Applies damage to the character, reducing their health. ## Character Class - **๐ŸŒŸ Character(const std::string& name, unsigned level, unsigned health, unsigned attackPower, unsigned defense, unsigned speed)**: Constructor that initializes the character's attributes. - **๐ŸŒ addExp(unsigned addExp)**: Adds experience points to the character. - **๐Ÿ‘€ isAlive()**: Checks if the character is alive (health greater than 0). - **๐Ÿ”ฎ useSkill1(ICharacter& target)**: Uses Skill 1 on the target (must be implemented in derived classes). ## Enemy Class - **๐Ÿ‘พ Enemy(const std::string& name, unsigned health, unsigned attackPower, unsigned defense, unsigned speed, unsigned exp, unsigned shield = 0)**: Constructor that initializes the enemy's attributes. - **๐Ÿ›ก๏ธ takeDamage(unsigned damage)**: Handles damage to the enemy, considering shields and defense. - **๐Ÿ’ซ revive()**: Revives the enemy, restoring half of their maximum health. ## Room Class - **๐Ÿšช Room(const std::string& name, const std::string& description, bool hasSkillRestriction = false, double speedPenalty = 1.0)**: Constructor that initializes room information. - **๐Ÿ‘น addMonster(ICharacter* monster)**: Adds a monster to the room. - **๐Ÿงน removeDeadMonsters()**: Removes all defeated monsters from the room. ## Item Class - **๐ŸŽ Item(const std::string& name, const std::string& description, float effectValue, unsigned quantity = 1)**: Constructor that initializes item information. - **๐ŸŒŸ use(ICharacter* character)**: Defines how the item interacts with a character (must be implemented in derived classes). ## IO Class - **๐Ÿ‘” getPlayerName()**: Prompts the player to input their name and returns it. - **๐Ÿ“Š displayCharacterStatus(ICharacter* character)**: Displays detailed status information about the character. - **โณ waitForPlayer()**: Waits for the player to press Enter to continue. ## Game Class - **๐Ÿ”„ initialize()**: Initializes the game state, including creating the player, rooms, and enemies. - **๐Ÿ run()**: Starts the main game loop, managing turns, battles, and player actions. - **โš”๏ธ enterCombatMode()**: Enters combat mode, preparing the player and enemies for battle. - **๐ŸŽฎ handlePlayerTurn()**: Handles the player's actions during their turn. \* Regarding the detailed explanation of the class, please refer to the `Classes_Documentation.md` document. --- # Outline ## ๐Ÿ“˜ Void Library Text RPG A Strategy-Based Adventure Game --- ## ๐ŸŽฎ Game Overview **Genre**: Text-based RPG **Objective**: Restore order to the collapsing "Void Library" by defeating the Knowledge Dragon and overcoming environmental challenges. --- ## ๐Ÿ“š Story You find yourself in the **Void Library**, a transcendent sanctuary where bookshelves float in non-Euclidean space. Each book is a living entity of knowledge, rewriting itself endlessly. However, the libraryโ€™s indexing system has malfunctioned, threatening to fragment all knowledge into chaos. As the sole savior, you must explore rooms, collect magical items, defeat monsters, and restore balance to this sacred realm. --- ## ๐Ÿ† Winning Conditions 1. **Main Goal**: - Reach the **End Realm** and defeat the **Knowledge Dragon**. 2. **Hidden Challenge**: - Collect specific items from **Library Elder** and **Scroll Master** to unlock the **Easter Egg Room**, which grants powerful bonuses. - Use the **Resurrection Potion** (only available in the Easter Egg Room) to revive yourself if you perish in the final boss battle. --- ## ๐ŸŒŸ Key Features ### 1. Character System Choose between two protagonists: #### **A. Page Guardian** - **Base Stats**: High HP, moderate Attack, low Defense, average Speed (1 action per turn). - **Skills**: - **๐Ÿ“š Scroll Empowerment** (4-turn cooldown): Boosts attack power by 20% this turn. - **๐ŸŒ€ Mana Bind** (3-turn cooldown): Paralyzes enemies for 1 turn. #### **B. Scroll Mage** - **Base Stats**: Moderate HP, low Attack, average Defense, high Speed (2 actions per turn). - **Skills**: - **๐ŸŒช๏ธ Scroll Burst** (3-turn cooldown): Deals three consecutive attacks. - **๐ŸŒ Slow Curse** (5-turn cooldown): Reduces enemy speed by 25% for 3 turns. --- ### 2. Enemy Design #### **Common Enemies** - **๐Ÿ“– Page Thief**: Steals magical scrolls with a chance during attacks. - **๐Ÿ“œ Scroll Guardian**: Steals ancient scrolls with a chance during attacks. #### **Elite Enemies** - **๐Ÿ‘ด Library Elder**: Uses **๐Ÿ›ก๏ธ Wisdom Shield** (4-turn cooldown) to absorb damage. - **๐Ÿ“š Scroll Master**: - **๐ŸŒช๏ธ Scroll Storm** (3-turn cooldown): Deals multiple hits. - **๐ŸŒ€ Mana Drain** (4-turn cooldown): Reduces playerโ€™s attack power for 2 turns. #### **Final Boss** - **๐Ÿ‰ Knowledge Dragon**: - High HP/Attack/Defense. - Skills: - **๐Ÿ”ฅ Dragonโ€™s Breath** (4-turn cooldown): Massive damage. - **๐Ÿ‘๏ธ Knowledge Gaze** (4-turn cooldown): Paralyzes the player for 2 turns. --- ### 3. Room Design & Environment Mechanics Explore 9 interconnected rooms with unique challenges: | Room Name | Special Mechanics | Items/Enemies | |---------------------|-----------------------------------------------------------------------------------|----------------------------------------| | **๐Ÿ“š Scroll Room** | Normal room. | 2 Scroll Guardians, ancient scrolls. | | **๐Ÿ“– Book Room** | Normal room. | 2 Page Thieves, magic scrolls. | | **๐ŸŒ€ Forgotten Corridor**| Boss room. | 1 Page Thief, 1 Scroll Guardian, Elder | | **โณ Time Distortion Room** | Boss room. | 1 Scroll Master, Elder. | | **๐ŸŽ‰ Easter Egg Room** | **No enemies**. Reward room with powerful items. | 10 Ancient Scrolls, 10 Magic Scrolls, 5 Health Potions, 2 Strength Potions, 2 Agility Potions, 1 Resurrection Potion. | | **๐Ÿฐ End Realm** | Final battle against the Knowledge Dragon. | 1 Knowledge Dragon. | #### **map** ``` ๐Ÿ“š Scroll Study 1 โ”‚ ๐Ÿ“– Book Room 1 โ”€โ”€ ๐ŸŒ€ Forgotten Corridor โ”€โ”€ ๐Ÿ“š Scroll Study 2 โ”€โ”€ ๐Ÿ“– Book Room 2 โ€”โ€” ๐ŸŽ‰ Easter Egg Room โ”‚ โ”‚ ๐Ÿ›Œ Rest Room โ”€โ”€ โณ Time Warp Chamber โ”‚ ๐Ÿ—ผ Tower of Babel Dictionary ``` --- ### 4. Item System - **Consumables**: - **๐Ÿงšโ€โ™‚๏ธ Health Potion**: Restores HP. - **๐Ÿ’ช Strength Potion**: Boosts attack by 50% for 2 battles. - **๐Ÿƒโ€โ™‚๏ธ Agility Potion**: Doubles speed for 2 battles. - **๐Ÿงšโ€โ™‚๏ธ Resurrection Potion**: Revives the player once (only in Easter Egg Room). - **Essential Items**: - **๐Ÿ“œ Magic Scrolls**: Required for skills. - **๐Ÿ“š Ancient Scrolls**: Required for advanced skills. --- ## ๐ŸŽฏ How to Play 1. Move between rooms via menu-based navigation. 2. Manage inventory, use items, and cast skills strategically. 3. Adapt to room-specific mechanics (e.g., speed reduction, skill restrictions). 4. Defeat enemies through combat turns, considering cooldowns and status effects. --- ## ๐Ÿ› ๏ธ Compilation and Execution ### Compilation Steps This project uses **๐Ÿ”ง CMake** and **๐Ÿ—‚๏ธ MinGW** toolchain to generate an executable file. Below are the steps to compile: 1. Open a terminal and navigate to the project's root directory. 2. Run the following command to generate build files: ```bash cmake -G "MinGW Makefiles" -B build ``` - `-G "MinGW Makefiles"`: Specifies generating MinGW-compatible Makefile files. - `-B build`: Specifies that the generated build files will be stored in the `build` directory. 3. Run the following command to compile the project: ```bash cmake --build build ``` - This command generates the final executable file `program.exe` in the `code` directory. ### Running the Program Run the generated executable file: ```bash ./program.exe ``` - Once the program starts, follow the in-game prompts to begin your adventure! ### Note The Chinese version `/code_cn` of this project is still under development and is not yet complete. It is only for preliminary development use. The English version `/code_en` and the cracked English version `code_en_crack` have been fully developed. Please feel free to experience them.