Shaman stats weight and totem

This commit is contained in:
Yunfan Li
2024-09-01 15:46:39 +08:00
parent 62ba364872
commit ae37876848
8 changed files with 46 additions and 18 deletions

View File

@@ -66,7 +66,9 @@ void CasterShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
// 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("fire elemental totem",
NextAction::array(0, new NextAction("fire elemental totem", 32.0f), nullptr)));
triggers.push_back(
new TriggerNode("medium mana", NextAction::array(0, new NextAction("thunderstorm", ACTION_HIGH + 1), nullptr)));

View File

@@ -104,6 +104,11 @@ void HealShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(
new TriggerNode("medium mana", NextAction::array(0, new NextAction("mana tide totem", ACTION_HIGH + 5), NULL)));
triggers.push_back(
new TriggerNode("no fire totem", NextAction::array(0, new NextAction("flametongue totem", 7.0f),
new NextAction("searing totem", 6.0f), nullptr)));
triggers.push_back(new TriggerNode("fire elemental totem",
NextAction::array(0, new NextAction("fire elemental totem", 32.0f), 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)));

View File

@@ -83,9 +83,8 @@ void MeleeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
"no fire totem",
NextAction::array(0, new NextAction("reach melee", 23.0f), new NextAction("magma totem", 22.0f), nullptr)));
triggers.push_back(new TriggerNode("fire elemental totem",
NextAction::array(0, new NextAction("reach melee", 33.0f),
new NextAction("fire elemental totem", 32.0f), nullptr)));
triggers.push_back(new TriggerNode(
"fire elemental totem", NextAction::array(0, new NextAction("fire elemental totem melee", 32.0f), nullptr)));
triggers.push_back(
new TriggerNode("no air totem", NextAction::array(0, new NextAction("windfury totem", 20.0f), nullptr)));

View File

@@ -7,6 +7,7 @@
#define _PLAYERBOT_SHAMANACTIONS_H
#include "GenericSpellActions.h"
#include "Playerbots.h"
#include "SharedDefines.h"
class PlayerbotAI;
@@ -426,6 +427,20 @@ public:
virtual bool isUseful() override { return CastTotemAction::isUseful(); }
};
class CastFireElementalTotemMeleeAction : public CastTotemAction
{
public:
CastFireElementalTotemMeleeAction(PlayerbotAI* ai) : CastTotemAction(ai, "fire elemental totem", "", 0.0f) {}
virtual std::string const GetTargetName() override { return "self target"; }
virtual bool isUseful() override
{
Unit* target = AI_VALUE(Unit*, "current target");
if (!target || !bot->IsWithinMeleeRange(target))
return false;
return CastTotemAction::isUseful();
}
};
class CastWrathOfAirTotemAction : public CastTotemAction
{
public:

View File

@@ -238,6 +238,7 @@ public:
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["fire elemental totem melee"] = &ShamanAiObjectContextInternal::fire_elemental_totem_melee;
creators["totem of wrath"] = &ShamanAiObjectContextInternal::totem_of_wrath;
creators["wrath of air totem"] = &ShamanAiObjectContextInternal::wrath_of_air_totem;
creators["shamanistic rage"] = &ShamanAiObjectContextInternal::shamanistic_rage;
@@ -318,6 +319,7 @@ private:
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* fire_elemental_totem_melee(PlayerbotAI* ai) { return new CastFireElementalTotemMeleeAction(ai); }
static Action* wrath_of_air_totem(PlayerbotAI* ai) { return new CastWrathOfAirTotemAction(ai); }
static Action* shamanistic_rage(PlayerbotAI* ai) { return new CastShamanisticRageAction(ai); }
static Action* feral_spirit(PlayerbotAI* ai) { return new CastFeralSpiritAction(ai); }

View File

@@ -13,20 +13,13 @@ void TotemsShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericShamanStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("fire elemental totem",
NextAction::array(0, new NextAction("fire elemental totem", 32.0f), nullptr)));
triggers.push_back(
new TriggerNode("no air totem", NextAction::array(0, new NextAction("wrath of air totem", 8.0f), NULL)));
new TriggerNode("no air totem", NextAction::array(0, new NextAction("wrath of air totem", 8.0f), nullptr)));
triggers.push_back(
new TriggerNode("no water totem", NextAction::array(0, new NextAction("mana spring totem", 7.0f),
new NextAction("healing stream totem", 6.0f), nullptr)));
triggers.push_back(
new TriggerNode("no fire totem", NextAction::array(0, new NextAction("flametongue totem", 7.0f),
new NextAction("searing totem", 6.0f), nullptr)));
triggers.push_back(new TriggerNode("strength of earth totem",
NextAction::array(0, new NextAction("strength of earth totem", 6.0f), NULL)));
NextAction::array(0, new NextAction("strength of earth totem", 6.0f), nullptr)));
}