mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-29 16:33:46 +00:00
[HOT FIX] MS build issues regarding folder / command lenght usage or rc.exe (#2038)
This commit is contained in:
215
src/Ai/Raid/MoltenCore/Action/RaidMcActions.cpp
Normal file
215
src/Ai/Raid/MoltenCore/Action/RaidMcActions.cpp
Normal file
@@ -0,0 +1,215 @@
|
||||
#include "RaidMcActions.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
#include "RtiTargetValue.h"
|
||||
#include "RaidMcTriggers.h"
|
||||
#include "RaidMcHelpers.h"
|
||||
|
||||
static constexpr float LIVING_BOMB_DISTANCE = 20.0f;
|
||||
static constexpr float INFERNO_DISTANCE = 20.0f;
|
||||
|
||||
// don't get hit by Arcane Explosion but still be in casting range
|
||||
static constexpr float ARCANE_EXPLOSION_DISTANCE = 26.0f;
|
||||
|
||||
// dedicated tank positions; prevents assist tanks from positioning Core Ragers on steep walls on pull
|
||||
static const Position GOLEMAGG_TANK_POSITION{795.7308, -994.8848, -207.18661};
|
||||
static const Position CORE_RAGER_TANK_POSITION{846.6453, -1019.0639, -198.9819};
|
||||
|
||||
static constexpr float GOLEMAGGS_TRUST_DISTANCE = 30.0f;
|
||||
static constexpr float CORE_RAGER_STEP_DISTANCE = 5.0f;
|
||||
|
||||
using namespace MoltenCoreHelpers;
|
||||
|
||||
bool McMoveFromGroupAction::Execute(Event event)
|
||||
{
|
||||
return MoveFromGroup(LIVING_BOMB_DISTANCE);
|
||||
}
|
||||
|
||||
bool McMoveFromBaronGeddonAction::Execute(Event event)
|
||||
{
|
||||
if (Unit* boss = AI_VALUE2(Unit*, "find target", "baron geddon"))
|
||||
{
|
||||
float distToTravel = INFERNO_DISTANCE - bot->GetDistance2d(boss);
|
||||
if (distToTravel > 0)
|
||||
{
|
||||
// Stop current spell first
|
||||
bot->AttackStop();
|
||||
bot->InterruptNonMeleeSpells(false);
|
||||
|
||||
return MoveAway(boss, distToTravel);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool McShazzrahMoveAwayAction::Execute(Event event)
|
||||
{
|
||||
if (Unit* boss = AI_VALUE2(Unit*, "find target", "shazzrah"))
|
||||
{
|
||||
float distToTravel = ARCANE_EXPLOSION_DISTANCE - bot->GetDistance2d(boss);
|
||||
if (distToTravel > 0)
|
||||
return MoveAway(boss, distToTravel);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool McGolemaggMarkBossAction::Execute(Event event)
|
||||
{
|
||||
if (Unit* boss = AI_VALUE2(Unit*, "find target", "golemagg the incinerator"))
|
||||
{
|
||||
if (Group* group = bot->GetGroup())
|
||||
{
|
||||
ObjectGuid currentSkullGuid = group->GetTargetIcon(RtiTargetValue::skullIndex);
|
||||
if (currentSkullGuid.IsEmpty() || currentSkullGuid != boss->GetGUID())
|
||||
{
|
||||
group->SetTargetIcon(RtiTargetValue::skullIndex, bot->GetGUID(), boss->GetGUID());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool McGolemaggTankAction::MoveUnitToPosition(Unit* target, const Position& tankPosition, float maxDistance,
|
||||
float stepDistance)
|
||||
{
|
||||
if (bot->GetVictim() != target)
|
||||
return Attack(target);
|
||||
if (target->GetVictim() == bot)
|
||||
{
|
||||
float distanceToTankPosition = bot->GetExactDist2d(tankPosition.GetPositionX(), tankPosition.GetPositionY());
|
||||
if (distanceToTankPosition > maxDistance)
|
||||
{
|
||||
float dX = tankPosition.GetPositionX() - bot->GetPositionX();
|
||||
float dY = tankPosition.GetPositionY() - bot->GetPositionY();
|
||||
float dist = sqrt(dX * dX + dY * dY);
|
||||
float moveX = bot->GetPositionX() + (dX / dist) * stepDistance;
|
||||
float moveY = bot->GetPositionY() + (dY / dist) * stepDistance;
|
||||
return MoveTo(bot->GetMapId(), moveX, moveY, bot->GetPositionZ(), false, false,
|
||||
false, false, MovementPriority::MOVEMENT_COMBAT, true,
|
||||
true);
|
||||
}
|
||||
}
|
||||
else if (botAI->DoSpecificAction("taunt spell", Event(), true))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool McGolemaggTankAction::FindCoreRagers(Unit*& coreRager1, Unit*& coreRager2) const
|
||||
{
|
||||
coreRager1 = coreRager2 = nullptr;
|
||||
for (auto const& target : AI_VALUE(GuidVector, "possible targets no los"))
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(target);
|
||||
if (unit && unit->IsAlive() && unit->GetEntry() == NPC_CORE_RAGER)
|
||||
{
|
||||
if (coreRager1 == nullptr)
|
||||
coreRager1 = unit;
|
||||
else if (coreRager2 == nullptr)
|
||||
{
|
||||
coreRager2 = unit;
|
||||
break; // There should be no third Core Rager.
|
||||
}
|
||||
}
|
||||
}
|
||||
return coreRager1 != nullptr && coreRager2 != nullptr;
|
||||
}
|
||||
|
||||
bool McGolemaggMainTankAttackGolemaggAction::Execute(Event event)
|
||||
{
|
||||
// At this point, we know we are not the last living tank in the group.
|
||||
if (Unit* boss = AI_VALUE2(Unit*, "find target", "golemagg the incinerator"))
|
||||
{
|
||||
Unit* coreRager1;
|
||||
Unit* coreRager2;
|
||||
if (!FindCoreRagers(coreRager1, coreRager2))
|
||||
return false; // safety check
|
||||
|
||||
// We only need to move if the Core Ragers still have Golemagg's Trust
|
||||
if (coreRager1->HasAura(SPELL_GOLEMAGGS_TRUST) || coreRager2->HasAura(SPELL_GOLEMAGGS_TRUST))
|
||||
return MoveUnitToPosition(boss, GOLEMAGG_TANK_POSITION, boss->GetCombatReach());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool McGolemaggAssistTankAttackCoreRagerAction::Execute(Event event)
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "golemagg the incinerator");
|
||||
if (!boss)
|
||||
return false;
|
||||
|
||||
// Step 0: Filter additional assist tanks. We only need 2.
|
||||
bool isFirstAssistTank = PlayerbotAI::IsAssistTankOfIndex(bot, 0, true);
|
||||
bool isSecondAssistTank = PlayerbotAI::IsAssistTankOfIndex(bot, 1, true);
|
||||
if (!isFirstAssistTank && !isSecondAssistTank)
|
||||
return Attack(boss);
|
||||
|
||||
// Step 1: Find both Core Ragers
|
||||
Unit* coreRager1;
|
||||
Unit* coreRager2;
|
||||
if (!FindCoreRagers(coreRager1, coreRager2))
|
||||
return false; // safety check
|
||||
|
||||
// Step 2: Assign Core Rager to bot
|
||||
Unit* myCoreRager = nullptr;
|
||||
Unit* otherCoreRager = nullptr;
|
||||
if (isFirstAssistTank)
|
||||
{
|
||||
myCoreRager = coreRager1;
|
||||
otherCoreRager = coreRager2;
|
||||
}
|
||||
else // isSecondAssistTank is always true here
|
||||
{
|
||||
myCoreRager = coreRager2;
|
||||
otherCoreRager = coreRager1;
|
||||
}
|
||||
|
||||
// Step 3: Select the right target
|
||||
if (myCoreRager->GetVictim() != bot)
|
||||
{
|
||||
// Step 3.1: My Core Rager isn't attacking me. Attack until it does.
|
||||
if (bot->GetVictim() != myCoreRager)
|
||||
return Attack(myCoreRager);
|
||||
return botAI->DoSpecificAction("taunt spell", event, true);
|
||||
}
|
||||
|
||||
Unit* otherCoreRagerVictim = otherCoreRager->GetVictim();
|
||||
if (otherCoreRagerVictim) // Core Rager victim can be NULL
|
||||
{
|
||||
// Step 3.2: Check if the other Core Rager isn't attacking its assist tank.
|
||||
Player* otherCoreRagerPlayerVictim = otherCoreRagerVictim->ToPlayer();
|
||||
if (otherCoreRagerPlayerVictim &&
|
||||
!PlayerbotAI::IsAssistTankOfIndex(otherCoreRagerPlayerVictim, 0, true) &&
|
||||
!PlayerbotAI::IsAssistTankOfIndex(otherCoreRagerPlayerVictim, 1, true))
|
||||
{
|
||||
// Assume we are the only assist tank or the other assist tank is dead => pick up other Core Rager!
|
||||
if (bot->GetVictim() != otherCoreRager)
|
||||
return Attack(otherCoreRager);
|
||||
return botAI->DoSpecificAction("taunt spell", event, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (bot->GetVictim() != myCoreRager)
|
||||
return Attack(myCoreRager); // Step 3.3: Attack our Core Rager in case we previously switched in 3.2.
|
||||
|
||||
// Step 4: Prevent Golemagg's Trust on Core Ragers
|
||||
if (myCoreRager->HasAura(SPELL_GOLEMAGGS_TRUST) ||
|
||||
(otherCoreRagerVictim == bot && otherCoreRager->HasAura(SPELL_GOLEMAGGS_TRUST)))
|
||||
{
|
||||
// Step 4.1: Move Core Ragers to dedicated tank position (only if Golemagg is far enough away from said position)
|
||||
float bossDistanceToCoreRagerTankPosition = boss->GetExactDist2d(
|
||||
CORE_RAGER_TANK_POSITION.GetPositionX(), CORE_RAGER_TANK_POSITION.GetPositionY());
|
||||
if (bossDistanceToCoreRagerTankPosition > GOLEMAGGS_TRUST_DISTANCE)
|
||||
{
|
||||
float distanceToTankPosition = bot->GetExactDist2d(CORE_RAGER_TANK_POSITION.GetPositionX(),
|
||||
CORE_RAGER_TANK_POSITION.GetPositionY());
|
||||
if (distanceToTankPosition > CORE_RAGER_STEP_DISTANCE)
|
||||
return MoveUnitToPosition(myCoreRager, CORE_RAGER_TANK_POSITION, CORE_RAGER_STEP_DISTANCE);
|
||||
}
|
||||
|
||||
// Step 4.2: if boss is too close to tank position, or we are already there, move away from Golemagg to try to out-range Golemagg's Trust
|
||||
return MoveAway(boss, CORE_RAGER_STEP_DISTANCE, true);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
67
src/Ai/Raid/MoltenCore/Action/RaidMcActions.h
Normal file
67
src/Ai/Raid/MoltenCore/Action/RaidMcActions.h
Normal file
@@ -0,0 +1,67 @@
|
||||
#ifndef _PLAYERBOT_RAIDMCACTIONS_H
|
||||
#define _PLAYERBOT_RAIDMCACTIONS_H
|
||||
|
||||
#include "AttackAction.h"
|
||||
#include "MovementActions.h"
|
||||
#include "PlayerbotAI.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class McMoveFromGroupAction : public MovementAction
|
||||
{
|
||||
public:
|
||||
McMoveFromGroupAction(PlayerbotAI* botAI, std::string const name = "mc move from group")
|
||||
: MovementAction(botAI, name) {}
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class McMoveFromBaronGeddonAction : public MovementAction
|
||||
{
|
||||
public:
|
||||
McMoveFromBaronGeddonAction(PlayerbotAI* botAI, std::string const name = "mc move from baron geddon")
|
||||
: MovementAction(botAI, name) {}
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class McShazzrahMoveAwayAction : public MovementAction
|
||||
{
|
||||
public:
|
||||
McShazzrahMoveAwayAction(PlayerbotAI* botAI, std::string const name = "mc shazzrah move away")
|
||||
: MovementAction(botAI, name) {}
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class McGolemaggMarkBossAction : public Action
|
||||
{
|
||||
public:
|
||||
McGolemaggMarkBossAction(PlayerbotAI* botAI, std::string const name = "mc golemagg mark boss")
|
||||
: Action(botAI, name) {};
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class McGolemaggTankAction : public AttackAction
|
||||
{
|
||||
public:
|
||||
McGolemaggTankAction(PlayerbotAI* botAI, std::string const name)
|
||||
: AttackAction(botAI, name) {}
|
||||
protected:
|
||||
bool MoveUnitToPosition(Unit* target, const Position& tankPosition, float maxDistance, float stepDistance = 3.0f);
|
||||
bool FindCoreRagers(Unit*& coreRager1, Unit*& coreRager2) const;
|
||||
};
|
||||
|
||||
class McGolemaggMainTankAttackGolemaggAction : public McGolemaggTankAction
|
||||
{
|
||||
public:
|
||||
McGolemaggMainTankAttackGolemaggAction(PlayerbotAI* botAI, std::string const name = "mc golemagg main tank attack golemagg")
|
||||
: McGolemaggTankAction(botAI, name) {};
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class McGolemaggAssistTankAttackCoreRagerAction : public McGolemaggTankAction
|
||||
{
|
||||
public:
|
||||
McGolemaggAssistTankAttackCoreRagerAction(PlayerbotAI* botAI, std::string const name = "mc golemagg assist tank attack core rager")
|
||||
: McGolemaggTankAction(botAI, name) {};
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
117
src/Ai/Raid/MoltenCore/Multiplier/RaidMcMultipliers.cpp
Normal file
117
src/Ai/Raid/MoltenCore/Multiplier/RaidMcMultipliers.cpp
Normal file
@@ -0,0 +1,117 @@
|
||||
#include "RaidMcMultipliers.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
#include "ChooseTargetActions.h"
|
||||
#include "GenericSpellActions.h"
|
||||
#include "DruidActions.h"
|
||||
#include "HunterActions.h"
|
||||
#include "PaladinActions.h"
|
||||
#include "ShamanActions.h"
|
||||
#include "WarriorActions.h"
|
||||
#include "DKActions.h"
|
||||
#include "RaidMcActions.h"
|
||||
#include "RaidMcHelpers.h"
|
||||
|
||||
using namespace MoltenCoreHelpers;
|
||||
|
||||
static bool IsDpsBotWithAoeAction(Player* bot, Action* action)
|
||||
{
|
||||
if (PlayerbotAI::IsDps(bot))
|
||||
{
|
||||
if (dynamic_cast<DpsAoeAction*>(action) || dynamic_cast<CastConsecrationAction*>(action) ||
|
||||
dynamic_cast<CastStarfallAction*>(action) || dynamic_cast<CastWhirlwindAction*>(action) ||
|
||||
dynamic_cast<CastMagmaTotemAction*>(action) || dynamic_cast<CastExplosiveTrapAction*>(action) ||
|
||||
dynamic_cast<CastDeathAndDecayAction*>(action))
|
||||
return true;
|
||||
|
||||
if (auto castSpellAction = dynamic_cast<CastSpellAction*>(action))
|
||||
{
|
||||
if (castSpellAction->getThreatType() == Action::ActionThreatType::Aoe)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
float GarrDisableDpsAoeMultiplier::GetValue(Action* action)
|
||||
{
|
||||
if (AI_VALUE2(Unit*, "find target", "garr"))
|
||||
{
|
||||
if (IsDpsBotWithAoeAction(bot, action))
|
||||
return 0.0f;
|
||||
}
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
static bool IsAllowedGeddonMovementAction(Action* action)
|
||||
{
|
||||
if (dynamic_cast<MovementAction*>(action) &&
|
||||
!dynamic_cast<McMoveFromGroupAction*>(action) &&
|
||||
!dynamic_cast<McMoveFromBaronGeddonAction*>(action))
|
||||
return false;
|
||||
|
||||
if (dynamic_cast<CastReachTargetSpellAction*>(action))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
float BaronGeddonAbilityMultiplier::GetValue(Action* action)
|
||||
{
|
||||
if (Unit* boss = AI_VALUE2(Unit*, "find target", "baron geddon"))
|
||||
{
|
||||
if (boss->HasAura(SPELL_INFERNO))
|
||||
{
|
||||
if (!IsAllowedGeddonMovementAction(action))
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
// No check for Baron Geddon, because bots may have the bomb even after Geddon died.
|
||||
if (bot->HasAura(SPELL_LIVING_BOMB))
|
||||
{
|
||||
if (!IsAllowedGeddonMovementAction(action))
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
static bool IsSingleLivingTankInGroup(Player* bot)
|
||||
{
|
||||
if (Group* group = bot->GetGroup())
|
||||
{
|
||||
for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
|
||||
{
|
||||
Player* member = itr->GetSource();
|
||||
if (!member || !member->IsAlive() || member == bot)
|
||||
continue;
|
||||
if (PlayerbotAI::IsTank(member))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
float GolemaggMultiplier::GetValue(Action* action)
|
||||
{
|
||||
if (AI_VALUE2(Unit*, "find target", "golemagg the incinerator"))
|
||||
{
|
||||
if (PlayerbotAI::IsTank(bot) && IsSingleLivingTankInGroup(bot))
|
||||
{
|
||||
// Only one tank => Pick up Golemagg and the two Core Ragers
|
||||
if (dynamic_cast<McGolemaggMainTankAttackGolemaggAction*>(action) ||
|
||||
dynamic_cast<McGolemaggAssistTankAttackCoreRagerAction*>(action))
|
||||
return 0.0f;
|
||||
}
|
||||
if (PlayerbotAI::IsAssistTank(bot))
|
||||
{
|
||||
// The first two assist tanks manage the Core Ragers. The remaining assist tanks attack the boss.
|
||||
if (dynamic_cast<TankAssistAction*>(action))
|
||||
return 0.0f;
|
||||
}
|
||||
if (IsDpsBotWithAoeAction(bot, action))
|
||||
return 0.0f;
|
||||
}
|
||||
return 1.0f;
|
||||
}
|
||||
27
src/Ai/Raid/MoltenCore/Multiplier/RaidMcMultipliers.h
Normal file
27
src/Ai/Raid/MoltenCore/Multiplier/RaidMcMultipliers.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef _PLAYERBOT_RAIDMCMULTIPLIERS_H
|
||||
#define _PLAYERBOT_RAIDMCMULTIPLIERS_H
|
||||
|
||||
#include "Multiplier.h"
|
||||
|
||||
class GarrDisableDpsAoeMultiplier : public Multiplier
|
||||
{
|
||||
public:
|
||||
GarrDisableDpsAoeMultiplier(PlayerbotAI* botAI) : Multiplier(botAI, "garr disable dps aoe multiplier") {}
|
||||
float GetValue(Action* action) override;
|
||||
};
|
||||
|
||||
class BaronGeddonAbilityMultiplier : public Multiplier
|
||||
{
|
||||
public:
|
||||
BaronGeddonAbilityMultiplier(PlayerbotAI* botAI) : Multiplier(botAI, "baron geddon ability multiplier") {}
|
||||
float GetValue(Action* action) override;
|
||||
};
|
||||
|
||||
class GolemaggMultiplier : public Multiplier
|
||||
{
|
||||
public:
|
||||
GolemaggMultiplier(PlayerbotAI* botAI) : Multiplier(botAI, "golemagg multiplier") {}
|
||||
float GetValue(Action* action) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
48
src/Ai/Raid/MoltenCore/RaidMcActionContext.h
Normal file
48
src/Ai/Raid/MoltenCore/RaidMcActionContext.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#ifndef _PLAYERBOT_RAIDMCACTIONCONTEXT_H
|
||||
#define _PLAYERBOT_RAIDMCACTIONCONTEXT_H
|
||||
|
||||
#include "Action.h"
|
||||
#include "NamedObjectContext.h"
|
||||
#include "RaidMcActions.h"
|
||||
|
||||
class RaidMcActionContext : public NamedObjectContext<Action>
|
||||
{
|
||||
public:
|
||||
RaidMcActionContext()
|
||||
{
|
||||
creators["mc lucifron shadow resistance"] = &RaidMcActionContext::lucifron_shadow_resistance;
|
||||
creators["mc magmadar fire resistance"] = &RaidMcActionContext::magmadar_fire_resistance;
|
||||
creators["mc gehennas shadow resistance"] = &RaidMcActionContext::gehennas_shadow_resistance;
|
||||
creators["mc garr fire resistance"] = &RaidMcActionContext::garr_fire_resistance;
|
||||
creators["mc baron geddon fire resistance"] = &RaidMcActionContext::baron_geddon_fire_resistance;
|
||||
creators["mc move from group"] = &RaidMcActionContext::check_should_move_from_group;
|
||||
creators["mc move from baron geddon"] = &RaidMcActionContext::move_from_baron_geddon;
|
||||
creators["mc shazzrah move away"] = &RaidMcActionContext::shazzrah_move_away;
|
||||
creators["mc sulfuron harbinger fire resistance"] = &RaidMcActionContext::sulfuron_harbinger_fire_resistance;
|
||||
creators["mc golemagg fire resistance"] = &RaidMcActionContext::golemagg_fire_resistance;
|
||||
creators["mc golemagg mark boss"] = &RaidMcActionContext::golemagg_mark_boss;
|
||||
creators["mc golemagg main tank attack golemagg"] = &RaidMcActionContext::golemagg_main_tank_attack_golemagg;
|
||||
creators["mc golemagg assist tank attack core rager"] = &RaidMcActionContext::golemagg_assist_tank_attack_core_rager;
|
||||
creators["mc majordomo shadow resistance"] = &RaidMcActionContext::majordomo_shadow_resistance;
|
||||
creators["mc ragnaros fire resistance"] = &RaidMcActionContext::ragnaros_fire_resistance;
|
||||
}
|
||||
|
||||
private:
|
||||
static Action* lucifron_shadow_resistance(PlayerbotAI* botAI) { return new BossShadowResistanceAction(botAI, "lucifron"); }
|
||||
static Action* magmadar_fire_resistance(PlayerbotAI* botAI) { return new BossFireResistanceAction(botAI, "magmadar"); }
|
||||
static Action* gehennas_shadow_resistance(PlayerbotAI* botAI) { return new BossShadowResistanceAction(botAI, "gehennas"); }
|
||||
static Action* garr_fire_resistance(PlayerbotAI* botAI) { return new BossFireResistanceAction(botAI, "garr"); }
|
||||
static Action* baron_geddon_fire_resistance(PlayerbotAI* botAI) { return new BossFireResistanceAction(botAI, "baron geddon"); }
|
||||
static Action* check_should_move_from_group(PlayerbotAI* botAI) { return new McMoveFromGroupAction(botAI); }
|
||||
static Action* move_from_baron_geddon(PlayerbotAI* botAI) { return new McMoveFromBaronGeddonAction(botAI); }
|
||||
static Action* shazzrah_move_away(PlayerbotAI* botAI) { return new McShazzrahMoveAwayAction(botAI); }
|
||||
static Action* sulfuron_harbinger_fire_resistance(PlayerbotAI* botAI) { return new BossFireResistanceAction(botAI, "sulfuron harbinger"); }
|
||||
static Action* golemagg_fire_resistance(PlayerbotAI* botAI) { return new BossFireResistanceAction(botAI, "golemagg the incinerator"); }
|
||||
static Action* golemagg_mark_boss(PlayerbotAI* botAI) { return new McGolemaggMarkBossAction(botAI); }
|
||||
static Action* golemagg_main_tank_attack_golemagg(PlayerbotAI* botAI) { return new McGolemaggMainTankAttackGolemaggAction(botAI); }
|
||||
static Action* golemagg_assist_tank_attack_core_rager(PlayerbotAI* botAI) { return new McGolemaggAssistTankAttackCoreRagerAction(botAI); }
|
||||
static Action* majordomo_shadow_resistance(PlayerbotAI* botAI) { return new BossShadowResistanceAction(botAI, "majordomo executus"); }
|
||||
static Action* ragnaros_fire_resistance(PlayerbotAI* botAI) { return new BossFireResistanceAction(botAI, "ragnaros"); }
|
||||
};
|
||||
|
||||
#endif
|
||||
22
src/Ai/Raid/MoltenCore/RaidMcHelpers.h
Normal file
22
src/Ai/Raid/MoltenCore/RaidMcHelpers.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef _PLAYERBOT_RAIDMCHELPERS_H
|
||||
#define _PLAYERBOT_RAIDMCHELPERS_H
|
||||
|
||||
namespace MoltenCoreHelpers
|
||||
{
|
||||
enum MoltenCoreNPCs
|
||||
{
|
||||
// Golemagg
|
||||
NPC_CORE_RAGER = 11672,
|
||||
};
|
||||
enum MoltenCoreSpells
|
||||
{
|
||||
// Baron Geddon
|
||||
SPELL_INFERNO = 19695,
|
||||
SPELL_LIVING_BOMB = 20475,
|
||||
|
||||
// Golemagg
|
||||
SPELL_GOLEMAGGS_TRUST = 20553,
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
48
src/Ai/Raid/MoltenCore/RaidMcTriggerContext.h
Normal file
48
src/Ai/Raid/MoltenCore/RaidMcTriggerContext.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#ifndef _PLAYERBOT_RAIDMCTRIGGERCONTEXT_H
|
||||
#define _PLAYERBOT_RAIDMCTRIGGERCONTEXT_H
|
||||
|
||||
#include "AiObjectContext.h"
|
||||
#include "NamedObjectContext.h"
|
||||
#include "RaidMcTriggers.h"
|
||||
|
||||
class RaidMcTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
RaidMcTriggerContext()
|
||||
{
|
||||
creators["mc lucifron shadow resistance"] = &RaidMcTriggerContext::lucifron_shadow_resistance;
|
||||
creators["mc magmadar fire resistance"] = &RaidMcTriggerContext::magmadar_fire_resistance;
|
||||
creators["mc gehennas shadow resistance"] = &RaidMcTriggerContext::gehennas_shadow_resistance;
|
||||
creators["mc garr fire resistance"] = &RaidMcTriggerContext::garr_fire_resistance;
|
||||
creators["mc baron geddon fire resistance"] = &RaidMcTriggerContext::baron_geddon_fire_resistance;
|
||||
creators["mc living bomb debuff"] = &RaidMcTriggerContext::living_bomb_debuff;
|
||||
creators["mc baron geddon inferno"] = &RaidMcTriggerContext::baron_geddon_inferno;
|
||||
creators["mc shazzrah ranged"] = &RaidMcTriggerContext::shazzrah_ranged;
|
||||
creators["mc sulfuron harbinger fire resistance"] = &RaidMcTriggerContext::sulfuron_harbinger_fire_resistance;
|
||||
creators["mc golemagg fire resistance"] = &RaidMcTriggerContext::golemagg_fire_resistance;
|
||||
creators["mc golemagg mark boss"] = &RaidMcTriggerContext::golemagg_mark_boss;
|
||||
creators["mc golemagg is main tank"] = &RaidMcTriggerContext::golemagg_is_main_tank;
|
||||
creators["mc golemagg is assist tank"] = &RaidMcTriggerContext::golemagg_is_assist_tank;
|
||||
creators["mc majordomo shadow resistance"] = &RaidMcTriggerContext::majordomo_shadow_resistance;
|
||||
creators["mc ragnaros fire resistance"] = &RaidMcTriggerContext::ragnaros_fire_resistance;
|
||||
}
|
||||
|
||||
private:
|
||||
static Trigger* lucifron_shadow_resistance(PlayerbotAI* botAI) { return new BossShadowResistanceTrigger(botAI, "lucifron"); }
|
||||
static Trigger* magmadar_fire_resistance(PlayerbotAI* botAI) { return new BossFireResistanceTrigger(botAI, "magmadar"); }
|
||||
static Trigger* gehennas_shadow_resistance(PlayerbotAI* botAI) { return new BossShadowResistanceTrigger(botAI, "gehennas"); }
|
||||
static Trigger* garr_fire_resistance(PlayerbotAI* botAI) { return new BossFireResistanceTrigger(botAI, "garr"); }
|
||||
static Trigger* baron_geddon_fire_resistance(PlayerbotAI* botAI) { return new BossFireResistanceTrigger(botAI, "baron geddon"); }
|
||||
static Trigger* living_bomb_debuff(PlayerbotAI* botAI) { return new McLivingBombDebuffTrigger(botAI); }
|
||||
static Trigger* baron_geddon_inferno(PlayerbotAI* botAI) { return new McBaronGeddonInfernoTrigger(botAI); }
|
||||
static Trigger* shazzrah_ranged(PlayerbotAI* botAI) { return new McShazzrahRangedTrigger(botAI); }
|
||||
static Trigger* sulfuron_harbinger_fire_resistance(PlayerbotAI* botAI) { return new BossFireResistanceTrigger(botAI, "sulfuron harbinger"); }
|
||||
static Trigger* golemagg_fire_resistance(PlayerbotAI* botAI) { return new BossFireResistanceTrigger(botAI, "golemagg the incinerator"); }
|
||||
static Trigger* golemagg_mark_boss(PlayerbotAI* botAI) { return new McGolemaggMarkBossTrigger(botAI); }
|
||||
static Trigger* golemagg_is_main_tank(PlayerbotAI* botAI) { return new McGolemaggIsMainTankTrigger(botAI); }
|
||||
static Trigger* golemagg_is_assist_tank(PlayerbotAI* botAI) { return new McGolemaggIsAssistTankTrigger(botAI); }
|
||||
static Trigger* majordomo_shadow_resistance(PlayerbotAI* botAI) { return new BossShadowResistanceTrigger(botAI, "majordomo executus"); }
|
||||
static Trigger* ragnaros_fire_resistance(PlayerbotAI* botAI) { return new BossFireResistanceTrigger(botAI, "ragnaros"); }
|
||||
};
|
||||
|
||||
#endif
|
||||
81
src/Ai/Raid/MoltenCore/Strategy/RaidMcStrategy.cpp
Normal file
81
src/Ai/Raid/MoltenCore/Strategy/RaidMcStrategy.cpp
Normal file
@@ -0,0 +1,81 @@
|
||||
#include "RaidMcStrategy.h"
|
||||
|
||||
#include "RaidMcMultipliers.h"
|
||||
#include "Strategy.h"
|
||||
|
||||
void RaidMcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
// Lucifron
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc lucifron shadow resistance",
|
||||
{ NextAction("mc lucifron shadow resistance", ACTION_RAID) }));
|
||||
|
||||
// Magmadar
|
||||
// TODO: Fear ward / tremor totem, or general anti-fear strat development. Same as King Dred (Drak'Tharon) and faction commander (Nexus).
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc magmadar fire resistance",
|
||||
{ NextAction("mc magmadar fire resistance", ACTION_RAID) }));
|
||||
|
||||
// Gehennas
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc gehennas shadow resistance",
|
||||
{ NextAction("mc gehennas shadow resistance", ACTION_RAID) }));
|
||||
|
||||
// Garr
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc garr fire resistance",
|
||||
{ NextAction("mc garr fire resistance", ACTION_RAID) }));
|
||||
|
||||
// Baron Geddon
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc baron geddon fire resistance",
|
||||
{ NextAction("mc baron geddon fire resistance", ACTION_RAID) }));
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc living bomb debuff",
|
||||
{ NextAction("mc move from group", ACTION_RAID) }));
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc baron geddon inferno",
|
||||
{ NextAction("mc move from baron geddon", ACTION_RAID) }));
|
||||
|
||||
// Shazzrah
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc shazzrah ranged",
|
||||
{ NextAction("mc shazzrah move away", ACTION_RAID) }));
|
||||
|
||||
// Sulfuron Harbinger
|
||||
// Alternatively, shadow resistance is also possible.
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc sulfuron harbinger fire resistance",
|
||||
{ NextAction("mc sulfuron harbinger fire resistance", ACTION_RAID) }));
|
||||
|
||||
// Golemagg the Incinerator
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc golemagg fire resistance",
|
||||
{ NextAction("mc golemagg fire resistance", ACTION_RAID) }));
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc golemagg mark boss",
|
||||
{ NextAction("mc golemagg mark boss", ACTION_RAID) }));
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc golemagg is main tank",
|
||||
{ NextAction("mc golemagg main tank attack golemagg", ACTION_RAID) }));
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc golemagg is assist tank",
|
||||
{ NextAction("mc golemagg assist tank attack core rager", ACTION_RAID) }));
|
||||
|
||||
// Majordomo Executus
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc majordomo shadow resistance",
|
||||
{ NextAction("mc majordomo shadow resistance", ACTION_RAID) }));
|
||||
|
||||
// Ragnaros
|
||||
triggers.push_back(
|
||||
new TriggerNode("mc ragnaros fire resistance",
|
||||
{ NextAction("mc ragnaros fire resistance", ACTION_RAID) }));
|
||||
}
|
||||
|
||||
void RaidMcStrategy::InitMultipliers(std::vector<Multiplier*>& multipliers)
|
||||
{
|
||||
multipliers.push_back(new GarrDisableDpsAoeMultiplier(botAI));
|
||||
multipliers.push_back(new BaronGeddonAbilityMultiplier(botAI));
|
||||
multipliers.push_back(new GolemaggMultiplier(botAI));
|
||||
}
|
||||
17
src/Ai/Raid/MoltenCore/Strategy/RaidMcStrategy.h
Normal file
17
src/Ai/Raid/MoltenCore/Strategy/RaidMcStrategy.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef _PLAYERBOT_RAIDMCSTRATEGY_H
|
||||
#define _PLAYERBOT_RAIDMCSTRATEGY_H
|
||||
|
||||
#include "AiObjectContext.h"
|
||||
#include "Multiplier.h"
|
||||
#include "Strategy.h"
|
||||
|
||||
class RaidMcStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
RaidMcStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
std::string const getName() override { return "moltencore"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
void InitMultipliers(std::vector<Multiplier*> &multipliers) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
40
src/Ai/Raid/MoltenCore/Trigger/RaidMcTriggers.cpp
Normal file
40
src/Ai/Raid/MoltenCore/Trigger/RaidMcTriggers.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "RaidMcTriggers.h"
|
||||
|
||||
#include "SharedDefines.h"
|
||||
#include "RaidMcHelpers.h"
|
||||
|
||||
using namespace MoltenCoreHelpers;
|
||||
|
||||
bool McLivingBombDebuffTrigger::IsActive()
|
||||
{
|
||||
// No check for Baron Geddon, because bots may have the bomb even after Geddon died.
|
||||
return bot->HasAura(SPELL_LIVING_BOMB);
|
||||
}
|
||||
|
||||
bool McBaronGeddonInfernoTrigger::IsActive()
|
||||
{
|
||||
if (Unit* boss = AI_VALUE2(Unit*, "find target", "baron geddon"))
|
||||
return boss->HasAura(SPELL_INFERNO);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool McShazzrahRangedTrigger::IsActive()
|
||||
{
|
||||
return AI_VALUE2(Unit*, "find target", "shazzrah") && PlayerbotAI::IsRanged(bot);
|
||||
}
|
||||
|
||||
bool McGolemaggMarkBossTrigger::IsActive()
|
||||
{
|
||||
// any tank may mark the boss
|
||||
return AI_VALUE2(Unit*, "find target", "golemagg the incinerator") && PlayerbotAI::IsTank(bot);
|
||||
}
|
||||
|
||||
bool McGolemaggIsMainTankTrigger::IsActive()
|
||||
{
|
||||
return AI_VALUE2(Unit*, "find target", "golemagg the incinerator") && PlayerbotAI::IsMainTank(bot);
|
||||
}
|
||||
|
||||
bool McGolemaggIsAssistTankTrigger::IsActive()
|
||||
{
|
||||
return AI_VALUE2(Unit*, "find target", "golemagg the incinerator") && PlayerbotAI::IsAssistTank(bot);
|
||||
}
|
||||
50
src/Ai/Raid/MoltenCore/Trigger/RaidMcTriggers.h
Normal file
50
src/Ai/Raid/MoltenCore/Trigger/RaidMcTriggers.h
Normal file
@@ -0,0 +1,50 @@
|
||||
#ifndef _PLAYERBOT_RAIDMCTRIGGERS_H
|
||||
#define _PLAYERBOT_RAIDMCTRIGGERS_H
|
||||
|
||||
#include "PlayerbotAI.h"
|
||||
#include "Playerbots.h"
|
||||
#include "Trigger.h"
|
||||
|
||||
class McLivingBombDebuffTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
McLivingBombDebuffTrigger(PlayerbotAI* botAI) : Trigger(botAI, "mc living bomb debuff") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class McBaronGeddonInfernoTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
McBaronGeddonInfernoTrigger(PlayerbotAI* botAI) : Trigger(botAI, "mc baron geddon inferno") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class McShazzrahRangedTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
McShazzrahRangedTrigger(PlayerbotAI* botAI) : Trigger(botAI, "mc shazzrah ranged") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class McGolemaggMarkBossTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
McGolemaggMarkBossTrigger(PlayerbotAI* botAI) : Trigger(botAI, "mc golemagg mark boss") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class McGolemaggIsMainTankTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
McGolemaggIsMainTankTrigger(PlayerbotAI* botAI) : Trigger(botAI, "mc golemagg is main tank") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class McGolemaggIsAssistTankTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
McGolemaggIsAssistTankTrigger(PlayerbotAI* botAI) : Trigger(botAI, "mc golemagg is assist tank") {}
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user