This game is asingle-player multi-level version of a dungeons and dragons board game.
You are trapped in a dungeon, surrounded by enemies. Your goal is to fight your way through them and get to the next level of the dungeon. Once you complete all the levels, you win the game.
The game is played on a board similar to the board in Figure 1.
The game board consists of a player, enemies of different types, walls and empty areas that both players and enemies can walk through.
In this board, the symbol '@' in green represents the player while the later red symbols 'B', 's', 'k' and 'M' represent the enemies that the player should fight.
In addition, there are dots scattered along the paths, representing the free areas and # symbols that represent the walls.
The game takes a path to a directory that containing indexed files via the command line argument (explained later). Each file represents a game level.
Each unit (player / enemy) has a Name, Health, Attack and Defense. Each property differs depending on the unit type.
In addition to the game unit properties, each player has the following properties:
- Experience: Initially 0. Increased by killing enemies.
- Player Level: Initially 1. Increased by gaining experience.
- Special Ability: each player type has a different special ability. Will be explained later.
Special ability: Avenger’s Shield, randomly hits one enemy withing range < 3 for an amount equals to 10% of the warrior’s max health and heals the warrior for amount equals to 10×defense (but will not exceed the total amount of health pool). Avenger's Shield has a cooldown that is reduced by 1 every turn.
Special ability: Blizzard, randomly hit enemies within range for an amount equals to the mage’s spell power at the cost of mana. The mage needs to have enough mana to cast Blizzard. The mana is increased every turn according to the level, and on leveling up.
Hits Count: maximal number of times a single cast of the ability can hit.
Special ability: Fan of Knives hits everyone around the rogue for an amount equals to the rogue’s attack points at the cost of energy. The rouge needs to have enough energy to case Fan of Knives. The energy is increased every turn by 10, and is filled upon leveling up.
Special ability: Shoot, hits the closest enemy for an amount equals to the hunter’s attack points at the cost of an arrow. The hunter should have at lease one enemy in range and at lease one arrow in his quiver starting with 10. every 10 turns the hunter gains additional arrows depending on his level.
The player may encounter enemies while traveling around the world. Each enemy has a property of Experience Value which is the amount of experience gained by defeating this enemy.
Each monster has a vision range that represents the monster’s vision range.
The monster will travel around the board. Monsters can move 1 step in one the following directions: Up/Down/Left/Right, and may chase the player if the player is within its vision range.
Each trap has the following properties:
- visibility time: amount of turns that the trap remains visible.
- invisibility time: amount of turns that the trap remains invisible.
A trap can’t move (unlike monsters) but updates its state on each turn. After visibility time turns, the trap will become invisible. The trap becomes visible again after invisibility time turns elapsed. The trap may attack the player if the player is within a range of 2 from it.
When the player attempts to step on a location that has an enemy, or when an enemy attempts to step on the player’s location, they engage in melee combat. The attacker is always the unit that performed the step. The other unit will attempt to defend itself.
The program takes a path of directory as command-line argument. The directory contains files represent the game boards. Each file is named "level<i>.txt" where <i> is the number of the level (For example: "level1.txt", "level2.txt", etc... Also, see the levels directory in the repo).
We will use the following tiles for each level:
And enemy tiles of your choice.
The game starts by asking the user to select the player character from a list of pre-defined characters. After choosing a character, the game will start. A may use the following actions: