mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
ranged and group heal
This commit is contained in:
@@ -10,5 +10,5 @@ void RangedCombatStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
|||||||
CombatStrategy::InitTriggers(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_HIGH), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_MOVE + 7), nullptr)));
|
// triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_MOVE + 7), nullptr)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,5 +38,5 @@ bool AoeHealTrigger::IsActive()
|
|||||||
bool AoeInGroupTrigger::IsActive()
|
bool AoeInGroupTrigger::IsActive()
|
||||||
{
|
{
|
||||||
Group *group = bot->GetGroup();
|
Group *group = bot->GetGroup();
|
||||||
return group && AI_VALUE2(uint8, "aoe heal", type) >= (group->GetMembersCount() * ratio);
|
return group && group->GetMembersCount() >= 5 && AI_VALUE2(uint8, "aoe heal", type) >= (group->GetMembersCount() * ratio);
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@ class GenericWarlockStrategyActionNodeFactory : public NamedObjectFactory<Action
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
GenericWarlockStrategy::GenericWarlockStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI)
|
GenericWarlockStrategy::GenericWarlockStrategy(PlayerbotAI* botAI) : RangedCombatStrategy(botAI)
|
||||||
{
|
{
|
||||||
actionNodeFactories.Add(new GenericWarlockStrategyActionNodeFactory());
|
actionNodeFactories.Add(new GenericWarlockStrategyActionNodeFactory());
|
||||||
}
|
}
|
||||||
@@ -43,14 +43,14 @@ NextAction** GenericWarlockStrategy::getDefaultActions()
|
|||||||
|
|
||||||
void GenericWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void GenericWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
{
|
{
|
||||||
CombatStrategy::InitTriggers(triggers);
|
RangedCombatStrategy::InitTriggers(triggers);
|
||||||
|
|
||||||
// triggers.push_back(new TriggerNode("shadow trance", NextAction::array(0, new NextAction("shadow bolt", 20.0f), nullptr)));
|
// triggers.push_back(new TriggerNode("shadow trance", NextAction::array(0, new NextAction("shadow bolt", 20.0f), nullptr)));
|
||||||
// triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("drain life", 40.0f), nullptr)));
|
// triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("drain life", 40.0f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("life tap", ACTION_EMERGENCY + 5), nullptr)));
|
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("life tap", ACTION_EMERGENCY + 5), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("target critical health", NextAction::array(0, new NextAction("drain soul", 30.0f), nullptr)));
|
triggers.push_back(new TriggerNode("target critical health", NextAction::array(0, new NextAction("drain soul", 30.0f), nullptr)));
|
||||||
// triggers.push_back(new TriggerNode("immolate", NextAction::array(0, new NextAction("immolate", 13.0f), new NextAction("conflagrate", 13.0f), nullptr)));
|
// triggers.push_back(new TriggerNode("immolate", NextAction::array(0, new NextAction("immolate", 13.0f), new NextAction("conflagrate", 13.0f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", 49.0f), NULL)));
|
// triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", 49.0f), NULL)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void WarlockBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void WarlockBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
#define _PLAYERBOT_GENERICWARLOCKSTRATEGY_H
|
#define _PLAYERBOT_GENERICWARLOCKSTRATEGY_H
|
||||||
|
|
||||||
#include "CombatStrategy.h"
|
#include "CombatStrategy.h"
|
||||||
|
#include "RangedCombatStrategy.h"
|
||||||
|
|
||||||
class PlayerbotAI;
|
class PlayerbotAI;
|
||||||
|
|
||||||
class GenericWarlockStrategy : public CombatStrategy
|
class GenericWarlockStrategy : public RangedCombatStrategy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GenericWarlockStrategy(PlayerbotAI* botAI);
|
GenericWarlockStrategy(PlayerbotAI* botAI);
|
||||||
|
|||||||
Reference in New Issue
Block a user