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

@@ -124,7 +124,7 @@ void CasterDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode("eclipse (solar) cooldown", NextAction::array(0, new NextAction("wrath", ACTION_NORMAL + 2), nullptr)));
triggers.push_back(new TriggerNode("moonfire", NextAction::array(0, new NextAction("moonfire", ACTION_NORMAL + 4), nullptr)));
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 9), NULL)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
triggers.push_back(new TriggerNode(
"party member remove curse",
NextAction::array(0, new NextAction("remove curse on party", ACTION_DISPEL + 7), NULL)));

View File

@@ -76,5 +76,5 @@ void HealDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
"medium mana",
NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 5), NULL)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
}

View File

@@ -9,6 +9,6 @@ void RangedCombatStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
{
CombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
// triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_MOVE + 7), nullptr)));
}

View File

@@ -89,7 +89,7 @@ void GenericHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode("hunters pet low health", NextAction::array(0, new NextAction("mend pet", ACTION_HIGH + 2), nullptr)));
// triggers.push_back(new TriggerNode("no ammo", NextAction::array(0, new NextAction("switch to melee", ACTION_HIGH + 1), new NextAction("say::no ammo", ACTION_HIGH), nullptr)));
triggers.push_back(new TriggerNode("aspect of the viper", NextAction::array(0, new NextAction("aspect of the viper", ACTION_HIGH), NULL)));
triggers.push_back(new TriggerNode("enemy too close for shoot", NextAction::array(0, new NextAction("flee", ACTION_HIGH + 3), nullptr)));
triggers.push_back(new TriggerNode("enemy too close for shoot", NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
triggers.push_back(new TriggerNode("misdirection on main tank", NextAction::array(0, new NextAction("misdirection on main tank", ACTION_HIGH + 7), NULL)));
triggers.push_back(new TriggerNode("tranquilizing shot", NextAction::array(0, new NextAction("tranquilizing shot", 61.0f), NULL)));

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)

View File

@@ -6,17 +6,18 @@
#define _PLAYERBOT_GENERICMAGESTRATEGY_H
#include "CombatStrategy.h"
#include "RangedCombatStrategy.h"
class PlayerbotAI;
class GenericMageStrategy : public CombatStrategy
class GenericMageStrategy : public RangedCombatStrategy
{
public:
GenericMageStrategy(PlayerbotAI* botAI);
std::string const getName() override { return "mage"; }
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
uint32 GetType() const override { return CombatStrategy::GetType() | STRATEGY_TYPE_RANGED | STRATEGY_TYPE_DPS; }
uint32 GetType() const override { return RangedCombatStrategy::GetType() | STRATEGY_TYPE_RANGED | STRATEGY_TYPE_DPS; }
};
class MageCureStrategy : public Strategy

View File

@@ -72,5 +72,4 @@ void HealPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
"sacred shield on main tank",
NextAction::array(0, new NextAction("sacred shield on main tank", ACTION_CRITICAL_HEAL + 6), NULL)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
}

View File

@@ -44,7 +44,7 @@ void GenericPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
"low mana",
NextAction::array(0, new NextAction("hymn of hope", ACTION_HIGH), NULL)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("apply oil", 1.0f), nullptr)));
}

View File

@@ -60,7 +60,7 @@ void CasterShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
// new NextAction("fire elemental totem", 16.0f),
new NextAction("totem of wrath", 15.0f), NULL)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
}
void CasterAoeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)

View File

@@ -93,7 +93,7 @@ void HealShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
"earth shield on main tank",
NextAction::array(0, new NextAction("earth shield on main tank", ACTION_HIGH + 7), NULL)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
triggers.push_back(new TriggerNode(
"medium mana",