Avoid aoe base

This commit is contained in:
Yunfan Li
2024-04-12 00:32:07 +08:00
parent 044c0980c9
commit 10799e689c
8 changed files with 49 additions and 9 deletions

View File

@@ -88,6 +88,7 @@ class ActionContext : public NamedObjectContext<Action>
creators["reach party member to resurrect"] = &ActionContext::reach_party_member_to_resurrect;
creators["flee"] = &ActionContext::flee;
creators["flee with pet"] = &ActionContext::flee_with_pet;
creators["avoid aoe"] = &ActionContext::avoid_aoe;
creators["gift of the naaru"] = &ActionContext::gift_of_the_naaru;
creators["shoot"] = &ActionContext::shoot;
creators["lifeblood"] = &ActionContext::lifeblood;
@@ -263,6 +264,7 @@ class ActionContext : public NamedObjectContext<Action>
static Action* reach_party_member_to_resurrect(PlayerbotAI* botAI) { return new ReachPartyMemberToResurrectAction(botAI); }
static Action* flee(PlayerbotAI* botAI) { return new FleeAction(botAI); }
static Action* flee_with_pet(PlayerbotAI* botAI) { return new FleeWithPetAction(botAI); }
static Action* avoid_aoe(PlayerbotAI* botAI) { return new AvoidAoeAction(botAI); }
static Action* gift_of_the_naaru(PlayerbotAI* botAI) { return new CastGiftOfTheNaaruAction(botAI); }
static Action* lifeblood(PlayerbotAI* botAI) { return new CastLifeBloodAction(botAI); }
static Action* arcane_torrent(PlayerbotAI* botAI) { return new CastArcaneTorrentAction(botAI); }

View File

@@ -1482,6 +1482,16 @@ bool FleeWithPetAction::Execute(Event event)
return Flee(AI_VALUE(Unit*, "current target"));
}
bool AvoidAoeAction::isUseful()
{
return false;
}
bool AvoidAoeAction::Execute(Event event)
{
return false;
}
bool RunAwayAction::Execute(Event event)
{
return Flee(AI_VALUE(Unit*, "master target"));

View File

@@ -66,11 +66,20 @@ class FleeWithPetAction : public MovementAction
bool Execute(Event event) override;
};
class AvoidAoeAction : public MovementAction
{
public:
AvoidAoeAction(PlayerbotAI* botAI) : MovementAction(botAI, "avoid aoe") { }
bool isUseful() override;
bool Execute(Event event) override;
};
class RunAwayAction : public MovementAction
{
public:
RunAwayAction(PlayerbotAI* botAI) : MovementAction(botAI, "runaway") { }
bool Execute(Event event) override;
};