From b97876dbc2909f4808fac2e1e5c4f0dee51b83d8 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 28 Aug 2023 19:04:13 +0800 Subject: [PATCH] paladin seal --- src/strategy/paladin/DpsPaladinStrategy.cpp | 12 ++++++- .../GenericPaladinStrategyActionNodeFactory.h | 32 +++++++++---------- src/strategy/paladin/HealPaladinStrategy.cpp | 10 +++--- src/strategy/paladin/PaladinActions.h | 1 + .../paladin/PaladinAiObjectContext.cpp | 2 ++ src/strategy/paladin/PaladinTriggers.cpp | 2 +- src/strategy/paladin/PaladinTriggers.h | 2 +- src/strategy/paladin/TankPaladinStrategy.cpp | 31 ++++++++++++++++-- 8 files changed, 65 insertions(+), 27 deletions(-) diff --git a/src/strategy/paladin/DpsPaladinStrategy.cpp b/src/strategy/paladin/DpsPaladinStrategy.cpp index c4d0bf47..c7c35fce 100644 --- a/src/strategy/paladin/DpsPaladinStrategy.cpp +++ b/src/strategy/paladin/DpsPaladinStrategy.cpp @@ -4,6 +4,7 @@ #include "DpsPaladinStrategy.h" #include "Playerbots.h" +#include "Strategy.h" class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory { @@ -12,6 +13,7 @@ class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory& triggers) triggers.push_back(new TriggerNode( "seal", - NextAction::array(0, new NextAction("seal of vengeance", 89.0f), NULL))); + NextAction::array(0, new NextAction("seal of corruption", ACTION_HIGH), NULL))); // triggers.push_back(new TriggerNode("seal", NextAction::array(0, new NextAction("seal of command", 90.0f), nullptr))); triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("seal of wisdom", 91.0f), nullptr))); // triggers.push_back(new TriggerNode("sanctity aura", NextAction::array(0, new NextAction("sanctity aura", 90.0f), nullptr))); diff --git a/src/strategy/paladin/GenericPaladinStrategyActionNodeFactory.h b/src/strategy/paladin/GenericPaladinStrategyActionNodeFactory.h index 99640f36..b07b30f5 100644 --- a/src/strategy/paladin/GenericPaladinStrategyActionNodeFactory.h +++ b/src/strategy/paladin/GenericPaladinStrategyActionNodeFactory.h @@ -15,13 +15,13 @@ class GenericPaladinStrategyActionNodeFactory : public NamedObjectFactory { public: - HealPaladinStrategyActionNodeFactory() - { - creators["concentration aura"] = &concentration_aura; - } + // HealPaladinStrategyActionNodeFactory() + // { + // creators["concentration aura"] = &concentration_aura; + // } private: - ACTION_NODE_A(concentration_aura, "concentration aura", "devotion aura"); + // ACTION_NODE_A(concentration_aura, "concentration aura", "devotion aura"); }; HealPaladinStrategy::HealPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrategy(botAI) diff --git a/src/strategy/paladin/PaladinActions.h b/src/strategy/paladin/PaladinActions.h index 88cbcbb3..219fce3e 100644 --- a/src/strategy/paladin/PaladinActions.h +++ b/src/strategy/paladin/PaladinActions.h @@ -19,6 +19,7 @@ BUFF_ACTION(CastSealOfLightAction, "seal of light"); BUFF_ACTION(CastSealOfWisdomAction, "seal of wisdom"); BUFF_ACTION(CastSealOfCommandAction, "seal of command"); BUFF_ACTION(CastSealOfVengeanceAction, "seal of vengeance"); +BUFF_ACTION(CastSealOfCorruptionAction, "seal of corruption"); // judgements SPELL_ACTION(CastJudgementAction, "judgement"); diff --git a/src/strategy/paladin/PaladinAiObjectContext.cpp b/src/strategy/paladin/PaladinAiObjectContext.cpp index 90366d7b..f70b35c4 100644 --- a/src/strategy/paladin/PaladinAiObjectContext.cpp +++ b/src/strategy/paladin/PaladinAiObjectContext.cpp @@ -186,6 +186,7 @@ class PaladinAiObjectContextInternal : public NamedObjectContext { creators["seal of command"] = &PaladinAiObjectContextInternal::seal_of_command; creators["seal of vengeance"] = &PaladinAiObjectContextInternal::seal_of_vengeance; + creators["seal of corruption"] = &PaladinAiObjectContextInternal::seal_of_corruption; creators["blessing of might"] = &PaladinAiObjectContextInternal::blessing_of_might; creators["blessing of wisdom"] = &PaladinAiObjectContextInternal::blessing_of_wisdom; creators["blessing of kings"] = &PaladinAiObjectContextInternal::blessing_of_kings; @@ -265,6 +266,7 @@ class PaladinAiObjectContextInternal : public NamedObjectContext static Action* righteous_fury(PlayerbotAI* botAI) { return new CastRighteousFuryAction(botAI); } static Action* seal_of_command(PlayerbotAI* botAI) { return new CastSealOfCommandAction(botAI); } static Action* seal_of_vengeance(PlayerbotAI* botAI) { return new CastSealOfVengeanceAction(botAI); } + static Action* seal_of_corruption(PlayerbotAI* botAI) { return new CastSealOfCorruptionAction(botAI); } static Action* blessing_of_sanctuary(PlayerbotAI* botAI) { return new CastBlessingOfSanctuaryAction(botAI); } static Action* blessing_of_might(PlayerbotAI* botAI) { return new CastBlessingOfMightAction(botAI); } static Action* blessing_of_wisdom(PlayerbotAI* botAI) { return new CastBlessingOfWisdomAction(botAI); } diff --git a/src/strategy/paladin/PaladinTriggers.cpp b/src/strategy/paladin/PaladinTriggers.cpp index 61566047..79c0e730 100644 --- a/src/strategy/paladin/PaladinTriggers.cpp +++ b/src/strategy/paladin/PaladinTriggers.cpp @@ -11,7 +11,7 @@ bool SealTrigger::IsActive() { Unit* target = GetTarget(); return !botAI->HasAura("seal of justice", target) && !botAI->HasAura("seal of command", target) && !botAI->HasAura("seal of vengeance", target) && - !botAI->HasAura("seal of righteousness", target) && !botAI->HasAura("seal of light", target) && (!botAI->HasAura("seal of wisdom", target) || AI_VALUE2(uint8, "mana", "self target") > 70) && + !botAI->HasAura("seal of corruption", target) && !botAI->HasAura("seal of righteousness", target) && !botAI->HasAura("seal of light", target) && (!botAI->HasAura("seal of wisdom", target) || AI_VALUE2(uint8, "mana", "self target") > 70) && AI_VALUE2(bool, "combat", "self target"); } diff --git a/src/strategy/paladin/PaladinTriggers.h b/src/strategy/paladin/PaladinTriggers.h index 8d700d13..a669ae78 100644 --- a/src/strategy/paladin/PaladinTriggers.h +++ b/src/strategy/paladin/PaladinTriggers.h @@ -54,7 +54,7 @@ class CrusaderAuraTrigger : public BuffTrigger class SealTrigger : public BuffTrigger { public: - SealTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "seal of justice") { } + SealTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "seal") { } bool IsActive() override; }; diff --git a/src/strategy/paladin/TankPaladinStrategy.cpp b/src/strategy/paladin/TankPaladinStrategy.cpp index 8ef67167..8644d83b 100644 --- a/src/strategy/paladin/TankPaladinStrategy.cpp +++ b/src/strategy/paladin/TankPaladinStrategy.cpp @@ -10,19 +10,44 @@ class TankPaladinStrategyActionNodeFactory : public NamedObjectFactory& triggers) { GenericPaladinStrategy::InitTriggers(triggers); - triggers.push_back(new TriggerNode("seal", NextAction::array(0, new NextAction("seal of command", 90.0f), nullptr))); + triggers.push_back(new TriggerNode("seal", NextAction::array(0, new NextAction("seal of corruption", 90.0f), nullptr))); triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("seal of wisdom", 91.0f), nullptr))); // triggers.push_back(new TriggerNode("devotion aura", NextAction::array(0, new NextAction("devotion aura", 90.0f), NULL)));