Spell casting

This commit is contained in:
Yunfan Li
2024-03-12 18:39:23 +08:00
parent 00e48c7548
commit aab51a8182
16 changed files with 50 additions and 13 deletions

View File

@@ -153,8 +153,9 @@ void BearTankDruidStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
{
FeralDruidStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("feral charge - bear", ACTION_NORMAL + 8), nullptr)));
triggers.push_back(new TriggerNode("thorns", NextAction::array(0, new NextAction("thorns", ACTION_HIGH + 9), nullptr)));
// 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("low health", NextAction::array(0, new NextAction("frenzied regeneration", ACTION_HIGH + 7), 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)));

View File

@@ -96,6 +96,13 @@ class CastSurvivalInstinctsAction : public CastBuffSpellAction
CastSurvivalInstinctsAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "survival instincts") { }
};
class CastFrenziedRegenerationAction : public CastBuffSpellAction
{
public:
CastFrenziedRegenerationAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "frenzied regeneration") { }
};
class CastThornsAction : public CastBuffSpellAction
{
public:

View File

@@ -176,6 +176,7 @@ class DruidAiObjectContextInternal : public NamedObjectContext<Action>
creators["rip"] = &DruidAiObjectContextInternal::rip;
creators["cower"] = &DruidAiObjectContextInternal::cower;
creators["survival instincts"] = &DruidAiObjectContextInternal::survival_instincts;
creators["frenzied regeneration"] = &DruidAiObjectContextInternal::frenzied_regeneration;
creators["thorns"] = &DruidAiObjectContextInternal::thorns;
creators["thorns on party"] = &DruidAiObjectContextInternal::thorns_on_party;
creators["thorns on main tank"] = &DruidAiObjectContextInternal::thorns_on_main_tank;
@@ -258,6 +259,7 @@ class DruidAiObjectContextInternal : public NamedObjectContext<Action>
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* frenzied_regeneration(PlayerbotAI* botAI) { return new CastFrenziedRegenerationAction(botAI); }
static Action* thorns(PlayerbotAI* botAI) { return new CastThornsAction(botAI); }
static Action* thorns_on_party(PlayerbotAI* botAI) { return new CastThornsOnPartyAction(botAI); }
static Action* thorns_on_main_tank(PlayerbotAI* botAI) { return new CastThornsOnMainTankAction(botAI); }