mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-24 05:56:23 +00:00
major class spells
This commit is contained in:
@@ -105,9 +105,9 @@ CasterDruidStrategy::CasterDruidStrategy(PlayerbotAI* botAI) : GenericDruidStrat
|
||||
NextAction** CasterDruidStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0,
|
||||
new NextAction("starfall", ACTION_NORMAL + 3),
|
||||
new NextAction("starfall", ACTION_NORMAL + 2),
|
||||
new NextAction("wrath", ACTION_NORMAL + 1),
|
||||
new NextAction("starfire", ACTION_NORMAL),
|
||||
// new NextAction("starfire", ACTION_NORMAL),
|
||||
nullptr);
|
||||
}
|
||||
|
||||
@@ -119,9 +119,11 @@ void CasterDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
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) cooldown", NextAction::array(0, new NextAction("starfire", ACTION_NORMAL + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("eclipse (lunar)", NextAction::array(0, new NextAction("starfire", ACTION_NORMAL + 6), nullptr)));
|
||||
triggers.push_back(new TriggerNode("eclipse (solar) cooldown", NextAction::array(0, new NextAction("wrath", ACTION_NORMAL + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("moonfire", NextAction::array(0, new NextAction("moonfire", ACTION_NORMAL + 4), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 5), NULL)));
|
||||
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 9), NULL)));
|
||||
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"party member remove curse",
|
||||
@@ -134,9 +136,9 @@ void CasterDruidAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
triggers.push_back(new TriggerNode(
|
||||
"light aoe",
|
||||
NextAction::array(0,
|
||||
new NextAction("starfall", ACTION_NORMAL + 4),
|
||||
new NextAction("starfall", ACTION_NORMAL + 5),
|
||||
new NextAction("insect swarm on attacker", ACTION_NORMAL + 3),
|
||||
new NextAction("moonfire on attacker", ACTION_NORMAL + 2),
|
||||
new NextAction("moonfire on attacker", ACTION_NORMAL + 3),
|
||||
NULL)));
|
||||
}
|
||||
|
||||
|
||||
@@ -108,6 +108,12 @@ class CastThornsOnPartyAction : public BuffOnPartyAction
|
||||
CastThornsOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "thorns") { }
|
||||
};
|
||||
|
||||
class CastThornsOnMainTankAction : public BuffOnMainTankAction
|
||||
{
|
||||
public:
|
||||
CastThornsOnMainTankAction(PlayerbotAI* botAI) : BuffOnMainTankAction(botAI, "thorns", false) { }
|
||||
};
|
||||
|
||||
class CastOmenOfClarityAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -73,6 +73,7 @@ class DruidTriggerFactoryInternal : public NamedObjectContext<Trigger>
|
||||
creators["omen of clarity"] = &DruidTriggerFactoryInternal::omen_of_clarity;
|
||||
creators["thorns"] = &DruidTriggerFactoryInternal::thorns;
|
||||
creators["thorns on party"] = &DruidTriggerFactoryInternal::thorns_on_party;
|
||||
creators["thorns on main tank"] = &DruidTriggerFactoryInternal::thorns_on_main_tank;
|
||||
creators["bash"] = &DruidTriggerFactoryInternal::bash;
|
||||
creators["faerie fire (feral)"] = &DruidTriggerFactoryInternal::faerie_fire_feral;
|
||||
creators["faerie fire"] = &DruidTriggerFactoryInternal::faerie_fire;
|
||||
@@ -96,6 +97,8 @@ class DruidTriggerFactoryInternal : public NamedObjectContext<Trigger>
|
||||
creators["bash on enemy healer"] = &DruidTriggerFactoryInternal::bash_on_enemy_healer;
|
||||
creators["nature's swiftness"] = &DruidTriggerFactoryInternal::natures_swiftness;
|
||||
creators["party member remove curse"] = &DruidTriggerFactoryInternal::party_member_remove_curse;
|
||||
creators["eclipse (solar) cooldown"] = &DruidTriggerFactoryInternal::eclipse_solar_cooldown;
|
||||
creators["eclipse (lunar) cooldown"] = &DruidTriggerFactoryInternal::eclipse_lunar_cooldown;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -104,6 +107,7 @@ class DruidTriggerFactoryInternal : public NamedObjectContext<Trigger>
|
||||
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* thorns_on_main_tank(PlayerbotAI* botAI) { return new ThornsOnMainTankTrigger(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); }
|
||||
@@ -125,6 +129,8 @@ class DruidTriggerFactoryInternal : public NamedObjectContext<Trigger>
|
||||
static Trigger* bash_on_enemy_healer(PlayerbotAI* botAI) { return new BashInterruptEnemyHealerSpellTrigger(botAI); }
|
||||
static Trigger* omen_of_clarity(PlayerbotAI* botAI) { return new OmenOfClarityTrigger(botAI); }
|
||||
static Trigger* party_member_remove_curse(PlayerbotAI* ai) { return new DruidPartyMemberRemoveCurseTrigger(ai); }
|
||||
static Trigger* eclipse_solar_cooldown(PlayerbotAI* ai) { return new EclipseSolarCooldownTrigger(ai); }
|
||||
static Trigger* eclipse_lunar_cooldown(PlayerbotAI* ai) { return new EclipseLunarCooldownTrigger(ai); }
|
||||
};
|
||||
|
||||
class DruidAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
@@ -172,6 +178,7 @@ class DruidAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
creators["survival instincts"] = &DruidAiObjectContextInternal::survival_instincts;
|
||||
creators["thorns"] = &DruidAiObjectContextInternal::thorns;
|
||||
creators["thorns on party"] = &DruidAiObjectContextInternal::thorns_on_party;
|
||||
creators["thorns on main tank"] = &DruidAiObjectContextInternal::thorns_on_main_tank;
|
||||
creators["cure poison"] = &DruidAiObjectContextInternal::cure_poison;
|
||||
creators["cure poison on party"] = &DruidAiObjectContextInternal::cure_poison_on_party;
|
||||
creators["abolish poison"] = &DruidAiObjectContextInternal::abolish_poison;
|
||||
@@ -252,6 +259,7 @@ class DruidAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
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* thorns_on_main_tank(PlayerbotAI* botAI) { return new CastThornsOnMainTankAction(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); }
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
#define _PLAYERBOT_DRUIDTRIGGERS_H
|
||||
|
||||
#include "CureTriggers.h"
|
||||
#include "GenericTriggers.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "Player.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
@@ -34,6 +36,13 @@ class ThornsOnPartyTrigger : public BuffOnPartyTrigger
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class ThornsOnMainTankTrigger : public BuffOnMainTankTrigger
|
||||
{
|
||||
public:
|
||||
ThornsOnMainTankTrigger(PlayerbotAI* botAI) : BuffOnMainTankTrigger(botAI, "thorns", false, 2 * 2000) { }
|
||||
|
||||
};
|
||||
|
||||
class ThornsTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
@@ -183,4 +192,23 @@ class DruidPartyMemberRemoveCurseTrigger : public PartyMemberNeedCureTrigger
|
||||
public:
|
||||
DruidPartyMemberRemoveCurseTrigger(PlayerbotAI* ai) : PartyMemberNeedCureTrigger(ai, "druid remove curse", DISPEL_CURSE) {}
|
||||
};
|
||||
|
||||
class EclipseSolarCooldownTrigger : public SpellCooldownTrigger
|
||||
{
|
||||
public:
|
||||
EclipseSolarCooldownTrigger(PlayerbotAI* ai): SpellCooldownTrigger(ai, "eclipse (solar)") {}
|
||||
bool IsActive() override {
|
||||
return bot->HasSpellCooldown(48517);
|
||||
}
|
||||
};
|
||||
|
||||
class EclipseLunarCooldownTrigger : public SpellCooldownTrigger
|
||||
{
|
||||
public:
|
||||
EclipseLunarCooldownTrigger(PlayerbotAI* ai): SpellCooldownTrigger(ai, "eclipse (lunar)") {}
|
||||
bool IsActive() override {
|
||||
return bot->HasSpellCooldown(48518);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -118,5 +118,5 @@ 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)));
|
||||
triggers.push_back(new TriggerNode("thorns on main tank", NextAction::array(0, new NextAction("thorns on main tank", 11.0f), nullptr)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user