Skip to content

βš”οΈ Prepare for epic turn-based battles and strategic choices in this Python-based text/cli game! πŸ§™β€β™€οΈ Cast powerful spells, πŸ§β€β™€οΈ outsmart cunning foes, πŸ§” forge alliances, and conquer the fearsome dragon in this battle for glory! πŸ’ͺ

License

Notifications You must be signed in to change notification settings

Skylar-Lorena/battlegame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Battlegame

Welcome to the Battlegame! This Python-based text/cli game allows you to engage in epic battles and make strategic choices.

Author

The game is authored by Lorenah M.

Setup Instructions

Clone the Repository: git clone https://github.com/Skylar-Lorena/battlegame.git

Navigate to the Project Directory: cd battlegame

Install Python: Ensure you have Python installed. If not, download and install it from python.org.

Run the Game: python3 battlegame.py

Workshop Overview

Task 1 - Game Variables Setup

In the battlegame.py file, declare variables for game characters, their hitpoints (hp), and damage. Follow the provided workshop assignment guidelines.

Task 2 - Player Character Selection

Use the print() and input() functions to display character options and prompt the player to choose their character.

Task 3 - Player Choice Handling

Wrap the code in an infinite while loop, handling player choices with if statements. Display chosen character stats.

Task 4 - Dragon Battle

Create a second infinite while loop for a dragon battle. Simulate damage and display battle messages. Handle game outcomes.

Bonus Tasks

Choose Character by Name

Allow players to choose characters by typing their name.

Case-Insensitive Input

Make character name input case-insensitive.

Add New Character (Orc)

Implement an additional character option - Orc.

Exit Game Option

Add an option to exit the game entirely.

Play Again Feature

Ask the player if they want to play again after the game is over.

Testing

Save and run your code in the terminal, testing different options to ensure the game functions as expected. Run the Game: python3 battlegame.py

MIT License

Copyright (c) 2023 Lorenah M.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

βš”οΈ Prepare for epic turn-based battles and strategic choices in this Python-based text/cli game! πŸ§™β€β™€οΈ Cast powerful spells, πŸ§β€β™€οΈ outsmart cunning foes, πŸ§” forge alliances, and conquer the fearsome dragon in this battle for glory! πŸ’ͺ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages