Improve class spell and use trinket

This commit is contained in:
Yunfan Li
2024-08-14 18:18:01 +08:00
parent c778e303df
commit a1cb9dea05
47 changed files with 377 additions and 108 deletions

View File

@@ -31,8 +31,9 @@ void GenericPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
// NextAction("inner focus", 42.0f), nullptr))); triggers.push_back(new TriggerNode("medium mana",
// NextAction::array(0, new NextAction("symbol of hope", ACTION_EMERGENCY), nullptr))); triggers.push_back(new
// TriggerNode("low mana", NextAction::array(0, new NextAction("consume magic", 10.0f), nullptr)));
// triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("desperate prayer",
// ACTION_EMERGENCY), nullptr))); triggers.push_back(new TriggerNode("enemy is close", NextAction::array(0, new
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("desperate prayer",
ACTION_HIGH + 5), nullptr)));
// triggers.push_back(new TriggerNode("enemy is close", NextAction::array(0, new
// NextAction("elune's grace", ACTION_EMERGENCY), nullptr))); triggers.push_back(new TriggerNode("chastise",
// NextAction::array(0, new NextAction("chastise", ACTION_INTERRUPT), nullptr)));
triggers.push_back(new TriggerNode(

View File

@@ -73,7 +73,9 @@ void HolyHealPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode(
"party member critical health",
NextAction::array(0, new NextAction("power word: shield on party", ACTION_CRITICAL_HEAL + 5),
NextAction::array(0,
new NextAction("guardian spirit on party", ACTION_CRITICAL_HEAL + 6),
new NextAction("power word: shield on party", ACTION_CRITICAL_HEAL + 5),
new NextAction("flash heal on party", ACTION_CRITICAL_HEAL + 3),
new NextAction("prayer of mending on party", ACTION_CRITICAL_HEAL + 2), NULL)));

View File

@@ -173,4 +173,11 @@ public:
CastMindSearAction(PlayerbotAI* ai) : CastSpellAction(ai, "mind sear") {}
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
};
class CastGuardianSpiritOnPartyAction : public HealPartyMemberAction
{
public:
CastGuardianSpiritOnPartyAction(PlayerbotAI* ai) : HealPartyMemberAction(ai, "guardian spirit", 40.0f, HealingManaEfficiency::MEDIUM) {}
};
#endif

View File

@@ -234,6 +234,7 @@ public:
creators["hymn of hope"] = &PriestAiObjectContextInternal::hymn_of_hope;
creators["divine hymn"] = &PriestAiObjectContextInternal::divine_hymn;
creators["mind sear"] = &PriestAiObjectContextInternal::mind_sear;
creators["guardian spirit on party"] = &PriestAiObjectContextInternal::guardian_spirit_on_party;
}
private:
@@ -339,6 +340,7 @@ private:
static Action* hymn_of_hope(PlayerbotAI* ai) { return new CastHymnOfHopeAction(ai); }
static Action* divine_hymn(PlayerbotAI* ai) { return new CastDivineHymnAction(ai); }
static Action* mind_sear(PlayerbotAI* ai) { return new CastMindSearAction(ai); }
static Action* guardian_spirit_on_party(PlayerbotAI* ai) { return new CastGuardianSpiritOnPartyAction(ai); }
};
PriestAiObjectContext::PriestAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)

View File

@@ -23,7 +23,7 @@ CURE_TRIGGER(CureDiseaseTrigger, "cure disease", DISPEL_DISEASE);
CURE_PARTY_TRIGGER(PartyMemberCureDiseaseTrigger, "cure disease", DISPEL_DISEASE);
BUFF_TRIGGER_A(InnerFireTrigger, "inner fire");
BUFF_TRIGGER_A(ShadowformTrigger, "shadowform");
BUFF_TRIGGER(PowerInfusionTrigger, "power infusion");
BOOST_TRIGGER(PowerInfusionTrigger, "power infusion");
BUFF_TRIGGER(InnerFocusTrigger, "inner focus");
BUFF_TRIGGER(ShadowProtectionTrigger, "shadow protection");
BUFF_PARTY_TRIGGER(ShadowProtectionOnPartyTrigger, "shadow protection");

View File

@@ -29,8 +29,10 @@ void ShadowPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
// ACTION_MOVE + 9), nullptr)));
triggers.push_back(
new TriggerNode("shadowform", NextAction::array(0, new NextAction("shadowform", ACTION_HIGH), nullptr)));
// triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("dispersion", ACTION_EMERGENCY
// + 5), nullptr)));
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("dispersion", ACTION_HIGH
+ 5), nullptr)));
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("dispersion", ACTION_HIGH
+ 5), nullptr)));
triggers.push_back(
new TriggerNode("vampiric embrace", NextAction::array(0, new NextAction("vampiric embrace", 16.0f), nullptr)));
triggers.push_back(