1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
|
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
void help();
void RenameTextPet();
void Stats(int health, int money, int level);
void Arena();
void FeedTextPet(int);
void OtherInfo(int,int,int);
void PassByReferenceStats(int health, int money, int level);
//Main Program
int main()
{
string death = "Your TextPet has died";
string choice;
int health = 100;
int money = 20;
int level = 1;
while(choice !="quit"){
cin >> choice;
if(choice == "Help" || choice == "help"){
help();
}
if(choice == "Rename" || choice == "rename"){
RenameTextPet();
}
if(choice == "Stats" || choice == "stats"){
Stats(health, money, level);
}
if(choice == "Feed" || choice == "feed"){
FeedTextPet(money);
}
if(choice == "Arena" || choice == "arena"){
Arena();
}
}
cin.get();
return 0;
}
//Help Function
void help()
{
string choice;
cout << "\n";
cout << "HELP DOCUMENTATION" << endl;
cout << "\n";
cout << "Below is a list of catagories, please type in the letter next to the catagorie to see more info on that subject" << endl;
cout << "\n";
cout << "A - Keywords" << endl;
cout << "B - Pets List" << endl;
cin >> choice;
cout << "\n";
if(choice == "A" || choice == "a"){
cout << "KEYWORDS LIST" << endl;
cout << "\n";
cout << "Quit - Exits from the game" << endl;
cout << "Feed - Feeds your TextPet" << endl;
cout << "Rename - Allows you to re-name your text pet" << endl;
cout << "Stats - Shows your stats like pet name, money, pet health etc" << endl;
cout << "School - You can go to school and learn stuff" << endl;
cout << "\n";
}
if(choice == "B" || choice == "b"){
cout << "TextCat" << endl;
cout << "TextDog" << endl;
cout << "TextGuineaPig" << endl;
cout << "TextHampster" << endl;
}
}
//Choose TextPet
void choosepet()
{
string TextPetChoose;
string TextPet;
cout << "Ok now please choose your TextPet" << endl;
cout<< "Only type the number next to the pet you wish to choose" << endl;
cout << "\n";
cout << "1 - TextDog" << endl;
cout << "2 - TextCat" << endl;
cout << "3 - TextHampster" << endl;
cout << "4 - TextGuineaPig" << endl;
cout << "\n";
getline(cin, TextPetChoose);
cout << "\n";
}
//Here you can rename your pet
void RenameTextPet()
{
string rename;
cout << "What would you like to re-name your pet?" << endl;
getline(cin, rename);
cout <<"\n";
}
//View Statistics
void Stats(int health, int money, int level)
{
cout << "\n";
cout << "Pet Health: " << health << endl;
cout << "\n";
cout << "Money: "<< "$" << money << endl;
cout << "\n";
cout << "Level: " << level << endl;
}
//School for your TextPet
void School()
{
string SchoolChoice;
cout << "Welcome to pet school! here you can make your TextPet smarter and earn achievements and skill points." << endl;
cout << "\n";
cout << "Please choose which classes you would like to take:" << endl;
cout << "\n";
cin >> SchoolChoice;
cout << "\n";
cout << "A - History" << endl;
cout << "B - Math" << endl;
cout << "C - Science" << endl;
cout << "D - Biology" << endl;
if(SchoolChoice == ""){
}
}
//Feed TextPet
void FeedTextPet(int money)
{
string FoodChoice;
cout << "What would you like to feed your TextPet?" << endl;
cout << "\n";
cout << "A - TextPet Low Grade Food" << endl;
cout << " " << "Cost: $2" << endl;
cout << " " << " " << "Health Restored: 3 points" << endl;
cout << "\n";
cout << "B - TextPet Medium Grade Food" << endl;
cout << " " << "Cost: $5" << endl;
cout << " " << " " << "Health Restored: 6 points" << endl;
cout << "\n";
cout << "C - TextPet High Grade Food" << endl;
cout << " " << "Cost: $10" << endl;
cout << " " << " " << "Health Restored: 14 points" << endl;
cin >> FoodChoice;
if(FoodChoice == "A" || FoodChoice == "a"){
money -= 2;
cout << "You bought 'TextPet Low Grade Food'" << endl;
cout << "Your current balance is $" << money << endl;
}
if(FoodChoice == "B" || FoodChoice == "a"){
money -=5;
cout << "You bought 'TextPet Medium Grade Food'" << endl;
cout << "Your current balance is $" << money << endl;
}
if(FoodChoice == "C" || FoodChoice == "c"){
money -=10;
cout << "You bought 'TextPet High Grade Food'" << endl;
cout << "Your current balance is $" << money << endl;
}
}
//This will start in the beginning only, if the person has played before it will not show again.
void beginning()
{
string TextPetName;
string PlayerName;
cout << "Welcome to the world of TextPet" << endl;
cout << "TextPet is a interactive text pet that you can play with!" << endl;
cout << "If you need help, just type in help at anytime" << endl;
cout << "Its suggested you visit the help corner if this is your first time playing" << endl;
cout << "\n";
cout << "Press Enter to begin" << endl;
cin.get();
//Enter your name
cout << "Ok lets start by entering your name" << endl;
cout << "\n";
getline(cin, PlayerName);
cout << "\n";
//Name your TextPet
cout << "what do you want to name your new TextPet?" << endl;
getline(cin, TextPetName);
cout << "\n;";
}
//The player can level up their TextPet
void LevelUp()
{
}
//These are achievements that the player can earn
void Achievements()
{
}
//This is the Arena where your TextPet can fight in.
void Arena()
{
string ArenaChoice;
cout << "Welcome to the arena which fight would you like to enter your pet in?" << endl;
cout << "\n";
cout << "A - Low Level" << endl;
cout << " " << "Requirements: Level 1-15" << endl;
cout << "\n";
cout << "B - " << endl;
cout << " " << "Requirements: Level 15-30" << endl;
cout << "\n";
cout << "C - " << endl;
cout << " " << "Requirements: Level 30-" << endl;
cin >> ArenaChoice;
if(ArenaChoice == "A" || ArenaChoice == "a"){
cout << "test" << endl;
}
if(ArenaChoice == "B" || ArenaChoice == "b"){
cout << "test" << endl;
}
}
|