-
Notifications
You must be signed in to change notification settings - Fork 0
/
Unit.h
72 lines (54 loc) 路 1.17 KB
/
Unit.h
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
//
// Created by Barlas on 5/13/2020.
//
#include <iostream>
#ifndef UNTITLED54_UNIT_H
#define UNTITLED54_UNIT_H
class Unit {
protected:
std::string name;
std::string type;
int position;
int maxHp = 0;
int hp;
int dodge;
int prot = 0;
int speed;
int temporalSpeed;
int accMod;
int baseCrit;
int minDmg;
int maxDmg;
int stunResist;
bool alive = true;
bool stun = false;
int protRound = 0;
public:
Unit();
void virtual dying() = 0;
std::string getName();
std::string getType();
int getHp();
int getDodge();
int getProt();
int getSpeed();
int getTemporalSpeed();
int getAccMod();
int getBaseCrit();
int getMinDmg();
int getMaxDmg();
int getStunResist();
int getPosition();
void increaseSpeed(int speedIncrement);
void increaseHp(int hpIncrement);
void setProt(int prot);
void setTemporalSpeed(int temporalSpeed);
void setPosition(int pst);
bool isAlive();
bool isStun();
void setStun(int stun);
int getProtRound();
void setProtRound(int protRound);
void getDamage(int damage);
};
#endif //UNTITLED54_UNIT_H