Raise flee action relevance

This commit is contained in:
Yunfan Li
2023-12-22 00:05:09 +08:00
parent a442821745
commit 111109b112
10 changed files with 13 additions and 13 deletions

View File

@@ -4,6 +4,7 @@
#include "GenericMageStrategy.h"
#include "Playerbots.h"
#include "RangedCombatStrategy.h"
class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
@@ -121,14 +122,14 @@ class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
}
};
GenericMageStrategy::GenericMageStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI)
GenericMageStrategy::GenericMageStrategy(PlayerbotAI* botAI) : RangedCombatStrategy(botAI)
{
actionNodeFactories.Add(new GenericMageStrategyActionNodeFactory());
}
void GenericMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
CombatStrategy::InitTriggers(triggers);
RangedCombatStrategy::InitTriggers(triggers);
// triggers.push_back(new TriggerNode("enemy out of spell", NextAction::array(0, new NextAction("reach spell", ACTION_MOVE + 9), nullptr)));
triggers.push_back(new TriggerNode("enemy is close", NextAction::array(0, new NextAction("frost nova", 50.0f), nullptr)));
@@ -139,7 +140,6 @@ void GenericMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("evocation", ACTION_EMERGENCY + 5), nullptr)));
triggers.push_back(new TriggerNode("fire ward", NextAction::array(0, new NextAction("fire ward", ACTION_EMERGENCY), nullptr)));
triggers.push_back(new TriggerNode("frost ward", NextAction::array(0, new NextAction("frost ward", ACTION_EMERGENCY), nullptr)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
}
void MageCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)