-
Notifications
You must be signed in to change notification settings - Fork 372
Expand file tree
/
Copy pathGenericMageNonCombatStrategy.cpp
More file actions
102 lines (87 loc) · 3.3 KB
/
GenericMageNonCombatStrategy.cpp
File metadata and controls
102 lines (87 loc) · 3.3 KB
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
#include "botpch.h"
#include "../../playerbot.h"
#include "MageMultipliers.h"
#include "GenericMageNonCombatStrategy.h"
using namespace ai;
class GenericMageNonCombatStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
GenericMageNonCombatStrategyActionNodeFactory()
{
creators["molten armor"] = &molten_armor;
creators["mage armor"] = &mage_armor;
creators["ice armor"] = &ice_armor;
}
private:
static ActionNode* molten_armor(PlayerbotAI* ai)
{
return new ActionNode ("molten armor",
/*P*/ NULL,
/*A*/ NextAction::array(0, new NextAction("mage armor"), NULL),
/*C*/ NULL);
}
static ActionNode* mage_armor(PlayerbotAI* ai)
{
return new ActionNode ("mage armor",
/*P*/ NULL,
/*A*/ NextAction::array(0, new NextAction("ice armor"), NULL),
/*C*/ NULL);
}
static ActionNode* ice_armor(PlayerbotAI* ai)
{
return new ActionNode ("ice armor",
/*P*/ NULL,
/*A*/ NextAction::array(0, new NextAction("frost armor"), NULL),
/*C*/ NULL);
}
};
GenericMageNonCombatStrategy::GenericMageNonCombatStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai)
{
actionNodeFactories.Add(new GenericMageNonCombatStrategyActionNodeFactory());
}
void GenericMageNonCombatStrategy::InitTriggers(std::list<TriggerNode*> &triggers)
{
NonCombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode(
"arcane intellect",
NextAction::array(0, new NextAction("arcane intellect", 21.0f), NULL)));
triggers.push_back(new TriggerNode(
"arcane intellect on party",
NextAction::array(0,
new NextAction("arcane brilliance", 21.0f),
new NextAction("arcane intellect on party", 20.0f),
NULL)));
triggers.push_back(new TriggerNode(
"no conjured drink",
NextAction::array(0, new NextAction("conjure water", 16.0f), NULL)));
triggers.push_back(new TriggerNode(
"no conjured food",
NextAction::array(0, new NextAction("conjure food", 15.0f), NULL)));
triggers.push_back(new TriggerNode(
"no mana gem",
NextAction::array(0, new NextAction("conjure mana gem", 14.0f), NULL)));
triggers.push_back(new TriggerNode(
"remove curse",
NextAction::array(0, new NextAction("remove curse", 41.0f), NULL)));
triggers.push_back(new TriggerNode(
"remove curse on party",
NextAction::array(0, new NextAction("remove curse on party", 40.0f), NULL)));
triggers.push_back(new TriggerNode(
"party member needs food",
NextAction::array(0, new NextAction("give conjured food", 13.0f), NULL)));
triggers.push_back(new TriggerNode(
"party member needs water",
NextAction::array(0, new NextAction("give conjured water", 13.0f), NULL)));
}
void MageBuffManaStrategy::InitTriggers(std::list<TriggerNode*> &triggers)
{
triggers.push_back(new TriggerNode(
"mage armor",
NextAction::array(0, new NextAction("mage armor", 19.0f), NULL)));
}
void MageBuffDpsStrategy::InitTriggers(std::list<TriggerNode*> &triggers)
{
triggers.push_back(new TriggerNode(
"mage armor",
NextAction::array(0, new NextAction("molten armor", 19.0f), NULL)));
}