Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
creators["swipe"] = &swipe;
creators["lacerate"] = &lacerate;
creators["demoralizing roar"] = &demoralizing_roar;
creators["frenzied regeneration"] = &frenzied_regeneration;
creators["challenging roar"] = &challenging_roar;
}
private:
static ActionNode* melee(PlayerbotAI* ai)
Expand All @@ -42,7 +44,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
{
return new ActionNode ("swipe (bear)",
/*P*/ NULL,
/*A*/ NULL,
/*A*/ NextAction::array(0, new NextAction("swipe"), NULL),
/*C*/ NULL);
}
static ActionNode* faerie_fire_feral(PlayerbotAI* ai)
Expand Down Expand Up @@ -115,6 +117,20 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*A*/ NULL,
/*C*/ NULL);
}
static ActionNode* frenzied_regeneration(PlayerbotAI* ai)
{
return new ActionNode ("frenzied regeneration",
/*P*/ NULL,
/*A*/ NextAction::array(0, new NextAction("barkskin"), NULL),
/*C*/ NULL);
}
static ActionNode* challenging_roar(PlayerbotAI* ai)
{
return new ActionNode ("challenging roar",
/*P*/ NULL,
/*A*/ NULL,
/*C*/ NULL);
}
};

BearTankDruidStrategy::BearTankDruidStrategy(PlayerbotAI* ai) : FeralDruidStrategy(ai)
Expand Down Expand Up @@ -152,9 +168,13 @@ void BearTankDruidStrategy::InitTriggers(std::list<TriggerNode*> &triggers)
"lose aggro",
NextAction::array(0, new NextAction("growl", ACTION_HIGH + 8), NULL)));

triggers.push_back(new TriggerNode(
"low health",
NextAction::array(0, new NextAction("frenzied regeneration", ACTION_MEDIUM_HEAL + 3), NULL)));

triggers.push_back(new TriggerNode(
"medium aoe",
NextAction::array(0, new NextAction("demoralizing roar", ACTION_HIGH + 6), new NextAction("swipe (bear)", ACTION_HIGH + 6), NULL)));
NextAction::array(0, new NextAction("challenging roar", ACTION_HIGH + 7), new NextAction("demoralizing roar", ACTION_HIGH + 6), new NextAction("swipe (bear)", ACTION_HIGH + 6), NULL)));

triggers.push_back(new TriggerNode(
"light aoe",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
creators["rake"] = &rake;
creators["ferocious bite"] = &ferocious_bite;
creators["rip"] = &rip;
creators["swipe (cat)"] = &swipe_cat;
}
private:
static ActionNode* faerie_fire_feral(PlayerbotAI* ai)
Expand Down Expand Up @@ -84,6 +85,13 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*A*/ NULL,
/*C*/ NULL);
}
static ActionNode* swipe_cat(PlayerbotAI* ai)
{
return new ActionNode ("swipe (cat)",
/*P*/ NULL,
/*A*/ NextAction::array(0, new NextAction("claw"), NULL),
/*C*/ NULL);
}
};

CatDpsDruidStrategy::CatDpsDruidStrategy(PlayerbotAI* ai) : FeralDruidStrategy(ai)
Expand All @@ -93,7 +101,9 @@ CatDpsDruidStrategy::CatDpsDruidStrategy(PlayerbotAI* ai) : FeralDruidStrategy(a

NextAction** CatDpsDruidStrategy::getDefaultActions()
{
return NextAction::array(0, new NextAction("mangle (cat)", ACTION_NORMAL + 1), NULL);
return NextAction::array(0,
new NextAction("mangle (cat)", ACTION_NORMAL + 1),
NULL);
}

void CatDpsDruidStrategy::InitTriggers(std::list<TriggerNode*> &triggers)
Expand Down
14 changes: 13 additions & 1 deletion src/modules/Bots/playerbot/strategy/druid/DruidActions.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,19 @@ namespace ai
class CastBarskinAction : public CastBuffSpellAction
{
public:
CastBarskinAction(PlayerbotAI* ai) : CastBuffSpellAction(ai, "barskin") {}
CastBarskinAction(PlayerbotAI* ai) : CastBuffSpellAction(ai, "barkskin") {}
};

class CastRemoveCurseAction : public CastCureSpellAction
{
public:
CastRemoveCurseAction(PlayerbotAI* ai) : CastCureSpellAction(ai, "remove curse") {}
};

class CastRemoveCurseOnPartyAction : public CurePartyMemberAction
{
public:
CastRemoveCurseOnPartyAction(PlayerbotAI* ai) : CurePartyMemberAction(ai, "remove curse", DISPEL_CURSE) {}
};

class CastInnervateAction : public CastSpellAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ namespace ai
creators["eclipse (solar)"] = &TriggerFactoryInternal::eclipse_solar;
creators["eclipse (lunar)"] = &TriggerFactoryInternal::eclipse_lunar;
creators["bash on enemy healer"] = &TriggerFactoryInternal::bash_on_enemy_healer;
creators["remove curse"] = &TriggerFactoryInternal::remove_curse;
creators["remove curse on party"] = &TriggerFactoryInternal::remove_curse_on_party;
}

private:
Expand All @@ -113,6 +115,8 @@ namespace ai
static Trigger* cat_form(PlayerbotAI* ai) { return new CatFormTrigger(ai); }
static Trigger* tree_form(PlayerbotAI* ai) { return new TreeFormTrigger(ai); }
static Trigger* bash_on_enemy_healer(PlayerbotAI* ai) { return new BashInterruptEnemyHealerSpellTrigger(ai); }
static Trigger* remove_curse(PlayerbotAI* ai) { return new RemoveCurseTrigger(ai); }
static Trigger* remove_curse_on_party(PlayerbotAI* ai) { return new PartyMemberRemoveCurseTrigger(ai); }
};
};
};
Expand Down Expand Up @@ -176,12 +180,16 @@ namespace ai
creators["rejuvenation on party"] = &AiObjectContextInternal::rejuvenation_on_party;
creators["healing touch on party"] = &AiObjectContextInternal::healing_touch_on_party;
creators["rebirth"] = &AiObjectContextInternal::rebirth;
creators["barskin"] = &AiObjectContextInternal::barskin;
creators["barkskin"] = &AiObjectContextInternal::barskin;
creators["lacerate"] = &AiObjectContextInternal::lacerate;
creators["hurricane"] = &AiObjectContextInternal::hurricane;
creators["innervate"] = &AiObjectContextInternal::innervate;
creators["tranquility"] = &AiObjectContextInternal::tranquility;
creators["bash on enemy healer"] = &AiObjectContextInternal::bash_on_enemy_healer;
creators["remove curse"] = &AiObjectContextInternal::remove_curse;
creators["remove curse on party"] = &AiObjectContextInternal::remove_curse_on_party;
creators["frenzied regeneration"] = &AiObjectContextInternal::frenzied_regeneration;
creators["challenging roar"] = &AiObjectContextInternal::challenging_roar;
}

private:
Expand Down Expand Up @@ -239,6 +247,10 @@ namespace ai
static Action* hurricane(PlayerbotAI* ai) { return new CastHurricaneAction(ai); }
static Action* innervate(PlayerbotAI* ai) { return new CastInnervateAction(ai); }
static Action* bash_on_enemy_healer(PlayerbotAI* ai) { return new CastBashOnEnemyHealerAction(ai); }
static Action* remove_curse(PlayerbotAI* ai) { return new CastRemoveCurseAction(ai); }
static Action* remove_curse_on_party(PlayerbotAI* ai) { return new CastRemoveCurseOnPartyAction(ai); }
static Action* frenzied_regeneration(PlayerbotAI* ai) { return new CastFrenziedRegenerationAction(ai); }
static Action* challenging_roar(PlayerbotAI* ai) { return new CastChallengingRoarAction(ai); }
};
};
};
Expand Down
12 changes: 12 additions & 0 deletions src/modules/Bots/playerbot/strategy/druid/DruidBearActions.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,16 @@ namespace ai {
public:
CastBashOnEnemyHealerAction(PlayerbotAI* ai) : CastSpellOnEnemyHealerAction(ai, "bash") {}
};

class CastFrenziedRegenerationAction : public CastSpellAction
{
public:
CastFrenziedRegenerationAction(PlayerbotAI* ai) : CastSpellAction(ai, "frenzied regeneration") {}
};

class CastChallengingRoarAction : public CastSpellAction
{
public:
CastChallengingRoarAction(PlayerbotAI* ai) : CastSpellAction(ai, "challenging roar") {}
};
}
2 changes: 0 additions & 2 deletions src/modules/Bots/playerbot/strategy/druid/DruidCatActions.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,4 @@ namespace ai {
CastRipAction(PlayerbotAI* ai) : CastMeleeSpellAction(ai, "rip") {}
};



}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ namespace ai {
class CastTreeFormAction : public CastBuffSpellAction {
public:
CastTreeFormAction(PlayerbotAI* ai) : CastBuffSpellAction(ai, "tree of life") {}

virtual bool isUseful() {
return AI_VALUE2(uint32, "spell id", "tree of life") != 0 && CastBuffSpellAction::isUseful();
}
};

class CastMoonkinFormAction : public CastBuffSpellAction {
Expand Down
12 changes: 12 additions & 0 deletions src/modules/Bots/playerbot/strategy/druid/DruidTriggers.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,16 @@ namespace ai {
public:
BashInterruptEnemyHealerSpellTrigger(PlayerbotAI* ai) : InterruptEnemyHealerTrigger(ai, "bash") {}
};

class RemoveCurseTrigger : public NeedCureTrigger
{
public:
RemoveCurseTrigger(PlayerbotAI* ai) : NeedCureTrigger(ai, "remove curse", DISPEL_CURSE) {}
};

class PartyMemberRemoveCurseTrigger : public PartyMemberNeedCureTrigger
{
public:
PartyMemberRemoveCurseTrigger(PlayerbotAI* ai) : PartyMemberNeedCureTrigger(ai, "remove curse", DISPEL_CURSE) {}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class FeralDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
{
return new ActionNode ("survival instincts",
/*P*/ NULL,
/*A*/ NextAction::array(0, new NextAction("barskin"), NULL),
/*A*/ NextAction::array(0, new NextAction("barkskin"), NULL),
/*C*/ NULL);
}
static ActionNode* thorns(PlayerbotAI* ai)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ void GenericDruidNonCombatStrategy::InitTriggers(std::list<TriggerNode*> &trigge
"party member cure poison",
NextAction::array(0, new NextAction("abolish poison on party", 20.0f), NULL)));

triggers.push_back(new TriggerNode(
"remove curse",
NextAction::array(0, new NextAction("remove curse", ACTION_DISPEL + 2), NULL)));

triggers.push_back(new TriggerNode(
"remove curse on party",
NextAction::array(0, new NextAction("remove curse on party", ACTION_DISPEL + 1), NULL)));

triggers.push_back(new TriggerNode(
"party member dead",
NextAction::array(0, new NextAction("revive", 22.0f), NULL)));
Expand Down
24 changes: 24 additions & 0 deletions src/modules/Bots/playerbot/strategy/druid/GenericDruidStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
creators["rebirth"] = &rebirth;
creators["entangling roots on cc"] = &entangling_roots_on_cc;
creators["innervate"] = &innervate;
creators["remove curse"] = &remove_curse;
creators["remove curse on party"] = &remove_curse_on_party;
}

private:
Expand Down Expand Up @@ -85,6 +87,20 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
/*A*/ NextAction::array(0, new NextAction("mana potion"), NULL),
/*C*/ NULL);
}
static ActionNode* remove_curse(PlayerbotAI* ai)
{
return new ActionNode ("remove curse",
/*P*/ NextAction::array(0, new NextAction("caster form"), NULL),
/*A*/ NULL,
/*C*/ NULL);
}
static ActionNode* remove_curse_on_party(PlayerbotAI* ai)
{
return new ActionNode ("remove curse on party",
/*P*/ NextAction::array(0, new NextAction("caster form"), NULL),
/*A*/ NULL,
/*C*/ NULL);
}
};

GenericDruidStrategy::GenericDruidStrategy(PlayerbotAI* ai) : CombatStrategy(ai)
Expand Down Expand Up @@ -122,6 +138,14 @@ void GenericDruidStrategy::InitTriggers(std::list<TriggerNode*> &triggers)
"party member cure poison",
NextAction::array(0, new NextAction("abolish poison on party", ACTION_DISPEL + 1), NULL)));

triggers.push_back(new TriggerNode(
"remove curse",
NextAction::array(0, new NextAction("remove curse", ACTION_DISPEL + 2), NULL)));

triggers.push_back(new TriggerNode(
"remove curse on party",
NextAction::array(0, new NextAction("remove curse on party", ACTION_DISPEL + 1), NULL)));

triggers.push_back(new TriggerNode(
"party member dead",
NextAction::array(0, new NextAction("rebirth", ACTION_HIGH + 1), NULL)));
Expand Down
Loading