12-05-2009, 06:40 PM
YO! I'm in the process of making a Text Based RPG
AND
Yes this is my, i think, 5th project in C++ and yes it in incredibly messy!
I like rushed into it without thinking and realized i couldn't tidy it up without deleting whole chunks so i kept it messy.
Yes the code is messy, poorly written, but i was mainly experimenting.
(Here is the main menu, all i got done for the moment)
Thankz! Don't criticise me that much lol
AND
Yes this is my, i think, 5th project in C++ and yes it in incredibly messy!
I like rushed into it without thinking and realized i couldn't tidy it up without deleting whole chunks so i kept it messy.
Yes the code is messy, poorly written, but i was mainly experimenting.
(Here is the main menu, all i got done for the moment)
Code:
// Text Based RPG.cpp : Defines the entry point for the console application.
//Version 0.0.0
// Date Started Thursday 3rd December 2009
// Bugs
// Do...While Loop for section ties
// Switch Loops (Continue;)
// Changle Class Loops to Switch Conditionals
// String for name
#include <iostream>
#include <string>
int main()
{
int race;
int type;
int menu;
std::cout << "-------------------------------\n";
std::cout << " <ENTER GAME NAME HERE>\n";
std::cout << "-------------------------------\n\n";
std::cout << " -----Version 0.0.0-----\n\n";
std::cout << "-------------------------------\n\n";
std::cout << "<ENTER INTRODUCTION HERE>\n\n";
std::cout << "===============================\n\n";
/*for (;;) do {
{
Switch (menu) { */
//Finish that loop off
std::cout << "---------Path of Light---------\n";
std::cout << "1. Elf\n";
std::cout << "2. Human\n";
std::cout << "3. Dwarf\n";
std::cout << "4. Centaur\n";
std::cout << "-------------------------------\n\n";
std::cout << "--------Path of Darkness--------\n";
std::cout << "5. Orc\n";
std::cout << "6. Demonoid\n";
std::cout << "7. Troll\n";
std::cout << "8. Shade\n";
std::cout << "------------------------------\n\n";
std::cout << "=============================================================\n";
std::cout << "Please choose your race by entering the corresponding digit...\n";
std::cout << "=============================================================\n\n";
std::cout << "Race: ";
std::cin >> race;
while (race < 1 || race > 8) {
std::cout << "Invalid Input...\n\nRace: ";
std::cin >> race;
}
if (race == 1) { // Elf
std::cout << "=============================================================\n";
std::cout << "You have chosen to become an elf\n\n";
std::cout << "1. Ranger \n";
std::cout << "2. Warrior \n";
std::cout << "3. Elementalist \n";
std::cout << "4. Healer \n";
std::cout << "=============================================================\n";
std::cout << "Please choose your class by entering the corresponding digit..\n";
std::cout << "=============================================================\n\n";
std::cout << "Class: ";
std::cin >> type;
std::cout << "\n\n";
if (type == 1) { // Elf Ranger
std::cout << "=============================================================\n";
std::cout << " Ranger\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Bows, Crossbows, Muskets, Shortswords, Daggers, Throwing Knives.\n";
std::cout << "Armour: Cloth, Leather, Mail.\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 2) { //Elf Warrior
std::cout << "=============================================================\n";
std::cout << " Warrior\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: All Weapons\n";
std::cout << "Armour: All Armour\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 3) { //Elf Elementalist
std::cout << "=============================================================\n";
std::cout << " Elementalist\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Staff, Wands\n";
std::cout << "Armour: Cloth\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 4) { // Elf Healer
std::cout << "=============================================================\n";
std::cout << " Healer\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Staff, Daggers, Wands\n";
std::cout << "Armour: Cloth, Leather\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
}
if (race == 2) { // Human
std::cout << "=============================================================\n";
std::cout << "You have chosen to become a Human\n";
std::cout << "1. Knight\n";
std::cout << "2. Mage\n";
std::cout << "3. Thief\n";
std::cout << "4. Brawler\n";
std::cout << "=============================================================\n";
std::cout << "Please choose your class by entering the corresponding digit..\n";
std::cout << "=============================================================\n\n";
std::cout << "Class: ";
std::cin >> type;
std::cout << "\n\n";
if (type == 1) { // Human Knight
std::cout << "=============================================================\n";
std::cout << " Knight\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: All\n";
std::cout << "Armour: Plate, Mail\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 2) { // Human Mage
std::cout << "=============================================================\n";
std::cout << " Mage\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Staffs, Wands, Daggers\n";
std::cout << "Armour: Cloth\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 3) { // Human Thief
std::cout << "=============================================================\n";
std::cout << " Thief\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Daggers, Shortswords, Throwing Knives\n";
std::cout << "Armour: Cloth, Leather\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 4) { // Human Brawler
std::cout << "=============================================================\n";
std::cout << " Brawler\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Axes, Maces, Broadswords\n";
std::cout << "Armour: Leather, Mail\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
}
if (race == 3) { // Dwarf
std::cout << "=============================================================\n";
std::cout << "You have chosen to become a Dwarf.\n";
std::cout << "1. Knight\n";
std::cout << "2. Beserker\n";
std::cout << "3. Brawler\n";
std::cout << "=============================================================\n";
std::cout << "Please choose your class by entering the corresponding digit..\n";
std::cout << "=============================================================\n\n";
std::cout << "Class: ";
std::cin >> type;
std::cout << "\n\n";
if (type == 1) { // Dwarf Knight
std::cout << "=============================================================\n";
std::cout << " Knight\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: All\n";
std::cout << "Armour: Plate, Mail\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 2) { // Dwarf Beserker
std::cout << "=============================================================\n";
std::cout << " Beserker\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: All\n";
std::cout << "Armour: None\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 3) { // Dwarf Brawler
std::cout << "=============================================================\n";
std::cout << " Brawler\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Axes, Maces, Broadswords\n";
std::cout << "Armour: Leather, Mail\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
}
if (race == 4) { // Centaur
std::cout << "=============================================================\n";
std::cout << "You have chosen to become a Centaur\n";
std::cout << "1. Warrior\n";
std::cout << "2. Elementalist\n";
std::cout << "3. Healer\n";
std::cout << "4. Ranger\n";
std::cout << "=============================================================\n";
std::cout << "Please choose your class by entering the corresponding digit..\n";
std::cout << "=============================================================\n\n";
std::cout << "Class: ";
std::cin >> type;
std::cout << "\n\n";
if (type == 1) { // Centaur Warrior
std::cout << "=============================================================\n";
std::cout << " Warrior\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: All Weapons\n";
std::cout << "Armour: All Armour\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 2) { // Centaur Elementalist
std::cout << "=============================================================\n";
std::cout << " Elementalist\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Staff, Wands\n";
std::cout << "Armour: Cloth\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 3) { // Centaur Healer
std::cout << "=============================================================\n";
std::cout << " Healer\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Staff, Daggers, Wands\n";
std::cout << "Armour: Cloth, Leather\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 4) { // Centaur Ranger
std::cout << "=============================================================\n";
std::cout << " Ranger\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Bows, Crossbows, Muskets, Shortswords, Daggers, Throwing Knives.\n";
std::cout << "Armour: Cloth, Leather, Mail.\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
}
//END OF THE PATH OF LIGHT TEAM
//================================================================================================================================================================
//BEGINNING OF THE PATH OF DARKNESS TEAM
if (race == 5) { // Orc
std::cout << "=============================================================\n";
std::cout << "You have chosen to become an Orc\n";
std::cout << "1. Warrior\n";
std::cout << "2. Warlock\n";
std::cout << "3. Thief\n";
std::cout << "4. Beserker\n";
std::cout << "5. Brawler\n";
std::cout << "=============================================================\n";
std::cout << "Please choose your class by entering the corresponding digit..\n";
std::cout << "=============================================================\n\n";
std::cout << "Class: ";
std::cin >> type;
std::cout << "\n\n";
if (type == 1) { // Orc Warrior
std::cout << "=============================================================\n";
std::cout << " Warrior\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: All Weapons\n";
std::cout << "Armour: All Armour\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 2) { // Orc Warlock
std::cout << "=============================================================\n";
std::cout << " Warlock\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Staff, Spear, Dagger\n";
std::cout << "Armour: Cloth, Leather, Mail, Plate\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 3) { // Orc Thief
std::cout << "=============================================================\n";
std::cout << " Thief\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Daggers, Shortswords, Throwing Knives\n";
std::cout << "Armour: Cloth, Leather\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 4) { // Orc Beserker
std::cout << "=============================================================\n";
std::cout << " Beserker\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: All\n";
std::cout << "Armour: None\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 5) { // Orc Brawler
std::cout << "=============================================================\n";
std::cout << " Brawler\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Axes, Maces, Broadswords\n";
std::cout << "Armour: Leather, Mail\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
}
if (race == 6) { // Demonoid
std::cout << "=============================================================\n";
std::cout << "You have chosen to become a Demonoid\n";
std::cout << "1. Mage\n";
std::cout << "2. Warlock\n";
std::cout << "3. Elementalist\n";
std::cout << "=============================================================\n";
std::cout << "Please choose your class by entering the corresponding digit..\n";
std::cout << "=============================================================\n\n";
std::cout << "Class: ";
std::cin >> type;
std::cout << "\n\n";
if (type == 1) { // Demonoid Mage
std::cout << "=============================================================\n";
std::cout << " Mage\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Staffs, Wands, Daggers\n";
std::cout << "Armour: Cloth\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 2) { // Demonoid Warlock
std::cout << "=============================================================\n";
std::cout << " Warlock\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Staff, Spear, Dagger\n";
std::cout << "Armour: Cloth, Leather, Mail, Plate\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 3) { // Demonoid Elementalist
std::cout << "=============================================================\n";
std::cout << " Elementalist\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Staff, Wands\n";
std::cout << "Armour: Cloth\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
}
if (race == 7) { // Troll
std::cout << "=============================================================\n";
std::cout << "You have chosen to become a Troll\n";
std::cout << "1. Beserker\n";
std::cout << "2. Brawler\n";
std::cout << "=============================================================\n";
std::cout << "Please choose your class by entering the corresponding digit..\n";
std::cout << "=============================================================\n\n";
std::cout << "Class: ";
std::cin >> type;
if (type == 1) { // Troll Beserker
std::cout << "=============================================================\n";
std::cout << " Beserker\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: All\n";
std::cout << "Armour: None\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 5) { // Troll Brawler
std::cout << "=============================================================\n";
std::cout << " Brawler\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Axes, Maces, Broadswords\n";
std::cout << "Armour: Leather, Mail\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
}
if (race == 8) { // Shade
std::cout << "=============================================================\n";
std::cout << "You have chosen to become a Shade\n";
std::cout << "1. Mage\n";
std::cout << "2. Warlock\n";
std::cout << "3. Healer\n";
std::cout << "=============================================================\n";
std::cout << "Please choose your class by entering the corresponding digit..\n";
std::cout << "=============================================================\n\n";
std::cout << "Class: ";
std::cin >> type;
std::cout << "\n\n";
if (type == 1) { // Shade Mage
std::cout << "=============================================================\n";
std::cout << " Mage\n";
std::cout << "=============================================================\n\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Staffs, Wands, Daggers\n";
std::cout << "Armour: Cloth\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 2) { // Shade Warlock
std::cout << "=============================================================\n";
std::cout << " Warlock\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Staff, Spear, Dagger\n";
std::cout << "Armour: Cloth, Leather, Mail, Plate\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
if (type == 3) { // Shade Healer
std::cout << "=============================================================\n";
std::cout << " Healer\n";
std::cout << "=============================================================\n";
std::cout << " -----Stats-----\n";
std::cout << "<WILL BE ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cout << " ---Equipment---\n";
std::cout << "Weapons: Staff, Daggers, Wands\n";
std::cout << "Armour: Cloth, Leather\n";
std::cout << " ---------------\n\n";
std::cout << " --Description--\n";
std::cout << "<ADDED IN LATER>\n";
std::cout << " ---------------\n\n";
std::cin.get();
}
}
//============================================================================================================================================================
//END OF MAIN MENU AND CLASSES
// CHANGE TO SWITCH CONDITIONALS
//============================================================================================================================================================
std::cin.get();
return 0;
}
Thankz! Don't criticise me that much lol