[Assist Dps] Healer assist dps strats

This commit is contained in:
Yunfan Li
2024-10-03 22:35:26 +08:00
parent 11ce70635d
commit 008d098eda
31 changed files with 253 additions and 68 deletions

View File

@@ -51,8 +51,8 @@ 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(
// "enough mana", NextAction::array(0, new NextAction("chain lightning", ACTION_DEFAULT + 0.1f), nullptr)));
triggers.push_back(new TriggerNode(
"enough mana", NextAction::array(0, new NextAction("chain lightning", ACTION_DEFAULT + 0.1f), nullptr)));
triggers.push_back(new TriggerNode("main hand weapon no imbue",
NextAction::array(0, new NextAction("flametongue weapon", 22.0f), nullptr)));

View File

@@ -3,6 +3,7 @@
* and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#include "GenericShamanStrategy.h"
#include "HealShamanStrategy.h"
#include "Playerbots.h"
#include "Strategy.h"
@@ -162,3 +163,18 @@ void ShamanCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
new TriggerNode("party member cleanse spirit curse",
NextAction::array(0, new NextAction("cleanse spirit curse on party", 23.0f), nullptr)));
}
void ShamanAssistDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(
new TriggerNode("healer should attack",
NextAction::array(0,
new NextAction("flame shock", ACTION_DEFAULT + 0.2f),
new NextAction("lava burst", ACTION_DEFAULT + 0.1f),
new NextAction("lightning bolt", ACTION_DEFAULT), nullptr)));
triggers.push_back(
new TriggerNode("medium aoe and healer should attack",
NextAction::array(0,
new NextAction("chain lightning", ACTION_DEFAULT + 0.3f), nullptr)));
}

View File

@@ -45,4 +45,13 @@ public:
std::string const getName() override { return "cure"; }
};
class ShamanAssistDpsStrategy : public Strategy
{
public:
ShamanAssistDpsStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "assist dps"; }
};
#endif

View File

@@ -335,7 +335,7 @@ public:
class CastFlameShockAction : public CastDebuffSpellAction
{
public:
CastFlameShockAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "flame shock", true) {}
CastFlameShockAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "flame shock", true, 6.0f) {}
};
class CastEarthShockAction : public CastSpellAction

View File

@@ -6,6 +6,7 @@
#include "ShamanAiObjectContext.h"
#include "CasterShamanStrategy.h"
#include "GenericShamanStrategy.h"
#include "HealShamanStrategy.h"
#include "MeleeShamanStrategy.h"
#include "NamedObjectContext.h"
@@ -25,6 +26,7 @@ public:
creators["melee aoe"] = &ShamanStrategyFactoryInternal::melee_aoe;
creators["caster aoe"] = &ShamanStrategyFactoryInternal::caster_aoe;
creators["cure"] = &ShamanStrategyFactoryInternal::cure;
creators["assist dps"] = &ShamanStrategyFactoryInternal::assist_dps;
}
private:
@@ -33,6 +35,7 @@ private:
static Strategy* melee_aoe(PlayerbotAI* botAI) { return new MeleeAoeShamanStrategy(botAI); }
static Strategy* caster_aoe(PlayerbotAI* botAI) { return new CasterAoeShamanStrategy(botAI); }
static Strategy* cure(PlayerbotAI* botAI) { return new ShamanCureStrategy(botAI); }
static Strategy* assist_dps(PlayerbotAI* botAI) { return new ShamanAssistDpsStrategy(botAI); }
};
class ShamanBuffStrategyFactoryInternal : public NamedObjectContext<Strategy>

View File

@@ -39,7 +39,7 @@ void ShamanNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
new NextAction("lesser 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)));
new TriggerNode("group heal occasion", 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)));