Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Game Maybe...
- #include <iostream>
- #include <string>
- using std::cout;
- using std::endl;
- using std::cin;
- using std::string;
- int main()
- {
- const int GEMS = 500;
- int adventurers, killed, survivors;
- int choice;
- string leader;
- char direction;
- char spells;
- char classes;
- bool loop = true;
- cout << "Welcome to the Lost Fortune\n\n";
- cout << "Please input the following for an adventure!\n";
- cout << "Enter a Number: ";
- cin >> adventurers;
- cout << "Enter a Number smaller than the first: ";
- cin >> killed;
- survivors = adventurers - killed;
- cout << "Enter a Nickname: ";
- cin >> leader;
- //!!!!!Start you loop here.
- do
- {
- cout << "Classes\n\n";
- cout << "1 - Mage\n";
- cout << "2 - Brute\n";
- cout << "3 - Warrior\n";
- cout << "4 - Dwarf\n\n";
- cout << "Choice: ";
- cin >> choice;
- switch(choice)
- {
- case 1:
- classes = 'M';
- loop = false;
- cout << "\nMage\n";
- break;
- case 2:
- classes = 'B';
- loop = false;
- cout << "\nBrute\n";
- break;
- case 3:
- classes = 'W';
- loop = false;
- cout << "\nWarrior\n";
- break;
- case 4:
- classes = 'D';
- loop = false;
- cout << "\nDwarf\n";
- break;
- default:
- cout << "\nYou made an illegal choice.\n\n";
- loop = true;
- break;
- }
- }
- while (loop == true);
- //!!!!!End you loop here. Check the choice here.
- //story
- cout << "\nA group of " << adventurers << " set out of a mission ";
- cout << "-- in search of the Chalice of Solitude.\n ";
- cout << "The group was led by the marvelous " << leader << ".";
- cout << "\nAlong the way, a pack of vicious Flutterwackening Jabberwocks attacked.\n";
- if (classes == 'M') //!!!!Make this be the compair to the char from above.
- {
- cout << "As a Mage you stand back and look through your book of spells. " << endl;
- do
- {
- cout << "\nSpells\n\n";
- cout << "1 - Icebeam\n";
- cout << "2 - Fireball\n";
- cout << "3 - Earthquake\n";
- cout << "Choice: ";
- cin >> choice;
- switch(choice)
- {
- case 1:
- spells = 'I';
- loop = false;
- cout << "\nIcebeam\n";
- break;
- case 2:
- spells = 'F';
- loop = false;
- cout << "\nFireball\n";
- break;
- case 3:
- spells = 'E';
- loop = false;
- cout << "\nEarthquake\n";
- break;
- default:
- cout << "\nYou made an illegal choice.\n\n";
- loop = true;
- break;
- }
- }
- while (loop == true);
- if (spells == 'I')
- {
- cout << "You cast Icebeam, freezing the Jabberwock charging your allies in its path." << endl;
- }
- if (spells == 'F')
- {
- cout << "You cast Fireball, placing a line of fire between your group and the Jabberwocks." << endl;
- cout << "The only bad thing about this is that it is blocking your path to the exit." << endl;
- }
- if (spells == 'E')
- {
- cout << "You cast Earthquake, causing the ground to shake and stalagmites to break off from the ceiling." << endl;
- cout << "Your foes dodge all of the falling stalagmites, but some of your friends arent so lucky." << endl;
- killed + 2;
- }
- }
- if (classes == 'W') //!!!!Make this be the compair to the char from above. Make it only a if
- {
- cout << "Test Warrior" << endl;
- }
- if (classes == 'D') //!!!!Make this be the compair to the char from above. Make it only a if
- {
- cout << "Test Dwarf" << endl;
- }
- if (classes == 'B') //!!!!Make this be the compair to the char from above. Make it only a if
- {
- cout << "As a Brute you start to take charge of your group." << endl;
- cout << "You choose the largest Jabberwock out of the pack and slay it within seconds." << endl;
- cout << "The others flee in fear." << endl;
- cout << "You see two passages." << endl;
- cout << "Which way do you choose?" << endl;
- do
- {
- cout << "Directions:\n\n";
- cout << "1 - Left\n";
- cout << "2 - Right\n";
- cout << "\nChoice: ";
- cin >> choice;
- switch(choice)
- {
- case 1:
- direction = 'L';
- loop = false;
- break;
- case 2:
- direction = 'R';
- loop = false;
- break;
- default:
- cout << "\n\nYou made an ILLEGAL choice.\n\n";
- loop = true;
- }
- }
- while (loop == true);
- if(direction = 'L')
- {
- cout << "The passage has led you and your pack to their demise.\n" << endl;
- }
- if(direction = 'R')
- {
- cout << "You find a wide open room with absolutely no light." << endl;
- cout << "You cannot find anything to make your path visible." << endl;
- do
- {
- cout << "\nOptions:\n\n";
- cout << "1 - Stay\n";
- cout << "2 - Go back\n";
- cout << "\nChoice: ";
- cin >> choice;
- switch(choice)
- {
- case 1:
- direction = 'S';
- loop = false;
- break;
- case 2:
- direction = 'G';
- loop = false;
- break;
- default:
- cout << "\n\nYou made an ILLEGAL choice.\n\n";
- loop = true;
- }
- }
- while(loop = true);
- if(direction == 'S')
- {
- cout << "You search for a source of light." << endl;
- cout << "You feel around and find the edge of a large hole." << endl;
- }
- if(direction == 'G')
- {
- cout << "You turn around and go back." << endl;
- }
- }
- }
- cout << "Everyone fought to hold their territory." << endl;
- cout << "All of the foes have been vanquished, but at a cost.\n";
- cout << "\nOf the adventurers, " << killed << " were valiently lost, ";
- cout << "leaving just " << survivors << " in the group.\n";
- cout << "But while laying the deceased to rest, \n";
- cout << "they stumbled upon the buried fortune. \n";
- cout << "So the adventurers split " << GEMS << " gems.\n";
- cout << leader << " held on to the extra " << (GEMS % survivors);
- cout << " peices to keep things fair.\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement