Advertisement
zhalpern

Final coding

Dec 12th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.09 KB | None | 0 0
  1. #include<iostream>
  2. #include <cstdio>
  3. using namespace std;
  4.  
  5. class Pirate {
  6. public:
  7. int health;
  8. int coin;
  9. int damage;
  10.  
  11. Pirate() {
  12. health = 10;
  13. coin = 0;
  14. }
  15.  
  16. void getHealth() {
  17.  
  18. int input;
  19. char choice;
  20.  
  21. cout << "Do you have a health pack? (y/n)" << endl;
  22. cin >> choice; {
  23. if (choice == 'y')
  24. cout << "What level is your health pack?" << endl;
  25. cin >> input; {
  26. if (input == 1) {
  27. if (health <= 90) {
  28. health = health + 10;
  29. cout << "Your health: " << health << endl;
  30. }
  31. }
  32. else {
  33. cout << "Cannot use health pack." << endl;
  34. }
  35. if (input == 2) {
  36. if (health <= 80) {
  37. health = health + 20;
  38. cout << "Your health: " << health << endl;
  39. }
  40. }
  41. else {
  42. cout << "Cannot use health pack." << endl;
  43. }
  44. if (input == 3) {
  45. if (health <= 50) {
  46. health = health + 50;
  47. cout << "Your health: " << health << endl;
  48. }
  49. }
  50. else {
  51. cout << "Cannot use health pack." << endl;
  52. }
  53. }
  54. }
  55. }
  56.  
  57. void damageImpactOne() {
  58. int input;
  59.  
  60. cout << "Choose a number one through five, but choose carefully." << endl;
  61. cin >> input; {
  62. if (input == 1) {
  63. health = health - 20;
  64. cout << "Damage! Your new health: " << health << endl;
  65. }
  66. if (input == 2) {
  67. health = health - 0;
  68. cout << "Lucky Punk! No damage. Current health: " << health << endl;
  69. }
  70. if (input == 3) {
  71. health = health - 10;
  72. cout << "Damage! Your new health: " << health << endl;
  73. }
  74. if (input == 4) {
  75. health = health - 50;
  76. cout << "Damage! Your new health: " << health << endl;
  77. }
  78. if (input == 5) {
  79. cout << "Critical damage! You will not make it." << endl;
  80. }
  81. }
  82.  
  83. }
  84.  
  85. void damageImpactTwo()
  86. {
  87. int input;
  88.  
  89. cout << "Choose a number one through five, but choose carefully." << endl;
  90. cin >> input;
  91. {
  92. if (input == 3) {
  93. health = health - 20;
  94. cout << "Damage! Your new health: " << health << endl;
  95. if (health <= 0) {
  96. cout << "You have died." << endl;
  97. }
  98. }
  99.  
  100. if (input == 1) {
  101. health = health - 0;
  102. cout << "Lucky Punk! No damage. Current health: " << health << endl;
  103. }
  104.  
  105. if (input == 2) {
  106. health = health - 10;
  107. cout << "Damage! Your new health: " << health << endl;
  108. if (health <= 0) {
  109. cout << "You have died." << endl;
  110. }
  111. }
  112.  
  113. if (input == 5) {
  114. health = health - 50;
  115. cout << "Damage! Your new health: " << health << endl;
  116. if (health <= 0) {
  117. cout << "You have died." << endl;
  118. }
  119. }
  120.  
  121. if (input == 4) {
  122. cout << "Critical damage! You will not make it." << endl;
  123. }
  124. }
  125. }
  126.  
  127. void findTreasure()
  128. {
  129. char O;
  130.  
  131. cout << "Check this out. You have a chest. Let's see what's inside." << endl;
  132. cout << "Press 'O' to open the chest. Capitalize!" << endl;
  133. cin >> O;
  134.  
  135. if (health <= 80)
  136. {
  137. health = health + 20;
  138. cout << "Your health: " << health << endl;
  139. }
  140. }
  141.  
  142. void findTreasureTwo()
  143. {
  144. char O;
  145.  
  146. cout << "Check this out. You have a chest. Let's see what's inside." << endl;
  147. cout << "Press 'O' to open the chest. Capitalize!" << endl;
  148. cin >> O;
  149.  
  150. if (health <= 50)
  151. {
  152. health = health + 50;
  153. cout << "Your health: " << health << endl;
  154. }
  155. }
  156.  
  157. void findExplosive()
  158. {
  159. cout << "Watch out!!!!" << endl;
  160. cout << "Boom." << endl;
  161. cout << "What did I just say? Your health has decreased. Great job!" << endl;
  162. health = health - 20;
  163. if (health <= 0) {
  164. cout << "You have died." << endl;
  165. }
  166. cout << "Health: " << health << endl;
  167. }
  168.  
  169. void findExplosiveTwo()
  170. {
  171. cout << "Uh oh." << endl;
  172. cout << "Pfft." << endl;
  173. health = health - 10;
  174. if (health <= 0) {
  175. cout << "You have died." << endl;
  176. }
  177. cout << "Think of it this way. You're not dead." << endl;
  178. cout << "Your health: " << health << endl;
  179. }
  180.  
  181. void advertisementPBP()
  182. {
  183. cout << "What's poppin?" << endl;
  184. cout << "Pirate's Booty! That's what's poppin!" << endl;
  185. cout << "Try our new Pirate's Booty Aged White Cheddar Popcorn....Available at your nearest convenience store." << endl;
  186. health = health + 10;
  187. cout << "Thanks for watching the ad, heres your last 10 health" << health << endl;
  188.  
  189. }
  190.  
  191. void advertisementMCD()
  192. {
  193. cout << "Feeling hungry? Try the McDonald's dollar menu! Now with lettuce!" << endl;
  194. cout << "Badabababa. I'm loving it!" << endl;
  195. }
  196.  
  197. void stopAds()
  198. {
  199. cout << "Would you like to stop ads?" << endl;
  200. cout << "Well, I'd love to help, but you bought a Pirated Game." << endl;
  201. cout << "LOL. Rest in peace." << endl;
  202. }
  203.  
  204. void cannonThreat()
  205. {
  206. char input, IDKTPSWD;
  207.  
  208. cout << "Ahoy MATEy! Welcome to Australia! There are lots of cannon threats here. To make sure it's you, enter the password. (IDKTPSWD) " << endl;
  209. cin >> input;
  210.  
  211. if (input == IDKTPSWD)
  212. {
  213. cout << "Great! Proceed to the red x in the cave." << endl;
  214. }
  215. }
  216.  
  217. void thePriceisRight()
  218. {
  219. int input;
  220.  
  221. cout << "Welcome to the Price is Right! If you can guess within $2, you get a level 2 health pack!" << endl;
  222. cout << "Here, you can see a loaf of bread. Isn't that Wonderful? It is pre-sliced and picked up at the nearest supermarket. How much does this loaf of bread cost?" << endl;
  223. cin >> input;
  224.  
  225. if (input <= 5 && input >= 2)
  226. {
  227. cout << "You now have a level 2 health pack! " << endl;
  228. }
  229. }
  230.  
  231. void attackOtherSwing()
  232. {
  233. char input, duck, swing;
  234.  
  235. cout << "There is someone coming behind you! And he has a sword! Duck!" << endl;
  236. cin >> input;
  237.  
  238. if (input == duck)
  239. {
  240. cout << "He missed! Swing your sword!" << endl;
  241. cin >> input;
  242.  
  243. if (input == swing)
  244. {
  245. cout << "You killed him! Shame on you! You have recieved one coin." << endl;
  246. coin++;
  247. cout << "Coins: " << coin << endl;
  248. }
  249. }
  250. else
  251. {
  252. cout << "He hit you. -20 health." << endl;
  253. health = health - 20;
  254. if (health <= 0) {
  255. cout << "You have died." << endl;
  256. }
  257. cout << "Health: " << health << endl;
  258. }
  259. }
  260.  
  261. void cannonAttack()
  262. {
  263. float input, S;
  264.  
  265. cout << "You're under attack! Someone is shooting you with their cannon!" << endl;
  266. cout << "Boom!" << endl;
  267. health = health - 20;
  268. if (health <= 0) {
  269. cout << "You have died." << endl;
  270. }
  271. cout << "Health: " << health << endl;
  272. cout << "Shoot your cannon! Type S for shoot!" << endl;
  273. cin >> input;
  274.  
  275. if (input == S)
  276. {
  277. cout << "You won! The enemy is destroyed!" << endl;
  278. cout << "You have recieved one coin!" << endl;
  279. coin++;
  280. cout << "Coins: " << coin << endl;
  281. }
  282.  
  283. else
  284. {
  285. cout << "You've been hit! Critical damage!" << endl;
  286. health = health / 2;
  287. cout << "Health:" << health << endl;
  288. getHealth();
  289.  
  290. }
  291. }
  292.  
  293. void printCredits()
  294. {
  295. float input;
  296. float p, c;
  297.  
  298. cout << "Ahoy! Press p to play the game. Press c to see the credits!" << endl;
  299. cin >> input;
  300.  
  301. if (input == p)
  302. {
  303. cout << "Welcome to the Pirated Game!" << endl;
  304. }
  305.  
  306. if (input == c)
  307. {
  308. cout << "Built by: Benjamin Parma and Zachary Halpern. Gotta give us credit!" << endl;
  309. }
  310.  
  311. }
  312.  
  313. void encounterEnemy()
  314. {
  315. char input;
  316. float L, F;
  317. float hisHealth;
  318.  
  319. hisHealth = 100;
  320. cout << "You've encountered another ship! Press L to load your cannon!" << endl;
  321. cin >> input;
  322.  
  323.  
  324. if (input = 'L') {
  325. cout << "Cannon loaded! Press F to fire." << endl;
  326.  
  327. cin >> input;
  328.  
  329. if (input = 'F') {
  330. hisHealth = hisHealth - 100;
  331. cout << "His ship was hit! His health: " << hisHealth << endl;
  332. }
  333. else {
  334. health = health - 20;
  335. if (health <= 0) {
  336. cout << "You have died." << endl;
  337. }
  338. cout << "You've been hit! Your health: " << health << endl;
  339. }
  340. }
  341. else {
  342. health = health - 20;
  343. cout << "Too slow! You've been hit! Health: " << health << endl;
  344. }
  345.  
  346. if (hisHealth = 0)
  347. {
  348. cout << "congrats" << endl;
  349. cout << "you killed your fellow man" << endl;
  350. cout << "you have gained 10 coins for sinking his merchant ship" << endl;
  351. cout << "Coins: " << coin << endl;
  352.  
  353. }
  354. }
  355.  
  356. void encounterHelp() {
  357. cout << "Captain! I found you some aid. These leaves are healing. Here, apply them to your wounds." << endl;
  358.  
  359. if (health <= 80)
  360. {
  361. health = health + 20;
  362. cout << "Your health: " << health << endl;
  363. }
  364.  
  365. else
  366. {
  367. cout << "You have recieved a level 2 health pack." << endl;
  368. }
  369. }
  370.  
  371. void encounterSink()
  372. {
  373. float input;
  374.  
  375. cout << "Arrrg, Captain! The ship is sinking. We need to patch the hole!" << endl;
  376. cout << "Solve this problem to repair the ship! 12 X 4 = ? " << endl;
  377. cin >> input;
  378.  
  379. if (input == 48)
  380. {
  381. cout << "The boat has been repaired! Great job!" << endl;
  382. }
  383. else
  384. {
  385. float input, plane, airplane, bb;
  386.  
  387. cout << "You're starting to drown!" << endl;
  388. health = health - 10;
  389. if (health <= 0) {
  390. cout << "You have died." << endl;
  391. }
  392. cout << "Health: " << health << endl;
  393. cout << "Solve this riddle to save yourself! What has 4 wheels and flies?" << endl;
  394. cin >> input;
  395.  
  396. if
  397. (input == plane || airplane) {
  398. cout << "You're saved!" << endl;
  399. }
  400. else
  401. {
  402. cout << "Crtitical damage!" << endl;
  403. health = health - 50;
  404. cout << "Health: " << health << endl;
  405. cout << "Solve this pattern. aabbaabbaabbaa__." << endl;
  406. cin >> input;
  407. if (input == bb) {
  408. cout << "You're saved!" << endl;
  409. }
  410. else
  411. {
  412. cout << "You have died." << endl;
  413. }
  414. }
  415.  
  416. }
  417. }
  418. void attackEnemy()
  419. {
  420. float L, F;
  421. float input;
  422.  
  423. cout << "You've spotted an enemy! Press L to load!" << endl;
  424. cin >> input;
  425. if (input == L)
  426. {
  427. cout << "Loaded! Press F to fire!" << endl;
  428. cin >> input;
  429.  
  430. if (input == F)
  431. {
  432. cout << "You killed the enemy! Great job. You've earned one coin." << endl;
  433. coin++;
  434. cout << "Coins: " << coin << endl;
  435.  
  436. }
  437.  
  438. else
  439. {
  440. cout << "He spotted you first!" << endl;
  441. cout << "Pow!" << endl;
  442. cout << "You've been hit." << endl;
  443. health = health - 20;
  444. if (health <= 0) {
  445. cout << "You have died." << endl;
  446. }
  447. cout << "Health: " << endl;
  448. cout << "Press F to fire!" << endl;
  449. cin >> input;
  450. if (input == F) {
  451. cout << "You killed the enemy! Great job. You've earned one coin." << endl;
  452. coin++;
  453. cout << "Coins: " << coin << endl;
  454.  
  455. }
  456. }
  457. }
  458.  
  459. else
  460. {
  461. cout << "I don't really know why you couldn't follow directions. Sorry, son. You're dead." << endl;
  462. }
  463. }
  464.  
  465. void storm()
  466. {
  467. float input, C;
  468.  
  469. cout << "The Island Weather Service has issued a storm warning for this area. Take cover immediately." << endl;
  470. cout << "Press C for cover." << endl;
  471. cin >> input;
  472.  
  473. if (input == C)
  474. {
  475. cout << "Great job! You avoided a tree falling on your face!" << endl;
  476. }
  477.  
  478. else
  479. {
  480. cout << "Bet you didn't like that nail poking your eye out, did you? I told you to take cover." << endl;
  481. health = health - 10;
  482. if (health <= 0) {
  483. cout << "You have died." << endl;
  484. }
  485. cout << "Health: " << endl;
  486. cout << "Your incompetance is unbelievable." << endl;
  487. }
  488. }
  489.  
  490. void stormTwo()
  491. {
  492. float input, C;
  493.  
  494. cout << "The Island Weather Service has issued a storm warning for this area. Take cover immediately." << endl;
  495. cout << "Press C for cover." << endl;
  496. cin >> input;
  497.  
  498. if (input == C) {
  499. cout << "Great job! You avoided a tree falling on your face!" << endl;
  500. }
  501.  
  502. else {
  503. cout << "Bet you didn't like that nail poking your eye out, did you? I told you to take cover." << endl;
  504. health = health - 20;
  505. if (health <= 0) {
  506. cout << "You have died." << endl;
  507. }
  508. cout << "Health: " << endl;
  509. cout << "Your incompetance is unbelievable." << endl;
  510. }
  511. }
  512.  
  513. void enterCave()
  514. {
  515. float input, W;
  516. cout << "You've entered a cave." << endl;
  517. cout << "Watch out! There are bats nearby!" << endl;
  518. cout << "Press W to swat them off." << endl;
  519. cin >> input;
  520.  
  521. if (input == W) {
  522. cout << "Congratulations! You swatted off the bats." << endl;
  523. cout << "You have recieved one coin." << endl;
  524. coin++;
  525. cout << "Coins: " << coin << endl;
  526.  
  527. }
  528. else
  529. {
  530. cout << "The bats got you." << endl;
  531. health = health - 10;
  532. if (health <= 0) {
  533. cout << "You have died." << endl;
  534. cout << "Your health is depreciating. Press W to swat off the bats before its too late! Health: " << health << endl;
  535. cin >> input;
  536.  
  537. if (input == W) {
  538. cout << "You have swatted off the bats! Good job, but you have lost a little bit of health due to the delay. Health: " << health << endl;
  539. }
  540. else
  541. {
  542. cout << "The bats got to you. They didn't even bat an eye. You have died." << endl;
  543. }
  544. }
  545. }
  546. }
  547.  
  548. void rollingBarrel() {
  549.  
  550. char choice;
  551. float J, S, input;
  552.  
  553. cout << "Aye! You have made it to the final challenge: the rolling barrel. Jump when I say jump, and squat when I say squat. If you don't you will be squat." << endl;
  554. cout << "Are you ready? (y/n)" << endl;
  555.  
  556. if (choice == 'y') {
  557. cout << "Here comes the first barrel! Jump! (Press J for jump.)" << endl;
  558. cin >> input;
  559. if (input == J) {
  560. cout << "First barrel avoided." << endl;
  561. cout << "Here comes another! Watch out! (Press S for squat." << endl;
  562. cin >> input;
  563.  
  564. if (input == S) {
  565. cout << "Here comes a barrel! Jump! (Press J for jump.)" << endl;
  566. cin >> input;
  567.  
  568. if (input == J) {
  569. cout << "Barrel avoided." << endl;
  570. cout << "Here comes another! Watch out! (Press S for squat." << endl;
  571. cin >> input;
  572. }
  573. }
  574. }
  575. }
  576.  
  577. else {
  578. health = health - 20;
  579. cout << " Damage! Health: " << health << endl;
  580. cout << "You lost a game. Nice job!" << endl;
  581. if (health <= 0) {
  582. cout << "You have died." << endl;
  583. }
  584. }
  585. }
  586. void yourDeath()
  587. {
  588. cout << "You have died. All your coins have been lost." << endl;
  589. }
  590.  
  591. void initialHealthPack()
  592. {
  593. health = health + 80;
  594. cout << "You're at full health! Health: " << health << endl;
  595. }
  596. void shipfight()
  597. {
  598. char input, S;
  599.  
  600. cout << "You board a ship but unknowingly board with an enemy." << endl;
  601. cout << "You two see each other and want to engage in a fight." << endl;
  602. cout << "Press S to swing your sword." << endl;
  603. cin >> input;
  604. if (input == 'S') {
  605. cout << "The enemy's head was cut off. Great job. You've earned one coin." << endl;
  606. coin++;
  607. cout << "Coins: " << coin << endl;
  608.  
  609. }
  610. }
  611. void swordfight()
  612. {
  613. char input, S;
  614.  
  615. cout << "Press S to swing your sword." << endl;
  616. cin >> input;
  617. if (input == 'S') {
  618. cout << "The enemy's head was cut off. Great job. You've earned one coin." << endl;
  619. coin++;
  620. cout << "Coins: " << coin << endl;
  621.  
  622. }
  623. }
  624.  
  625. void retirement()
  626. {
  627. char choice;
  628. char A, B;
  629.  
  630. cout << "The road ahead is long and dangerous" << endl;
  631. cout << "You can go ahead and: " << endl;
  632. cout << "(A) retire, and live a peaceful life " << endl;
  633. cout << "Or (B) continue on" << endl;
  634. cin >> choice;
  635.  
  636. if (choice == 'A') {
  637. cout << "You live out your days as celebrated individual in your town" << endl;
  638. cout << "Kids come to your house and ask to hear your stories about being a pirate " << endl;
  639. cout << "thanks for playing!" << endl;
  640. }
  641.  
  642. else if (choice == 'B') {
  643. cout << "your greed outweights everything else." << endl;
  644. cout << " you decide to continue on your journey." << endl;
  645. }
  646. }
  647.  
  648. void findthelegend27sTreasure() {
  649. cout << "Nice Job!" << endl;
  650. cout << "You found the treasure!" << endl;
  651. coin = coin + 1000000;
  652. cout << "You now have " << coin << " coins" << endl;
  653. }
  654.  
  655. void advertisementCM() {
  656. cout << "Feel the need for some spiced pirate rum?" << endl;
  657. cout << "look no further with Captain Morgan's Spiced Rum!" << endl;
  658. cout << "Enjoy some piratey goodness!" << endl;
  659. };
  660.  
  661. int main() {
  662. Pirate var;
  663. char choice, n;
  664. cout << "Hello!" << endl;
  665. cout << "Welcome to: The pirated game" << endl;
  666. cout << "Would you like to play? (y/n)" << endl;
  667. cin >> choice;
  668. if (choice == 'n') {
  669. cout << "Alright, thanks for your time" << endl;
  670. return 0;
  671. }
  672.  
  673. else
  674. {
  675. cout << "Great, get ready for an amazing story line" << endl;
  676. cout << "You are Captain Landlubber, the most feared man on the seven seas" << endl;
  677. cout << "You have sunk every single ship sent out after you, pillaged almost every village on every coastline in the world" << endl;
  678. cout << "Your age is unknown, and so is your backstory" << endl;
  679. cout << "The only thing you know how to do is be a pirate, and your are the best at it" << endl;
  680. cout << "You slowly come back to conciousness, you see the chaos around you" << endl;
  681. cout << "The battle commences around you in the village square" << endl;
  682. cout << "You notice the wounds on your body, and realize you are bleeding out" << endl;
  683. cout << "As you look around, you notice that one of your fallen shipmates has dropped a healthpack" << endl;
  684. cout << "Do you: " << endl;
  685. cout << "A. Crawl " << endl;
  686. cout << "B. Give up and die" << endl;
  687. cin >> choice;
  688.  
  689. if (choice == 'B') {
  690. var.yourDeath();
  691.  
  692. }
  693.  
  694. else if (choice == 'A')
  695. {
  696. cout << "You begin to crawl towards the health pack" << endl;
  697. cout << "after several minutes of agonizing pain, you reach the health pack" << endl;
  698. var.initialHealthPack();
  699.  
  700. cout << "After using the health pack, you slowly feel better" << endl;
  701. cout << "You notice your health bar is going from 10 to 90" << endl;
  702. cout << "In order to get the last 10 health, you must watch an ad for pirates booty" << endl;
  703. cout << "Do you wish to see the ad? Pick carefully now. (y/n)" << endl;
  704. cin >> choice;
  705.  
  706. if (choice == 'n')
  707. {
  708. cout << "wow look at you, thinking you dont have to pay to play this game" << endl;
  709. cout << "Youve now automatically lost the game, you penny pincher" << endl;
  710. var.yourDeath();
  711. }
  712. else
  713. {
  714. cout << "thank you for choosing to watch the ad from our sponsors " << endl;
  715. cout << "the ad which will play is from our friends at Pirates booty" << endl;
  716. var.advertisementPBP();
  717.  
  718.  
  719. cout << "After healing up do you:" << endl;
  720. cout << "A. Continue Fighting" << endl;
  721. cout << "B. Return to your ship" << endl;
  722. cin >> choice;
  723.  
  724. if (choice == 'A') {
  725. cout << "You decide to keep fighting on" << endl;
  726. cout << "You soon encounter an enemy pirate" << endl;
  727. cout << "Using your sword, you engage the enemy" << endl;
  728. var.swordfight();
  729. cout << "You eventually decide to return to yourship, as youve lost too many crew members" << endl;
  730.  
  731. }
  732. else
  733. {
  734. cout << "You flee the battlefield with what remains of your crew" << endl;
  735. var.shipfight();
  736. }
  737.  
  738. cout << "You and your crew quickly set sail away from the battlefield" << endl;
  739. cout << "Hoping to forget your first defeat, you decide to do something you know you are good at." << endl;
  740. cout << "You scan the horizon for ships to pillage" << endl;
  741. cout << "Days pass by before you finnaly find a ship that you can engage" << endl;
  742. cout << "Your crew quickly mussers to battlestations, ready to finnally taste victory" << endl;
  743. cout << "Do you:" << endl;
  744. cout << "A. Enage?" << endl;
  745. cout << "B. Run away and dissapoint your crew?" << endl;
  746. cin >> choice;
  747.  
  748. if (choice == 'B') {
  749. cout << "Coward!" << endl;
  750. cout << "Your crew thinks of you the same way!" << endl;
  751. cout << "They have decided to mutiny against a terrible leader!" << endl;
  752. cout << "You are lowerd into one of the lifeboats and set adrift without any provisions." << endl;
  753. cout << "You are never heard from again." << endl;
  754. var.yourDeath();
  755. }
  756. else {
  757. cout << "congrats you arent a coward" << endl;
  758. var.encounterEnemy();
  759.  
  760.  
  761. cout << "To continue playing, please listen to another ad (y/n)" << endl;
  762. cin >> choice;
  763.  
  764. if (choice == 'n') {
  765. cout << "wow look at you, thinking you dont have to pay to play this game" << endl;
  766. cout << "Youve now automatically lost the game, you penny pincher" << endl;
  767. var.yourDeath();
  768. }
  769.  
  770. else if (choice == 'y') {
  771. cout << "thank you for choosing to watch the ad from our sponsor again " << endl;
  772. cout << "the ad which will play is from our friends at Mcdonalds" << endl;
  773. var.advertisementMCD();
  774.  
  775.  
  776. cout << "you watch the enemy ship sink" << endl;
  777. cout << "now that the enemy ship has sunk, you can continue on your way to finding the treasure. " << endl;
  778. cout << "You stop in port, taking on supplies and replacement crew members" << endl;
  779. cout << "A wiseman stops you and tells you that: " << endl;
  780. var.retirement();
  781.  
  782. cout << "you continue sailing, hoping to find some clues to find thelegend27's buried treasure " << endl;
  783. cout << "The days pass by quickly as you search for clues." << endl;
  784. cout << "As you search around, the weather progessively gets worse" << endl;
  785. cout << "The ship is rolling heavily, and waves are breaking over the sides" << endl;
  786. cout << "Your first mate tells you that you should turn back, and that there is no point going on" << endl;
  787. cout << "Do you:" << endl;
  788. cout << "(A.) Turn back to port and give up" << endl;
  789. cout << "(B.) Press on in the hopes of finding the treasure" << endl;
  790. cin >> choice;
  791. if (choice == 'A') {
  792. cout << "You make the decision to turn back to port" << endl;
  793. cout << "Upon reaching port, you decide that you are done with being a pirate" << endl;
  794. cout << "You live out your days as a popular individual in your town" << endl;
  795. cout << "Kids come to your house and ask to hear your stories about being a pirate " << endl;
  796. cout << "You eventually die a peaceful and happy death" << endl;
  797. cout << "thanks for playing!" << endl;
  798. return 4;
  799. }
  800. if (choice == 'B') {
  801. cout << "You decide to keep pressing on" << endl;
  802. cout << "The weather cotinues to get worse" << endl;
  803. cout << "Eventually something had to give, and you are alerted to a leak by one of your crew members" << endl;
  804. var.encounterSink();
  805. }
  806. cout << "You've barely survived the damage, and were able to patchup the hole in time" << endl;
  807. cout << "Shaken, but not dissuaded, you continue on to finding the treasure of thelegend27 " << endl;
  808. cout << "The story still surges on around you" << endl;
  809. cout << "you decide to try to seek shelter in a nearby port" << endl;
  810. cout << "As you are ploting a course in the map room, you hear a large bang" << endl;
  811. cout << "suddenly the bookshelf behind breaks loose and falls" << endl;
  812. cout << "You are unable to avoid being crushed by it" << endl;
  813. var.damageImpactOne();
  814. cout << "ouch, that hurt!" << endl;
  815. cout << "You feel the pain within your body magnify and become unberable" << endl;
  816. cout << "You realize the urgent need to seek shelter" << endl;
  817. cout << "You give the order to make for any land, and then pass out due to the pain" << endl;
  818. cout << "You wake up again, after an unknown number of days" << endl;
  819. cout << "You analyze your suroundings and notice that you are no longer aboard the ship" << endl;
  820. cout << "It is apparent now that you are on land, inside of a cave." << endl;
  821. cout << "By your side, you see a health pack" << endl;
  822. cout << "Do you: " << endl;
  823. cout << "(A.) use the health pack?" << endl;
  824. cout << "(B.) save it for later?" << endl;
  825. cin >> choice;
  826.  
  827. if (choice == 'A') {
  828. cout << "You decide to use the health pack" << endl;
  829. var.getHealth();
  830. cout << "You feel much better. " << endl;
  831. cout << "You decide to try to get up, but for some reason you can't" << endl;
  832. cout << "You find that you have been restrained to the bed" << endl;
  833. cout << "After struggling to be freed, you finally begin yelling for help" << endl;
  834. cout << "A man comes down and sees you" << endl;
  835. cout << "He notices your weakened state and laughs" << endl;
  836. cout << "He decides to free you, on the condition that you and him duel" << endl;
  837. cout << "you agree, and he releases the chains" << endl;
  838. var.swordfight();
  839. cout << "Youve killed the poor guy!" << endl;
  840. cout << "As you regain your stamina, you hear another man running towards you" << endl;
  841. var.attackOtherSwing();
  842. cout << "Jeez, no wonder your a pirate" << endl;
  843.  
  844.  
  845.  
  846. }
  847. if (choice == 'B') {
  848. cout << "You decide to save the health pack for later" << endl;
  849. cout << "You can still feel the pain, but its bearable now" << endl;
  850. cout << "You decide to try to get up, but for some reason you can't" << endl;
  851. cout << "You find that you have been restrained to the bed" << endl;
  852. cout << "After struggling to be freed, you finally begin yelling for help" << endl;
  853. cout << "A man comes down and sees you" << endl;
  854. cout << "He notices your weakened state and laughs" << endl;
  855. cout << "He decides to free you, on the condition that you and him duel" << endl;
  856. cout << "you agree, and he releases the chains" << endl;
  857. var.swordfight();
  858. cout << "Youve killed the poor guy!" << endl;
  859. cout << "You are still hurting" << endl;
  860. cout << "Would you like to use the health pack from earlier? (y/n)" << endl;
  861. cin >> choice;
  862. if (choice == 'y') {
  863. cout << "You decide to use the health pack" << endl;
  864. var.getHealth();
  865. cout << "As you regain your stamina, you hear another man running towards you" << endl;
  866. var.attackOtherSwing();
  867. cout << "Jeez, no wonder your a pirate" << endl;
  868. }
  869. if (choice == 'n') {
  870. cout << "You decide not to use the health pack" << endl;
  871. cout << "As you regain your stamina, you hear another man running towards you" << endl;
  872. var.attackOtherSwing();
  873. cout << "Jeez, no wonder your a pirate" << endl;
  874. cout << "This is your last chance to use the healthpack." << endl;
  875. cout << "Do you wish to not use it (y/n)" << endl;
  876. cin >> choice;
  877. if (choice = 'n') {
  878. cout << "Finnally you decide to use it" << endl;
  879. var.getHealth();
  880. }
  881. if (choice = 'y') {
  882. cout << "You stubborn idiot" << endl;
  883. cout << "Now you're stuck with what ever health you have left" << endl;
  884. }
  885. }
  886.  
  887.  
  888. cout << "You decide to try to escape the cave, and possibly find your crew" << endl;
  889. cout << "You hear some scary sounds, but you decide to cary on" << endl;
  890. cout << "Before you can move on to the next part, please listen to another ad from our sponsors" << endl;
  891. cout << "Do you wish to listen? (y/n)" << endl;
  892. cin >> choice;
  893.  
  894. if (choice = 'n')
  895. {
  896. cout << "wow look at you, thinking you dont have to pay to play this game" << endl;
  897. cout << "Youve now automatically lost the game, you penny pincher" << endl;
  898. cout << "enjoy your time in davey jones's locker!" << endl;
  899. var.yourDeath();
  900. }
  901. else {
  902. cout << "thank you for choosing to watch the ad from our sponsors " << endl;
  903. cout << "the ad which will play is from favorite spiced rum seller" << endl;
  904. var.advertisementCM();
  905. }
  906. cout << "I'd bet you'd like to stop seeing ads right about now " << endl;
  907. var.stopAds();
  908. cout << "now that you've seen the mandatory ad, you push on into the darkness" << endl;
  909. var.enterCave();
  910. system("pause");
  911. cout << "You huridly leave the bat infested hell hole" << endl;
  912. cout << "You begin to hear a loud rumbling sound in the distance" << endl;
  913. cout << "you look in the direction which the sound is comming from and you see a bunch of barrels comming down at you" << endl;
  914. var.rollingBarrel();
  915. system("pause");
  916. cout << "You narrowly avoided the barrels" << endl;
  917. cout << "you continue along your journey to leave the cave" << endl;
  918. cout << "eventually after several hours of aimless wandering, you see the light at the end of the tunnel" << endl;
  919. cout << "Upon exiting the cave, you see your crew outside" << endl;
  920. cout << "You notice a cannon near by as you begin to run towards your crew" << endl;
  921. cout << "Out of no where a cannon begins to fire at you" << endl;
  922. var.cannonAttack();
  923. system("pause");
  924. cout << "Upon Destroying the enemy cannon, you run over to where you saw your crew" << endl;
  925. cout << "They see that you are hurt, and offer you some magical leaves" << endl;
  926. var.encounterHelp();
  927. system("pause");
  928. cout << "After healing up, the crew point out a door which sparked their interest" << endl;
  929. cout << "You approach the door, and see that it is locked with a password." << endl;
  930. var.cannonThreat();
  931. system("pause");
  932. cout << "The door opens for you, and you enter the room" << endl;
  933. cout << "sudenly rocks rain down from the ceiling and hit you" << endl;
  934. var.damageImpactTwo();
  935. system("pause");
  936. cout << "covered with dust, and visibly shaken, you are faced with two options: " << endl;
  937. cout << "(A.) Turn back and forget any of this ever happened?" << endl;
  938. cout << "(B.) Press forward?" << endl;
  939. cin >> choice;
  940. if (choice == 'A') {
  941. cout << "You decide to turn back" << endl;
  942. cout << "You leave the island and return home" << endl;
  943. cout << "You live out your days as a popular individual in your town" << endl;
  944. cout << "Kids come to your house and ask to hear your stories about being a pirate " << endl;
  945. cout << "You eventually die a peaceful and happy death" << endl;
  946. cout << "thanks for playing!" << endl;
  947. var.printCredits();
  948. }
  949. if (choice == 'B') {
  950. cout << "You decide continue moving forward, destined to find thelegend27's treasure." << endl;
  951. }
  952. cout << "You find 2 chests in a room, and only 1 key " << endl;
  953. cout << "Do you open: " << endl;
  954. cout << "(A.) Chest 1?" << endl;
  955. cout << "(B.) Chest 2?" << endl;
  956. cin >> choice;
  957. if (choice == 'A') {
  958. var.findTreasure();
  959. }
  960. if (choice == 'B') {
  961. var.findTreasureTwo();
  962. }
  963. cout << "After opening the chest, you continue on" << endl;
  964. cout << "Soon the room splits into three hallways (left, right and middle), which way do you chose?" << endl;
  965. cout << "(A.) Right" << endl;
  966. cout << "(B.) Left" << endl;
  967. cout << "(C.) Middle" << endl;
  968. if (choice == 'A') {
  969. cout << "You walk along and trigger a trap!" << endl;
  970. var.findExplosive();
  971. cout << "You continue along" << endl;
  972. }
  973. if (choice == 'B') {
  974. cout << "You walk along and trigger a trap!" << endl;
  975. var.findExplosiveTwo();
  976. cout << "You continue along" << endl;
  977. }
  978. if (choice == 'C') {
  979. cout << "you continue walking" << endl;
  980. }
  981. cout << "Finnally you see it" << endl;
  982. cout << "Thelegend27's treasure" << endl;
  983. var.findthelegend27sTreasure();
  984. cout << "You are now the richest man alive in the world" << endl;
  985. cout << "You bring back your riches and buy a massive house on the outskirts of the town" << endl;
  986. cout << "Youve decided to settle down and retire from being a pirate" << endl;
  987. cout << "You live out your days as a popular individual, adored by all" << endl;
  988. cout << "Kids come to your house and ask to hear your stories about being a pirate " << endl;
  989. cout << "You eventually die a peaceful and happy death" << endl;
  990. cout << "thanks for playing!" << endl;
  991. var.printCredits();
  992.  
  993. system("pause");
  994. }
  995. }
  996. }
  997. }
  998. }
  999. }
  1000. }
  1001. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement