Skip to content

Sr-GrEeNe18/Python-RPG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RPG Game

In this exercise, you will develop a hero RPG (Role Playing Game) using all of the cool new python knowledge you've acquired. This game will be created using Object Oriented Programming.

The game starts off with 2 characters: a hero and a goblin. Each character will be given a starting health and starting value.

Each character also has a power that can be used to attack their opponent. In the initial scenario, the hero's opponent is the goblin, and the goblin's opponent is the hero.

When either character attacks his/her opponent, the opponent's health will decrease by the amount of power of the attacking character.

For example

If the hero starts off with the following:

  • health = 9
  • power = 4

And the goblin starts off with the following:

  • health = 7
  • power = 3

Then when the hero attacks the goblin, the goblin's health will decrease by 4.

The result of goblin's health after being attacked

  • health = 3 ==> (7 - 4)
  • power = 3

Run following command to clone this repository onto your local computer

  1. Clone this repository: git clone https://github.com/DigitalCraftsStudents/python-rpg-starter.git
  2. cd python-rpg-starter
  3. git init
  4. git add
  5. git commit -m 'rpg game'
  6. Create a new repository without a README in your github account
  7. Follow the instructions to connect and push your local repo to your remote repository
    • git remote remove origin
    • git remote add origin [url of your repo]
    • git push --set-upstream origin main

Use hero_rpg.py, located in this repository, as a starting point for your game.

As you complete each step, commit, push, and tag the final working version. In the future we'll base a refactor off of one the steps.

RPG Game Part 1

Follow the link below to continue building new characters with new abilities to your game.

RPG Game Part 2

Follow the link below to continue building new characters with new abilities to your game.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages