mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-24 22:16:23 +00:00
shaman, rogue strategy port, use item action.
This commit is contained in:
@@ -11,6 +11,7 @@ class CasterShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
|
||||
CasterShamanStrategyActionNodeFactory()
|
||||
{
|
||||
creators["magma totem"] = &magma_totem;
|
||||
creators["totem of wrath"] = &totem_of_wrath;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -21,6 +22,13 @@ class CasterShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
|
||||
/*A*/ nullptr,
|
||||
/*C*/ NextAction::array(0, new NextAction("fire nova"), nullptr));
|
||||
}
|
||||
static ActionNode* totem_of_wrath(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("totem of wrath",
|
||||
/*P*/ NULL,
|
||||
/*A*/ NextAction::array(0, new NextAction("flametongue totem"), NULL),
|
||||
/*C*/ NULL);
|
||||
}
|
||||
};
|
||||
|
||||
CasterShamanStrategy::CasterShamanStrategy(PlayerbotAI* botAI) : GenericShamanStrategy(botAI)
|
||||
@@ -30,7 +38,10 @@ CasterShamanStrategy::CasterShamanStrategy(PlayerbotAI* botAI) : GenericShamanSt
|
||||
|
||||
NextAction** CasterShamanStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("lightning bolt", 10.0f), nullptr);
|
||||
return NextAction::array(0,
|
||||
new NextAction("lava burst", 11.0f),
|
||||
new NextAction("lightning bolt", 10.0f),
|
||||
NULL);
|
||||
}
|
||||
|
||||
void CasterShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
@@ -39,10 +50,16 @@ void CasterShamanStrategy::InitTriggers(std::vector<TriggerNode*>& 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("shaman weapon", NextAction::array(0, new NextAction("flametongue weapon", 23.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("searing totem", NextAction::array(0, new NextAction("searing totem", 19.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("shock", NextAction::array(0, new NextAction("earth shock", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("frost shock snare", NextAction::array(0, new NextAction("frost shock", 21.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("flametongue totem", ACTION_LIGHT_HEAL), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("searing totem", NextAction::array(0, new NextAction("searing totem", 19.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("flame shock", NextAction::array(0, new NextAction("flame shock", 20.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("frost shock snare", NextAction::array(0, new NextAction("frost shock", 21.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"no fire totem",
|
||||
NextAction::array(0, new NextAction("totem of wrath", 15.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"enemy too close for spell",
|
||||
NextAction::array(0, new NextAction("flee", 49.0f), NULL)));
|
||||
}
|
||||
|
||||
void CasterAoeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
|
||||
@@ -99,7 +99,8 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
|
||||
{
|
||||
return new ActionNode ("riptide on party",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("healing wave on party"), nullptr),
|
||||
// /*A*/ NextAction::array(0, new NextAction("healing wave on party"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
@@ -116,13 +117,16 @@ void GenericShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
triggers.push_back(new TriggerNode("wind shear", NextAction::array(0, new NextAction("wind shear", 23.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("wind shear on enemy healer", NextAction::array(0, new NextAction("wind shear on enemy healer", 23.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("purge", NextAction::array(0, new NextAction("purge", 10.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member medium health", NextAction::array(0, new NextAction("lesser healing wave on party", 25.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member low health", NextAction::array(0, new NextAction("riptide on party", 25.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe heal", NextAction::array(0, new NextAction("chain heal", 27.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium health", NextAction::array(0, new NextAction("lesser healing wave", 26.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("riptide", 26.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("party member medium health", NextAction::array(0, new NextAction("lesser healing wave on party", 25.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("party member low health", NextAction::array(0, new NextAction("riptide on party", 25.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("medium aoe heal", NextAction::array(0, new NextAction("chain heal", 27.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("medium health", NextAction::array(0, new NextAction("lesser healing wave", 26.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("riptide", 26.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("heroism", NextAction::array(0, new NextAction("heroism", 31.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("bloodlust", NextAction::array(0, new NextAction("bloodlust", 30.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"medium mana",
|
||||
NextAction::array(0, new NextAction("mana tide totem", ACTION_EMERGENCY + 5), NULL)));
|
||||
}
|
||||
|
||||
void ShamanBuffDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
|
||||
@@ -43,7 +43,59 @@ void HealShamanStrategy::InitTriggers(std::vector<TriggerNode*>& 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("shaman weapon", NextAction::array(0, new NextAction("earthliving weapon", 22.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("mana tide totem", ACTION_EMERGENCY + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("healing stream totem", ACTION_LIGHT_HEAL), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"group heal occasion",
|
||||
NextAction::array(0, new NextAction("chain heal", 22.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"party member critical health",
|
||||
NextAction::array(0, new NextAction("riptide on party", 24.0f), new NextAction("lesser healing wave on party", 23.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"party member low health",
|
||||
NextAction::array(0, new NextAction("riptide on party", 18.0f), new NextAction("lesser healing wave on party", 17.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"party member medium health",
|
||||
NextAction::array(0, new NextAction("riptide on party", 15.0f), new NextAction("lesser healing wave on party", 14.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"party member almost full health",
|
||||
NextAction::array(0, new NextAction("riptide on party", 12.0f), new NextAction("lesser healing wave on party", 11.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"party member cleanse spirit poison",
|
||||
NextAction::array(0,
|
||||
new NextAction("cleanse spirit poison on party", ACTION_DISPEL + 2),
|
||||
new NextAction("cleansing totem", ACTION_DISPEL + 2),
|
||||
NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"party member cleanse spirit disease",
|
||||
NextAction::array(0,
|
||||
new NextAction("cleanse spirit disease on party", ACTION_DISPEL + 2),
|
||||
new NextAction("cleansing totem", ACTION_DISPEL + 1),
|
||||
NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"party member cleanse spirit curse",
|
||||
NextAction::array(0, new NextAction("cleanse spirit curse on party", ACTION_DISPEL + 2), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"no fire totem",
|
||||
NextAction::array(0, new NextAction("fire elemental totem", 11.0f), new NextAction("flametongue totem", 10.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"no water totem",
|
||||
NextAction::array(0, new NextAction("healing stream totem", 13.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"earth shield on main tank",
|
||||
NextAction::array(0, new NextAction("earth shield on main tank", ACTION_HIGH + 7), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"enemy too close for spell",
|
||||
NextAction::array(0, new NextAction("flee", 49.0f), NULL)));
|
||||
|
||||
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)));
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ class MeleeShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
|
||||
{
|
||||
return new ActionNode ("stormstrike",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("lava lash"), nullptr),
|
||||
// /*A*/ NextAction::array(0, new NextAction("lava lash"), nullptr),
|
||||
nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
@@ -35,9 +36,9 @@ class MeleeShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
|
||||
static ActionNode* magma_totem([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("magma totem",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ NextAction::array(0, new NextAction("fire nova"), nullptr));
|
||||
/*P*/ NULL,
|
||||
/*A*/ NextAction::array(0, new NextAction("searing totem"), NULL),
|
||||
/*C*/ NULL);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -48,24 +49,37 @@ MeleeShamanStrategy::MeleeShamanStrategy(PlayerbotAI* botAI) : GenericShamanStra
|
||||
|
||||
NextAction** MeleeShamanStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("stormstrike", 10.0f), nullptr);
|
||||
return NextAction::array(0,
|
||||
new NextAction("stormstrike", ACTION_NORMAL + 6),
|
||||
new NextAction("earth shock", ACTION_NORMAL + 5),
|
||||
new NextAction("fire nova", ACTION_NORMAL + 4),
|
||||
new NextAction("lava lash", ACTION_NORMAL + 1),
|
||||
new NextAction("melee", ACTION_NORMAL),
|
||||
NULL);
|
||||
}
|
||||
|
||||
void MeleeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericShamanStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("shaman weapon", NextAction::array(0, new NextAction("windfury weapon", 22.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("searing totem", NextAction::array(0, new NextAction("reach melee", 22.0f), new NextAction("searing totem", 22.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("shock", NextAction::array(0, new NextAction("earth shock", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("shaman weapon", NextAction::array(0, new NextAction("flametongue weapon", 22.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("searing totem", NextAction::array(0, new NextAction("reach melee", 22.0f), new NextAction("searing totem", 22.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("flame shock", NextAction::array(0, new NextAction("flame shock", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"maelstrom weapon",
|
||||
NextAction::array(0, new NextAction("lightning bolt", 25.0f), NULL)));
|
||||
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 too close for melee", NextAction::array(0, new NextAction("move out of enemy contact", 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("medium aoe", NextAction::array(0, new NextAction("strength of earth totem", ACTION_LIGHT_HEAL), 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(
|
||||
"no fire totem",
|
||||
NextAction::array(0, new NextAction("reach melee", 23.0f), new NextAction("magma totem", 22.0f), NULL)));
|
||||
}
|
||||
|
||||
void MeleeAoeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
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("magma totem", NextAction::array(0, new NextAction("magma totem", 26.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("fire nova", 25.0f), nullptr)));
|
||||
}
|
||||
|
||||
@@ -29,3 +29,8 @@ bool CastMagmaTotemAction::isUseful()
|
||||
{
|
||||
return CastMeleeSpellAction::isUseful() && !AI_VALUE2(bool, "has totem", name);
|
||||
}
|
||||
|
||||
bool CastCleansingTotemAction::isUseful()
|
||||
{
|
||||
return CastTotemAction::isUseful() && !AI_VALUE2(bool, "has totem", "mana tide totem");
|
||||
}
|
||||
@@ -158,6 +158,7 @@ class CastCleansingTotemAction : public CastTotemAction
|
||||
{
|
||||
public:
|
||||
CastCleansingTotemAction(PlayerbotAI* botAI) : CastTotemAction(botAI, "cleansing totem") { }
|
||||
virtual bool isUseful();
|
||||
};
|
||||
|
||||
class CastFlametongueTotemAction : public CastTotemAction
|
||||
@@ -368,4 +369,37 @@ class CastWindShearOnEnemyHealerAction : public CastSpellOnEnemyHealerAction
|
||||
// std::string const getName() override { return "cure disease on party"; }
|
||||
// };
|
||||
|
||||
class CastLavaBurstAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastLavaBurstAction(PlayerbotAI* ai) : CastSpellAction(ai, "lava burst") {}
|
||||
};
|
||||
|
||||
class CastEarthShieldOnMainTankAction : public BuffOnMainTankAction
|
||||
{
|
||||
public:
|
||||
CastEarthShieldOnMainTankAction(PlayerbotAI* ai) : BuffOnMainTankAction(ai, "earth shield", true) {}
|
||||
};
|
||||
|
||||
class CastTotemOfWrathAction : public CastTotemAction
|
||||
{
|
||||
public:
|
||||
CastTotemOfWrathAction(PlayerbotAI* ai) : CastTotemAction(ai, "totem of wrath") {}
|
||||
virtual std::string const GetTargetName() override { return "self target"; }
|
||||
virtual bool isUseful() override { return CastTotemAction::isUseful(); }
|
||||
};
|
||||
|
||||
class CastFireElementalTotemAction : public CastTotemAction
|
||||
{
|
||||
public:
|
||||
CastFireElementalTotemAction(PlayerbotAI* ai) : CastTotemAction(ai, "fire elemental totem") {}
|
||||
virtual std::string const GetTargetName() override { return "self target"; }
|
||||
virtual bool isUseful() override { return CastTotemAction::isUseful(); }
|
||||
};
|
||||
|
||||
class CastWrathOfAirTotemAction : public CastTotemAction
|
||||
{
|
||||
public:
|
||||
CastWrathOfAirTotemAction(PlayerbotAI* ai) : CastTotemAction(ai, "wrath of air totem") {}
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -95,12 +95,17 @@ class ShamanATriggerFactoryInternal : public NamedObjectContext<Trigger>
|
||||
creators["frost shock snare"] = &ShamanATriggerFactoryInternal::frost_shock_snare;
|
||||
creators["heroism"] = &ShamanATriggerFactoryInternal::heroism;
|
||||
creators["bloodlust"] = &ShamanATriggerFactoryInternal::bloodlust;
|
||||
creators["maelstrom weapon"] = &ShamanATriggerFactoryInternal::maelstrom_weapon;
|
||||
creators["wind shear on enemy healer"] = &ShamanATriggerFactoryInternal::wind_shear_on_enemy_healer;
|
||||
creators["cure poison"] = &ShamanATriggerFactoryInternal::cure_poison;
|
||||
creators["party member cure poison"] = &ShamanATriggerFactoryInternal::party_member_cure_poison;
|
||||
// creators["cure disease"] = &ShamanATriggerFactoryInternal::cure_disease;
|
||||
creators["cure disease"] = &ShamanATriggerFactoryInternal::cure_disease;
|
||||
creators["party member cure disease"] = &ShamanATriggerFactoryInternal::party_member_cure_disease;
|
||||
creators["no fire totem"] = &ShamanATriggerFactoryInternal::no_fire_totem;
|
||||
creators["no water totem"] = &ShamanATriggerFactoryInternal::no_water_totem;
|
||||
creators["earth shield on main tank"] = &ShamanATriggerFactoryInternal::earth_shield_on_main_tank;
|
||||
creators["maelstrom weapon"] = &ShamanATriggerFactoryInternal::maelstrom_weapon;
|
||||
creators["flame shock"] = &ShamanATriggerFactoryInternal::flame_shock;
|
||||
creators["wrath of air totem"] = &ShamanATriggerFactoryInternal::wrath_of_air_totem;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -136,6 +141,11 @@ class ShamanATriggerFactoryInternal : public NamedObjectContext<Trigger>
|
||||
static Trigger* party_member_cure_poison(PlayerbotAI* botAI) { return new PartyMemberCurePoisonTrigger(botAI); }
|
||||
static Trigger* cure_disease(PlayerbotAI* botAI) { return new CureDiseaseTrigger(botAI); }
|
||||
static Trigger* party_member_cure_disease(PlayerbotAI* botAI) { return new PartyMemberCureDiseaseTrigger(botAI); }
|
||||
static Trigger* no_fire_totem(PlayerbotAI* ai) { return new NoFireTotemTrigger(ai); }
|
||||
static Trigger* no_water_totem(PlayerbotAI* ai) { return new NoWaterTotemTrigger(ai); }
|
||||
static Trigger* earth_shield_on_main_tank(PlayerbotAI* ai) { return new EarthShieldOnMainTankTrigger(ai); }
|
||||
static Trigger* flame_shock(PlayerbotAI* ai) { return new FlameShockTrigger(ai); }
|
||||
static Trigger* wrath_of_air_totem(PlayerbotAI* ai) { return new WrathOfAirTotemTrigger(ai); }
|
||||
};
|
||||
|
||||
class ShamanAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
@@ -196,6 +206,12 @@ class ShamanAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
// creators["cure disease on party"] = &ShamanAiObjectContextInternal::cure_disease_on_party;
|
||||
// creators["cure poison"] = &ShamanAiObjectContextInternal::cure_poison;
|
||||
// creators["cure poison on party"] = &ShamanAiObjectContextInternal::cure_poison_on_party;
|
||||
creators["lava burst"] = &ShamanAiObjectContextInternal::lava_burst;
|
||||
creators["earth shield on main tank"] = &ShamanAiObjectContextInternal::earth_shield_on_main_tank;
|
||||
creators["fire elemental totem"] = &ShamanAiObjectContextInternal::fire_elemental_totem;
|
||||
creators["totem of wrath"] = &ShamanAiObjectContextInternal::totem_of_wrath;
|
||||
creators["fire elemental totem"] = &ShamanAiObjectContextInternal::fire_elemental_totem;
|
||||
creators["wrath of air totem"] = &ShamanAiObjectContextInternal::wrath_of_air_totem;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -252,6 +268,12 @@ class ShamanAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
// static Action* cure_poison_on_party(PlayerbotAI* botAI) { return new CastCurePoisonOnPartyAction(botAI); }
|
||||
// static Action* cure_disease(PlayerbotAI* botAI) { return new CastCureDiseaseAction(botAI); }
|
||||
// static Action* cure_disease_on_party(PlayerbotAI* botAI) { return new CastCureDiseaseOnPartyAction(botAI); }
|
||||
static Action* lava_burst(PlayerbotAI* ai) { return new CastLavaBurstAction(ai); }
|
||||
static Action* earth_shield_on_main_tank(PlayerbotAI* ai) { return new CastEarthShieldOnMainTankAction(ai); }
|
||||
static Action* totem_of_wrath(PlayerbotAI* ai) { return new CastTotemOfWrathAction(ai); }
|
||||
static Action* fire_elemental_totem(PlayerbotAI* ai) { return new CastFireElementalTotemAction(ai); }
|
||||
static Action* wrath_of_air_totem(PlayerbotAI* ai) { return new CastWrathOfAirTotemAction(ai); }
|
||||
|
||||
};
|
||||
|
||||
ShamanAiObjectContext::ShamanAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
|
||||
|
||||
@@ -14,9 +14,26 @@ void ShamanNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
triggers.push_back(new TriggerNode("water walking", NextAction::array(0, new NextAction("water walking", 12.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("water breathing on party", NextAction::array(0, new NextAction("water breathing on party", 11.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("water walking on party", NextAction::array(0, new NextAction("water walking on party", 11.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("healing wave", 70.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member critical health", NextAction::array(0, new NextAction("healing wave on party", 60.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe heal", NextAction::array(0, new NextAction("chain heal", 27.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"party member critical health",
|
||||
NextAction::array(0, new NextAction("healing wave on party", 27.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"party member low health",
|
||||
NextAction::array(0, new NextAction("healing wave on party", 26.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"party member medium health",
|
||||
NextAction::array(0, new NextAction("healing wave on party", 25.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"party member almost full health",
|
||||
NextAction::array(0, new NextAction("healing wave on party", 24.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"medium aoe heal",
|
||||
NextAction::array(0, new NextAction("chain heal", 27.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode("cure poison", NextAction::array(0, new NextAction("cure poison", 21.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member cure poison", NextAction::array(0, new NextAction("cure poison on party", 21.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("cure disease", NextAction::array(0, new NextAction("cure disease", 31.0f), nullptr)));
|
||||
|
||||
@@ -66,3 +66,22 @@ bool WaterBreathingOnPartyTrigger::IsActive()
|
||||
{
|
||||
return BuffOnPartyTrigger::IsActive() && AI_VALUE2(bool, "swimming", "self target");
|
||||
}
|
||||
|
||||
bool NoFireTotemTrigger::IsActive()
|
||||
{
|
||||
return !AI_VALUE2(bool, "has totem", "magma totem") &&
|
||||
!AI_VALUE2(bool, "has totem", "flametongue totem") &&
|
||||
!AI_VALUE2(bool, "has totem", "searing totem") &&
|
||||
!AI_VALUE2(bool, "has totem", "fire elemental totem") &&
|
||||
!AI_VALUE2(bool, "has totem", "frost resistance totem") &&
|
||||
!AI_VALUE2(bool, "has totem", "totem of wrath");
|
||||
}
|
||||
|
||||
bool NoWaterTotemTrigger::IsActive()
|
||||
{
|
||||
return !AI_VALUE2(bool, "has totem", "fire resistance totem") &&
|
||||
!AI_VALUE2(bool, "has totem", "mana tide totem") &&
|
||||
!AI_VALUE2(bool, "has totem", "cleansing totem") &&
|
||||
!AI_VALUE2(bool, "has totem", "mana spring totem") &&
|
||||
!AI_VALUE2(bool, "has totem", "healing stream totem");
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
#define _PLAYERBOT_SHAMANTRIGGERS_H
|
||||
|
||||
#include "CureTriggers.h"
|
||||
#include "GenericTriggers.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
@@ -194,10 +195,10 @@ class BloodlustTrigger : public BoostTrigger
|
||||
BloodlustTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "bloodlust") { }
|
||||
};
|
||||
|
||||
class MaelstromWeaponTrigger : public HasAuraTrigger
|
||||
class MaelstromWeaponTrigger : public HasAuraStackTrigger
|
||||
{
|
||||
public:
|
||||
MaelstromWeaponTrigger(PlayerbotAI* botAI) : HasAuraTrigger(botAI, "maelstrom weapon") { }
|
||||
MaelstromWeaponTrigger(PlayerbotAI* botAI) : HasAuraStackTrigger(botAI, "maelstrom weapon", 5) { }
|
||||
};
|
||||
|
||||
class WindShearInterruptEnemyHealerSpellTrigger : public InterruptEnemyHealerTrigger
|
||||
@@ -230,4 +231,32 @@ class PartyMemberCureDiseaseTrigger : public PartyMemberNeedCureTrigger
|
||||
PartyMemberCureDiseaseTrigger(PlayerbotAI* botAI) : PartyMemberNeedCureTrigger(botAI, "cure disease", DISPEL_DISEASE) { }
|
||||
};
|
||||
|
||||
class NoFireTotemTrigger : public Trigger {
|
||||
public:
|
||||
NoFireTotemTrigger(PlayerbotAI* ai) : Trigger(ai, "no fire totem") {}
|
||||
virtual bool IsActive() override;
|
||||
};
|
||||
|
||||
class NoWaterTotemTrigger : public Trigger {
|
||||
public:
|
||||
NoWaterTotemTrigger(PlayerbotAI* ai) : Trigger(ai, "no water totem") {}
|
||||
virtual bool IsActive() override;
|
||||
};
|
||||
|
||||
class EarthShieldOnMainTankTrigger : public BuffOnMainTankTrigger
|
||||
{
|
||||
public:
|
||||
EarthShieldOnMainTankTrigger(PlayerbotAI* botAI) : BuffOnMainTankTrigger(botAI, "earth shield", true) {}
|
||||
};
|
||||
|
||||
class FlameShockTrigger : public DebuffTrigger {
|
||||
public:
|
||||
FlameShockTrigger(PlayerbotAI* ai) : DebuffTrigger(ai, "flame shock", 1, true) {}
|
||||
};
|
||||
|
||||
class WrathOfAirTotemTrigger : public TotemTrigger
|
||||
{
|
||||
public:
|
||||
WrathOfAirTotemTrigger(PlayerbotAI* ai) : TotemTrigger(ai, "wrath of air totem") {}
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -13,8 +13,19 @@ void TotemsShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericShamanStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("grace of air totem", NextAction::array(0, new NextAction("grace of air totem", 16.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("mana spring totem", NextAction::array(0, new NextAction("mana spring totem", 19.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("strength of earth totem", NextAction::array(0, new NextAction("strength of earth totem", 18.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("flametongue totem", NextAction::array(0, new NextAction("flametongue totem", 17.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"wrath of air totem",
|
||||
NextAction::array(0, new NextAction("wrath of air totem", 8.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"no water totem",
|
||||
NextAction::array(0, new NextAction("mana spring totem", 7.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"strength of earth totem",
|
||||
NextAction::array(0, new NextAction("strength of earth totem", 6.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"no fire totem",
|
||||
NextAction::array(0, new NextAction("flametongue totem", 5.0f), NULL)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user