SHARE
TWEET

Untitled

a guest Jul 21st, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ConsoleApplication1.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <vector>
  6. #include <iostream>
  7. #include <ctime>    // For time()
  8. #include <cstdlib>  // For srand() and rand()
  9.  
  10. int create_character(std::string name)
  11. {
  12.  
  13. }
  14.  
  15. int special_menu()
  16. {
  17.  
  18. }
  19.  
  20.  
  21. int choose_target(int target, bool enemies_remain)
  22. {
  23.     if (enemies_remain == true)
  24.     {
  25.         std::cin >> target;
  26.     }
  27.     else
  28.     {
  29.         std::cout << "No enemies remain, you win!";
  30.     }
  31.  
  32.  
  33. }
  34.  
  35.  
  36. int command_menu(int choice, int order)
  37. {
  38.     std::string choice  = "1) Attackn";
  39.     std::string choice2 = "2) Special Attackn";
  40.     std::string choice3 = "3) Itemn";
  41.     std::string choice3 = "4) Runn";
  42.  
  43. std::cin >> choice;
  44.  
  45. if (choice > 4 || choice < 1)
  46. {
  47.     std::cout << "Invalid input.";
  48. }
  49.  
  50. if (choice == 1)
  51. {
  52.     choose_target;
  53. }
  54. else if (choice == 2)
  55. {
  56.  
  57. }
  58. else if (choice == 3)
  59. {
  60.  
  61. }
  62. else if (choice == 4)
  63. {
  64.  
  65. }
  66.  
  67. }
  68.  
  69. int atb_meter(bool normal_speed, bool is_hasted, bool is_slowed, bool is_asleep)
  70. {
  71.     int rando;
  72.     srand(time(0)); // every second a new seed is generated for rando
  73.     rando = (rand() % 70) + 1;
  74.  
  75. if (is_hasted == true)
  76. {
  77.     normal_speed = false;
  78.     is_slowed = false;
  79. }
  80. else if (is_slowed == true)
  81. {
  82.     normal_speed = false;
  83.     is_hasted = false;
  84. }
  85. else
  86. {
  87.     normal_speed = true;
  88. }
  89.  
  90. std::vector<double> meter;
  91. meter.push_back(rando);
  92. meter.push_back(rando);
  93. meter.push_back(rando);
  94. for (int i = 0; i <= 100; meter[i]+=0.5)
  95. {
  96.     if (is_hasted == true)
  97.     {
  98.         meter[i] *= 2;
  99.     }
  100.     else if (is_slowed == true)
  101.     {
  102.         meter[i] /= 2;
  103.     }
  104.     else if (is_asleep)
  105.     {
  106.         meter[i] *= 0;
  107.     }
  108.  
  109.     if (meter[i] == 100)
  110.     {
  111.  
  112.  
  113.     }
  114. }
  115.  
  116.  
  117.  
  118.  
  119. }
  120.  
  121.  
  122. int main()
  123. {
  124.     atb_meter(true, false, false, false);
  125.  
  126.  
  127.  
  128. return 0;
  129. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top