mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-24 14:06:22 +00:00
Big update.
This commit is contained in:
161
src/strategy/druid/BearTankDruidStrategy.cpp
Normal file
161
src/strategy/druid/BearTankDruidStrategy.cpp
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "BearTankDruidStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
BearTankDruidStrategyActionNodeFactory()
|
||||
{
|
||||
creators["melee"] = &melee;
|
||||
creators["feral charge - bear"] = &feral_charge_bear;
|
||||
creators["swipe (bear)"] = &swipe_bear;
|
||||
creators["faerie fire (feral)"] = &faerie_fire_feral;
|
||||
creators["bear form"] = &bear_form;
|
||||
creators["dire bear form"] = &dire_bear_form;
|
||||
creators["mangle (bear)"] = &mangle_bear;
|
||||
creators["maul"] = &maul;
|
||||
creators["bash"] = &bash;
|
||||
creators["swipe"] = &swipe;
|
||||
creators["lacerate"] = &lacerate;
|
||||
creators["demoralizing roar"] = &demoralizing_roar;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* melee(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("melee",
|
||||
/*P*/ NextAction::array(0, new NextAction("feral charge - bear"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* feral_charge_bear(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("feral charge - bear",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("reach melee"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* swipe_bear(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("swipe (bear)",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* faerie_fire_feral(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("faerie fire (feral)",
|
||||
/*P*/ NextAction::array(0, new NextAction("feral charge - bear"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* bear_form(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("bear form",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* dire_bear_form(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("dire bear form",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("bear form"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* mangle_bear(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("mangle (bear)",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("lacerate"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* maul(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("maul",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("melee"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* bash(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("bash",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("melee"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* swipe(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("swipe",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("melee"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* lacerate(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("lacerate",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("maul"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* growl(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("growl",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* demoralizing_roar(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("demoralizing roar",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
BearTankDruidStrategy::BearTankDruidStrategy(PlayerbotAI* botAI) : FeralDruidStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new BearTankDruidStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
NextAction** BearTankDruidStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0,
|
||||
new NextAction("lacerate", ACTION_NORMAL + 4),
|
||||
new NextAction("mangle (bear)", ACTION_NORMAL + 3),
|
||||
new NextAction("maul", ACTION_NORMAL + 2),
|
||||
new NextAction("faerie fire (feral)", ACTION_NORMAL + 1),
|
||||
new NextAction("melee", ACTION_NORMAL),
|
||||
nullptr);
|
||||
}
|
||||
|
||||
void BearTankDruidStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
{
|
||||
FeralDruidStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("thorns", NextAction::array(0, new NextAction("thorns", ACTION_HIGH + 9), nullptr)));
|
||||
triggers.push_back(new TriggerNode("bear form", NextAction::array(0, new NextAction("dire bear form", ACTION_HIGH + 8), nullptr)));
|
||||
triggers.push_back(new TriggerNode("faerie fire (feral)", NextAction::array(0, new NextAction("faerie fire (feral)", ACTION_HIGH + 7), nullptr)));
|
||||
triggers.push_back(new TriggerNode("lose aggro", NextAction::array(0, new NextAction("growl", ACTION_HIGH + 8), nullptr)));
|
||||
triggers.push_back(new TriggerNode( "medium aoe", NextAction::array(0, new NextAction("demoralizing roar", ACTION_HIGH + 6), new NextAction("swipe (bear)", ACTION_HIGH + 6), nullptr)));
|
||||
triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("swipe (bear)", ACTION_HIGH + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("bash", NextAction::array(0, new NextAction("bash", ACTION_INTERRUPT + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("bash on enemy healer", NextAction::array(0, new NextAction("bash on enemy healer", ACTION_INTERRUPT + 1), nullptr)));
|
||||
}
|
||||
23
src/strategy/druid/BearTankDruidStrategy.h
Normal file
23
src/strategy/druid/BearTankDruidStrategy.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_BEARTANKDRUIDSTRATEGY_H
|
||||
#define _PLAYERBOT_BEARTANKDRUIDSTRATEGY_H
|
||||
|
||||
#include "FeralDruidStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class BearTankDruidStrategy : public FeralDruidStrategy
|
||||
{
|
||||
public:
|
||||
BearTankDruidStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bear"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_TANK | STRATEGY_TYPE_MELEE; }
|
||||
};
|
||||
|
||||
#endif
|
||||
135
src/strategy/druid/CasterDruidStrategy.cpp
Normal file
135
src/strategy/druid/CasterDruidStrategy.cpp
Normal file
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "CasterDruidStrategy.h"
|
||||
#include "AiObjectContext.h"
|
||||
#include "FeralDruidStrategy.h"
|
||||
|
||||
class CasterDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
CasterDruidStrategyActionNodeFactory()
|
||||
{
|
||||
creators["faerie fire"] = &faerie_fire;
|
||||
creators["hibernate"] = &hibernate;
|
||||
creators["entangling roots"] = &entangling_roots;
|
||||
creators["entangling roots on cc"] = &entangling_roots_on_cc;
|
||||
creators["wrath"] = &wrath;
|
||||
creators["starfall"] = &starfall;
|
||||
creators["insect swarm"] = &insect_swarm;
|
||||
creators["moonfire"] = &moonfire;
|
||||
creators["starfire"] = &starfire;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* faerie_fire(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("faerie fire",
|
||||
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* hibernate(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("hibernate",
|
||||
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
|
||||
/*A*/ NextAction::array(0, new NextAction("entangling roots"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* entangling_roots(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("entangling roots",
|
||||
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* entangling_roots_on_cc(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("entangling roots on cc",
|
||||
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* wrath(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("wrath",
|
||||
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* starfall(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("starfall",
|
||||
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
|
||||
/*A*/ NextAction::array(0, new NextAction("hurricane"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* insect_swarm(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("insect swarm",
|
||||
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* moonfire(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("moonfire",
|
||||
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* starfire(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("starfire",
|
||||
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
CasterDruidStrategy::CasterDruidStrategy(PlayerbotAI* botAI) : GenericDruidStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new CasterDruidStrategyActionNodeFactory());
|
||||
actionNodeFactories.Add(new ShapeshiftDruidStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
NextAction** CasterDruidStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("starfire", ACTION_NORMAL + 2), new NextAction("wrath", ACTION_NORMAL + 1), nullptr);
|
||||
}
|
||||
|
||||
void CasterDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericDruidStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("enemy out of spell", NextAction::array(0, new NextAction("reach spell", ACTION_MOVE), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium health", NextAction::array(0, new NextAction("regrowth", ACTION_MEDIUM_HEAL + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member medium health", NextAction::array(0, new NextAction("regrowth on party", ACTION_MEDIUM_HEAL + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("almost full health", NextAction::array(0, new NextAction("rejuvenation", ACTION_LIGHT_HEAL + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member almost full health", NextAction::array(0, new NextAction("rejuvenation on party", ACTION_LIGHT_HEAL + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("insect swarm", NextAction::array(0, new NextAction("insect swarm", ACTION_NORMAL + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("moonfire", NextAction::array(0, new NextAction("moonfire", ACTION_NORMAL + 4), nullptr)));
|
||||
triggers.push_back(new TriggerNode("eclipse (solar)", NextAction::array(0, new NextAction("wrath", ACTION_NORMAL + 6), nullptr)));
|
||||
triggers.push_back(new TriggerNode("eclipse (lunar)", NextAction::array(0, new NextAction("starfire", ACTION_NORMAL + 6), nullptr)));
|
||||
triggers.push_back(new TriggerNode("moonfire", NextAction::array(0, new NextAction("moonfire", ACTION_NORMAL + 4), nullptr)));
|
||||
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("nature's grasp", ACTION_EMERGENCY), nullptr)));
|
||||
}
|
||||
|
||||
void CasterDruidAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("high aoe", NextAction::array(0, new NextAction("starfall", ACTION_HIGH + 1), nullptr)));
|
||||
}
|
||||
|
||||
void CasterDruidDebuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("faerie fire", NextAction::array(0, new NextAction("faerie fire", ACTION_HIGH), nullptr)));
|
||||
}
|
||||
44
src/strategy/druid/CasterDruidStrategy.h
Normal file
44
src/strategy/druid/CasterDruidStrategy.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_CASTERDRUIDSTRATEGY_H
|
||||
#define _PLAYERBOT_CASTERDRUIDSTRATEGY_H
|
||||
|
||||
#include "GenericDruidStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class CasterDruidStrategy : public GenericDruidStrategy
|
||||
{
|
||||
public:
|
||||
CasterDruidStrategy(PlayerbotAI* botAI);
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "caster"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_COMBAT | STRATEGY_TYPE_DPS | STRATEGY_TYPE_RANGED; }
|
||||
};
|
||||
|
||||
class CasterDruidAoeStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
CasterDruidAoeStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) { }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "caster aoe"; }
|
||||
};
|
||||
|
||||
class CasterDruidDebuffStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
CasterDruidDebuffStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) { }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "caster debuff"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
147
src/strategy/druid/CatDpsDruidStrategy.cpp
Normal file
147
src/strategy/druid/CatDpsDruidStrategy.cpp
Normal file
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "CatDpsDruidStrategy.h"
|
||||
#include "AiObjectContext.h"
|
||||
|
||||
class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
CatDpsDruidStrategyActionNodeFactory()
|
||||
{
|
||||
creators["faerie fire (feral)"] = &faerie_fire_feral;
|
||||
creators["melee"] = &melee;
|
||||
creators["feral charge - cat"] = &feral_charge_cat;
|
||||
creators["cat form"] = &cat_form;
|
||||
creators["claw"] = &claw;
|
||||
creators["mangle (cat)"] = &mangle_cat;
|
||||
creators["rake"] = &rake;
|
||||
creators["ferocious bite"] = &ferocious_bite;
|
||||
creators["rip"] = &rip;
|
||||
creators["pounce"] = &pounce;
|
||||
creators["ravage"] = &ravage;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* faerie_fire_feral(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("faerie fire (feral)",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* melee(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("melee",
|
||||
/*P*/ NextAction::array(0, new NextAction("feral charge - cat"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* feral_charge_cat(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("feral charge - cat",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("reach melee"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* cat_form(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("cat form",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* claw(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("claw",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("melee"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* mangle_cat(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("mangle (cat)",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("claw"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* rake(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("rake",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* ferocious_bite(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("ferocious bite",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("rip"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* rip(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("rip",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* pounce(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("pounce",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("ravage"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* ravage(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("ravage",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("shred"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
CatDpsDruidStrategy::CatDpsDruidStrategy(PlayerbotAI* botAI) : FeralDruidStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new CatDpsDruidStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
NextAction** CatDpsDruidStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("mangle (cat)", ACTION_NORMAL + 1), nullptr);
|
||||
}
|
||||
|
||||
void CatDpsDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
FeralDruidStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("cat form", NextAction::array(0, new NextAction("cat form", ACTION_HIGH + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("rake", NextAction::array(0, new NextAction("rake", ACTION_NORMAL + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("combo points available", NextAction::array(0, new NextAction("ferocious bite", ACTION_NORMAL + 9), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium threat", NextAction::array(0, new NextAction("cower", ACTION_EMERGENCY + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("faerie fire (feral)", NextAction::array(0, new NextAction("faerie fire (feral)", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(new TriggerNode("tiger's fury", NextAction::array(0, new NextAction("tiger's fury", ACTION_EMERGENCY + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("behind target", NextAction::array(0, new NextAction("pounce", ACTION_HIGH + 1), nullptr)));
|
||||
//triggers.push_back(new TriggerNode("player has no flag", NextAction::array(0, new NextAction("prowl", ACTION_HIGH), nullptr)));
|
||||
//triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("prowl", ACTION_INTERRUPT + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("player has flag", NextAction::array(0, new NextAction("dash", ACTION_EMERGENCY), nullptr)));
|
||||
triggers.push_back(new TriggerNode("enemy flagcarrier near", NextAction::array(0, new NextAction("dash", ACTION_EMERGENCY), nullptr)));
|
||||
}
|
||||
|
||||
void CatAoeDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("swipe (cat)", ACTION_HIGH + 2), nullptr)));
|
||||
}
|
||||
|
||||
34
src/strategy/druid/CatDpsDruidStrategy.h
Normal file
34
src/strategy/druid/CatDpsDruidStrategy.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_CATDPSDRUIDSTRATEGY_H
|
||||
#define _PLAYERBOT_CATDPSDRUIDSTRATEGY_H
|
||||
|
||||
#include "FeralDruidStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class CatDpsDruidStrategy : public FeralDruidStrategy
|
||||
{
|
||||
public:
|
||||
CatDpsDruidStrategy(PlayerbotAI* botAI);
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cat"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_COMBAT | STRATEGY_TYPE_MELEE; }
|
||||
};
|
||||
|
||||
class CatAoeDruidStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
CatAoeDruidStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) { }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cat aoe"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
47
src/strategy/druid/DruidActions.cpp
Normal file
47
src/strategy/druid/DruidActions.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "DruidActions.h"
|
||||
#include "Event.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
NextAction** CastAbolishPoisonAction::getAlternatives()
|
||||
{
|
||||
return NextAction::merge(NextAction::array(0, new NextAction("cure poison"), nullptr), CastSpellAction::getPrerequisites());
|
||||
}
|
||||
|
||||
NextAction** CastAbolishPoisonOnPartyAction::getAlternatives()
|
||||
{
|
||||
return NextAction::merge(NextAction::array(0, new NextAction("cure poison on party"), nullptr), CastSpellAction::getPrerequisites());
|
||||
}
|
||||
|
||||
Value<Unit*>* CastEntanglingRootsCcAction::GetTargetValue()
|
||||
{
|
||||
return context->GetValue<Unit*>("cc target", "entangling roots");
|
||||
}
|
||||
|
||||
bool CastEntanglingRootsCcAction::Execute(Event event)
|
||||
{
|
||||
return botAI->CastSpell("entangling roots", GetTarget());
|
||||
}
|
||||
|
||||
Value<Unit*>* CastHibernateCcAction::GetTargetValue()
|
||||
{
|
||||
return context->GetValue<Unit*>("cc target", "hibernate");
|
||||
}
|
||||
|
||||
bool CastHibernateCcAction::Execute(Event event)
|
||||
{
|
||||
return botAI->CastSpell("hibernate", GetTarget());
|
||||
}
|
||||
|
||||
NextAction** CastReviveAction::getPrerequisites()
|
||||
{
|
||||
return NextAction::merge(NextAction::array(0, new NextAction("caster form"), nullptr), ResurrectPartyMemberAction::getPrerequisites());
|
||||
}
|
||||
|
||||
NextAction** CastRebirthAction::getPrerequisites()
|
||||
{
|
||||
return NextAction::merge(NextAction::array(0, new NextAction("caster form"), nullptr), ResurrectPartyMemberAction::getPrerequisites());
|
||||
}
|
||||
239
src/strategy/druid/DruidActions.h
Normal file
239
src/strategy/druid/DruidActions.h
Normal file
@@ -0,0 +1,239 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_DRUIDACTIONS_H
|
||||
#define _PLAYERBOT_DRUIDACTIONS_H
|
||||
|
||||
#include "GenericSpellActions.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
class Unit;
|
||||
|
||||
class CastFaerieFireAction : public CastDebuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastFaerieFireAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "faerie fire") { }
|
||||
};
|
||||
|
||||
class CastFaerieFireFeralAction : public CastDebuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastFaerieFireFeralAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "faerie fire (feral)") { }
|
||||
};
|
||||
|
||||
class CastRejuvenationAction : public CastHealingSpellAction
|
||||
{
|
||||
public:
|
||||
CastRejuvenationAction(PlayerbotAI* botAI) : CastHealingSpellAction(botAI, "rejuvenation") { }
|
||||
};
|
||||
|
||||
class CastRegrowthAction : public CastHealingSpellAction
|
||||
{
|
||||
public:
|
||||
CastRegrowthAction(PlayerbotAI* botAI) : CastHealingSpellAction(botAI, "regrowth") { }
|
||||
|
||||
};
|
||||
|
||||
class CastHealingTouchAction : public CastHealingSpellAction
|
||||
{
|
||||
public:
|
||||
CastHealingTouchAction(PlayerbotAI* botAI) : CastHealingSpellAction(botAI, "healing touch") { }
|
||||
|
||||
};
|
||||
|
||||
class CastRejuvenationOnPartyAction : public HealPartyMemberAction
|
||||
{
|
||||
public:
|
||||
CastRejuvenationOnPartyAction(PlayerbotAI* botAI) : HealPartyMemberAction(botAI, "rejuvenation") { }
|
||||
};
|
||||
|
||||
class CastRegrowthOnPartyAction : public HealPartyMemberAction
|
||||
{
|
||||
public:
|
||||
CastRegrowthOnPartyAction(PlayerbotAI* botAI) : HealPartyMemberAction(botAI, "regrowth") { }
|
||||
};
|
||||
|
||||
class CastHealingTouchOnPartyAction : public HealPartyMemberAction
|
||||
{
|
||||
public:
|
||||
CastHealingTouchOnPartyAction(PlayerbotAI* botAI) : HealPartyMemberAction(botAI, "healing touch") { }
|
||||
};
|
||||
|
||||
class CastReviveAction : public ResurrectPartyMemberAction
|
||||
{
|
||||
public:
|
||||
CastReviveAction(PlayerbotAI* botAI) : ResurrectPartyMemberAction(botAI, "revive") { }
|
||||
|
||||
NextAction** getPrerequisites() override;
|
||||
};
|
||||
|
||||
class CastRebirthAction : public ResurrectPartyMemberAction
|
||||
{
|
||||
public:
|
||||
CastRebirthAction(PlayerbotAI* botAI) : ResurrectPartyMemberAction(botAI, "rebirth") { }
|
||||
|
||||
NextAction** getPrerequisites() override;
|
||||
};
|
||||
|
||||
class CastMarkOfTheWildAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastMarkOfTheWildAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "mark of the wild") { }
|
||||
};
|
||||
|
||||
class CastMarkOfTheWildOnPartyAction : public BuffOnPartyAction
|
||||
{
|
||||
public:
|
||||
CastMarkOfTheWildOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "mark of the wild") { }
|
||||
};
|
||||
|
||||
class CastSurvivalInstinctsAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastSurvivalInstinctsAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "survival instincts") { }
|
||||
};
|
||||
|
||||
class CastThornsAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastThornsAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "thorns") { }
|
||||
};
|
||||
|
||||
class CastThornsOnPartyAction : public BuffOnPartyAction
|
||||
{
|
||||
public:
|
||||
CastThornsOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "thorns") { }
|
||||
};
|
||||
|
||||
class CastOmenOfClarityAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastOmenOfClarityAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "omen of clarity") { }
|
||||
};
|
||||
|
||||
class CastWrathAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastWrathAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "wrath") { }
|
||||
};
|
||||
|
||||
class CastStarfallAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastStarfallAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "starfall") { }
|
||||
};
|
||||
|
||||
class CastHurricaneAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastHurricaneAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "hurricane") { }
|
||||
};
|
||||
|
||||
class CastMoonfireAction : public CastDebuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastMoonfireAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "moonfire") { }
|
||||
};
|
||||
|
||||
class CastInsectSwarmAction : public CastDebuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastInsectSwarmAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "insect swarm") { }
|
||||
};
|
||||
|
||||
class CastStarfireAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastStarfireAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "starfire") { }
|
||||
};
|
||||
|
||||
class CastEntanglingRootsAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastEntanglingRootsAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "entangling roots") { }
|
||||
};
|
||||
|
||||
class CastEntanglingRootsCcAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastEntanglingRootsCcAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "entangling roots on cc") { }
|
||||
Value<Unit*>* GetTargetValue() override;
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class CastHibernateAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastHibernateAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "hibernate") { }
|
||||
};
|
||||
|
||||
class CastHibernateCcAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastHibernateCcAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "hibernate on cc") { }
|
||||
Value<Unit*>* GetTargetValue() override;
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class CastNaturesGraspAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastNaturesGraspAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "nature's grasp") { }
|
||||
};
|
||||
|
||||
class CastCurePoisonAction : public CastCureSpellAction
|
||||
{
|
||||
public:
|
||||
CastCurePoisonAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "cure poison") { }
|
||||
};
|
||||
|
||||
class CastCurePoisonOnPartyAction : public CurePartyMemberAction
|
||||
{
|
||||
public:
|
||||
CastCurePoisonOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "cure poison", DISPEL_POISON) { }
|
||||
};
|
||||
|
||||
class CastAbolishPoisonAction : public CastCureSpellAction
|
||||
{
|
||||
public:
|
||||
CastAbolishPoisonAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "abolish poison") { }
|
||||
NextAction** getAlternatives() override;
|
||||
};
|
||||
|
||||
class CastAbolishPoisonOnPartyAction : public CurePartyMemberAction
|
||||
{
|
||||
public:
|
||||
CastAbolishPoisonOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "abolish poison", DISPEL_POISON) { }
|
||||
|
||||
NextAction** getAlternatives() override;
|
||||
};
|
||||
|
||||
class CastBarskinAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastBarskinAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "barskin") { }
|
||||
};
|
||||
|
||||
class CastInnervateAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastInnervateAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "innervate") { }
|
||||
|
||||
std::string const GetTargetName() override { return "self target"; }
|
||||
};
|
||||
|
||||
class CastTranquilityAction : public CastAoeHealSpellAction
|
||||
{
|
||||
public:
|
||||
CastTranquilityAction(PlayerbotAI* botAI) : CastAoeHealSpellAction(botAI, "tranquility") { }
|
||||
};
|
||||
|
||||
class CastNaturesSwiftnessAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastNaturesSwiftnessAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "nature's swiftness") { }
|
||||
};
|
||||
|
||||
#endif
|
||||
281
src/strategy/druid/DruidAiObjectContext.cpp
Normal file
281
src/strategy/druid/DruidAiObjectContext.cpp
Normal file
@@ -0,0 +1,281 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "DruidAiObjectContext.h"
|
||||
#include "BearTankDruidStrategy.h"
|
||||
#include "CatDpsDruidStrategy.h"
|
||||
#include "CasterDruidStrategy.h"
|
||||
#include "GenericDruidNonCombatStrategy.h"
|
||||
#include "DruidActions.h"
|
||||
#include "DruidBearActions.h"
|
||||
#include "DruidCatActions.h"
|
||||
#include "DruidShapeshiftActions.h"
|
||||
#include "DruidTriggers.h"
|
||||
#include "HealDruidStrategy.h"
|
||||
#include "MeleeDruidStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class DruidStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
{
|
||||
public:
|
||||
DruidStrategyFactoryInternal()
|
||||
{
|
||||
creators["nc"] = &DruidStrategyFactoryInternal::nc;
|
||||
creators["cat aoe"] = &DruidStrategyFactoryInternal::cat_aoe;
|
||||
creators["caster aoe"] = &DruidStrategyFactoryInternal::caster_aoe;
|
||||
creators["caster debuff"] = &DruidStrategyFactoryInternal::caster_debuff;
|
||||
creators["dps debuff"] = &DruidStrategyFactoryInternal::caster_debuff;
|
||||
creators["cure"] = &DruidStrategyFactoryInternal::cure;
|
||||
creators["melee"] = &DruidStrategyFactoryInternal::melee;
|
||||
creators["buff"] = &DruidStrategyFactoryInternal::buff;
|
||||
creators["boost"] = &DruidStrategyFactoryInternal::boost;
|
||||
creators["cc"] = &DruidStrategyFactoryInternal::cc;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* nc(PlayerbotAI* botAI) { return new GenericDruidNonCombatStrategy(botAI); }
|
||||
static Strategy* cat_aoe(PlayerbotAI* botAI) { return new CatAoeDruidStrategy(botAI); }
|
||||
static Strategy* caster_aoe(PlayerbotAI* botAI) { return new CasterDruidAoeStrategy(botAI); }
|
||||
static Strategy* caster_debuff(PlayerbotAI* botAI) { return new CasterDruidDebuffStrategy(botAI); }
|
||||
static Strategy* cure(PlayerbotAI* botAI) { return new DruidCureStrategy(botAI); }
|
||||
static Strategy* melee(PlayerbotAI* botAI) { return new MeleeDruidStrategy(botAI); }
|
||||
static Strategy* buff(PlayerbotAI* botAI) { return new GenericDruidBuffStrategy(botAI); }
|
||||
static Strategy* boost(PlayerbotAI* botAI) { return new DruidBoostStrategy(botAI); }
|
||||
static Strategy* cc(PlayerbotAI* botAI) { return new DruidCcStrategy(botAI); }
|
||||
};
|
||||
|
||||
class DruidDruidStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
{
|
||||
public:
|
||||
DruidDruidStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
|
||||
{
|
||||
creators["bear"] = &DruidDruidStrategyFactoryInternal::bear;
|
||||
creators["tank"] = &DruidDruidStrategyFactoryInternal::bear;
|
||||
creators["cat"] = &DruidDruidStrategyFactoryInternal::cat;
|
||||
creators["caster"] = &DruidDruidStrategyFactoryInternal::caster;
|
||||
creators["dps"] = &DruidDruidStrategyFactoryInternal::cat;
|
||||
creators["heal"] = &DruidDruidStrategyFactoryInternal::heal;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* bear(PlayerbotAI* botAI) { return new BearTankDruidStrategy(botAI); }
|
||||
static Strategy* cat(PlayerbotAI* botAI) { return new CatDpsDruidStrategy(botAI); }
|
||||
static Strategy* caster(PlayerbotAI* botAI) { return new CasterDruidStrategy(botAI); }
|
||||
static Strategy* heal(PlayerbotAI* botAI) { return new HealDruidStrategy(botAI); }
|
||||
};
|
||||
|
||||
class DruidTriggerFactoryInternal : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
DruidTriggerFactoryInternal()
|
||||
{
|
||||
creators["omen of clarity"] = &DruidTriggerFactoryInternal::omen_of_clarity;
|
||||
creators["thorns"] = &DruidTriggerFactoryInternal::thorns;
|
||||
creators["thorns on party"] = &DruidTriggerFactoryInternal::thorns_on_party;
|
||||
creators["bash"] = &DruidTriggerFactoryInternal::bash;
|
||||
creators["faerie fire (feral)"] = &DruidTriggerFactoryInternal::faerie_fire_feral;
|
||||
creators["faerie fire"] = &DruidTriggerFactoryInternal::faerie_fire;
|
||||
creators["insect swarm"] = &DruidTriggerFactoryInternal::insect_swarm;
|
||||
creators["moonfire"] = &DruidTriggerFactoryInternal::moonfire;
|
||||
creators["nature's grasp"] = &DruidTriggerFactoryInternal::natures_grasp;
|
||||
creators["tiger's fury"] = &DruidTriggerFactoryInternal::tigers_fury;
|
||||
creators["rake"] = &DruidTriggerFactoryInternal::rake;
|
||||
creators["mark of the wild"] = &DruidTriggerFactoryInternal::mark_of_the_wild;
|
||||
creators["mark of the wild on party"] = &DruidTriggerFactoryInternal::mark_of_the_wild_on_party;
|
||||
creators["cure poison"] = &DruidTriggerFactoryInternal::cure_poison;
|
||||
creators["party member cure poison"] = &DruidTriggerFactoryInternal::party_member_cure_poison;
|
||||
creators["entangling roots"] = &DruidTriggerFactoryInternal::entangling_roots;
|
||||
creators["entangling roots kite"] = &DruidTriggerFactoryInternal::entangling_roots_kite;
|
||||
creators["hibernate"] = &DruidTriggerFactoryInternal::hibernate;
|
||||
creators["bear form"] = &DruidTriggerFactoryInternal::bear_form;
|
||||
creators["cat form"] = &DruidTriggerFactoryInternal::cat_form;
|
||||
creators["tree form"] = &DruidTriggerFactoryInternal::tree_form;
|
||||
creators["eclipse (solar)"] = &DruidTriggerFactoryInternal::eclipse_solar;
|
||||
creators["eclipse (lunar)"] = &DruidTriggerFactoryInternal::eclipse_lunar;
|
||||
creators["bash on enemy healer"] = &DruidTriggerFactoryInternal::bash_on_enemy_healer;
|
||||
creators["nature's swiftness"] = &DruidTriggerFactoryInternal::natures_swiftness;
|
||||
}
|
||||
|
||||
private:
|
||||
static Trigger* natures_swiftness(PlayerbotAI* botAI) { return new NaturesSwiftnessTrigger(botAI); }
|
||||
static Trigger* eclipse_solar(PlayerbotAI* botAI) { return new EclipseSolarTrigger(botAI); }
|
||||
static Trigger* eclipse_lunar(PlayerbotAI* botAI) { return new EclipseLunarTrigger(botAI); }
|
||||
static Trigger* thorns(PlayerbotAI* botAI) { return new ThornsTrigger(botAI); }
|
||||
static Trigger* thorns_on_party(PlayerbotAI* botAI) { return new ThornsOnPartyTrigger(botAI); }
|
||||
static Trigger* bash(PlayerbotAI* botAI) { return new BashInterruptSpellTrigger(botAI); }
|
||||
static Trigger* faerie_fire_feral(PlayerbotAI* botAI) { return new FaerieFireFeralTrigger(botAI); }
|
||||
static Trigger* insect_swarm(PlayerbotAI* botAI) { return new InsectSwarmTrigger(botAI); }
|
||||
static Trigger* moonfire(PlayerbotAI* botAI) { return new MoonfireTrigger(botAI); }
|
||||
static Trigger* faerie_fire(PlayerbotAI* botAI) { return new FaerieFireTrigger(botAI); }
|
||||
static Trigger* natures_grasp(PlayerbotAI* botAI) { return new NaturesGraspTrigger(botAI); }
|
||||
static Trigger* tigers_fury(PlayerbotAI* botAI) { return new TigersFuryTrigger(botAI); }
|
||||
static Trigger* rake(PlayerbotAI* botAI) { return new RakeTrigger(botAI); }
|
||||
static Trigger* mark_of_the_wild(PlayerbotAI* botAI) { return new MarkOfTheWildTrigger(botAI); }
|
||||
static Trigger* mark_of_the_wild_on_party(PlayerbotAI* botAI) { return new MarkOfTheWildOnPartyTrigger(botAI); }
|
||||
static Trigger* cure_poison(PlayerbotAI* botAI) { return new CurePoisonTrigger(botAI); }
|
||||
static Trigger* party_member_cure_poison(PlayerbotAI* botAI) { return new PartyMemberCurePoisonTrigger(botAI); }
|
||||
static Trigger* entangling_roots(PlayerbotAI* botAI) { return new EntanglingRootsTrigger(botAI); }
|
||||
static Trigger* entangling_roots_kite(PlayerbotAI* botAI) { return new EntanglingRootsKiteTrigger(botAI); }
|
||||
static Trigger* hibernate(PlayerbotAI* botAI) { return new HibernateTrigger(botAI); }
|
||||
static Trigger* bear_form(PlayerbotAI* botAI) { return new BearFormTrigger(botAI); }
|
||||
static Trigger* cat_form(PlayerbotAI* botAI) { return new CatFormTrigger(botAI); }
|
||||
static Trigger* tree_form(PlayerbotAI* botAI) { return new TreeFormTrigger(botAI); }
|
||||
static Trigger* bash_on_enemy_healer(PlayerbotAI* botAI) { return new BashInterruptEnemyHealerSpellTrigger(botAI); }
|
||||
static Trigger* omen_of_clarity(PlayerbotAI* botAI) { return new OmenOfClarityTrigger(botAI); }
|
||||
};
|
||||
|
||||
class DruidAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
{
|
||||
public:
|
||||
DruidAiObjectContextInternal()
|
||||
{
|
||||
creators["feral charge - bear"] = &DruidAiObjectContextInternal::feral_charge_bear;
|
||||
creators["feral charge - cat"] = &DruidAiObjectContextInternal::feral_charge_cat;
|
||||
creators["swipe (bear)"] = &DruidAiObjectContextInternal::swipe_bear;
|
||||
creators["faerie fire (feral)"] = &DruidAiObjectContextInternal::faerie_fire_feral;
|
||||
creators["faerie fire"] = &DruidAiObjectContextInternal::faerie_fire;
|
||||
creators["bear form"] = &DruidAiObjectContextInternal::bear_form;
|
||||
creators["dire bear form"] = &DruidAiObjectContextInternal::dire_bear_form;
|
||||
creators["moonkin form"] = &DruidAiObjectContextInternal::moonkin_form;
|
||||
creators["cat form"] = &DruidAiObjectContextInternal::cat_form;
|
||||
creators["tree form"] = &DruidAiObjectContextInternal::tree_form;
|
||||
creators["travel form"] = &DruidAiObjectContextInternal::travel_form;
|
||||
creators["aquatic form"] = &DruidAiObjectContextInternal::aquatic_form;
|
||||
creators["caster form"] = &DruidAiObjectContextInternal::caster_form;
|
||||
creators["mangle (bear)"] = &DruidAiObjectContextInternal::mangle_bear;
|
||||
creators["maul"] = &DruidAiObjectContextInternal::maul;
|
||||
creators["bash"] = &DruidAiObjectContextInternal::bash;
|
||||
creators["swipe"] = &DruidAiObjectContextInternal::swipe;
|
||||
creators["growl"] = &DruidAiObjectContextInternal::growl;
|
||||
creators["demoralizing roar"] = &DruidAiObjectContextInternal::demoralizing_roar;
|
||||
creators["hibernate"] = &DruidAiObjectContextInternal::hibernate;
|
||||
creators["entangling roots"] = &DruidAiObjectContextInternal::entangling_roots;
|
||||
creators["entangling roots on cc"] = &DruidAiObjectContextInternal::entangling_roots_on_cc;
|
||||
creators["hibernate"] = &DruidAiObjectContextInternal::hibernate;
|
||||
creators["hibernate on cc"] = &DruidAiObjectContextInternal::hibernate_on_cc;
|
||||
creators["wrath"] = &DruidAiObjectContextInternal::wrath;
|
||||
creators["starfall"] = &DruidAiObjectContextInternal::starfall;
|
||||
creators["insect swarm"] = &DruidAiObjectContextInternal::insect_swarm;
|
||||
creators["moonfire"] = &DruidAiObjectContextInternal::moonfire;
|
||||
creators["starfire"] = &DruidAiObjectContextInternal::starfire;
|
||||
creators["nature's grasp"] = &DruidAiObjectContextInternal::natures_grasp;
|
||||
creators["claw"] = &DruidAiObjectContextInternal::claw;
|
||||
creators["mangle (cat)"] = &DruidAiObjectContextInternal::mangle_cat;
|
||||
creators["swipe (cat)"] = &DruidAiObjectContextInternal::swipe_cat;
|
||||
creators["rake"] = &DruidAiObjectContextInternal::rake;
|
||||
creators["ferocious bite"] = &DruidAiObjectContextInternal::ferocious_bite;
|
||||
creators["rip"] = &DruidAiObjectContextInternal::rip;
|
||||
creators["cower"] = &DruidAiObjectContextInternal::cower;
|
||||
creators["survival instincts"] = &DruidAiObjectContextInternal::survival_instincts;
|
||||
creators["thorns"] = &DruidAiObjectContextInternal::thorns;
|
||||
creators["thorns on party"] = &DruidAiObjectContextInternal::thorns_on_party;
|
||||
creators["cure poison"] = &DruidAiObjectContextInternal::cure_poison;
|
||||
creators["cure poison on party"] = &DruidAiObjectContextInternal::cure_poison_on_party;
|
||||
creators["abolish poison"] = &DruidAiObjectContextInternal::abolish_poison;
|
||||
creators["abolish poison on party"] = &DruidAiObjectContextInternal::abolish_poison_on_party;
|
||||
creators["berserk"] = &DruidAiObjectContextInternal::berserk;
|
||||
creators["tiger's fury"] = &DruidAiObjectContextInternal::tigers_fury;
|
||||
creators["mark of the wild"] = &DruidAiObjectContextInternal::mark_of_the_wild;
|
||||
creators["mark of the wild on party"] = &DruidAiObjectContextInternal::mark_of_the_wild_on_party;
|
||||
creators["regrowth"] = &DruidAiObjectContextInternal::regrowth;
|
||||
creators["rejuvenation"] = &DruidAiObjectContextInternal::rejuvenation;
|
||||
creators["healing touch"] = &DruidAiObjectContextInternal::healing_touch;
|
||||
creators["regrowth on party"] = &DruidAiObjectContextInternal::regrowth_on_party;
|
||||
creators["rejuvenation on party"] = &DruidAiObjectContextInternal::rejuvenation_on_party;
|
||||
creators["healing touch on party"] = &DruidAiObjectContextInternal::healing_touch_on_party;
|
||||
creators["rebirth"] = &DruidAiObjectContextInternal::rebirth;
|
||||
creators["revive"] = &DruidAiObjectContextInternal::revive;
|
||||
creators["barskin"] = &DruidAiObjectContextInternal::barskin;
|
||||
creators["lacerate"] = &DruidAiObjectContextInternal::lacerate;
|
||||
creators["hurricane"] = &DruidAiObjectContextInternal::hurricane;
|
||||
creators["innervate"] = &DruidAiObjectContextInternal::innervate;
|
||||
creators["tranquility"] = &DruidAiObjectContextInternal::tranquility;
|
||||
creators["bash on enemy healer"] = &DruidAiObjectContextInternal::bash_on_enemy_healer;
|
||||
creators["omen of clarity"] = &DruidAiObjectContextInternal::omen_of_clarity;
|
||||
creators["nature's swiftness"] = &DruidAiObjectContextInternal::natures_swiftness;
|
||||
creators["prowl"] = &DruidAiObjectContextInternal::prowl;
|
||||
creators["dash"] = &DruidAiObjectContextInternal::dash;
|
||||
creators["shred"] = &DruidAiObjectContextInternal::shred;
|
||||
creators["ravage"] = &DruidAiObjectContextInternal::ravage;
|
||||
creators["pounce"] = &DruidAiObjectContextInternal::pounce;
|
||||
}
|
||||
|
||||
private:
|
||||
static Action* natures_swiftness(PlayerbotAI* botAI) { return new CastNaturesSwiftnessAction(botAI); }
|
||||
static Action* omen_of_clarity(PlayerbotAI* botAI) { return new CastOmenOfClarityAction(botAI); }
|
||||
static Action* tranquility(PlayerbotAI* botAI) { return new CastTranquilityAction(botAI); }
|
||||
static Action* feral_charge_bear(PlayerbotAI* botAI) { return new CastFeralChargeBearAction(botAI); }
|
||||
static Action* feral_charge_cat(PlayerbotAI* botAI) { return new CastFeralChargeCatAction(botAI); }
|
||||
static Action* swipe_bear(PlayerbotAI* botAI) { return new CastSwipeBearAction(botAI); }
|
||||
static Action* faerie_fire_feral(PlayerbotAI* botAI) { return new CastFaerieFireFeralAction(botAI); }
|
||||
static Action* faerie_fire(PlayerbotAI* botAI) { return new CastFaerieFireAction(botAI); }
|
||||
static Action* bear_form(PlayerbotAI* botAI) { return new CastBearFormAction(botAI); }
|
||||
static Action* dire_bear_form(PlayerbotAI* botAI) { return new CastDireBearFormAction(botAI); }
|
||||
static Action* cat_form(PlayerbotAI* botAI) { return new CastCatFormAction(botAI); }
|
||||
static Action* tree_form(PlayerbotAI* botAI) { return new CastTreeFormAction(botAI); }
|
||||
static Action* travel_form(PlayerbotAI* botAI) { return new CastTravelFormAction(botAI); }
|
||||
static Action* aquatic_form(PlayerbotAI* botAI) { return new CastAquaticFormAction(botAI); }
|
||||
static Action* caster_form(PlayerbotAI* botAI) { return new CastCasterFormAction(botAI); }
|
||||
static Action* mangle_bear(PlayerbotAI* botAI) { return new CastMangleBearAction(botAI); }
|
||||
static Action* maul(PlayerbotAI* botAI) { return new CastMaulAction(botAI); }
|
||||
static Action* bash(PlayerbotAI* botAI) { return new CastBashAction(botAI); }
|
||||
static Action* swipe(PlayerbotAI* botAI) { return new CastSwipeAction(botAI); }
|
||||
static Action* growl(PlayerbotAI* botAI) { return new CastGrowlAction(botAI); }
|
||||
static Action* demoralizing_roar(PlayerbotAI* botAI) { return new CastDemoralizingRoarAction(botAI); }
|
||||
static Action* moonkin_form(PlayerbotAI* botAI) { return new CastMoonkinFormAction(botAI); }
|
||||
static Action* hibernate(PlayerbotAI* botAI) { return new CastHibernateAction(botAI); }
|
||||
static Action* entangling_roots(PlayerbotAI* botAI) { return new CastEntanglingRootsAction(botAI); }
|
||||
static Action* hibernate_on_cc(PlayerbotAI* botAI) { return new CastHibernateCcAction(botAI); }
|
||||
static Action* entangling_roots_on_cc(PlayerbotAI* botAI) { return new CastEntanglingRootsCcAction(botAI); }
|
||||
static Action* wrath(PlayerbotAI* botAI) { return new CastWrathAction(botAI); }
|
||||
static Action* starfall(PlayerbotAI* botAI) { return new CastStarfallAction(botAI); }
|
||||
static Action* insect_swarm(PlayerbotAI* botAI) { return new CastInsectSwarmAction(botAI); }
|
||||
static Action* moonfire(PlayerbotAI* botAI) { return new CastMoonfireAction(botAI); }
|
||||
static Action* starfire(PlayerbotAI* botAI) { return new CastStarfireAction(botAI); }
|
||||
static Action* natures_grasp(PlayerbotAI* botAI) { return new CastNaturesGraspAction(botAI); }
|
||||
static Action* claw(PlayerbotAI* botAI) { return new CastClawAction(botAI); }
|
||||
static Action* mangle_cat(PlayerbotAI* botAI) { return new CastMangleCatAction(botAI); }
|
||||
static Action* swipe_cat(PlayerbotAI* botAI) { return new CastSwipeCatAction(botAI); }
|
||||
static Action* rake(PlayerbotAI* botAI) { return new CastRakeAction(botAI); }
|
||||
static Action* ferocious_bite(PlayerbotAI* botAI) { return new CastFerociousBiteAction(botAI); }
|
||||
static Action* rip(PlayerbotAI* botAI) { return new CastRipAction(botAI); }
|
||||
static Action* cower(PlayerbotAI* botAI) { return new CastCowerAction(botAI); }
|
||||
static Action* survival_instincts(PlayerbotAI* botAI) { return new CastSurvivalInstinctsAction(botAI); }
|
||||
static Action* thorns(PlayerbotAI* botAI) { return new CastThornsAction(botAI); }
|
||||
static Action* thorns_on_party(PlayerbotAI* botAI) { return new CastThornsOnPartyAction(botAI); }
|
||||
static Action* cure_poison(PlayerbotAI* botAI) { return new CastCurePoisonAction(botAI); }
|
||||
static Action* cure_poison_on_party(PlayerbotAI* botAI) { return new CastCurePoisonOnPartyAction(botAI); }
|
||||
static Action* abolish_poison(PlayerbotAI* botAI) { return new CastAbolishPoisonAction(botAI); }
|
||||
static Action* abolish_poison_on_party(PlayerbotAI* botAI) { return new CastAbolishPoisonOnPartyAction(botAI); }
|
||||
static Action* berserk(PlayerbotAI* botAI) { return new CastBerserkAction(botAI); }
|
||||
static Action* tigers_fury(PlayerbotAI* botAI) { return new CastTigersFuryAction(botAI); }
|
||||
static Action* mark_of_the_wild(PlayerbotAI* botAI) { return new CastMarkOfTheWildAction(botAI); }
|
||||
static Action* mark_of_the_wild_on_party(PlayerbotAI* botAI) { return new CastMarkOfTheWildOnPartyAction(botAI); }
|
||||
static Action* regrowth(PlayerbotAI* botAI) { return new CastRegrowthAction(botAI); }
|
||||
static Action* rejuvenation(PlayerbotAI* botAI) { return new CastRejuvenationAction(botAI); }
|
||||
static Action* healing_touch(PlayerbotAI* botAI) { return new CastHealingTouchAction(botAI); }
|
||||
static Action* regrowth_on_party(PlayerbotAI* botAI) { return new CastRegrowthOnPartyAction(botAI); }
|
||||
static Action* rejuvenation_on_party(PlayerbotAI* botAI) { return new CastRejuvenationOnPartyAction(botAI); }
|
||||
static Action* healing_touch_on_party(PlayerbotAI* botAI) { return new CastHealingTouchOnPartyAction(botAI); }
|
||||
static Action* rebirth(PlayerbotAI* botAI) { return new CastRebirthAction(botAI); }
|
||||
static Action* revive(PlayerbotAI* botAI) { return new CastReviveAction(botAI); }
|
||||
static Action* barskin(PlayerbotAI* botAI) { return new CastBarskinAction(botAI); }
|
||||
static Action* lacerate(PlayerbotAI* botAI) { return new CastLacerateAction(botAI); }
|
||||
static Action* hurricane(PlayerbotAI* botAI) { return new CastHurricaneAction(botAI); }
|
||||
static Action* innervate(PlayerbotAI* botAI) { return new CastInnervateAction(botAI); }
|
||||
static Action* bash_on_enemy_healer(PlayerbotAI* botAI) { return new CastBashOnEnemyHealerAction(botAI); }
|
||||
static Action* ravage(PlayerbotAI* botAI) { return new CastRavageAction(botAI); }
|
||||
static Action* pounce(PlayerbotAI* botAI) { return new CastPounceAction(botAI); }
|
||||
static Action* prowl(PlayerbotAI* botAI) { return new CastProwlAction(botAI); }
|
||||
static Action* dash(PlayerbotAI* botAI) { return new CastDashAction(botAI); }
|
||||
static Action* shred(PlayerbotAI* botAI) { return new CastShredAction(botAI); }
|
||||
};
|
||||
|
||||
DruidAiObjectContext::DruidAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
|
||||
{
|
||||
strategyContexts.Add(new DruidStrategyFactoryInternal());
|
||||
strategyContexts.Add(new DruidDruidStrategyFactoryInternal());
|
||||
actionContexts.Add(new DruidAiObjectContextInternal());
|
||||
triggerContexts.Add(new DruidTriggerFactoryInternal());
|
||||
}
|
||||
18
src/strategy/druid/DruidAiObjectContext.h
Normal file
18
src/strategy/druid/DruidAiObjectContext.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_DRUIDAIOBJECTCONTEXT_H
|
||||
#define _PLAYERBOT_DRUIDAIOBJECTCONTEXT_H
|
||||
|
||||
#include "AiObjectContext.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class DruidAiObjectContext : public AiObjectContext
|
||||
{
|
||||
public:
|
||||
DruidAiObjectContext(PlayerbotAI* botAI);
|
||||
};
|
||||
|
||||
#endif
|
||||
11
src/strategy/druid/DruidBearActions.cpp
Normal file
11
src/strategy/druid/DruidBearActions.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "DruidBearActions.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
bool CastMaulAction::isUseful()
|
||||
{
|
||||
return CastMeleeSpellAction::isUseful() && AI_VALUE2(uint8, "rage", "self target") >= 45;
|
||||
}
|
||||
75
src/strategy/druid/DruidBearActions.h
Normal file
75
src/strategy/druid/DruidBearActions.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_DRUIDBEARACTIONS_H
|
||||
#define _PLAYERBOT_DRUIDBEARACTIONS_H
|
||||
|
||||
#include "ReachTargetActions.h"
|
||||
#include "GenericSpellActions.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class CastFeralChargeBearAction : public CastReachTargetSpellAction
|
||||
{
|
||||
public:
|
||||
CastFeralChargeBearAction(PlayerbotAI* botAI) : CastReachTargetSpellAction(botAI, "feral charge - bear", 1.5f) { }
|
||||
};
|
||||
|
||||
class CastGrowlAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastGrowlAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "growl") { }
|
||||
};
|
||||
|
||||
class CastMaulAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastMaulAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "maul") { }
|
||||
|
||||
bool isUseful() override;
|
||||
};
|
||||
|
||||
class CastBashAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastBashAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "bash") { }
|
||||
};
|
||||
|
||||
class CastSwipeAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastSwipeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "swipe") { }
|
||||
};
|
||||
|
||||
class CastDemoralizingRoarAction : public CastDebuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastDemoralizingRoarAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "demoralizing roar") { }
|
||||
};
|
||||
|
||||
class CastMangleBearAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastMangleBearAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "mangle (bear)") { }
|
||||
};
|
||||
|
||||
class CastSwipeBearAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastSwipeBearAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "swipe (bear)") { }
|
||||
};
|
||||
|
||||
class CastLacerateAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastLacerateAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "lacerate") { }
|
||||
};
|
||||
|
||||
class CastBashOnEnemyHealerAction : public CastSpellOnEnemyHealerAction
|
||||
{
|
||||
public:
|
||||
CastBashOnEnemyHealerAction(PlayerbotAI* botAI) : CastSpellOnEnemyHealerAction(botAI, "bash") { }
|
||||
};
|
||||
|
||||
#endif
|
||||
103
src/strategy/druid/DruidCatActions.h
Normal file
103
src/strategy/druid/DruidCatActions.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_DRUIDCATACTIONS_H
|
||||
#define _PLAYERBOT_DRUIDCATACTIONS_H
|
||||
|
||||
#include "ReachTargetActions.h"
|
||||
#include "GenericSpellActions.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class CastFeralChargeCatAction : public CastReachTargetSpellAction
|
||||
{
|
||||
public:
|
||||
CastFeralChargeCatAction(PlayerbotAI* botAI) : CastReachTargetSpellAction(botAI, "feral charge - cat", 1.5f) { }
|
||||
};
|
||||
|
||||
class CastCowerAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastCowerAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "cower") { }
|
||||
};
|
||||
|
||||
class CastBerserkAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastBerserkAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "berserk") { }
|
||||
};
|
||||
|
||||
class CastTigersFuryAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastTigersFuryAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "tiger's fury") { }
|
||||
};
|
||||
|
||||
class CastRakeAction : public CastDebuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastRakeAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "rake") { }
|
||||
};
|
||||
|
||||
class CastClawAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastClawAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "claw") { }
|
||||
};
|
||||
|
||||
class CastMangleCatAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastMangleCatAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "mangle (cat)") { }
|
||||
};
|
||||
|
||||
class CastSwipeCatAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastSwipeCatAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "swipe (cat)") { }
|
||||
};
|
||||
|
||||
class CastFerociousBiteAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastFerociousBiteAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "ferocious bite") { }
|
||||
};
|
||||
|
||||
class CastRipAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastRipAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "rip") { }
|
||||
};
|
||||
|
||||
class CastShredAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastShredAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "shred") { }
|
||||
};
|
||||
|
||||
class CastProwlAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastProwlAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "prowl") { }
|
||||
};
|
||||
|
||||
class CastDashAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastDashAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "dash") { }
|
||||
};
|
||||
|
||||
class CastRavageAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastRavageAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "ravage") { }
|
||||
};
|
||||
|
||||
class CastPounceAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastPounceAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "pounce") { }
|
||||
};
|
||||
|
||||
#endif
|
||||
41
src/strategy/druid/DruidShapeshiftActions.cpp
Normal file
41
src/strategy/druid/DruidShapeshiftActions.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "DruidShapeshiftActions.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
bool CastBearFormAction::isPossible()
|
||||
{
|
||||
return CastBuffSpellAction::isPossible() && !botAI->HasAura("dire bear form", GetTarget());
|
||||
}
|
||||
|
||||
bool CastBearFormAction::isUseful()
|
||||
{
|
||||
return CastBuffSpellAction::isUseful() && !botAI->HasAura("dire bear form", GetTarget());
|
||||
}
|
||||
|
||||
NextAction** CastDireBearFormAction::getAlternatives()
|
||||
{
|
||||
return NextAction::merge(NextAction::array(0, new NextAction("bear form"), nullptr), CastSpellAction::getAlternatives());
|
||||
}
|
||||
|
||||
bool CastTravelFormAction::isUseful()
|
||||
{
|
||||
bool firstmount = bot->getLevel() >= 20;
|
||||
|
||||
// useful if no mount or with wsg flag
|
||||
return !bot->IsMounted() && (!firstmount || (bot->HasAura(23333) || bot->HasAura(23335) || bot->HasAura(34976))) && !botAI->HasAura("dash", bot);
|
||||
}
|
||||
|
||||
bool CastCasterFormAction::isUseful()
|
||||
{
|
||||
return botAI->HasAnyAuraOf(GetTarget(), "dire bear form", "bear form", "cat form", "travel form", "aquatic form",
|
||||
"flight form", "swift flight form", "moonkin form", "tree of life", nullptr);
|
||||
}
|
||||
|
||||
bool CastCasterFormAction::Execute(Event event)
|
||||
{
|
||||
botAI->RemoveShapeshift();
|
||||
return true;
|
||||
}
|
||||
71
src/strategy/druid/DruidShapeshiftActions.h
Normal file
71
src/strategy/druid/DruidShapeshiftActions.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_DRUIDSHAPESHIFTACTIONS_H
|
||||
#define _PLAYERBOT_DRUIDSHAPESHIFTACTIONS_H
|
||||
|
||||
#include "GenericSpellActions.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class CastBearFormAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastBearFormAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "bear form") { }
|
||||
|
||||
bool isPossible() override;
|
||||
bool isUseful() override;
|
||||
};
|
||||
|
||||
class CastDireBearFormAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastDireBearFormAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "dire bear form") { }
|
||||
|
||||
NextAction** getAlternatives() override;
|
||||
};
|
||||
|
||||
class CastCatFormAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastCatFormAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "cat form") { }
|
||||
};
|
||||
|
||||
class CastTreeFormAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastTreeFormAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "tree of life") { }
|
||||
};
|
||||
|
||||
class CastMoonkinFormAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastMoonkinFormAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "moonkin form") { }
|
||||
};
|
||||
|
||||
class CastAquaticFormAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastAquaticFormAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aquatic form") { }
|
||||
};
|
||||
|
||||
class CastTravelFormAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastTravelFormAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "travel form") { }
|
||||
|
||||
bool isUseful() override;
|
||||
};
|
||||
|
||||
class CastCasterFormAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastCasterFormAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "caster form") { }
|
||||
|
||||
bool isUseful() override;
|
||||
bool isPossible() override { return true; }
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
51
src/strategy/druid/DruidTriggers.cpp
Normal file
51
src/strategy/druid/DruidTriggers.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "DruidTriggers.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
bool MarkOfTheWildOnPartyTrigger::IsActive()
|
||||
{
|
||||
return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("gift of the wild", GetTarget());
|
||||
}
|
||||
|
||||
bool MarkOfTheWildTrigger::IsActive()
|
||||
{
|
||||
return BuffTrigger::IsActive() && !botAI->HasAura("gift of the wild", GetTarget());
|
||||
}
|
||||
|
||||
bool ThornsOnPartyTrigger::IsActive()
|
||||
{
|
||||
return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("thorns", GetTarget());
|
||||
}
|
||||
|
||||
bool MoonfireTrigger::IsActive()
|
||||
{
|
||||
return DebuffTrigger::IsActive() && !GetTarget()->HasUnitState(UNIT_STATE_ROOT);
|
||||
}
|
||||
|
||||
bool EntanglingRootsKiteTrigger::IsActive()
|
||||
{
|
||||
return DebuffTrigger::IsActive() && AI_VALUE(uint8, "attacker count") < 3 && !GetTarget()->GetPower(POWER_MANA);
|
||||
}
|
||||
|
||||
bool ThornsTrigger::IsActive()
|
||||
{
|
||||
return BuffTrigger::IsActive() && !botAI->HasAura("thorns", GetTarget());
|
||||
}
|
||||
|
||||
bool BearFormTrigger::IsActive()
|
||||
{
|
||||
return !botAI->HasAnyAuraOf(bot, "bear form", "dire bear form", nullptr);
|
||||
}
|
||||
|
||||
bool TreeFormTrigger::IsActive()
|
||||
{
|
||||
return !botAI->HasAura("tree of life", bot);
|
||||
}
|
||||
|
||||
bool CatFormTrigger::IsActive()
|
||||
{
|
||||
return !botAI->HasAura("cat form", bot);
|
||||
}
|
||||
181
src/strategy/druid/DruidTriggers.h
Normal file
181
src/strategy/druid/DruidTriggers.h
Normal file
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_DRUIDTRIGGERS_H
|
||||
#define _PLAYERBOT_DRUIDTRIGGERS_H
|
||||
|
||||
#include "CureTriggers.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class MarkOfTheWildOnPartyTrigger : public BuffOnPartyTrigger
|
||||
{
|
||||
public:
|
||||
MarkOfTheWildOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "mark of the wild", 2) { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class MarkOfTheWildTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
MarkOfTheWildTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "mark of the wild", 2) { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class ThornsOnPartyTrigger : public BuffOnPartyTrigger
|
||||
{
|
||||
public:
|
||||
ThornsOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "thorns", 2) { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class ThornsTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
ThornsTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "thorns", 2) { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class OmenOfClarityTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
OmenOfClarityTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "omen of clarity") { }
|
||||
};
|
||||
|
||||
class RakeTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
RakeTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "rake") { }
|
||||
};
|
||||
|
||||
class InsectSwarmTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
InsectSwarmTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "insect swarm") { }
|
||||
};
|
||||
|
||||
class MoonfireTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
MoonfireTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "moonfire") { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class FaerieFireTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
FaerieFireTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "faerie fire") { }
|
||||
};
|
||||
|
||||
class FaerieFireFeralTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
FaerieFireFeralTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "faerie fire (feral)") { }
|
||||
};
|
||||
|
||||
class BashInterruptSpellTrigger : public InterruptSpellTrigger
|
||||
{
|
||||
public:
|
||||
BashInterruptSpellTrigger(PlayerbotAI* botAI) : InterruptSpellTrigger(botAI, "bash") { }
|
||||
};
|
||||
|
||||
class TigersFuryTrigger : public BoostTrigger
|
||||
{
|
||||
public:
|
||||
TigersFuryTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "tiger's fury") { }
|
||||
};
|
||||
|
||||
class NaturesGraspTrigger : public BoostTrigger
|
||||
{
|
||||
public:
|
||||
NaturesGraspTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "nature's grasp") { }
|
||||
};
|
||||
|
||||
class EntanglingRootsTrigger : public HasCcTargetTrigger
|
||||
{
|
||||
public:
|
||||
EntanglingRootsTrigger(PlayerbotAI* botAI) : HasCcTargetTrigger(botAI, "entangling roots") { }
|
||||
};
|
||||
|
||||
class EntanglingRootsKiteTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
EntanglingRootsKiteTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "entangling roots") { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class HibernateTrigger : public HasCcTargetTrigger
|
||||
{
|
||||
public:
|
||||
HibernateTrigger(PlayerbotAI* botAI) : HasCcTargetTrigger(botAI, "hibernate") { }
|
||||
};
|
||||
|
||||
class CurePoisonTrigger : public NeedCureTrigger
|
||||
{
|
||||
public:
|
||||
CurePoisonTrigger(PlayerbotAI* botAI) : NeedCureTrigger(botAI, "cure poison", DISPEL_POISON) { }
|
||||
};
|
||||
|
||||
class PartyMemberCurePoisonTrigger : public PartyMemberNeedCureTrigger
|
||||
{
|
||||
public:
|
||||
PartyMemberCurePoisonTrigger(PlayerbotAI* botAI) : PartyMemberNeedCureTrigger(botAI, "cure poison", DISPEL_POISON) { }
|
||||
};
|
||||
|
||||
class BearFormTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
BearFormTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "bear form") { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class TreeFormTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
TreeFormTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "tree of life") { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class CatFormTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
CatFormTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "cat form") { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class EclipseSolarTrigger : public HasAuraTrigger
|
||||
{
|
||||
public:
|
||||
EclipseSolarTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "eclipse (solar)") { }
|
||||
};
|
||||
|
||||
class EclipseLunarTrigger : public HasAuraTrigger
|
||||
{
|
||||
public:
|
||||
EclipseLunarTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "eclipse (lunar)") { }
|
||||
};
|
||||
|
||||
class BashInterruptEnemyHealerSpellTrigger : public InterruptEnemyHealerTrigger
|
||||
{
|
||||
public:
|
||||
BashInterruptEnemyHealerSpellTrigger(PlayerbotAI* botAI) : InterruptEnemyHealerTrigger(botAI, "bash") { }
|
||||
};
|
||||
|
||||
class NaturesSwiftnessTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
NaturesSwiftnessTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "nature's swiftness") { }
|
||||
};
|
||||
|
||||
#endif
|
||||
109
src/strategy/druid/FeralDruidStrategy.cpp
Normal file
109
src/strategy/druid/FeralDruidStrategy.cpp
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "FeralDruidStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class FeralDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
FeralDruidStrategyActionNodeFactory()
|
||||
{
|
||||
creators["survival instincts"] = &survival_instincts;
|
||||
creators["thorns"] = þs;
|
||||
creators["omen of clarity"] = &omen_of_clarity;
|
||||
creators["cure poison"] = &cure_poison;
|
||||
creators["cure poison on party"] = &cure_poison_on_party;
|
||||
creators["abolish poison"] = &abolish_poison;
|
||||
creators["abolish poison on party"] = &abolish_poison_on_party;
|
||||
creators["prowl"] = &prowl;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* survival_instincts(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("survival instincts",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("barskin"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* thorns(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("thorns",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* omen_of_clarity(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("omen of clarity",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* cure_poison(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("cure poison",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* cure_poison_on_party(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("cure poison on party",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* abolish_poison(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("abolish poison",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* abolish_poison_on_party(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("abolish poison on party",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* prowl(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("prowl",
|
||||
/*P*/ NextAction::array(0, new NextAction("cat form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
FeralDruidStrategy::FeralDruidStrategy(PlayerbotAI* botAI) : GenericDruidStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new FeralDruidStrategyActionNodeFactory());
|
||||
actionNodeFactories.Add(new ShapeshiftDruidStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void FeralDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericDruidStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_NORMAL + 7), nullptr)));
|
||||
triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), nullptr)));
|
||||
triggers.push_back(new TriggerNode("enemy too close for melee", NextAction::array(0, new NextAction("move out of enemy contact", ACTION_NORMAL + 8), nullptr)));
|
||||
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("survival instincts", ACTION_EMERGENCY + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("omen of clarity", NextAction::array(0, new NextAction("omen of clarity", ACTION_HIGH + 9), nullptr)));
|
||||
//triggers.push_back(new TriggerNode("player has no flag", NextAction::array(0, new NextAction("prowl", ACTION_HIGH + 1), nullptr)));
|
||||
//triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("prowl", ACTION_INTERRUPT + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("player has flag", NextAction::array(0, new NextAction("dash", ACTION_EMERGENCY + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("enemy flagcarrier near", NextAction::array(0, new NextAction("dash", ACTION_EMERGENCY + 2), nullptr)));
|
||||
}
|
||||
|
||||
85
src/strategy/druid/FeralDruidStrategy.h
Normal file
85
src/strategy/druid/FeralDruidStrategy.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_FERALRUIDSTRATEGY_H
|
||||
#define _PLAYERBOT_FERALRUIDSTRATEGY_H
|
||||
|
||||
#include "GenericDruidStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class ShapeshiftDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
ShapeshiftDruidStrategyActionNodeFactory()
|
||||
{
|
||||
creators["rejuvenation"] = &rejuvenation;
|
||||
creators["regrowth"] = ®rowth;
|
||||
creators["healing touch"] = &healing_touch;
|
||||
creators["rejuvenation on party"] = &rejuvenation_on_party;
|
||||
creators["regrowth on party"] = ®rowth_on_party;
|
||||
creators["healing touch on party"] = &healing_touch_on_party;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* regrowth(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("regrowth",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ NextAction::array(0, new NextAction("healing touch"), nullptr),
|
||||
/*C*/ NextAction::array(0, new NextAction("melee", 10.0f), nullptr));
|
||||
}
|
||||
|
||||
static ActionNode* rejuvenation(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("rejuvenation",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* healing_touch(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("healing touch",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* regrowth_on_party(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("regrowth on party",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ NextAction::array(0, new NextAction("healing touch on party"), nullptr),
|
||||
/*C*/ NextAction::array(0, new NextAction("melee", 10.0f), nullptr));
|
||||
}
|
||||
|
||||
static ActionNode* rejuvenation_on_party(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("rejuvenation on party",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* healing_touch_on_party(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("healing touch on party",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
class FeralDruidStrategy : public GenericDruidStrategy
|
||||
{
|
||||
protected:
|
||||
FeralDruidStrategy(PlayerbotAI* botAI);
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_COMBAT | STRATEGY_TYPE_MELEE; }
|
||||
};
|
||||
|
||||
#endif
|
||||
92
src/strategy/druid/GenericDruidNonCombatStrategy.cpp
Normal file
92
src/strategy/druid/GenericDruidNonCombatStrategy.cpp
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "GenericDruidNonCombatStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class GenericDruidNonCombatStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
GenericDruidNonCombatStrategyActionNodeFactory()
|
||||
{
|
||||
creators["thorns"] = þs;
|
||||
creators["thorns on party"] = þs_on_party;
|
||||
creators["mark of the wild"] = &mark_of_the_wild;
|
||||
creators["mark of the wild on party"] = &mark_of_the_wild_on_party;
|
||||
creators["innervate"] = &innervate;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* thorns(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("thorns",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* thorns_on_party(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("thorns on party",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* mark_of_the_wild(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("mark of the wild",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* mark_of_the_wild_on_party(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("mark of the wild on party",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* innervate(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("innervate",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("drink"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
GenericDruidNonCombatStrategy::GenericDruidNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericDruidNonCombatStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericDruidNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
NonCombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("mark of the wild", NextAction::array(0, new NextAction("mark of the wild", 14.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("thorns", NextAction::array(0, new NextAction("thorns", 12.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("cure poison", NextAction::array(0, new NextAction("abolish poison", 21.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member cure poison", NextAction::array(0, new NextAction("abolish poison on party", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member dead", NextAction::array(0, new NextAction("revive", 22.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("innervate", ACTION_EMERGENCY + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("swimming", NextAction::array(0, new NextAction("aquatic form", 1.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("apply oil", 1.0f), nullptr)));
|
||||
}
|
||||
|
||||
GenericDruidBuffStrategy::GenericDruidBuffStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericDruidNonCombatStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericDruidBuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
NonCombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("mark of the wild on party", NextAction::array(0, new NextAction("mark of the wild on party", 13.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("thorns on party", NextAction::array(0, new NextAction("thorns on party", 11.0f), nullptr)));
|
||||
}
|
||||
30
src/strategy/druid/GenericDruidNonCombatStrategy.h
Normal file
30
src/strategy/druid/GenericDruidNonCombatStrategy.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_GENERICDRUIDNONCOMBATSTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICDRUIDNONCOMBATSTRATEGY_H
|
||||
|
||||
#include "NonCombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericDruidNonCombatStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericDruidNonCombatStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "nc"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class GenericDruidBuffStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericDruidBuffStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "buff"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
131
src/strategy/druid/GenericDruidStrategy.cpp
Normal file
131
src/strategy/druid/GenericDruidStrategy.cpp
Normal file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "GenericDruidStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
GenericDruidStrategyActionNodeFactory()
|
||||
{
|
||||
creators["melee"] = &melee;
|
||||
creators["caster form"] = &caster_form;
|
||||
creators["cure poison"] = &cure_poison;
|
||||
creators["cure poison on party"] = &cure_poison_on_party;
|
||||
creators["abolish poison"] = &abolish_poison;
|
||||
creators["abolish poison on party"] = &abolish_poison_on_party;
|
||||
creators["rebirth"] = &rebirth;
|
||||
creators["entangling roots on cc"] = &entangling_roots_on_cc;
|
||||
creators["innervate"] = &innervate;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* melee(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("melee",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* caster_form(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("caster form",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* cure_poison(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("cure poison",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* cure_poison_on_party(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("cure poison on party",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* abolish_poison(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("abolish poison",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* abolish_poison_on_party(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("abolish poison on party",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* rebirth(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("rebirth",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* entangling_roots_on_cc(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("entangling roots on cc",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* innervate(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("innervate",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("mana potion"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
GenericDruidStrategy::GenericDruidStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericDruidStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
CombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("regrowth", ACTION_MEDIUM_HEAL + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member low health", NextAction::array(0, new NextAction("regrowth on party", ACTION_MEDIUM_HEAL + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("regrowth", ACTION_CRITICAL_HEAL + 2), new NextAction("healing touch", ACTION_CRITICAL_HEAL + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member critical health", NextAction::array(0, new NextAction("regrowth on party", ACTION_CRITICAL_HEAL + 1), new NextAction("healing touch on party", ACTION_CRITICAL_HEAL + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member dead", NextAction::array(0, new NextAction("rebirth", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("innervate", ACTION_EMERGENCY + 5), nullptr)));
|
||||
}
|
||||
|
||||
void DruidCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("cure poison", NextAction::array(0, new NextAction("abolish poison", ACTION_DISPEL + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member cure poison", NextAction::array(0, new NextAction("abolish poison on party", ACTION_DISPEL + 1), nullptr)));
|
||||
}
|
||||
|
||||
void DruidBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("nature's swiftness", NextAction::array(0, new NextAction("nature's swiftness", ACTION_HIGH + 9), nullptr)));
|
||||
}
|
||||
|
||||
void DruidCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("entangling roots", NextAction::array(0, new NextAction("entangling roots on cc", ACTION_HIGH + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("entangling roots kite", NextAction::array(0, new NextAction("entangling roots", ACTION_HIGH + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("hibernate", NextAction::array(0, new NextAction("hibernate on cc", ACTION_HIGH + 3), nullptr)));
|
||||
}
|
||||
48
src/strategy/druid/GenericDruidStrategy.h
Normal file
48
src/strategy/druid/GenericDruidStrategy.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_GENERICDRUIDSTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICDRUIDSTRATEGY_H
|
||||
|
||||
#include "CombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericDruidStrategy : public CombatStrategy
|
||||
{
|
||||
protected:
|
||||
GenericDruidStrategy(PlayerbotAI* botAI);
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class DruidCureStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
DruidCureStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cure"; }
|
||||
};
|
||||
|
||||
class DruidBoostStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
DruidBoostStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "boost"; }
|
||||
};
|
||||
|
||||
class DruidCcStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
DruidCcStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cc"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
31
src/strategy/druid/HealDruidStrategy.cpp
Normal file
31
src/strategy/druid/HealDruidStrategy.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "HealDruidStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class HealDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
HealDruidStrategyActionNodeFactory() { }
|
||||
};
|
||||
|
||||
HealDruidStrategy::HealDruidStrategy(PlayerbotAI* botAI) : GenericDruidStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new HealDruidStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void HealDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericDruidStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("enemy out of spell", NextAction::array(0, new NextAction("reach spell", ACTION_NORMAL + 9), nullptr)));
|
||||
triggers.push_back(new TriggerNode("tree form", NextAction::array(0, new NextAction("tree form", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium health", NextAction::array(0, new NextAction("regrowth", ACTION_MEDIUM_HEAL + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member medium health", NextAction::array(0, new NextAction("regrowth on party", ACTION_MEDIUM_HEAL + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("almost full health", NextAction::array(0, new NextAction("rejuvenation", ACTION_LIGHT_HEAL + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member almost full health", NextAction::array(0, new NextAction("rejuvenation on party", ACTION_LIGHT_HEAL + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe heal", NextAction::array(0, new NextAction("tranquility", ACTION_MEDIUM_HEAL + 3), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member to heal out of spell range", NextAction::array(0, new NextAction("reach party member to heal", ACTION_CRITICAL_HEAL + 1), nullptr)));
|
||||
}
|
||||
22
src/strategy/druid/HealDruidStrategy.h
Normal file
22
src/strategy/druid/HealDruidStrategy.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_HEALDRUIDSTRATEGY_H
|
||||
#define _PLAYERBOT_HEALDRUIDSTRATEGY_H
|
||||
|
||||
#include "GenericDruidStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class HealDruidStrategy : public GenericDruidStrategy
|
||||
{
|
||||
public:
|
||||
HealDruidStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "heal"; }
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_HEAL; }
|
||||
};
|
||||
|
||||
#endif
|
||||
25
src/strategy/druid/MeleeDruidStrategy.cpp
Normal file
25
src/strategy/druid/MeleeDruidStrategy.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "MeleeDruidStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
MeleeDruidStrategy::MeleeDruidStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI)
|
||||
{
|
||||
}
|
||||
|
||||
NextAction** MeleeDruidStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0,
|
||||
new NextAction("faerie fire", ACTION_NORMAL + 1),
|
||||
new NextAction("melee", ACTION_NORMAL),
|
||||
nullptr);
|
||||
}
|
||||
|
||||
void MeleeDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("omen of clarity", NextAction::array(0, new NextAction("omen of clarity", ACTION_HIGH + 9), nullptr)));
|
||||
|
||||
CombatStrategy::InitTriggers(triggers);
|
||||
}
|
||||
20
src/strategy/druid/MeleeDruidStrategy.h
Normal file
20
src/strategy/druid/MeleeDruidStrategy.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_MELEEDRUIDSTRATEGY_H
|
||||
#define _PLAYERBOT_MELEEDRUIDSTRATEGY_H
|
||||
|
||||
#include "CombatStrategy.h"
|
||||
|
||||
class MeleeDruidStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
MeleeDruidStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "melee"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user