mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Flee action, factory setting
This commit is contained in:
@@ -11,50 +11,14 @@ class DpsHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
DpsHunterStrategyActionNodeFactory()
|
||||
{
|
||||
creators["aimed shot"] = &aimed_shot;
|
||||
creators["chimera shot"] = &chimera_shot;
|
||||
creators["explosive shot"] = &explosive_shot;
|
||||
creators["concussive shot"] = &concussive_shot;
|
||||
creators["viper sting"] = &viper_sting;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* viper_sting([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("viper sting",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("mana potion", 10.0f), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* aimed_shot([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("aimed shot",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("chimera shot", 10.0f), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* chimera_shot([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("chimera shot",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("arcane shot", 10.0f), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* explosive_shot([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("explosive shot",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("aimed shot"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* concussive_shot([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("concussive shot",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("multi-shot", 10.0f), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
@@ -66,7 +30,16 @@ DpsHunterStrategy::DpsHunterStrategy(PlayerbotAI* botAI) : GenericHunterStrategy
|
||||
|
||||
NextAction** DpsHunterStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("explosive shot", 11.0f), new NextAction("auto shot", 10.0f), new NextAction("auto attack", 9.0f), nullptr);
|
||||
return NextAction::array(0,
|
||||
new NextAction("kill shot", 16.0f),
|
||||
new NextAction("chimera shot", 15.0f),
|
||||
new NextAction("explosive shot", 15.0f),
|
||||
new NextAction("aimed shot", 14.0f),
|
||||
new NextAction("arcane shot", 13.0f),
|
||||
new NextAction("steady shot", 12.0f),
|
||||
new NextAction("auto shot", 10.0f),
|
||||
NULL);
|
||||
// return NextAction::array(0, new NextAction("explosive shot", 11.0f), new NextAction("auto shot", 10.0f), new NextAction("auto attack", 9.0f), nullptr);
|
||||
}
|
||||
|
||||
void DpsHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
@@ -77,6 +50,8 @@ void DpsHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("viper sting", 23), nullptr)));
|
||||
triggers.push_back(new TriggerNode("hunter's mark", NextAction::array(0, new NextAction("hunter's mark", 19.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("concussive shot on snare target", NextAction::array(0, new NextAction("concussive shot", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("call pet", 21.0f), NULL)));
|
||||
triggers.push_back(new TriggerNode("hunters pet low health", NextAction::array(0, new NextAction("mend pet", 21.0f), NULL)));
|
||||
/*triggers.push_back(new TriggerNode("has aggro", NextAction::array(0, new NextAction("concussive shot", 20.0f), nullptr)));*/
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user