[Spell] Healer spell enhancement

This commit is contained in:
Yunfan Li
2024-10-04 20:48:29 +08:00
parent db9b1115cb
commit 21e17e163b
15 changed files with 137 additions and 59 deletions

View File

@@ -202,9 +202,9 @@ bool Engine::DoNextAction(Unit* unit, uint32 depth, bool minimal)
{ {
LogAction("A:%s - PREREQ", action->getName().c_str()); 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; continue;
} }
} }
@@ -226,7 +226,7 @@ bool Engine::DoNextAction(Unit* unit, uint32 depth, bool minimal)
else else
{ {
LogAction("A:%s - FAILED", action->getName().c_str()); 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 else
@@ -246,7 +246,7 @@ bool Engine::DoNextAction(Unit* unit, uint32 depth, bool minimal)
botAI->TellMasterNoFacing(out); botAI->TellMasterNoFacing(out);
} }
LogAction("A:%s - IMPOSSIBLE", action->getName().c_str()); 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 else

View File

@@ -38,7 +38,7 @@ bool TogglePetSpellAutoCastAction::Execute(Event event)
bool shouldApply = true; bool shouldApply = true;
// imp's spell, felhunte's intelligence, cat stealth // imp's spell, felhunte's intelligence, cat stealth
if (spellId == 4511 || spellId == 1742 || spellId == 54424 || spellId == 57564 || spellId == 57565 || 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; shouldApply = false;
} }

View File

@@ -196,8 +196,8 @@ bool CastEnchantItemAction::isPossible()
} }
CastHealingSpellAction::CastHealingSpellAction(PlayerbotAI* botAI, std::string const spell, uint8 estAmount, CastHealingSpellAction::CastHealingSpellAction(PlayerbotAI* botAI, std::string const spell, uint8 estAmount,
HealingManaEfficiency manaEfficiency) HealingManaEfficiency manaEfficiency, bool isOwner)
: CastAuraSpellAction(botAI, spell, true), estAmount(estAmount), manaEfficiency(manaEfficiency) : CastAuraSpellAction(botAI, spell, isOwner), estAmount(estAmount), manaEfficiency(manaEfficiency)
{ {
range = botAI->GetRange("heal"); range = botAI->GetRange("heal");
} }

View File

@@ -129,7 +129,7 @@ class CastHealingSpellAction : public CastAuraSpellAction
{ {
public: public:
CastHealingSpellAction(PlayerbotAI* botAI, std::string const spell, uint8 estAmount = 15.0f, 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"; } std::string const GetTargetName() override { return "self target"; }
bool isUseful() override; bool isUseful() override;
@@ -177,8 +177,8 @@ class HealPartyMemberAction : public CastHealingSpellAction, public PartyMemberA
{ {
public: public:
HealPartyMemberAction(PlayerbotAI* botAI, std::string const spell, uint8 estAmount = 15.0f, HealPartyMemberAction(PlayerbotAI* botAI, std::string const spell, uint8 estAmount = 15.0f,
HealingManaEfficiency manaEfficiency = HealingManaEfficiency::MEDIUM) HealingManaEfficiency manaEfficiency = HealingManaEfficiency::MEDIUM, bool isOwner = true)
: CastHealingSpellAction(botAI, spell, estAmount, manaEfficiency), PartyMemberActionNameSupport(spell) : CastHealingSpellAction(botAI, spell, estAmount, manaEfficiency, isOwner), PartyMemberActionNameSupport(spell)
{ {
} }

View File

@@ -48,3 +48,34 @@ bool CastRebirthAction::isUseful()
return CastSpellAction::isUseful() && return CastSpellAction::isUseful() &&
AI_VALUE2(float, "distance", GetTargetName()) <= sPlayerbotAIConfig->spellDistance; 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();
}

View File

@@ -311,4 +311,16 @@ public:
CastEnrageAction(PlayerbotAI* ai) : CastBuffSpellAction(ai, "enrage") {} 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 #endif

View File

@@ -209,6 +209,7 @@ public:
creators["healing touch"] = &DruidAiObjectContextInternal::healing_touch; creators["healing touch"] = &DruidAiObjectContextInternal::healing_touch;
creators["regrowth on party"] = &DruidAiObjectContextInternal::regrowth_on_party; creators["regrowth on party"] = &DruidAiObjectContextInternal::regrowth_on_party;
creators["rejuvenation on party"] = &DruidAiObjectContextInternal::rejuvenation_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["healing touch on party"] = &DruidAiObjectContextInternal::healing_touch_on_party;
creators["rebirth"] = &DruidAiObjectContextInternal::rebirth; creators["rebirth"] = &DruidAiObjectContextInternal::rebirth;
creators["revive"] = &DruidAiObjectContextInternal::revive; creators["revive"] = &DruidAiObjectContextInternal::revive;
@@ -295,6 +296,7 @@ private:
static Action* healing_touch(PlayerbotAI* botAI) { return new CastHealingTouchAction(botAI); } static Action* healing_touch(PlayerbotAI* botAI) { return new CastHealingTouchAction(botAI); }
static Action* regrowth_on_party(PlayerbotAI* botAI) { return new CastRegrowthOnPartyAction(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_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* healing_touch_on_party(PlayerbotAI* botAI) { return new CastHealingTouchOnPartyAction(botAI); }
static Action* rebirth(PlayerbotAI* botAI) { return new CastRebirthAction(botAI); } static Action* rebirth(PlayerbotAI* botAI) { return new CastRebirthAction(botAI); }
static Action* revive(PlayerbotAI* botAI) { return new CastReviveAction(botAI); } static Action* revive(PlayerbotAI* botAI) { return new CastReviveAction(botAI); }

View File

@@ -164,9 +164,10 @@ void DruidAssistDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
new NextAction("starfire", ACTION_DEFAULT), new NextAction("starfire", ACTION_DEFAULT),
nullptr))); nullptr)));
triggers.push_back( // long cast time
new TriggerNode("medium aoe and healer should attack", // triggers.push_back(
NextAction::array(0, // new TriggerNode("medium aoe and healer should attack",
new NextAction("hurricane", ACTION_DEFAULT + 0.7f), // NextAction::array(0,
nullptr))); // new NextAction("hurricane", ACTION_DEFAULT + 0.7f),
// nullptr)));
} }

View File

@@ -70,8 +70,8 @@ void HealDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
NextAction::array(0, NextAction::array(0,
new NextAction("tree form", ACTION_CRITICAL_HEAL + 4.1f), new NextAction("tree form", ACTION_CRITICAL_HEAL + 4.1f),
new NextAction("swiftmend on party", ACTION_CRITICAL_HEAL + 4), 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 + 3),
new NextAction("regrowth on party", ACTION_CRITICAL_HEAL + 2), new NextAction("wild growth on party", ACTION_CRITICAL_HEAL + 2),
new NextAction("nourish on party", ACTION_CRITICAL_HEAL + 1), new NextAction("nourish on party", ACTION_CRITICAL_HEAL + 1),
// new NextAction("healing touch on party", ACTION_CRITICAL_HEAL + 0), // new NextAction("healing touch on party", ACTION_CRITICAL_HEAL + 0),
nullptr))); nullptr)));
@@ -80,36 +80,46 @@ void HealDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
new TriggerNode("party member critical health", new TriggerNode("party member critical health",
NextAction::array(0, new NextAction("nature's swiftness", ACTION_CRITICAL_HEAL + 4), nullptr))); 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( triggers.push_back(
new TriggerNode("medium group heal occasion", new TriggerNode("medium group heal setting",
NextAction::array(0, new NextAction("tranquility", ACTION_CRITICAL_HEAL + 5), nullptr))); NextAction::array(0,
new NextAction("tree form", ACTION_CRITICAL_HEAL + 0.6f),
new NextAction("tranquility", ACTION_CRITICAL_HEAL + 0.5f), nullptr)));
// LOW // LOW
triggers.push_back( triggers.push_back(
new TriggerNode("party member low health", new TriggerNode("party member low health",
NextAction::array(0, new NextAction("tree form", ACTION_MEDIUM_HEAL + 9.1f), NextAction::array(0, new NextAction("tree form", ACTION_MEDIUM_HEAL + 1.5f),
new NextAction("wild growth on party", ACTION_MEDIUM_HEAL + 9), new NextAction("wild growth on party", ACTION_MEDIUM_HEAL + 1.4f),
new NextAction("regrowth on party", ACTION_MEDIUM_HEAL + 8), new NextAction("regrowth on party", ACTION_MEDIUM_HEAL + 1.3f),
new NextAction("swiftmend on party", ACTION_MEDIUM_HEAL + 7), new NextAction("swiftmend on party", ACTION_MEDIUM_HEAL + 1.2),
new NextAction("nourish on party", ACTION_MEDIUM_HEAL + 6), new NextAction("nourish on party", ACTION_MEDIUM_HEAL + 1.1f),
nullptr))); nullptr)));
// MEDIUM // MEDIUM
triggers.push_back( triggers.push_back(
new TriggerNode("party member medium health", new TriggerNode("party member medium health",
NextAction::array(0, NextAction::array(0,
new NextAction("tree form", ACTION_MEDIUM_HEAL + 4.1f), new NextAction("tree form", ACTION_MEDIUM_HEAL + 0.5f),
new NextAction("wild growth on party", ACTION_MEDIUM_HEAL + 4), new NextAction("wild growth on party", ACTION_MEDIUM_HEAL + 0.4f),
new NextAction("rejuvenation on party", ACTION_MEDIUM_HEAL + 3), new NextAction("rejuvenation on party", ACTION_MEDIUM_HEAL + 0.3f),
new NextAction("regrowth on party", ACTION_MEDIUM_HEAL + 2), new NextAction("regrowth on party", ACTION_MEDIUM_HEAL + 0.2f),
new NextAction("nourish on party", ACTION_MEDIUM_HEAL + 1), nullptr))); new NextAction("nourish on party", ACTION_MEDIUM_HEAL + 0.1f), nullptr)));
// almost full // almost full
triggers.push_back( triggers.push_back(
new TriggerNode("party member almost full health", new TriggerNode("party member almost full health",
NextAction::array(0, new NextAction("wild growth on party", ACTION_LIGHT_HEAL + 3), NextAction::array(0, new NextAction("wild growth on party", ACTION_LIGHT_HEAL + 0.3f),
new NextAction("rejuvenation on party", ACTION_LIGHT_HEAL + 2), new NextAction("rejuvenation on party", ACTION_LIGHT_HEAL + 0.2f),
new NextAction("regrowth on party", ACTION_LIGHT_HEAL + 1), nullptr))); new NextAction("regrowth on party", ACTION_LIGHT_HEAL + 0.1f), nullptr)));
triggers.push_back( triggers.push_back(
new TriggerNode("medium mana", NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 5), nullptr))); new TriggerNode("medium mana", NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 5), nullptr)));

View File

@@ -49,7 +49,7 @@ void HealPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
NextAction::array(0, new NextAction("reach party member to heal", ACTION_EMERGENCY + 3), nullptr))); NextAction::array(0, new NextAction("reach party member to heal", ACTION_EMERGENCY + 3), nullptr)));
triggers.push_back( 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), NextAction::array(0, new NextAction("divine sacrifice", ACTION_CRITICAL_HEAL + 5),
new NextAction("avenging wrath", ACTION_HIGH + 4), new NextAction("avenging wrath", ACTION_HIGH + 4),
nullptr))); nullptr)));

View File

@@ -106,7 +106,7 @@ void TankPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"righteous fury", NextAction::array(0, new NextAction("righteous fury", ACTION_HIGH + 8), nullptr))); "righteous fury", NextAction::array(0, new NextAction("righteous fury", ACTION_HIGH + 8), nullptr)));
triggers.push_back( 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))); NextAction::array(0, new NextAction("divine sacrifice", ACTION_HIGH + 5), nullptr)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"enough mana", NextAction::array(0, new NextAction("consecration", ACTION_HIGH + 4), nullptr))); "enough mana", NextAction::array(0, new NextAction("consecration", ACTION_HIGH + 4), nullptr)));

View File

@@ -35,33 +35,39 @@ void HealPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"group heal setting", "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))); nullptr)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"medium group heal occasion", "medium group heal setting",
NextAction::array(0, new NextAction("divine hymn", ACTION_CRITICAL_HEAL + 6), NextAction::array(0, new NextAction("divine hymn", ACTION_CRITICAL_HEAL + 7),
new NextAction("prayer of healing on party", ACTION_CRITICAL_HEAL + 5), nullptr))); 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( triggers.push_back(new TriggerNode(
"party member critical health", "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("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 + 3),
new NextAction("prayer of mending on party", ACTION_CRITICAL_HEAL + 2), nullptr))); new NextAction("flash heal on party", ACTION_CRITICAL_HEAL + 2),
nullptr)));
triggers.push_back( triggers.push_back(
new TriggerNode("party member low health", new TriggerNode("party member low health",
NextAction::array(0, new NextAction("power word: shield on party", ACTION_MEDIUM_HEAL + 4), 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("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))); new NextAction("flash heal on party", ACTION_MEDIUM_HEAL + 0), nullptr)));
triggers.push_back( triggers.push_back(
new TriggerNode("party member medium health", new TriggerNode("party member medium health",
NextAction::array(0, new NextAction("power word: shield on party", ACTION_LIGHT_HEAL + 9), 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 + 7),
new NextAction("prayer of mending on party", ACTION_LIGHT_HEAL + 6), new NextAction("penance on party", ACTION_LIGHT_HEAL + 6),
new NextAction("flash heal on party", ACTION_LIGHT_HEAL + 5), new NextAction("flash heal on party", ACTION_LIGHT_HEAL + 5),
// new NextAction("renew on party", ACTION_LIGHT_HEAL + 8), // new NextAction("renew on party", ACTION_LIGHT_HEAL + 8),
nullptr))); nullptr)));
@@ -70,7 +76,9 @@ void HealPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
new TriggerNode("party member almost full health", new TriggerNode("party member almost full health",
NextAction::array(0, NextAction::array(0,
// new NextAction("penance on party", ACTION_LIGHT_HEAL + 3), // 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), // 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 // nullptr))); triggers.push_back(new TriggerNode("party member almost full health", NextAction::array(0, new

View File

@@ -64,40 +64,48 @@ void HolyHealPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back( triggers.push_back(
new TriggerNode("group heal setting", 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( triggers.push_back(new TriggerNode(
"medium group heal occasion", "medium group heal setting",
NextAction::array(0, new NextAction("divine hymn", ACTION_CRITICAL_HEAL + 6), NextAction::array(0, new NextAction("divine hymn", ACTION_CRITICAL_HEAL + 7),
new NextAction("prayer of healing on party", ACTION_CRITICAL_HEAL + 5), nullptr))); 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( triggers.push_back(new TriggerNode(
"party member critical health", "party member critical health",
NextAction::array(0, NextAction::array(0,
new NextAction("guardian spirit on party", ACTION_CRITICAL_HEAL + 6), new NextAction("guardian spirit on party", ACTION_CRITICAL_HEAL + 6),
new NextAction("power word: shield on party", ACTION_CRITICAL_HEAL + 5), 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 + 3),
new NextAction("prayer of mending on party", ACTION_CRITICAL_HEAL + 2), nullptr))); new NextAction("greater heal on party", ACTION_MEDIUM_HEAL + 2),
new NextAction("flash heal on party", ACTION_CRITICAL_HEAL + 1),
nullptr)));
triggers.push_back( triggers.push_back(
new TriggerNode("party member low health", new TriggerNode("party member low health",
NextAction::array(0, new NextAction("circle of healing on party", ACTION_MEDIUM_HEAL + 4), 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 + 3),
new NextAction("prayer of mending on party", ACTION_MEDIUM_HEAL + 2), new NextAction("greater heal on party", ACTION_MEDIUM_HEAL + 2),
new NextAction("flash heal on party", ACTION_MEDIUM_HEAL + 1), nullptr))); new NextAction("flash heal on party", ACTION_MEDIUM_HEAL + 1), nullptr)));
triggers.push_back( triggers.push_back(
new TriggerNode("party member medium health", new TriggerNode("party member medium health",
NextAction::array(0, new NextAction("circle of healing on party", ACTION_LIGHT_HEAL + 7), 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("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), // new NextAction("renew on party", ACTION_LIGHT_HEAL + 8),
nullptr))); nullptr)));
triggers.push_back( triggers.push_back(
new TriggerNode("party member almost full health", new TriggerNode("party member almost full health",
NextAction::array(0, new NextAction("renew on party", ACTION_LIGHT_HEAL + 2), NextAction::array(0,
// new NextAction("flash heal on party", ACTION_LIGHT_HEAL + 1), new NextAction("renew on party", ACTION_LIGHT_HEAL + 2),
new NextAction("prayer of mending on party", ACTION_LIGHT_HEAL + 1),
nullptr))); nullptr)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(

View File

@@ -175,6 +175,8 @@ public:
creators["power word: shield on party"] = &PriestAiObjectContextInternal::power_word_shield_on_party; creators["power word: shield on party"] = &PriestAiObjectContextInternal::power_word_shield_on_party;
creators["power word: shield on almost full health below"] = creators["power word: shield on almost full health below"] =
&PriestAiObjectContextInternal::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"] = &PriestAiObjectContextInternal::renew;
creators["renew on party"] = &PriestAiObjectContextInternal::renew_on_party; creators["renew on party"] = &PriestAiObjectContextInternal::renew_on_party;
creators["greater heal"] = &PriestAiObjectContextInternal::greater_heal; creators["greater heal"] = &PriestAiObjectContextInternal::greater_heal;
@@ -285,7 +287,11 @@ private:
} }
static Action* power_word_shield_on_almost_full_health_below(PlayerbotAI* ai) 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(PlayerbotAI* botAI) { return new CastRenewAction(botAI); }
static Action* renew_on_party(PlayerbotAI* botAI) { return new CastRenewOnPartyAction(botAI); } static Action* renew_on_party(PlayerbotAI* botAI) { return new CastRenewOnPartyAction(botAI); }

View File

@@ -140,7 +140,7 @@ public:
creators["almost full aoe heal"] = &TriggerContext::almost_full_aoe_heal; creators["almost full aoe heal"] = &TriggerContext::almost_full_aoe_heal;
creators["group heal setting"] = &TriggerContext::group_heal_occasion; 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["invalid target"] = &TriggerContext::invalid_target;
creators["lfg proposal active"] = &TriggerContext::lfg_proposal_active; creators["lfg proposal active"] = &TriggerContext::lfg_proposal_active;
@@ -250,7 +250,7 @@ private:
} }
static Trigger* medium_group_heal_occasion(PlayerbotAI* ai) 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* target_changed(PlayerbotAI* botAI) { return new TargetChangedTrigger(botAI); }
static Trigger* swimming(PlayerbotAI* botAI) { return new IsSwimmingTrigger(botAI); } static Trigger* swimming(PlayerbotAI* botAI) { return new IsSwimmingTrigger(botAI); }