From 68565dd813ea95e7e6704cd899ab0aecf7ab9b74 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Thu, 11 Jul 2024 15:48:23 +0800 Subject: [PATCH] [Class spell] Shaman elemental mastery --- src/strategy/shaman/CasterShamanStrategy.cpp | 1 + src/strategy/shaman/ShamanActions.h | 6 ++++++ src/strategy/shaman/ShamanAiObjectContext.cpp | 4 ++++ src/strategy/shaman/ShamanTriggers.h | 6 ++++++ 4 files changed, 17 insertions(+) diff --git a/src/strategy/shaman/CasterShamanStrategy.cpp b/src/strategy/shaman/CasterShamanStrategy.cpp index aa1fef0a..61a31b32 100644 --- a/src/strategy/shaman/CasterShamanStrategy.cpp +++ b/src/strategy/shaman/CasterShamanStrategy.cpp @@ -52,6 +52,7 @@ void CasterShamanStrategy::InitTriggers(std::vector& triggers) 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("flame shock", NextAction::array(0, new NextAction("flame shock", 20.0f), nullptr))); + triggers.push_back(new TriggerNode("elemental mastery", NextAction::array(0, new NextAction("elemental mastery", 27.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", diff --git a/src/strategy/shaman/ShamanActions.h b/src/strategy/shaman/ShamanActions.h index c9467e49..2db469fb 100644 --- a/src/strategy/shaman/ShamanActions.h +++ b/src/strategy/shaman/ShamanActions.h @@ -350,6 +350,12 @@ class CastBloodlustAction : public CastBuffSpellAction CastBloodlustAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "bloodlust") { } }; +class CastElementalMasteryAction : public CastBuffSpellAction +{ + public: + CastElementalMasteryAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "elemental mastery") { } +}; + class CastWindShearOnEnemyHealerAction : public CastSpellOnEnemyHealerAction { public: diff --git a/src/strategy/shaman/ShamanAiObjectContext.cpp b/src/strategy/shaman/ShamanAiObjectContext.cpp index c40f4957..819cf3d1 100644 --- a/src/strategy/shaman/ShamanAiObjectContext.cpp +++ b/src/strategy/shaman/ShamanAiObjectContext.cpp @@ -96,6 +96,7 @@ class ShamanATriggerFactoryInternal : public NamedObjectContext creators["frost shock snare"] = &ShamanATriggerFactoryInternal::frost_shock_snare; creators["heroism"] = &ShamanATriggerFactoryInternal::heroism; creators["bloodlust"] = &ShamanATriggerFactoryInternal::bloodlust; + creators["elemental mastery"] = &ShamanATriggerFactoryInternal::elemental_mastery; 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; @@ -114,6 +115,7 @@ class ShamanATriggerFactoryInternal : public NamedObjectContext static Trigger* maelstrom_weapon(PlayerbotAI* botAI) { return new MaelstromWeaponTrigger(botAI); } static Trigger* heroism(PlayerbotAI* botAI) { return new HeroismTrigger(botAI); } static Trigger* bloodlust(PlayerbotAI* botAI) { return new BloodlustTrigger(botAI); } + static Trigger* elemental_mastery(PlayerbotAI* botAI) { return new ElementalMasteryTrigger(botAI); } static Trigger* party_member_cleanse_disease(PlayerbotAI* botAI) { return new PartyMemberCleanseSpiritDiseaseTrigger(botAI); } static Trigger* party_member_cleanse_curse(PlayerbotAI* botAI) { return new PartyMemberCleanseSpiritCurseTrigger(botAI); } static Trigger* party_member_cleanse_poison(PlayerbotAI* botAI) { return new PartyMemberCleanseSpiritPoisonTrigger(botAI); } @@ -206,6 +208,7 @@ class ShamanAiObjectContextInternal : public NamedObjectContext creators["thunderstorm"] = &ShamanAiObjectContextInternal::thunderstorm; creators["heroism"] = &ShamanAiObjectContextInternal::heroism; creators["bloodlust"] = &ShamanAiObjectContextInternal::bloodlust; + creators["elemental mastery"] = &ShamanAiObjectContextInternal::elemental_mastery; // creators["cure disease"] = &ShamanAiObjectContextInternal::cure_disease; // creators["cure disease on party"] = &ShamanAiObjectContextInternal::cure_disease_on_party; // creators["cure poison"] = &ShamanAiObjectContextInternal::cure_poison; @@ -222,6 +225,7 @@ class ShamanAiObjectContextInternal : public NamedObjectContext private: static Action* heroism(PlayerbotAI* botAI) { return new CastHeroismAction(botAI); } static Action* bloodlust(PlayerbotAI* botAI) { return new CastBloodlustAction(botAI); } + static Action* elemental_mastery(PlayerbotAI* botAI) { return new CastElementalMasteryAction(botAI); } static Action* thunderstorm(PlayerbotAI* botAI) { return new CastThunderstormAction(botAI); } static Action* lightning_bolt(PlayerbotAI* botAI) { return new CastLightningBoltAction(botAI); } static Action* chain_lightning(PlayerbotAI* botAI) { return new CastChainLightningAction(botAI); } diff --git a/src/strategy/shaman/ShamanTriggers.h b/src/strategy/shaman/ShamanTriggers.h index 54395b4b..d85f0888 100644 --- a/src/strategy/shaman/ShamanTriggers.h +++ b/src/strategy/shaman/ShamanTriggers.h @@ -201,6 +201,12 @@ class BloodlustTrigger : public BoostTrigger BloodlustTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "bloodlust") { } }; +class ElementalMasteryTrigger : public BoostTrigger +{ + public: + ElementalMasteryTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "elemental mastery") { } +}; + class MaelstromWeaponTrigger : public HasAuraStackTrigger { public: