Encourage hunter bots to use auto shot

This commit is contained in:
qudzy
2022-06-01 22:49:40 +02:00
parent 66e77e324d
commit 15e3e452d8
7 changed files with 49 additions and 2 deletions

View File

@@ -69,6 +69,7 @@ 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("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)));

View File

@@ -83,6 +83,7 @@ class HunterTriggerFactoryInternal : public NamedObjectContext<Trigger>
}
private:
static Trigger* auto_shot(PlayerbotAI* botAI) { return new AutoShotTrigger(botAI); }
static Trigger* scare_beast(PlayerbotAI* botAI) { return new ScareBeastTrigger(botAI); }
static Trigger* concussive_shot_on_snare_target(PlayerbotAI* botAI) { return new ConsussiveShotSnareTrigger(botAI); }
static Trigger* pet_not_happy(PlayerbotAI* botAI) { return new HunterPetNotHappy(botAI); }

View File

@@ -12,6 +12,14 @@ class PlayerbotAI;
BEGIN_TRIGGER(HunterNoStingsActiveTrigger, Trigger)
END_TRIGGER()
class AutoShotTrigger : public Trigger
{
public:
AutoShotTrigger(PlayerbotAI* botAI) : Trigger(botAI, "auto shot") { }
bool IsActive() override;
};
class HunterAspectOfTheHawkTrigger : public BuffTrigger
{
public: