Giter Club home page Giter Club logo

dnd's Introduction

Introduction

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.

Game Description

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.

image

Units

Each unit (player / enemy) has a Name, Health, Attack and Defense. Each property differs depending on the unit type.

Players

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.

Player Types

1. Warriors

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.

image

2. Mages

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.

image

3. Rouges

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.

image

4. Hunters

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.

image

Enemies

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.

Enemy Types

1. Monsters

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.

image

2. Traps

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.

image

Combat System

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.

How to Play

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:

image

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:

image

Have fun!

dnd's People

Contributors

d4nieldev avatar kfirshal avatar

Stargazers

Vladislav Shembel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.