Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cmath>
- using namespace std;
- int main()
- {
- //skills variables
- int melee = 1;
- int magic = 1;
- int ranged = 1;
- cout << "Welcome to The Adventure! Please enter your adventurer name!\n";
- string playerName;
- cin >> playerName;
- cout << "Hello, " << playerName << "! Let's begin our journey!\n";
- cout << "-----\n";
- cout << "Our story begins many years ago in a land called Utoya.\n";
- cout << "The sun shines over the town of Landridge, a small village of farmers and shopkeepers.\n";
- cout << playerName << ", our dashing hero, is training to become a knight of the land." << playerName << " is about to fight a training dummy. What will he do?\n";
- cout << "-----\n";
- cout << "Throughout the story, you will be presented with multiple-choice questions. Use the numbers on your keyboard to choose which choice your character will make!\n";
- cout << "-----\n";
- cout << "What will " << playerName << " do?\n";
- cout << "1) Punch it.\n";
- cout << "2) Grab some runes and cast a wind spell on it.\n";
- cout << "3) Grab a bow and some arrows, then shoot it.\n";
- cout << "Enter your choice:\n";
- int choice;
- cin >> choice;
- if (choice == 1)
- {
- cout << "You punch the dummy, knocking it off its stool. Your increase your Melee level.\n";
- melee + 1;
- }
- else if (choice == 2)
- {
- cout << "You find some runes lying on the table next to you, and summon the power of magic to cast a large gust of air towards the dummy, knocking it off its stool. You increase your Magic level.\n";
- magic + 1;
- }
- else if (choice == 3)
- {
- cout << "You grab the bow and arrow on the table next to you, draw back and shoot the dummy in the chest. It falls off its stool. You increase your Ranged level.\n";
- ranged + 1;
- }
- else
- {
- cout << "Unable to make a suitable choice, you stumble over a rope on the floor and faceplant in front of your friends. You do not gain any experience.\n";
- }
- cout << "melee" << melee;
- cout << "ranged" << ranged;
- cout << "magic" << magic;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement