-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEnemies.cpp
106 lines (91 loc) · 1.97 KB
/
Enemies.cpp
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#pragma once
#include "Enemies.h"
#include <cstdlib>
#include <cmath>
#include <string>
#include <iostream>
#include <iomanip>
#include <time.h>
using namespace std;
// Default constructor
Enemies::Enemies()
{
Attack = 0;
Defense = 0;
Magic = 0;
Level = 0;
Health = 20;
Name = "";
}
// Destructor
Enemies::~Enemies()
{
}
// Returns an INT of the Enemies's attack
int Enemies::getAttack()
{
return (Attack);
}
// Returns an INT of the Enemies's defense
int Enemies::getDefense()
{
return (Defense);
}
// Returns an INT of the Enemies's magic
int Enemies::getMagic()
{
return (Magic);
}
// Returns an INT of the Enemies's magic
string Enemies::getName()
{
return (Name);
}
// Returns an INT of the Enemies's level
int Enemies::getLevel()
{
return (Level);
}
// Returns an INT of the Enemies's health
int Enemies::getHealth()
{
return (Health);
}
// Uses an INT for the Enemies's new attack
void Enemies::setAttack(int A)
{
Attack = A;
}
// Uses an INT for the Enemies's new health
void Enemies::setHealth(int H)
{
Health = H;
}
// Uses an INT for the Enemies's new level
void Enemies::setLevel(int L)
{
Level = L;
}
// Uses an INT for the Enemies's new defense
void Enemies::setDefense(int D)
{
Defense = D;
}
// Uses an INT for the Enemies's new magic
void Enemies::setMagic(int M)
{
Magic = M;
}
void printNewEnemy(Enemies *E)
{
cout << "|--------------------------|" << endl;
cout << "| Enemy Name |" << endl;
cout << "| " << E->getName() << " |" << endl;
cout << "| Enemy Attack |" << endl;
cout << "| " << E->getAttack() << " |" << endl;
cout << "| Enemy Defense |" << endl;
cout << "| " << E->getDefense() << " |" << endl;
cout << "| Enemy Health |" << endl;
cout << "| " << E->getHealth() << " |" << endl;
cout << "|--------------------------|" << endl;
}