Skip to content

Cinzia-I-M/harry-potter-battle-game

Repository files navigation

Harry Potter Battle Game :mage_man:

This project is the result of a Code First Girls task, with the open-ended challenge of creating a game using an API.

image

The Concept

I chose to use a Harry Potter API to create a spell casting battle game against a computer opponent. Players begin with 100 health and cast either damage or healing spells, with the goal of reducing your opponent’s health to 0.

Key Features

✨ Text input for character selection via API

✨ Houses have ‘special powers’ with damage/healing modifications

✨ Random spell chosen via a different API based on healing or damage selection

✨ Text interface embellishments

✨ Filtered text input to assist user experience

✨ Modular functions for code efficiency

System requirements and dependencies

How to run the game 🦉

  1. Clone the repository to your desired location

    git clone https://github.com/Cinzia-I-M/harry-potter-battle-game.git

  2. Enter the repository directory via command line

    cd harry-potter-battle-game

  3. Run the script

    python harrypotter.py

  4. Enjoy playing!

Play the game!

  • First you can choose if you would like to pick your team or if you want a random team.
  • If you choose to pick your team, you can select three characters from Harry Potter by typing all or part of their names.
  • Depending on which house your characters are in, you will get special powers that either increase or decrease your damage and healing powers.
  • The computer selects a random team.
  • Then you start the battle! Pick a damage spell to start. This will harm the computer's health.
  • The computer then picks either a damage or healing spell.
  • This goes on until one of you reaches 0 health.
  • Beware of Avada Kedavra (The Killing Curse) as this will kill instantly! 🐍
  • At the end you can choose to play again or not.

About

Code First Girls Python & Apps course project

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages