From 21e17e163bba6bfd068ab4599518bafaf41c50b1 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Fri, 4 Oct 2024 20:48:29 +0800 Subject: [PATCH] [Spell] Healer spell enhancement --- src/strategy/Engine.cpp | 8 ++-- src/strategy/actions/GenericActions.cpp | 2 +- src/strategy/actions/GenericSpellActions.cpp | 4 +- src/strategy/actions/GenericSpellActions.h | 6 +-- src/strategy/druid/DruidActions.cpp | 31 +++++++++++++ src/strategy/druid/DruidActions.h | 12 +++++ src/strategy/druid/DruidAiObjectContext.cpp | 2 + src/strategy/druid/GenericDruidStrategy.cpp | 11 ++--- src/strategy/druid/HealDruidStrategy.cpp | 44 ++++++++++++------- src/strategy/paladin/HealPaladinStrategy.cpp | 2 +- src/strategy/paladin/TankPaladinStrategy.cpp | 2 +- src/strategy/priest/HealPriestStrategy.cpp | 30 ++++++++----- src/strategy/priest/HolyPriestStrategy.cpp | 30 ++++++++----- src/strategy/priest/PriestAiObjectContext.cpp | 8 +++- src/strategy/triggers/TriggerContext.h | 4 +- 15 files changed, 137 insertions(+), 59 deletions(-) diff --git a/src/strategy/Engine.cpp b/src/strategy/Engine.cpp index d298aaf5..a9569a20 100644 --- a/src/strategy/Engine.cpp +++ b/src/strategy/Engine.cpp @@ -202,9 +202,9 @@ bool Engine::DoNextAction(Unit* unit, uint32 depth, bool minimal) { LogAction("A:%s - PREREQ", action->getName().c_str()); - if (MultiplyAndPush(actionNode->getPrerequisites(), relevance + 0.02, false, event, "prereq")) + if (MultiplyAndPush(actionNode->getPrerequisites(), relevance + 0.002f, false, event, "prereq")) { - PushAgain(actionNode, relevance + 0.01, event); + PushAgain(actionNode, relevance + 0.001f, event); continue; } } @@ -226,7 +226,7 @@ bool Engine::DoNextAction(Unit* unit, uint32 depth, bool minimal) else { LogAction("A:%s - FAILED", action->getName().c_str()); - MultiplyAndPush(actionNode->getAlternatives(), relevance + 0.03, false, event, "alt"); + MultiplyAndPush(actionNode->getAlternatives(), relevance + 0.003f, false, event, "alt"); } } else @@ -246,7 +246,7 @@ bool Engine::DoNextAction(Unit* unit, uint32 depth, bool minimal) botAI->TellMasterNoFacing(out); } LogAction("A:%s - IMPOSSIBLE", action->getName().c_str()); - MultiplyAndPush(actionNode->getAlternatives(), relevance + 0.03, false, event, "alt"); + MultiplyAndPush(actionNode->getAlternatives(), relevance + 0.003f, false, event, "alt"); } } else diff --git a/src/strategy/actions/GenericActions.cpp b/src/strategy/actions/GenericActions.cpp index 9682d2ef..84997212 100644 --- a/src/strategy/actions/GenericActions.cpp +++ b/src/strategy/actions/GenericActions.cpp @@ -38,7 +38,7 @@ bool TogglePetSpellAutoCastAction::Execute(Event event) bool shouldApply = true; // imp's spell, felhunte's intelligence, cat stealth if (spellId == 4511 || spellId == 1742 || spellId == 54424 || spellId == 57564 || spellId == 57565 || - spellId == 57566 || spellId == 57567 || spellId == 24450 || spellId == 53477) + spellId == 57566 || spellId == 57567 || spellId == 24450) { shouldApply = false; } diff --git a/src/strategy/actions/GenericSpellActions.cpp b/src/strategy/actions/GenericSpellActions.cpp index 9285f20a..749bed14 100644 --- a/src/strategy/actions/GenericSpellActions.cpp +++ b/src/strategy/actions/GenericSpellActions.cpp @@ -196,8 +196,8 @@ bool CastEnchantItemAction::isPossible() } CastHealingSpellAction::CastHealingSpellAction(PlayerbotAI* botAI, std::string const spell, uint8 estAmount, - HealingManaEfficiency manaEfficiency) - : CastAuraSpellAction(botAI, spell, true), estAmount(estAmount), manaEfficiency(manaEfficiency) + HealingManaEfficiency manaEfficiency, bool isOwner) + : CastAuraSpellAction(botAI, spell, isOwner), estAmount(estAmount), manaEfficiency(manaEfficiency) { range = botAI->GetRange("heal"); } diff --git a/src/strategy/actions/GenericSpellActions.h b/src/strategy/actions/GenericSpellActions.h index 2ab49bb0..be1dc200 100644 --- a/src/strategy/actions/GenericSpellActions.h +++ b/src/strategy/actions/GenericSpellActions.h @@ -129,7 +129,7 @@ class CastHealingSpellAction : public CastAuraSpellAction { public: CastHealingSpellAction(PlayerbotAI* botAI, std::string const spell, uint8 estAmount = 15.0f, - HealingManaEfficiency manaEfficiency = HealingManaEfficiency::MEDIUM); + HealingManaEfficiency manaEfficiency = HealingManaEfficiency::MEDIUM, bool isOwner = true); std::string const GetTargetName() override { return "self target"; } bool isUseful() override; @@ -177,8 +177,8 @@ class HealPartyMemberAction : public CastHealingSpellAction, public PartyMemberA { public: HealPartyMemberAction(PlayerbotAI* botAI, std::string const spell, uint8 estAmount = 15.0f, - HealingManaEfficiency manaEfficiency = HealingManaEfficiency::MEDIUM) - : CastHealingSpellAction(botAI, spell, estAmount, manaEfficiency), PartyMemberActionNameSupport(spell) + HealingManaEfficiency manaEfficiency = HealingManaEfficiency::MEDIUM, bool isOwner = true) + : CastHealingSpellAction(botAI, spell, estAmount, manaEfficiency, isOwner), PartyMemberActionNameSupport(spell) { } diff --git a/src/strategy/druid/DruidActions.cpp b/src/strategy/druid/DruidActions.cpp index 739ac941..1743a339 100644 --- a/src/strategy/druid/DruidActions.cpp +++ b/src/strategy/druid/DruidActions.cpp @@ -47,4 +47,35 @@ bool CastRebirthAction::isUseful() { return CastSpellAction::isUseful() && AI_VALUE2(float, "distance", GetTargetName()) <= sPlayerbotAIConfig->spellDistance; +} + +Unit* CastRejuvenationOnNotFullAction::GetTarget() +{ + Group* group = bot->GetGroup(); + MinValueCalculator calc(100); + for (GroupReference* gref = group->GetFirstMember(); gref; gref = gref->next()) + { + Player* player = gref->GetSource(); + if (!player) + continue; + if (player->isDead() || player->IsFullHealth()) + { + continue; + } + if (player->GetDistance2d(bot) > sPlayerbotAIConfig->spellDistance) + { + continue; + } + if (botAI->HasAura("rejuvenation", player)) + { + continue; + } + calc.probe(player->GetHealthPct(), player); + } + return (Unit*)calc.param; +} + +bool CastRejuvenationOnNotFullAction::isUseful() +{ + return GetTarget(); } \ No newline at end of file diff --git a/src/strategy/druid/DruidActions.h b/src/strategy/druid/DruidActions.h index 749ba3ea..ee90788a 100644 --- a/src/strategy/druid/DruidActions.h +++ b/src/strategy/druid/DruidActions.h @@ -311,4 +311,16 @@ public: CastEnrageAction(PlayerbotAI* ai) : CastBuffSpellAction(ai, "enrage") {} }; + +class CastRejuvenationOnNotFullAction : public HealPartyMemberAction +{ +public: + CastRejuvenationOnNotFullAction(PlayerbotAI* ai) + : HealPartyMemberAction(ai, "rejuvenation", 5.0f, HealingManaEfficiency::VERY_HIGH) + { + } + bool isUseful() override; + Unit* GetTarget() override; +}; + #endif diff --git a/src/strategy/druid/DruidAiObjectContext.cpp b/src/strategy/druid/DruidAiObjectContext.cpp index a39fbc5b..d9882c76 100644 --- a/src/strategy/druid/DruidAiObjectContext.cpp +++ b/src/strategy/druid/DruidAiObjectContext.cpp @@ -209,6 +209,7 @@ public: creators["healing touch"] = &DruidAiObjectContextInternal::healing_touch; creators["regrowth on party"] = &DruidAiObjectContextInternal::regrowth_on_party; creators["rejuvenation on party"] = &DruidAiObjectContextInternal::rejuvenation_on_party; + creators["rejuvenation on not full"] = &DruidAiObjectContextInternal::rejuvenation_on_not_full; creators["healing touch on party"] = &DruidAiObjectContextInternal::healing_touch_on_party; creators["rebirth"] = &DruidAiObjectContextInternal::rebirth; creators["revive"] = &DruidAiObjectContextInternal::revive; @@ -295,6 +296,7 @@ private: static Action* healing_touch(PlayerbotAI* botAI) { return new CastHealingTouchAction(botAI); } static Action* regrowth_on_party(PlayerbotAI* botAI) { return new CastRegrowthOnPartyAction(botAI); } static Action* rejuvenation_on_party(PlayerbotAI* botAI) { return new CastRejuvenationOnPartyAction(botAI); } + static Action* rejuvenation_on_not_full(PlayerbotAI* botAI) { return new CastRejuvenationOnNotFullAction(botAI); } static Action* healing_touch_on_party(PlayerbotAI* botAI) { return new CastHealingTouchOnPartyAction(botAI); } static Action* rebirth(PlayerbotAI* botAI) { return new CastRebirthAction(botAI); } static Action* revive(PlayerbotAI* botAI) { return new CastReviveAction(botAI); } diff --git a/src/strategy/druid/GenericDruidStrategy.cpp b/src/strategy/druid/GenericDruidStrategy.cpp index c3dacdb3..cbe3ad7a 100644 --- a/src/strategy/druid/GenericDruidStrategy.cpp +++ b/src/strategy/druid/GenericDruidStrategy.cpp @@ -164,9 +164,10 @@ void DruidAssistDpsStrategy::InitTriggers(std::vector& triggers) new NextAction("starfire", ACTION_DEFAULT), nullptr))); - triggers.push_back( - new TriggerNode("medium aoe and healer should attack", - NextAction::array(0, - new NextAction("hurricane", ACTION_DEFAULT + 0.7f), - nullptr))); + // long cast time + // triggers.push_back( + // new TriggerNode("medium aoe and healer should attack", + // NextAction::array(0, + // new NextAction("hurricane", ACTION_DEFAULT + 0.7f), + // nullptr))); } diff --git a/src/strategy/druid/HealDruidStrategy.cpp b/src/strategy/druid/HealDruidStrategy.cpp index ec33dea3..b1e2f125 100644 --- a/src/strategy/druid/HealDruidStrategy.cpp +++ b/src/strategy/druid/HealDruidStrategy.cpp @@ -70,8 +70,8 @@ void HealDruidStrategy::InitTriggers(std::vector& triggers) NextAction::array(0, new NextAction("tree form", ACTION_CRITICAL_HEAL + 4.1f), new NextAction("swiftmend on party", ACTION_CRITICAL_HEAL + 4), - new NextAction("wild growth on party", ACTION_CRITICAL_HEAL + 3), - new NextAction("regrowth on party", ACTION_CRITICAL_HEAL + 2), + new NextAction("regrowth on party", ACTION_CRITICAL_HEAL + 3), + new NextAction("wild growth on party", ACTION_CRITICAL_HEAL + 2), new NextAction("nourish on party", ACTION_CRITICAL_HEAL + 1), // new NextAction("healing touch on party", ACTION_CRITICAL_HEAL + 0), nullptr))); @@ -80,36 +80,46 @@ void HealDruidStrategy::InitTriggers(std::vector& triggers) new TriggerNode("party member critical health", NextAction::array(0, new NextAction("nature's swiftness", ACTION_CRITICAL_HEAL + 4), nullptr))); + triggers.push_back(new TriggerNode( + "group heal setting", + NextAction::array(0, + new NextAction("tree form", ACTION_MEDIUM_HEAL + 2.3f), + new NextAction("wild growth on party", ACTION_MEDIUM_HEAL + 2.2f), + new NextAction("rejuvenation on not full", ACTION_MEDIUM_HEAL + 2.1f), + nullptr))); + triggers.push_back( - new TriggerNode("medium group heal occasion", - NextAction::array(0, new NextAction("tranquility", ACTION_CRITICAL_HEAL + 5), nullptr))); + new TriggerNode("medium group heal setting", + NextAction::array(0, + new NextAction("tree form", ACTION_CRITICAL_HEAL + 0.6f), + new NextAction("tranquility", ACTION_CRITICAL_HEAL + 0.5f), nullptr))); // LOW triggers.push_back( new TriggerNode("party member low health", - NextAction::array(0, new NextAction("tree form", ACTION_MEDIUM_HEAL + 9.1f), - new NextAction("wild growth on party", ACTION_MEDIUM_HEAL + 9), - new NextAction("regrowth on party", ACTION_MEDIUM_HEAL + 8), - new NextAction("swiftmend on party", ACTION_MEDIUM_HEAL + 7), - new NextAction("nourish on party", ACTION_MEDIUM_HEAL + 6), + NextAction::array(0, new NextAction("tree form", ACTION_MEDIUM_HEAL + 1.5f), + new NextAction("wild growth on party", ACTION_MEDIUM_HEAL + 1.4f), + new NextAction("regrowth on party", ACTION_MEDIUM_HEAL + 1.3f), + new NextAction("swiftmend on party", ACTION_MEDIUM_HEAL + 1.2), + new NextAction("nourish on party", ACTION_MEDIUM_HEAL + 1.1f), nullptr))); // MEDIUM triggers.push_back( new TriggerNode("party member medium health", NextAction::array(0, - new NextAction("tree form", ACTION_MEDIUM_HEAL + 4.1f), - new NextAction("wild growth on party", ACTION_MEDIUM_HEAL + 4), - new NextAction("rejuvenation on party", ACTION_MEDIUM_HEAL + 3), - new NextAction("regrowth on party", ACTION_MEDIUM_HEAL + 2), - new NextAction("nourish on party", ACTION_MEDIUM_HEAL + 1), nullptr))); + new NextAction("tree form", ACTION_MEDIUM_HEAL + 0.5f), + new NextAction("wild growth on party", ACTION_MEDIUM_HEAL + 0.4f), + new NextAction("rejuvenation on party", ACTION_MEDIUM_HEAL + 0.3f), + new NextAction("regrowth on party", ACTION_MEDIUM_HEAL + 0.2f), + new NextAction("nourish on party", ACTION_MEDIUM_HEAL + 0.1f), nullptr))); // almost full triggers.push_back( new TriggerNode("party member almost full health", - NextAction::array(0, new NextAction("wild growth on party", ACTION_LIGHT_HEAL + 3), - new NextAction("rejuvenation on party", ACTION_LIGHT_HEAL + 2), - new NextAction("regrowth on party", ACTION_LIGHT_HEAL + 1), nullptr))); + NextAction::array(0, new NextAction("wild growth on party", ACTION_LIGHT_HEAL + 0.3f), + new NextAction("rejuvenation on party", ACTION_LIGHT_HEAL + 0.2f), + new NextAction("regrowth on party", ACTION_LIGHT_HEAL + 0.1f), nullptr))); triggers.push_back( new TriggerNode("medium mana", NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 5), nullptr))); diff --git a/src/strategy/paladin/HealPaladinStrategy.cpp b/src/strategy/paladin/HealPaladinStrategy.cpp index 42517630..5f1767dd 100644 --- a/src/strategy/paladin/HealPaladinStrategy.cpp +++ b/src/strategy/paladin/HealPaladinStrategy.cpp @@ -49,7 +49,7 @@ void HealPaladinStrategy::InitTriggers(std::vector& triggers) NextAction::array(0, new NextAction("reach party member to heal", ACTION_EMERGENCY + 3), nullptr))); triggers.push_back( - new TriggerNode("medium group heal occasion", + new TriggerNode("medium group heal setting", NextAction::array(0, new NextAction("divine sacrifice", ACTION_CRITICAL_HEAL + 5), new NextAction("avenging wrath", ACTION_HIGH + 4), nullptr))); diff --git a/src/strategy/paladin/TankPaladinStrategy.cpp b/src/strategy/paladin/TankPaladinStrategy.cpp index 1cb2c5c4..25e761b7 100644 --- a/src/strategy/paladin/TankPaladinStrategy.cpp +++ b/src/strategy/paladin/TankPaladinStrategy.cpp @@ -106,7 +106,7 @@ void TankPaladinStrategy::InitTriggers(std::vector& triggers) triggers.push_back(new TriggerNode( "righteous fury", NextAction::array(0, new NextAction("righteous fury", ACTION_HIGH + 8), nullptr))); triggers.push_back( - new TriggerNode("medium group heal occasion", + new TriggerNode("medium group heal setting", NextAction::array(0, new NextAction("divine sacrifice", ACTION_HIGH + 5), nullptr))); triggers.push_back(new TriggerNode( "enough mana", NextAction::array(0, new NextAction("consecration", ACTION_HIGH + 4), nullptr))); diff --git a/src/strategy/priest/HealPriestStrategy.cpp b/src/strategy/priest/HealPriestStrategy.cpp index 52c12df6..64c747fd 100644 --- a/src/strategy/priest/HealPriestStrategy.cpp +++ b/src/strategy/priest/HealPriestStrategy.cpp @@ -35,33 +35,39 @@ void HealPriestStrategy::InitTriggers(std::vector& triggers) triggers.push_back(new TriggerNode( "group heal setting", - NextAction::array(0, new NextAction("power word: shield on almost full health below", ACTION_MEDIUM_HEAL + 7), + NextAction::array(0, + new NextAction("prayer of mending on party", ACTION_MEDIUM_HEAL + 8), + new NextAction("power word: shield on not full", ACTION_MEDIUM_HEAL + 7), nullptr))); triggers.push_back(new TriggerNode( - "medium group heal occasion", - NextAction::array(0, new NextAction("divine hymn", ACTION_CRITICAL_HEAL + 6), - new NextAction("prayer of healing on party", ACTION_CRITICAL_HEAL + 5), nullptr))); + "medium group heal setting", + NextAction::array(0, new NextAction("divine hymn", ACTION_CRITICAL_HEAL + 7), + new NextAction("prayer of mending on party", ACTION_CRITICAL_HEAL + 6), + new NextAction("power word: shield on not full", ACTION_CRITICAL_HEAL + 5), + new NextAction("prayer of healing on party", ACTION_CRITICAL_HEAL + 4), + nullptr))); triggers.push_back(new TriggerNode( "party member critical health", - NextAction::array(0, new NextAction("power word: shield on party", ACTION_CRITICAL_HEAL + 6), + NextAction::array(0, new NextAction("power word: shield on party", ACTION_CRITICAL_HEAL + 5), new NextAction("penance on party", ACTION_CRITICAL_HEAL + 4), - new NextAction("flash heal on party", ACTION_CRITICAL_HEAL + 3), - new NextAction("prayer of mending on party", ACTION_CRITICAL_HEAL + 2), nullptr))); + new NextAction("prayer of mending on party", ACTION_CRITICAL_HEAL + 3), + new NextAction("flash heal on party", ACTION_CRITICAL_HEAL + 2), + nullptr))); triggers.push_back( new TriggerNode("party member low health", NextAction::array(0, new NextAction("power word: shield on party", ACTION_MEDIUM_HEAL + 4), + new NextAction("prayer of mending on party", ACTION_MEDIUM_HEAL + 3), new NextAction("penance on party", ACTION_MEDIUM_HEAL + 2), - new NextAction("prayer of mending on party", ACTION_MEDIUM_HEAL + 1), new NextAction("flash heal on party", ACTION_MEDIUM_HEAL + 0), nullptr))); triggers.push_back( new TriggerNode("party member medium health", NextAction::array(0, new NextAction("power word: shield on party", ACTION_LIGHT_HEAL + 9), - new NextAction("penance on party", ACTION_LIGHT_HEAL + 7), - new NextAction("prayer of mending on party", ACTION_LIGHT_HEAL + 6), + new NextAction("prayer of mending on party", ACTION_LIGHT_HEAL + 7), + new NextAction("penance on party", ACTION_LIGHT_HEAL + 6), new NextAction("flash heal on party", ACTION_LIGHT_HEAL + 5), // new NextAction("renew on party", ACTION_LIGHT_HEAL + 8), nullptr))); @@ -70,7 +76,9 @@ void HealPriestStrategy::InitTriggers(std::vector& triggers) new TriggerNode("party member almost full health", NextAction::array(0, // new NextAction("penance on party", ACTION_LIGHT_HEAL + 3), - new NextAction("renew on party", ACTION_LIGHT_HEAL + 2), NULL))); + new NextAction("prayer of mending on party", ACTION_LIGHT_HEAL + 2), + new NextAction("renew on party", ACTION_LIGHT_HEAL + 1), + nullptr))); // triggers.push_back(new TriggerNode("almost full health", NextAction::array(0, new NextAction("renew", 43.f), // nullptr))); triggers.push_back(new TriggerNode("party member almost full health", NextAction::array(0, new diff --git a/src/strategy/priest/HolyPriestStrategy.cpp b/src/strategy/priest/HolyPriestStrategy.cpp index de29d7ea..7c073e05 100644 --- a/src/strategy/priest/HolyPriestStrategy.cpp +++ b/src/strategy/priest/HolyPriestStrategy.cpp @@ -64,40 +64,48 @@ void HolyHealPriestStrategy::InitTriggers(std::vector& triggers) triggers.push_back( new TriggerNode("group heal setting", - NextAction::array(0, new NextAction("circle of healing on party", ACTION_MEDIUM_HEAL + 8), nullptr))); + NextAction::array(0, + new NextAction("prayer of mending on party", ACTION_MEDIUM_HEAL + 9), + new NextAction("circle of healing on party", ACTION_MEDIUM_HEAL + 8), nullptr))); triggers.push_back(new TriggerNode( - "medium group heal occasion", - NextAction::array(0, new NextAction("divine hymn", ACTION_CRITICAL_HEAL + 6), - new NextAction("prayer of healing on party", ACTION_CRITICAL_HEAL + 5), nullptr))); + "medium group heal setting", + NextAction::array(0, new NextAction("divine hymn", ACTION_CRITICAL_HEAL + 7), + new NextAction("prayer of mending on party", ACTION_CRITICAL_HEAL + 6), + new NextAction("circle of healing on party", ACTION_CRITICAL_HEAL + 5), + new NextAction("prayer of healing on party", ACTION_CRITICAL_HEAL + 4), nullptr))); triggers.push_back(new TriggerNode( "party member critical health", 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), nullptr))); + new NextAction("prayer of mending on party", ACTION_CRITICAL_HEAL + 3), + new NextAction("greater heal on party", ACTION_MEDIUM_HEAL + 2), + new NextAction("flash heal on party", ACTION_CRITICAL_HEAL + 1), + nullptr))); triggers.push_back( new TriggerNode("party member low health", NextAction::array(0, new NextAction("circle of healing on party", ACTION_MEDIUM_HEAL + 4), - new NextAction("greater heal on party", ACTION_MEDIUM_HEAL + 3), - new NextAction("prayer of mending on party", ACTION_MEDIUM_HEAL + 2), + new NextAction("prayer of mending on party", ACTION_MEDIUM_HEAL + 3), + new NextAction("greater heal on party", ACTION_MEDIUM_HEAL + 2), new NextAction("flash heal on party", ACTION_MEDIUM_HEAL + 1), nullptr))); triggers.push_back( new TriggerNode("party member medium health", NextAction::array(0, new NextAction("circle of healing on party", ACTION_LIGHT_HEAL + 7), new NextAction("prayer of mending on party", ACTION_LIGHT_HEAL + 6), - new NextAction("flash heal on party", ACTION_LIGHT_HEAL + 5), + new NextAction("greater heal on party", ACTION_MEDIUM_HEAL + 5), + new NextAction("flash heal on party", ACTION_LIGHT_HEAL + 4), // new NextAction("renew on party", ACTION_LIGHT_HEAL + 8), nullptr))); triggers.push_back( new TriggerNode("party member almost full health", - NextAction::array(0, new NextAction("renew on party", ACTION_LIGHT_HEAL + 2), - // new NextAction("flash heal on party", ACTION_LIGHT_HEAL + 1), + NextAction::array(0, + new NextAction("renew on party", ACTION_LIGHT_HEAL + 2), + new NextAction("prayer of mending on party", ACTION_LIGHT_HEAL + 1), nullptr))); triggers.push_back(new TriggerNode( diff --git a/src/strategy/priest/PriestAiObjectContext.cpp b/src/strategy/priest/PriestAiObjectContext.cpp index d6c59233..3f8dbacd 100644 --- a/src/strategy/priest/PriestAiObjectContext.cpp +++ b/src/strategy/priest/PriestAiObjectContext.cpp @@ -175,6 +175,8 @@ public: creators["power word: shield on party"] = &PriestAiObjectContextInternal::power_word_shield_on_party; creators["power word: shield on almost full health below"] = &PriestAiObjectContextInternal::power_word_shield_on_almost_full_health_below; + creators["power word: shield on not full"] = + &PriestAiObjectContextInternal::power_word_shield_on_not_full; creators["renew"] = &PriestAiObjectContextInternal::renew; creators["renew on party"] = &PriestAiObjectContextInternal::renew_on_party; creators["greater heal"] = &PriestAiObjectContextInternal::greater_heal; @@ -285,7 +287,11 @@ private: } static Action* power_word_shield_on_almost_full_health_below(PlayerbotAI* ai) { - return new CastPowerWordShieldOnAlmostFullHealthBelow(ai); + return new CastPowerWordShieldOnAlmostFullHealthBelowAction(ai); + } + static Action* power_word_shield_on_not_full(PlayerbotAI* ai) + { + return new CastPowerWordShieldOnNotFullAction(ai); } static Action* renew(PlayerbotAI* botAI) { return new CastRenewAction(botAI); } static Action* renew_on_party(PlayerbotAI* botAI) { return new CastRenewOnPartyAction(botAI); } diff --git a/src/strategy/triggers/TriggerContext.h b/src/strategy/triggers/TriggerContext.h index 7baebc8d..cbfeec6f 100644 --- a/src/strategy/triggers/TriggerContext.h +++ b/src/strategy/triggers/TriggerContext.h @@ -140,7 +140,7 @@ public: creators["almost full aoe heal"] = &TriggerContext::almost_full_aoe_heal; creators["group heal setting"] = &TriggerContext::group_heal_occasion; - creators["medium group heal occasion"] = &TriggerContext::medium_group_heal_occasion; + creators["medium group heal setting"] = &TriggerContext::medium_group_heal_occasion; creators["invalid target"] = &TriggerContext::invalid_target; creators["lfg proposal active"] = &TriggerContext::lfg_proposal_active; @@ -250,7 +250,7 @@ private: } static Trigger* medium_group_heal_occasion(PlayerbotAI* ai) { - return new AoeInGroupTrigger(ai, "medium group heal occasion", "medium"); + return new AoeInGroupTrigger(ai, "medium group heal setting", "medium"); } static Trigger* target_changed(PlayerbotAI* botAI) { return new TargetChangedTrigger(botAI); } static Trigger* swimming(PlayerbotAI* botAI) { return new IsSwimmingTrigger(botAI); }