Explore dungeons, fight monsters and avoid traps.
This is a really simple RPG game written in python, as defined in exercise 36 at Learn Python the Hard Way.
- Console based game: read some text, choose an action
- Simple battle system: attack or defend, kill or die
- Player and monster stats: health points (HP), attack points (AP), defense points (DP) and gold pieces (GP)
- Player inventory: list of gathered items
- Levels and XP: experience points to level up
- Quick time events: choose an action within a short period of time
To start the game:
- Clone this project
- Change the working directory to the project directory
- Execute
python play.py
When the player/monster is attacking:
- Rolls a D6 (a random value between 1 and 6)
- Add the player/monster attack points
- Subtract the player/monster defense points
- Calculate the damage, apply to the player/monster HP
- If player HP < 1, game over
- If monster HP < 1, victory
When the player/monster is defending:
- Rolls a D6 (a random value between 1 and 6)
- Add the player/monster defense points
- This defense points are valid until the next turn
The console layout defines how information is rendered in the console.
The general screen shows useful information about the game, as the current dungeon, room and player stats.
DUNGEONS AND PYTHONS
----------------------------------------------------------------------------
Dungeon: --, Room: --
Player: PLAYER NAME, HP: --, AP: --, DP: --, GP: --
In rooms, the dungeon master tells what is happening, and the player should take an action.
DM: You enter a dark room, there are two open doors...
1 - Open the left door
2 - Open the right door
In battles, you can attack or defend.
Monster: Ugly Orc, HP: --, AP: --, DP: --
Player/Monster attacks/defends, rolls --, dealing/getting -- of damage/defense!
1 - Attack
2 - Defend
The game map defines the events and actions available, structured as a linked list. Each event is defined by an unique ID, and actions are also handled as events.
You wake up in a dark and dry room. You look around and it's looks like a cell. Right in front of you, close to the cell bars, there is a guard, drop dead...
1 - Scream for help
No one listens to you, you are on your own.
2 - Check the guard body
You find the cell key in his pocket. You leave the cell.
Go to room 2.
This look like a corridor full of cells. There is an open door on the right and a long corridor on the left...
1 - Enter the open door on the right
Go to Room 3.
2 - Run through the corridor on the left
Go to Room 4
You enter a messy and dry room, there are a interesting desk in the corner, covered with papers and a shiny drawer...
1 - Check the drawer
You found 2GP.
2 - Leave the room
Go to Room 2.
You enter the main hall. You fell a huge shade coming from nowhere, weaving a big axe at you, time to battle...
Ugly Orc, HP: 10, AP: 2, DP: 2, GP: 4
On win:
Go to Room 5.
On loss:
GAME OVER
After a heat battle, you still have energy to run. At the end of the hall, there is a dark corridor. When you enter it, you notice that part of the floor looks different...
1 - Check for traps
You find a trap, a clumsy deep hole full of pythons. You jump over it.
Go to Dungeon 2.
2 - Run like there is no tomorrow
You fall in a deep hole and get bitten by the pythons.
GAME OVER
TODO create another cool dungeon