forked from ubsuny/WorldOfTextCraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoss.h
65 lines (50 loc) · 1.56 KB
/
Boss.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
#ifndef Boss_h
#define Boss_h
#include "Entity.h"
#include <vector>
/* ____ */
/* | _ \ */
/* | |_) | ___ ___ ___ */
/* | _ < / _ \/ __/ __| */
/* | |_) | (_) \__ \__ \ */
/* |____/ \___/|___/___/ */
//
// This is the Boss class.
// Bosses are special entities that are stronger,
// and have the ability to attack the entire opposing party at once.
//
// In addition to the standard Entity interface, it also has
// an "attackAll" function that will attack all of the entities
// inside of a vector<Entity*>.
// --------------------------------------
class Boss : public Entity{
public :
friend class Battle;
Boss( std::string name="",
int attackPower=0,
int healPower=0,
int defensePower=0,
int mana=0,
int multiAttackPower=0 );
// Default defend, heal, and attack
virtual int defend( Entity * other =0){
return defaultDefend(other);
}
virtual int heal( Entity * other=0 ){
return defaultHeal(other);
}
virtual int attack( Entity * other=0 ){
return defaultAttack( other );
}
// Special multiattack to attack many at once.
virtual int multiAttack( Entity * other = 0);
virtual void printStats(std::ostream &out) const;
virtual void print(std::ostream &out) const;
// Overload the input method.
virtual void input( std::string line );
protected:
action_map myMultiAttacks_;
private :
int multiAttackPower_; // The attack power of a mob who can attack more than one opponent.
};
#endif