mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Naxx loatheb strategy
This commit is contained in:
@@ -31,10 +31,8 @@ class RaidNaxxActionContext : public NamedObjectContext<Action>
|
||||
// creators["horseman attract alternatively"] = &RaidNaxxActionContext::horseman_attract_alternatively;
|
||||
// creators["horseman attack in order"] = &RaidNaxxActionContext::horseman_attack_in_order;
|
||||
|
||||
// creators["sapphiron ground main tank position"] = &RaidNaxxActionContext::sapphiron_ground_main_tank_position;
|
||||
creators["sapphiron ground position"] = &RaidNaxxActionContext::sapphiron_ground_position;
|
||||
creators["sapphiron flight position"] = &RaidNaxxActionContext::sapphiron_flight_position;
|
||||
// creators["sapphiron avoid chill"] = &RaidNaxxActionContext::sapphiron_avoid_chill;
|
||||
|
||||
creators["kel'thuzad choose target"] = &RaidNaxxActionContext::kelthuzad_choose_target;
|
||||
creators["kel'thuzad position"] = &RaidNaxxActionContext::kelthuzad_position;
|
||||
@@ -46,8 +44,8 @@ class RaidNaxxActionContext : public NamedObjectContext<Action>
|
||||
creators["gluth position"] = &RaidNaxxActionContext::gluth_position;
|
||||
creators["gluth slowdown"] = &RaidNaxxActionContext::gluth_slowdown;
|
||||
|
||||
// creators["loatheb position"] = &RaidNaxxActionContext::loatheb_position;
|
||||
// creators["loatheb choose target"] = &RaidNaxxActionContext::loatheb_choose_target;
|
||||
creators["loatheb position"] = &RaidNaxxActionContext::loatheb_position;
|
||||
creators["loatheb choose target"] = &RaidNaxxActionContext::loatheb_choose_target;
|
||||
}
|
||||
private:
|
||||
static Action* go_behind_the_boss(PlayerbotAI* ai) { return new GrobbulusGoBehindAction(ai); }
|
||||
@@ -75,8 +73,8 @@ class RaidNaxxActionContext : public NamedObjectContext<Action>
|
||||
static Action* gluth_choose_target(PlayerbotAI* ai) { return new GluthChooseTargetAction(ai); }
|
||||
static Action* gluth_position(PlayerbotAI* ai) { return new GluthPositionAction(ai); }
|
||||
static Action* gluth_slowdown(PlayerbotAI* ai) { return new GluthSlowdownAction(ai); }
|
||||
// static Action* loatheb_position(PlayerbotAI* ai) { return new LoathebPositionAction(ai); }
|
||||
// static Action* loatheb_choose_target(PlayerbotAI* ai) { return new LoathebChooseTargetAction(ai); }
|
||||
static Action* loatheb_position(PlayerbotAI* ai) { return new LoathebPositionAction(ai); }
|
||||
static Action* loatheb_choose_target(PlayerbotAI* ai) { return new LoathebChooseTargetAction(ai); }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -991,56 +991,52 @@ bool GluthSlowdownAction::Execute(Event event)
|
||||
return false;
|
||||
}
|
||||
|
||||
// bool LoathebPositionAction::Execute(Event event)
|
||||
// {
|
||||
// Unit* boss = AI_VALUE2(Unit*, "find target", "loatheb");
|
||||
// if (!boss) {
|
||||
// return false;
|
||||
// }
|
||||
// if (botAI->IsTank(bot)) {
|
||||
// if (AI_VALUE2(bool, "has aggro", "boss target")) {
|
||||
// return MoveTo(533, 2877.57, -3967.00, bot->GetPositionZ());
|
||||
// }
|
||||
// } else if (botAI->IsRanged(bot)) {
|
||||
// return MoveInside(533, 2896.96f, -3980.61f, bot->GetPositionZ(), 1.0f);
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
bool LoathebPositionAction::Execute(Event event)
|
||||
{
|
||||
if (!helper.UpdateBossAI()) {
|
||||
return false;
|
||||
}
|
||||
if (botAI->IsTank(bot)) {
|
||||
if (AI_VALUE2(bool, "has aggro", "boss target")) {
|
||||
return MoveTo(533, helper.mainTankPos.first, helper.mainTankPos.second, bot->GetPositionZ());
|
||||
}
|
||||
} else if (botAI->IsRanged(bot)) {
|
||||
return MoveInside(533, helper.rangePos.first, helper.rangePos.second, bot->GetPositionZ(), 1.0f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// bool LoathebChooseTargetAction::Execute(Event event)
|
||||
// {
|
||||
// Unit* boss = AI_VALUE2(Unit*, "find target", "loatheb");
|
||||
// if (!boss) {
|
||||
// return false;
|
||||
// }
|
||||
// BossAI* boss_ai = dynamic_cast<BossAI*>(boss->GetAI());
|
||||
// EventMap* eventMap = boss_botAI->GetEvents();
|
||||
// list<ObjectGuid> attackers = context->GetValue<list<ObjectGuid> >("attackers")->Get();
|
||||
// Unit* target = nullptr;
|
||||
// Unit *target_boss = nullptr;
|
||||
// Unit *target_spore = nullptr;
|
||||
// for (list<ObjectGuid>::iterator i = attackers.begin(); i != attackers.end(); ++i)
|
||||
// {
|
||||
// Unit* unit = botAI->GetUnit(*i);
|
||||
// if (!unit)
|
||||
// continue;
|
||||
// if (!unit->IsAlive()) {
|
||||
// continue;
|
||||
// }
|
||||
// if (botAI->EqualLowercaseName(unit->GetName(), "spore")) {
|
||||
// target_spore = unit;
|
||||
// }
|
||||
// if (botAI->EqualLowercaseName(unit->GetName(), "loatheb")) {
|
||||
// target_boss = unit;
|
||||
// }
|
||||
// }
|
||||
// if (target_spore && bot->GetDistance2d(target_spore) <= 1.0f) {
|
||||
// target = target_spore;
|
||||
// } else {
|
||||
// target = target_boss;
|
||||
// }
|
||||
// if (!target || context->GetValue<Unit*>("current target")->Get() == target) {
|
||||
// return false;
|
||||
// }
|
||||
// return Attack(target);
|
||||
// }
|
||||
bool LoathebChooseTargetAction::Execute(Event event)
|
||||
{
|
||||
if (!helper.UpdateBossAI()) {
|
||||
return false;
|
||||
}
|
||||
GuidVector attackers = context->GetValue<GuidVector>("attackers")->Get();
|
||||
Unit* target = nullptr;
|
||||
Unit *target_boss = nullptr;
|
||||
Unit *target_spore = nullptr;
|
||||
for (auto i = attackers.begin(); i != attackers.end(); ++i)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(*i);
|
||||
if (!unit)
|
||||
continue;
|
||||
if (!unit->IsAlive()) {
|
||||
continue;
|
||||
}
|
||||
if (botAI->EqualLowercaseName(unit->GetName(), "spore")) {
|
||||
target_spore = unit;
|
||||
}
|
||||
if (botAI->EqualLowercaseName(unit->GetName(), "loatheb")) {
|
||||
target_boss = unit;
|
||||
}
|
||||
}
|
||||
if (target_spore && bot->GetDistance2d(target_spore) <= 1.0f) {
|
||||
target = target_spore;
|
||||
} else {
|
||||
target = target_boss;
|
||||
}
|
||||
if (!target || context->GetValue<Unit*>("current target")->Get() == target) {
|
||||
return false;
|
||||
}
|
||||
return Attack(target);
|
||||
}
|
||||
@@ -256,19 +256,23 @@ class GluthSlowdownAction : public Action
|
||||
GluthBossHelper helper;
|
||||
};
|
||||
|
||||
// class LoathebPositionAction : public MovementAction
|
||||
// {
|
||||
// public:
|
||||
// LoathebPositionAction(PlayerbotAI* ai) : MovementAction(ai, "loatheb position") {}
|
||||
// virtual bool Execute(Event event);
|
||||
// };
|
||||
class LoathebPositionAction : public MovementAction
|
||||
{
|
||||
public:
|
||||
LoathebPositionAction(PlayerbotAI* ai) : MovementAction(ai, "loatheb position"), helper(ai) {}
|
||||
virtual bool Execute(Event event);
|
||||
private:
|
||||
LoathebBossHelper helper;
|
||||
};
|
||||
|
||||
// class LoathebChooseTargetAction : public AttackAction
|
||||
// {
|
||||
// public:
|
||||
// LoathebChooseTargetAction(PlayerbotAI* ai) : AttackAction(ai, "loatheb choose target") {}
|
||||
// virtual bool Execute(Event event);
|
||||
// };
|
||||
class LoathebChooseTargetAction : public AttackAction
|
||||
{
|
||||
public:
|
||||
LoathebChooseTargetAction(PlayerbotAI* ai) : AttackAction(ai, "loatheb choose target"), helper(ai) {}
|
||||
virtual bool Execute(Event event);
|
||||
private:
|
||||
LoathebBossHelper helper;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -20,39 +20,39 @@ const uint32 NAXX_MAP_ID = 533;
|
||||
template<class BossAiType>
|
||||
class GenericBossHelper : public AiObject {
|
||||
public:
|
||||
GenericBossHelper(PlayerbotAI* botAI, std::string name): AiObject(botAI), name_(name) {}
|
||||
GenericBossHelper(PlayerbotAI* botAI, std::string name): AiObject(botAI), _name(name) {}
|
||||
virtual bool UpdateBossAI() {
|
||||
if(unit_ && (!unit_->IsInWorld() || !unit_->IsAlive())) {
|
||||
unit_ = nullptr;
|
||||
if(_unit && (!_unit->IsInWorld() || !_unit->IsAlive())) {
|
||||
_unit = nullptr;
|
||||
}
|
||||
if (!unit_) {
|
||||
unit_ = AI_VALUE2(Unit*, "find target", name_);
|
||||
if (!unit_) {
|
||||
if (!_unit) {
|
||||
_unit = AI_VALUE2(Unit*, "find target", _name);
|
||||
if (!_unit) {
|
||||
return false;
|
||||
}
|
||||
target_ = unit_->ToCreature();
|
||||
if (!target_) {
|
||||
_target = _unit->ToCreature();
|
||||
if (!_target) {
|
||||
return false;
|
||||
}
|
||||
ai_ = dynamic_cast<BossAiType *>(target_->GetAI());
|
||||
if (!ai_) {
|
||||
_ai = dynamic_cast<BossAiType *>(_target->GetAI());
|
||||
if (!_ai) {
|
||||
return false;
|
||||
}
|
||||
event_map_ = &ai_->events;
|
||||
if (!event_map_) {
|
||||
_event_map = &_ai->events;
|
||||
if (!_event_map) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
timer_ = event_map_->GetTimer();
|
||||
_timer = _event_map->GetTimer();
|
||||
return true;
|
||||
}
|
||||
protected:
|
||||
Unit* unit_ = nullptr;
|
||||
Creature* target_ = nullptr;
|
||||
std::string name_ = nullptr;
|
||||
BossAiType *ai_ = nullptr;
|
||||
EventMap* event_map_ = nullptr;
|
||||
uint32 timer_ = 0;
|
||||
Unit* _unit = nullptr;
|
||||
Creature* _target = nullptr;
|
||||
std::string _name = nullptr;
|
||||
BossAiType *_ai = nullptr;
|
||||
EventMap* _event_map = nullptr;
|
||||
uint32 _timer = 0;
|
||||
};
|
||||
|
||||
class KelthuzadBossHelper: public GenericBossHelper<boss_kelthuzad::boss_kelthuzadAI> {
|
||||
@@ -62,7 +62,7 @@ class KelthuzadBossHelper: public GenericBossHelper<boss_kelthuzad::boss_kelthuz
|
||||
const std::pair<float, float> tank_pos = {3709.19f, -5104.86f};
|
||||
const std::pair<float, float> assist_tank_pos = {3746.05f, -5112.74f};
|
||||
bool IsPhaseOne() {
|
||||
return event_map_->GetNextEventTime(KELTHUZAD_EVENT_PHASE_2) != 0;
|
||||
return _event_map->GetNextEventTime(KELTHUZAD_EVENT_PHASE_2) != 0;
|
||||
}
|
||||
bool IsPhaseTwo() {
|
||||
return !IsPhaseOne();
|
||||
@@ -98,22 +98,22 @@ class SapphironBossHelper: public GenericBossHelper<boss_sapphiron::boss_sapphir
|
||||
if (!GenericBossHelper::UpdateBossAI()) {
|
||||
return false;
|
||||
}
|
||||
uint32 nextEventGround = event_map_->GetNextEventTime(EVENT_GROUND);
|
||||
uint32 nextEventGround = _event_map->GetNextEventTime(EVENT_GROUND);
|
||||
if (nextEventGround && nextEventGround != lastEventGround)
|
||||
lastEventGround = nextEventGround;
|
||||
return true;
|
||||
}
|
||||
bool IsPhaseGround() {
|
||||
return target_->GetReactState() == REACT_AGGRESSIVE;
|
||||
return _target->GetReactState() == REACT_AGGRESSIVE;
|
||||
}
|
||||
bool IsPhaseFlight() {
|
||||
return !IsPhaseGround();
|
||||
}
|
||||
bool JustLanded() {
|
||||
return (event_map_->GetNextEventTime(EVENT_FLIGHT_START) - timer_) >= EVENT_FLIGHT_INTERVAL - POSITION_TIME_AFTER_LANDED;
|
||||
return (_event_map->GetNextEventTime(EVENT_FLIGHT_START) - _timer) >= EVENT_FLIGHT_INTERVAL - POSITION_TIME_AFTER_LANDED;
|
||||
}
|
||||
bool WaitForExplosion() {
|
||||
return event_map_->GetNextEventTime(EVENT_FLIGHT_SPELL_EXPLOSION);
|
||||
return _event_map->GetNextEventTime(EVENT_FLIGHT_SPELL_EXPLOSION);
|
||||
}
|
||||
bool FindPosToAvoidChill(std::vector<float> &dest) {
|
||||
Aura* aura = botAI->GetAura("chill", bot);
|
||||
@@ -172,12 +172,19 @@ class GluthBossHelper: public GenericBossHelper<boss_gluth::boss_gluthAI> {
|
||||
const float decimatedZombiePct = 10.0f;
|
||||
GluthBossHelper(PlayerbotAI *botAI): GenericBossHelper(botAI, "gluth") {}
|
||||
bool BeforeDecimate() {
|
||||
uint32 decimate = event_map_->GetNextEventTime(GLUTH_EVENT_DECIMATE);
|
||||
return decimate && decimate - timer_ <= 3000;
|
||||
uint32 decimate = _event_map->GetNextEventTime(GLUTH_EVENT_DECIMATE);
|
||||
return decimate && decimate - _timer <= 3000;
|
||||
}
|
||||
bool JustStartCombat() {
|
||||
return timer_ < 10000;
|
||||
return _timer < 10000;
|
||||
}
|
||||
};
|
||||
|
||||
class LoathebBossHelper: public GenericBossHelper<boss_loatheb::boss_loathebAI> {
|
||||
public:
|
||||
const std::pair<float, float> mainTankPos = {2877.57f, -3967.00f};
|
||||
const std::pair<float, float> rangePos = {2896.96f, -3980.61f};
|
||||
LoathebBossHelper(PlayerbotAI *botAI): GenericBossHelper(botAI, "loatheb") {}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -56,31 +56,29 @@ float HeiganDanceMultiplier::GetValue(Action* action)
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
// float LoathebGenericMultiplier::GetValue(Action* action)
|
||||
// {
|
||||
// Unit* boss = AI_VALUE2(Unit*, "find target", "loatheb");
|
||||
// if (!boss) {
|
||||
// // bot->Yell("Can\'t find Loatheb...", LANG_UNIVERSAL);
|
||||
// return 1.0f;
|
||||
// }
|
||||
// context->GetValue<bool>("neglect threat")->Set(true);
|
||||
// if (botAI->GetCurrentState() == BOT_STATE_COMBAT &&
|
||||
// (dynamic_cast<DpsAssistAction*>(action) ||
|
||||
// dynamic_cast<TankAssistAction*>(action) ||
|
||||
// dynamic_cast<CastDebuffSpellOnAttackerAction*>(action) ||
|
||||
// dynamic_cast<FleeAction*>(action))) {
|
||||
// return 0.0f;
|
||||
// }
|
||||
// if (!dynamic_cast<CastHealingSpellAction*>(action)) {
|
||||
// return 1.0f;
|
||||
// }
|
||||
// // bot->Yell("It\'s a healing spell!", LANG_UNIVERSAL);
|
||||
// Aura* aura = botAI->GetAura("necrotic aura", bot);
|
||||
// if (!aura || aura->GetDuration() <= 1500) {
|
||||
// return 1.0f;
|
||||
// }
|
||||
// return 0.0f;
|
||||
// }
|
||||
float LoathebGenericMultiplier::GetValue(Action* action)
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "loatheb");
|
||||
if (!boss) {
|
||||
return 1.0f;
|
||||
}
|
||||
context->GetValue<bool>("neglect threat")->Set(true);
|
||||
if (botAI->GetState() == BOT_STATE_COMBAT &&
|
||||
(dynamic_cast<DpsAssistAction*>(action) ||
|
||||
dynamic_cast<TankAssistAction*>(action) ||
|
||||
dynamic_cast<CastDebuffSpellOnAttackerAction*>(action) ||
|
||||
dynamic_cast<FleeAction*>(action))) {
|
||||
return 0.0f;
|
||||
}
|
||||
if (!dynamic_cast<CastHealingSpellAction*>(action)) {
|
||||
return 1.0f;
|
||||
}
|
||||
Aura* aura = botAI->GetAura("necrotic aura", bot);
|
||||
if (!aura || aura->GetDuration() <= 1500) {
|
||||
return 1.0f;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
// float ThaddiusGenericMultiplier::GetValue(Action* action)
|
||||
// {
|
||||
|
||||
@@ -14,14 +14,14 @@ public:
|
||||
virtual float GetValue(Action* action);
|
||||
};
|
||||
|
||||
// class LoathebGenericMultiplier : public Multiplier
|
||||
// {
|
||||
// public:
|
||||
// LoathebGenericMultiplier(PlayerbotAI* ai) : Multiplier(ai, "loatheb generic") {}
|
||||
class LoathebGenericMultiplier : public Multiplier
|
||||
{
|
||||
public:
|
||||
LoathebGenericMultiplier(PlayerbotAI* ai) : Multiplier(ai, "loatheb generic") {}
|
||||
|
||||
// public:
|
||||
// virtual float GetValue(Action* action);
|
||||
// };
|
||||
public:
|
||||
virtual float GetValue(Action* action);
|
||||
};
|
||||
|
||||
// class ThaddiusGenericMultiplier : public Multiplier
|
||||
// {
|
||||
|
||||
@@ -6,29 +6,29 @@ void RaidNaxxStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
{
|
||||
// triggers.push_back(new TriggerNode(
|
||||
// "often",
|
||||
// NextAction::array(0, new NextAction("try to get boss ai", ACTION_RAID), NULL)));
|
||||
// NextAction::array(0, new NextAction("try to get boss ai", ACTION_RAID), nullptr)));
|
||||
|
||||
// Grobbulus
|
||||
triggers.push_back(new TriggerNode(
|
||||
"mutating injection",
|
||||
NextAction::array(0, new NextAction("grobbulus go behind the boss", ACTION_RAID + 2), NULL)));
|
||||
NextAction::array(0, new NextAction("grobbulus go behind the boss", ACTION_RAID + 2), nullptr)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"mutating injection removed",
|
||||
NextAction::array(0, new NextAction("grobbulus move center", ACTION_RAID + 1), NULL)));
|
||||
NextAction::array(0, new NextAction("grobbulus move center", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"grobbulus cloud",
|
||||
NextAction::array(0, new NextAction("rotate grobbulus", ACTION_RAID + 1), NULL)));
|
||||
NextAction::array(0, new NextAction("rotate grobbulus", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
// Heigan the Unclean
|
||||
triggers.push_back(new TriggerNode(
|
||||
"heigan melee",
|
||||
NextAction::array(0, new NextAction("heigan dance melee", ACTION_RAID + 1), NULL)));
|
||||
NextAction::array(0, new NextAction("heigan dance melee", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"heigan ranged",
|
||||
NextAction::array(0, new NextAction("heigan dance ranged", ACTION_RAID + 1), NULL)));
|
||||
NextAction::array(0, new NextAction("heigan dance ranged", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
// Kel'Thuzad
|
||||
triggers.push_back(new TriggerNode(
|
||||
@@ -36,7 +36,7 @@ void RaidNaxxStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
NextAction::array(0,
|
||||
new NextAction("kel'thuzad position", ACTION_RAID + 2),
|
||||
new NextAction("kel'thuzad choose target", ACTION_RAID + 1),
|
||||
NULL)));
|
||||
nullptr)));
|
||||
|
||||
// Anub'Rekhan
|
||||
triggers.push_back(new TriggerNode(
|
||||
@@ -44,7 +44,7 @@ void RaidNaxxStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
NextAction::array(0,
|
||||
// new NextAction("anub'rekhan choose target", ACTION_RAID + 1),
|
||||
new NextAction("anub'rekhan position", ACTION_RAID + 1),
|
||||
NULL)));
|
||||
nullptr)));
|
||||
|
||||
// Thaddius
|
||||
// triggers.push_back(new TriggerNode(
|
||||
@@ -53,50 +53,46 @@ void RaidNaxxStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
// new NextAction("thaddius attack nearest pet", ACTION_RAID + 1),
|
||||
// new NextAction("thaddius melee to place", ACTION_RAID),
|
||||
// new NextAction("thaddius ranged to place", ACTION_RAID),
|
||||
// NULL)));
|
||||
// nullptr)));
|
||||
|
||||
// triggers.push_back(new TriggerNode(
|
||||
// "thaddius phase pet lose aggro",
|
||||
// NextAction::array(0, new NextAction("taunt spell", ACTION_RAID + 2), NULL)));
|
||||
// NextAction::array(0, new NextAction("taunt spell", ACTION_RAID + 2), nullptr)));
|
||||
|
||||
// triggers.push_back(new TriggerNode(
|
||||
// "thaddius phase transition",
|
||||
// NextAction::array(0, new NextAction("thaddius move to platform", ACTION_RAID + 1), NULL)));
|
||||
// NextAction::array(0, new NextAction("thaddius move to platform", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
// triggers.push_back(new TriggerNode(
|
||||
// "thaddius phase thaddius",
|
||||
// NextAction::array(0, new NextAction("thaddius move polarity", ACTION_RAID + 1), NULL)));
|
||||
// NextAction::array(0, new NextAction("thaddius move polarity", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
// Instructor Razuvious
|
||||
triggers.push_back(new TriggerNode(
|
||||
"razuvious tank",
|
||||
NextAction::array(0, new NextAction("razuvious use obedience crystal", ACTION_RAID + 1), NULL)));
|
||||
NextAction::array(0, new NextAction("razuvious use obedience crystal", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"razuvious nontank",
|
||||
NextAction::array(0, new NextAction("razuvious target", ACTION_RAID + 1), NULL)));
|
||||
NextAction::array(0, new NextAction("razuvious target", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
// // four horseman
|
||||
// triggers.push_back(new TriggerNode(
|
||||
// "horseman attractors",
|
||||
// NextAction::array(0, new NextAction("horseman attract alternatively", ACTION_RAID + 1), NULL)));
|
||||
// NextAction::array(0, new NextAction("horseman attract alternatively", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
// triggers.push_back(new TriggerNode(
|
||||
// "horseman except attractors",
|
||||
// NextAction::array(0, new NextAction("horseman attack in order", ACTION_RAID + 1), NULL)));
|
||||
// NextAction::array(0, new NextAction("horseman attack in order", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
// sapphiron
|
||||
triggers.push_back(new TriggerNode(
|
||||
"sapphiron ground",
|
||||
NextAction::array(0, new NextAction("sapphiron ground position", ACTION_RAID + 1), NULL)));
|
||||
NextAction::array(0, new NextAction("sapphiron ground position", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"sapphiron flight",
|
||||
NextAction::array(0, new NextAction("sapphiron flight position", ACTION_RAID + 1), NULL)));
|
||||
|
||||
// triggers.push_back(new TriggerNode(
|
||||
// "sapphiron chill",
|
||||
// NextAction::array(0, new NextAction("sapphiron avoid chill", ACTION_RAID + 1), NULL)));
|
||||
NextAction::array(0, new NextAction("sapphiron flight position", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
// Gluth
|
||||
triggers.push_back(new TriggerNode(
|
||||
@@ -105,26 +101,26 @@ void RaidNaxxStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
new NextAction("gluth choose target", ACTION_RAID + 1),
|
||||
new NextAction("gluth position", ACTION_RAID + 1),
|
||||
new NextAction("gluth slowdown", ACTION_RAID),
|
||||
NULL)));
|
||||
nullptr)));
|
||||
|
||||
triggers.push_back(new TriggerNode(
|
||||
"gluth main tank mortal wound",
|
||||
NextAction::array(0,
|
||||
new NextAction("taunt spell", ACTION_RAID + 1), NULL)));
|
||||
new NextAction("taunt spell", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
// // Loatheb
|
||||
// triggers.push_back(new TriggerNode(
|
||||
// "loatheb",
|
||||
// NextAction::array(0,
|
||||
// new NextAction("loatheb position", ACTION_RAID + 1),
|
||||
// new NextAction("loatheb choose target", ACTION_RAID + 1),
|
||||
// NULL)));
|
||||
// Loatheb
|
||||
triggers.push_back(new TriggerNode(
|
||||
"loatheb",
|
||||
NextAction::array(0,
|
||||
new NextAction("loatheb position", ACTION_RAID + 1),
|
||||
new NextAction("loatheb choose target", ACTION_RAID + 1),
|
||||
nullptr)));
|
||||
}
|
||||
|
||||
void RaidNaxxStrategy::InitMultipliers(std::vector<Multiplier*> &multipliers)
|
||||
{
|
||||
multipliers.push_back(new HeiganDanceMultiplier(botAI));
|
||||
// multipliers.push_back(new LoathebGenericMultiplier(botAI));
|
||||
multipliers.push_back(new LoathebGenericMultiplier(botAI));
|
||||
// multipliers.push_back(new ThaddiusGenericMultiplier(botAI));
|
||||
multipliers.push_back(new SapphironGenericMultiplier(botAI));
|
||||
multipliers.push_back(new InstructorRazuviousGenericMultiplier(botAI));
|
||||
|
||||
@@ -35,14 +35,13 @@ class RaidNaxxTriggerContext : public NamedObjectContext<Trigger>
|
||||
creators["sapphiron flight"] = &RaidNaxxTriggerContext::sapphiron_flight;
|
||||
|
||||
creators["kel'thuzad"] = &RaidNaxxTriggerContext::kelthuzad;
|
||||
// creators["kel'thuzad phase two"] = &RaidNaxxTriggerContext::kelthuzad_phase_two;
|
||||
|
||||
creators["anub'rekhan"] = &RaidNaxxTriggerContext::anubrekhan;
|
||||
|
||||
creators["gluth"] = &RaidNaxxTriggerContext::gluth;
|
||||
creators["gluth main tank mortal wound"] = &RaidNaxxTriggerContext::gluth_main_tank_mortal_wound;
|
||||
|
||||
// creators["loatheb"] = &RaidNaxxTriggerContext::loatheb;
|
||||
creators["loatheb"] = &RaidNaxxTriggerContext::loatheb;
|
||||
}
|
||||
private:
|
||||
static Trigger* mutating_injection(PlayerbotAI* ai) { return new MutatingInjectionTrigger(ai); }
|
||||
@@ -61,14 +60,11 @@ class RaidNaxxTriggerContext : public NamedObjectContext<Trigger>
|
||||
// static Trigger* horseman_except_attractors(PlayerbotAI* ai) { return new HorsemanExceptAttractorsTrigger(ai); }
|
||||
static Trigger* sapphiron_ground(PlayerbotAI* ai) { return new SapphironGroundTrigger(ai); }
|
||||
static Trigger* sapphiron_flight(PlayerbotAI* ai) { return new SapphironFlightTrigger(ai); }
|
||||
// static Trigger* sapphiron_ground_except_main_tank(PlayerbotAI* ai) { return new SapphironGroundExceptMainTankTrigger(ai); }
|
||||
// static Trigger* sapphiron_ground_chill(PlayerbotAI* ai) { return new SapphironGroundChillTrigger(ai); }
|
||||
static Trigger* kelthuzad(PlayerbotAI* ai) { return new KelthuzadTrigger(ai); }
|
||||
// static Trigger* kelthuzad_phase_two(PlayerbotAI* ai) { return new KelthuzadPhaseTwoTrigger(ai); }
|
||||
static Trigger* anubrekhan(PlayerbotAI* ai) { return new AnubrekhanTrigger(ai); }
|
||||
static Trigger* gluth(PlayerbotAI* ai) { return new GluthTrigger(ai); }
|
||||
static Trigger* gluth_main_tank_mortal_wound(PlayerbotAI* ai) { return new GluthMainTankMortalWoundTrigger(ai); }
|
||||
// static Trigger* loatheb(PlayerbotAI* ai) { return new LoathebTrigger(ai); }
|
||||
static Trigger* loatheb(PlayerbotAI* ai) { return new LoathebTrigger(ai); }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -187,5 +187,10 @@ bool KelthuzadTrigger::IsActive()
|
||||
return helper.UpdateBossAI();
|
||||
}
|
||||
|
||||
bool LoathebTrigger::IsActive()
|
||||
{
|
||||
return helper.UpdateBossAI();
|
||||
}
|
||||
|
||||
template bool BossEventTrigger<boss_grobbulus::boss_grobbulusAI>::IsActive();
|
||||
template bool BossPhaseTrigger<boss_anubrekhan::boss_anubrekhanAI>::IsActive();
|
||||
@@ -215,11 +215,14 @@ class GluthMainTankMortalWoundTrigger : public Trigger
|
||||
GluthBossHelper helper;
|
||||
};
|
||||
|
||||
// class LoathebTrigger : public BossPhaseTrigger
|
||||
// {
|
||||
// public:
|
||||
// LoathebTrigger(PlayerbotAI* ai) : BossPhaseTrigger(ai, "loatheb", 0, "loatheb trigger") {}
|
||||
// };
|
||||
class LoathebTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
LoathebTrigger(PlayerbotAI* ai) : Trigger(ai, "loatheb"), helper(ai) {}
|
||||
bool IsActive() override;
|
||||
private:
|
||||
LoathebBossHelper helper;
|
||||
};
|
||||
|
||||
|
||||
// template BossEventTrigger<class boss_grobbulus::boss_grobbulusAI>;
|
||||
|
||||
Reference in New Issue
Block a user