mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Hunter melee
This commit is contained in:
@@ -15,6 +15,7 @@ class GenericHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionN
|
||||
creators["aspect of the pack"] = &aspect_of_the_pack;
|
||||
creators["feign death"] = &feign_death;
|
||||
creators["wing clip"] = &wing_clip;
|
||||
creators["mongoose bite"] = &mongoose_bite;
|
||||
creators["raptor strike"] = &raptor_strike;
|
||||
}
|
||||
|
||||
@@ -46,6 +47,15 @@ class GenericHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionN
|
||||
static ActionNode* wing_clip([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("wing clip",
|
||||
/*P*/ nullptr,
|
||||
// /*A*/ NextAction::array(0, new NextAction("mongoose bite"), nullptr),
|
||||
nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* mongoose_bite([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("mongoose bite",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("raptor strike"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
@@ -70,12 +80,16 @@ void GenericHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
CombatStrategy::InitTriggers(triggers);
|
||||
|
||||
// triggers.push_back(new TriggerNode("enemy too close for auto shot", NextAction::array(0, new NextAction("switch to melee", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(new TriggerNode("enemy is close", NextAction::array(0, new NextAction("wing clip", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(new TriggerNode("enemy is close",
|
||||
NextAction::array(0,
|
||||
new NextAction("wing clip", ACTION_HIGH + 1),
|
||||
new NextAction("mongoose bite", ACTION_HIGH),
|
||||
nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium threat", NextAction::array(0, new NextAction("feign death", 35.0f), nullptr)));
|
||||
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), 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("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)));
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ bool CastScareBeastCcAction::Execute(Event event)
|
||||
|
||||
bool CastWingClipAction::isUseful()
|
||||
{
|
||||
return CastMeleeSpellAction::isUseful() && !botAI->HasAura(spell, GetTarget());
|
||||
return CastSpellAction::isUseful() && !botAI->HasAura(spell, GetTarget());
|
||||
}
|
||||
|
||||
NextAction** CastWingClipAction::getPrerequisites()
|
||||
@@ -67,7 +67,7 @@ NextAction** CastWingClipAction::getPrerequisites()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CastRaptorStrikeAction::isUseful()
|
||||
{
|
||||
return CastMeleeSpellAction::isUseful() && botAI->HasStrategy("close", BOT_STATE_COMBAT);
|
||||
}
|
||||
// bool CastRaptorStrikeAction::isUseful()
|
||||
// {
|
||||
// return CastMeleeSpellAction::isUseful() && botAI->HasStrategy("close", BOT_STATE_COMBAT);
|
||||
// }
|
||||
|
||||
@@ -179,21 +179,25 @@ class CastFreezingTrap : public CastDebuffSpellAction
|
||||
Value<Unit*>* GetTargetValue() override;
|
||||
};
|
||||
|
||||
class CastWingClipAction : public CastMeleeSpellAction
|
||||
class CastWingClipAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastWingClipAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "wing clip") { }
|
||||
CastWingClipAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "wing clip") { }
|
||||
|
||||
bool isUseful() override;
|
||||
NextAction** getPrerequisites() override;
|
||||
};
|
||||
|
||||
class CastRaptorStrikeAction : public CastMeleeSpellAction
|
||||
class CastRaptorStrikeAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastRaptorStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "raptor strike") { }
|
||||
CastRaptorStrikeAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "raptor strike") { }
|
||||
};
|
||||
|
||||
bool isUseful() override;
|
||||
class CastMongooseBiteAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastMongooseBiteAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "mongoose bite") { }
|
||||
};
|
||||
|
||||
class CastSerpentStingOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
||||
|
||||
@@ -151,6 +151,7 @@ class HunterAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
creators["feign death"] = &HunterAiObjectContextInternal::feign_death;
|
||||
creators["wing clip"] = &HunterAiObjectContextInternal::wing_clip;
|
||||
creators["raptor strike"] = &HunterAiObjectContextInternal::raptor_strike;
|
||||
creators["mongoose bite"] = &HunterAiObjectContextInternal::mongoose_bite;
|
||||
creators["feed pet"] = &HunterAiObjectContextInternal::feed_pet;
|
||||
creators["bestial wrath"] = &HunterAiObjectContextInternal::bestial_wrath;
|
||||
creators["scare beast"] = &HunterAiObjectContextInternal::scare_beast;
|
||||
@@ -199,6 +200,7 @@ class HunterAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
static Action* aspect_of_the_cheetah(PlayerbotAI* botAI) { return new CastAspectOfTheCheetahAction(botAI); }
|
||||
static Action* wing_clip(PlayerbotAI* botAI) { return new CastWingClipAction(botAI); }
|
||||
static Action* raptor_strike(PlayerbotAI* botAI) { return new CastRaptorStrikeAction(botAI); }
|
||||
static Action* mongoose_bite(PlayerbotAI* botAI) { return new CastMongooseBiteAction(botAI); }
|
||||
static Action* aspect_of_the_dragonhawk(PlayerbotAI* ai) { return new CastAspectOfTheDragonhawkAction(ai); }
|
||||
static Action* tranquilizing_shot(PlayerbotAI* ai) { return new CastTranquilizingShotAction(ai); }
|
||||
static Action* steady_shot(PlayerbotAI* ai) { return new CastSteadyShotAction(ai); }
|
||||
|
||||
Reference in New Issue
Block a user