paladin seal

This commit is contained in:
Yunfan Li
2023-08-28 19:04:13 +08:00
parent 9efec9b325
commit b97876dbc2
8 changed files with 65 additions and 27 deletions

View File

@@ -4,6 +4,7 @@
#include "DpsPaladinStrategy.h" #include "DpsPaladinStrategy.h"
#include "Playerbots.h" #include "Playerbots.h"
#include "Strategy.h"
class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode> class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{ {
@@ -12,6 +13,7 @@ class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
{ {
creators["sanctity aura"] = &sanctity_aura; creators["sanctity aura"] = &sanctity_aura;
creators["retribution aura"] = &retribution_aura; creators["retribution aura"] = &retribution_aura;
creators["seal of corruption"] = &seal_of_corruption;
creators["seal of vengeance"] = &seal_of_vengeance; creators["seal of vengeance"] = &seal_of_vengeance;
creators["seal of command"] = &seal_of_command; creators["seal of command"] = &seal_of_command;
creators["blessing of might"] = &blessing_of_might; creators["blessing of might"] = &blessing_of_might;
@@ -23,6 +25,14 @@ class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
} }
private: private:
static ActionNode* seal_of_corruption([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("seal of corruption",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of vengeance"), nullptr),
/*C*/ nullptr);
}
static ActionNode* seal_of_vengeance([[maybe_unused]] PlayerbotAI* botAI) static ActionNode* seal_of_vengeance([[maybe_unused]] PlayerbotAI* botAI)
{ {
return new ActionNode ("seal of vengeance", return new ActionNode ("seal of vengeance",
@@ -83,7 +93,7 @@ void DpsPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"seal", "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("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("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))); // triggers.push_back(new TriggerNode("sanctity aura", NextAction::array(0, new NextAction("sanctity aura", 90.0f), nullptr)));

View File

@@ -15,13 +15,13 @@ class GenericPaladinStrategyActionNodeFactory : public NamedObjectFactory<Action
public: public:
GenericPaladinStrategyActionNodeFactory() GenericPaladinStrategyActionNodeFactory()
{ {
creators["seal of light"] = &seal_of_light; // creators["seal of light"] = &seal_of_light;
creators["cleanse poison"] = &cleanse_poison; creators["cleanse poison"] = &cleanse_poison;
creators["cleanse disease"] = &cleanse_disease; creators["cleanse disease"] = &cleanse_disease;
creators["cleanse magic"] = &cleanse_magic; creators["cleanse magic"] = &cleanse_magic;
creators["cleanse poison on party"] = &cleanse_poison_on_party; creators["cleanse poison on party"] = &cleanse_poison_on_party;
creators["cleanse disease on party"] = &cleanse_disease_on_party; creators["cleanse disease on party"] = &cleanse_disease_on_party;
creators["seal of wisdom"] = &seal_of_wisdom; // creators["seal of wisdom"] = &seal_of_wisdom;
creators["seal of justice"] = &seal_of_justice; creators["seal of justice"] = &seal_of_justice;
creators["hand of reckoning"] = &hand_of_reckoning; creators["hand of reckoning"] = &hand_of_reckoning;
creators["judgement"] = &judgement; creators["judgement"] = &judgement;
@@ -101,13 +101,13 @@ class GenericPaladinStrategyActionNodeFactory : public NamedObjectFactory<Action
/*A*/ NULL, // NextAction::array(0, new NextAction("flash of light"), NULL), /*A*/ NULL, // NextAction::array(0, new NextAction("flash of light"), NULL),
/*C*/ NULL); /*C*/ NULL);
} }
static ActionNode* seal_of_light(PlayerbotAI* ai) // static ActionNode* seal_of_light(PlayerbotAI* ai)
{ // {
return new ActionNode ("seal of light", // return new ActionNode ("seal of light",
/*P*/ NULL, // /*P*/ NULL,
/*A*/ NextAction::array(0, new NextAction("seal of justice"), NULL), // /*A*/ NextAction::array(0, new NextAction("seal of justice"), NULL),
/*C*/ NULL); // /*C*/ NULL);
} // }
static ActionNode* cleanse_poison(PlayerbotAI* ai) static ActionNode* cleanse_poison(PlayerbotAI* ai)
{ {
return new ActionNode ("cleanse poison", return new ActionNode ("cleanse poison",
@@ -143,13 +143,13 @@ class GenericPaladinStrategyActionNodeFactory : public NamedObjectFactory<Action
/*A*/ NextAction::array(0, new NextAction("purify disease on party"), NULL), /*A*/ NextAction::array(0, new NextAction("purify disease on party"), NULL),
/*C*/ NULL); /*C*/ NULL);
} }
static ActionNode* seal_of_wisdom(PlayerbotAI* ai) // static ActionNode* seal_of_wisdom(PlayerbotAI* ai)
{ // {
return new ActionNode ("seal of wisdom", // return new ActionNode ("seal of wisdom",
/*P*/ NULL, // /*P*/ NULL,
/*A*/ NextAction::array(0, new NextAction("seal of justice"), NULL), // /*A*/ NextAction::array(0, new NextAction("seal of justice"), NULL),
/*C*/ NULL); // /*C*/ NULL);
} // }
static ActionNode* seal_of_justice(PlayerbotAI* ai) static ActionNode* seal_of_justice(PlayerbotAI* ai)
{ {
return new ActionNode ("seal of justice", return new ActionNode ("seal of justice",

View File

@@ -9,13 +9,13 @@
class HealPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode> class HealPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{ {
public: public:
HealPaladinStrategyActionNodeFactory() // HealPaladinStrategyActionNodeFactory()
{ // {
creators["concentration aura"] = &concentration_aura; // creators["concentration aura"] = &concentration_aura;
} // }
private: 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) HealPaladinStrategy::HealPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrategy(botAI)

View File

@@ -19,6 +19,7 @@ BUFF_ACTION(CastSealOfLightAction, "seal of light");
BUFF_ACTION(CastSealOfWisdomAction, "seal of wisdom"); BUFF_ACTION(CastSealOfWisdomAction, "seal of wisdom");
BUFF_ACTION(CastSealOfCommandAction, "seal of command"); BUFF_ACTION(CastSealOfCommandAction, "seal of command");
BUFF_ACTION(CastSealOfVengeanceAction, "seal of vengeance"); BUFF_ACTION(CastSealOfVengeanceAction, "seal of vengeance");
BUFF_ACTION(CastSealOfCorruptionAction, "seal of corruption");
// judgements // judgements
SPELL_ACTION(CastJudgementAction, "judgement"); SPELL_ACTION(CastJudgementAction, "judgement");

View File

@@ -186,6 +186,7 @@ class PaladinAiObjectContextInternal : public NamedObjectContext<Action>
{ {
creators["seal of command"] = &PaladinAiObjectContextInternal::seal_of_command; creators["seal of command"] = &PaladinAiObjectContextInternal::seal_of_command;
creators["seal of vengeance"] = &PaladinAiObjectContextInternal::seal_of_vengeance; 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 might"] = &PaladinAiObjectContextInternal::blessing_of_might;
creators["blessing of wisdom"] = &PaladinAiObjectContextInternal::blessing_of_wisdom; creators["blessing of wisdom"] = &PaladinAiObjectContextInternal::blessing_of_wisdom;
creators["blessing of kings"] = &PaladinAiObjectContextInternal::blessing_of_kings; creators["blessing of kings"] = &PaladinAiObjectContextInternal::blessing_of_kings;
@@ -265,6 +266,7 @@ class PaladinAiObjectContextInternal : public NamedObjectContext<Action>
static Action* righteous_fury(PlayerbotAI* botAI) { return new CastRighteousFuryAction(botAI); } 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_command(PlayerbotAI* botAI) { return new CastSealOfCommandAction(botAI); }
static Action* seal_of_vengeance(PlayerbotAI* botAI) { return new CastSealOfVengeanceAction(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_sanctuary(PlayerbotAI* botAI) { return new CastBlessingOfSanctuaryAction(botAI); }
static Action* blessing_of_might(PlayerbotAI* botAI) { return new CastBlessingOfMightAction(botAI); } static Action* blessing_of_might(PlayerbotAI* botAI) { return new CastBlessingOfMightAction(botAI); }
static Action* blessing_of_wisdom(PlayerbotAI* botAI) { return new CastBlessingOfWisdomAction(botAI); } static Action* blessing_of_wisdom(PlayerbotAI* botAI) { return new CastBlessingOfWisdomAction(botAI); }

View File

@@ -11,7 +11,7 @@ bool SealTrigger::IsActive()
{ {
Unit* target = GetTarget(); Unit* target = GetTarget();
return !botAI->HasAura("seal of justice", target) && !botAI->HasAura("seal of command", target) && !botAI->HasAura("seal of vengeance", target) && 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"); AI_VALUE2(bool, "combat", "self target");
} }

View File

@@ -54,7 +54,7 @@ class CrusaderAuraTrigger : public BuffTrigger
class SealTrigger : public BuffTrigger class SealTrigger : public BuffTrigger
{ {
public: public:
SealTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "seal of justice") { } SealTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "seal") { }
bool IsActive() override; bool IsActive() override;
}; };

View File

@@ -10,19 +10,44 @@ class TankPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
public: public:
TankPaladinStrategyActionNodeFactory() TankPaladinStrategyActionNodeFactory()
{ {
// creators["seal of vengeance"] = &seal_of_vengeance;
creators["seal of corruption"] = &seal_of_corruption;
creators["seal of vengeance"] = &seal_of_vengeance; creators["seal of vengeance"] = &seal_of_vengeance;
creators["seal of command"] = &seal_of_command;
creators["hand of reckoning"] = &hand_of_reckoning; creators["hand of reckoning"] = &hand_of_reckoning;
} }
private: private:
// static ActionNode* seal_of_vengeance([[maybe_unused]] PlayerbotAI* botAI)
// {
// return new ActionNode("seal of vengeance",
// /*P*/ nullptr,
// /*A*/ NextAction::array(0, new NextAction("seal of righteousness"), nullptr),
// /*C*/ nullptr);
// }
static ActionNode* seal_of_corruption([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("seal of corruption",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of vengeance"), nullptr),
/*C*/ nullptr);
}
static ActionNode* seal_of_vengeance([[maybe_unused]] PlayerbotAI* botAI) static ActionNode* seal_of_vengeance([[maybe_unused]] PlayerbotAI* botAI)
{ {
return new ActionNode("seal of vengeance", return new ActionNode ("seal of vengeance",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of command"), nullptr),
/*C*/ nullptr);
}
static ActionNode* seal_of_command([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("seal of command",
/*P*/ nullptr, /*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of righteousness"), nullptr), /*A*/ NextAction::array(0, new NextAction("seal of righteousness"), nullptr),
/*C*/ nullptr); /*C*/ nullptr);
} }
ACTION_NODE_A(hand_of_reckoning, "hand of reckoning", "righteous defense"); ACTION_NODE_A(hand_of_reckoning, "hand of reckoning", "righteous defense");
}; };
@@ -47,7 +72,7 @@ void TankPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{ {
GenericPaladinStrategy::InitTriggers(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("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))); // triggers.push_back(new TriggerNode("devotion aura", NextAction::array(0, new NextAction("devotion aura", 90.0f), NULL)));