Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void swordUpgrade()
- {
- int level = 1;
- int goldReq = 100;
- char choice = y;
- if ( gold >= goldReq)
- {
- while ( choice != 'N')
- {
- cout << "\nYour sword mad SKLLZ are currently" << level << " level\n";
- cout << "\nUpgrading it to " << level + 1 << " will cost " << goldReq << " golden coins\n";
- cout << "\nLeaving you with " << gold - goldReq << " amount of golden coins\n";
- cout << "\nWill you do it?\n";
- cout << "\n Y for Yes or N for No!\n";
- char choice;
- cin >> choice;
- if ( choice == 'Y')
- {
- attack += 5;
- strenght +=2;
- gold -= goldReq;
- goldReq += 100;
- level ++;
- break;
- }
- else
- {
- break;
- }
- }
- }
- else
- {
- cout << "\nYou've not enough money!";
- }
- }
- void armorUpgrade()
- {
- int goldReq = 100;
- int level = 1
- char choice = y;
- if ( gold >= goldReq)
- {
- while ( choice != 'N')
- {
- cout << "\nYour armor is currently" << level << " level\n";
- cout << "\nUpgrading it to " << level + 1 << " will cost " << goldReq << " golden coins\n";
- cout << "\nLeaving you with " << gold - goldReq << " amount of golden coins\n";
- cout << "\nWill you do it?\n";
- cout << "\n Y for Yes or N for No!\n";
- char choice;
- cin >> choice;
- if ( choice == 'Y' || choice == 'y')
- {
- defence += 5;
- maxhealth += 10;
- gold -= goldReq;
- goldReq += 100;
- level ++;
- cout << " \nGold is" << gold;
- cout << " \n GoldREQ is" << goldReq;
- break;
- }
- else
- {
- break;
- }
- }
- }
- else
- {
- cout << "\nYou've not enough money!";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement