Skip to content
Permalink
Browse files
Merge branch 'master' of github.coventry.ac.uk:wlodarsb/Text-Based-Game
  • Loading branch information
wlodarsb committed Mar 4, 2019
2 parents 3edd14f + 4ee7041 commit 9272e93d205e455a875de1cd633adc368b3c1a91
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
BIN +0 Bytes (100%) Database/Game_Database.sqlite
Binary file not shown.
@@ -0,0 +1,43 @@
#include "../include/mainMenu.hpp"
#include "../include/Game.hpp"
#include <ncurses.h>
#include <locale.h>
#include <iostream>
#include <string>
#include "../include/GameWindow.hpp"
using namespace std;

int main()
{
initscr();
GameWindow selectionWin(0,0,0,0);
GameWindow heroDescr(0,0,0,0);
getch();
int selectedHeroes [5] = { };
int heroChoice;
int i;

vector<vector<string>> heroNames =
{
{"Warrior","Fearless warrior and weapon expert. A good choice for players who like a good combination of damage and speed.\n Abilities :\n 1)Shield Bash(attacks the enemy hero with a shield and has a chance to stun the other hero for 1 turn )\n 2)Spear Charge(sprints towards the enemy to stab him with the spear, ignores armor and has slight chance to cause bleed for 3 turns"},
{"Mage","Mage of the famous dragon academy of sorcery. This mage is able to attack from a distance with devastating spells.\n Abilities:\n 1)Magic Arrow(shoots an arrow made up of magic)\n 2)Curse(decreases the damage,defense and speed of a chosen enemy hero for 2 turns)"},
{"Thief","A lowly man who resorted to thievery in order to make it through the day. This thief relies on high damage and poison in order to kill his enemies.\n Abilities:\n 1)Poison Dagger(does not deal a lot of damage however it has a big chance to poison the enemy and deal damage for 3 turns)\n 2)Parry(if the thief is attacked by an enemy hero immediately after using this ability there is a 50% chance that the enemy hero will miss and get stunned for 2 turns)"},
{"Knight","A noble knight equipped with high defense gear and an 'ultra_great_sword' that crushes everything in it's way.\n Abilities:\n 1)Block(with his mighty 'great_shield' the knight is able to block an attack for the whole team however the attack will still do some minor damage)\n 2)Iron skin(buffs the defence of the knight for 2 turns)"},
{"Cleric","This pious cleric is able to cast holy miracles in order to aid those around him.\n Abilities:\n 1)Divine Blessing(buffs a chosen hero in the party increasing dmg,speed and defence for 2 turns)\n 2)Grand heal(Heals a chosen hero in the party for 25% of his hp however it takes a long time to cast)"},
{"Hunter","This man is a famous hunter of beasts and man alike. He will strike down every enemy from afar with his deadly arrows.\n Abilities:\n 1)Poison Arrow(shoots a poisonous arrow that has a chance to poison the enemy for 3 turns)\n 2)Aerial strike(shoots an arrow at every hero at once however there's a 30% chance of missing)"},
{"Paladin","Holy man whose sole duty is to purge to wicked from the world with the aid of his holy hammer.\n Abilities:\n 1)Minor Heal(Is able to heal himself for 10% of his hp)\n 2)Hammer Bash(Attack an enemy hero with a high chance to stun him for 1 turn)"},
{"Beastman","This deprived man was abandonded in the wilderness. In order to survive he had to adapt to his surroundings and abandon his humanity and any notion of civilization prior to his exile.\n Abilities:\n 1)Bite(charge at an enemy hero to bite his throat. The attack has a medium chance to deal bleed damage for 3 turns)\n 2)Howl(Shout at an enemy hero to intimidate him. The targeted heroes losses all buffs aplied on him and, his speed and defence are decreased for 1 turn)"},
{"Alchemist","The alchemist is able to craft potions capable of aiding the allies or damage the enemy.\n Abilities:\n 1)Fire Bomb(once thrown it deals damage and has a chance to set the enemy on fire)\n 2)Mana and Healing Potion(restores a little hp and mp)"},
};

for ( i=0; i<=5; ++i)
{
heroChoice=selectionWin.Menu(hero,heroDescr);
string to_print = "You've selected " + heroNames[heroChoice];
heroDescr.Print(to_print.c_str());
getch();
endwin();
selectedHeroes[i] = heroChoice;
}
return selectedHeroes;
}

0 comments on commit 9272e93

Please sign in to comment.