Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication1.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <vector>
- #include <iostream>
- #include <ctime> // For time()
- #include <cstdlib> // For srand() and rand()
- int create_character(std::string name)
- {
- }
- int special_menu()
- {
- }
- int choose_target(int target, bool enemies_remain)
- {
- if (enemies_remain == true)
- {
- std::cin >> target;
- }
- else
- {
- std::cout << "No enemies remain, you win!";
- }
- }
- int command_menu(int choice, int order)
- {
- std::string choice = "1) Attackn";
- std::string choice2 = "2) Special Attackn";
- std::string choice3 = "3) Itemn";
- std::string choice3 = "4) Runn";
- std::cin >> choice;
- if (choice > 4 || choice < 1)
- {
- std::cout << "Invalid input.";
- }
- if (choice == 1)
- {
- choose_target;
- }
- else if (choice == 2)
- {
- }
- else if (choice == 3)
- {
- }
- else if (choice == 4)
- {
- }
- }
- int atb_meter(bool normal_speed, bool is_hasted, bool is_slowed, bool is_asleep)
- {
- int rando;
- srand(time(0)); // every second a new seed is generated for rando
- rando = (rand() % 70) + 1;
- if (is_hasted == true)
- {
- normal_speed = false;
- is_slowed = false;
- }
- else if (is_slowed == true)
- {
- normal_speed = false;
- is_hasted = false;
- }
- else
- {
- normal_speed = true;
- }
- std::vector<double> meter;
- meter.push_back(rando);
- meter.push_back(rando);
- meter.push_back(rando);
- for (int i = 0; i <= 100; meter[i]+=0.5)
- {
- if (is_hasted == true)
- {
- meter[i] *= 2;
- }
- else if (is_slowed == true)
- {
- meter[i] /= 2;
- }
- else if (is_asleep)
- {
- meter[i] *= 0;
- }
- if (meter[i] == 100)
- {
- }
- }
- }
- int main()
- {
- atb_meter(true, false, false, false);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement