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
|
#include <iostream>
#include "Combat.h"
#include "Player.h"
#include "Monster.h"
using namespace std;
Combat::Combat()
{
}
bool Combat::runCombat()
{
Player kyle;
Monster bigger;
int speed1;
kyle.init(1, 10, 10, 3, 5, 6, 15, 12, 500, 1000);
bigger.init(1, 10, 10, 2, 5, 6, 15, 12, 500, 1000);
kyle.accessSpeed();
char turn = 'a';
}
void Combat::pickAction()
{
int actionChoice;
cout << "please pick an action!" << endl;
cout << "1). Attack!" << endl;
cout << "2). Cast Spell!" << endl;
cin >> actionChoice;
if (actionChoice == 1) {
makeAttack();
}
else if (actionChoice == 2) {
//Spell function
}
else {
//Need to make this loop for invalid choice.
cout << "You cannot do that now!" << endl;
}
}
void Combat::makeAttack()
{
}
int Combat::checkSpeed(int crea1, int crea2)
{
if (crea1 > crea2) {
return 1;
}
else {
return 2;
}
}
|