mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-16 00:26:10 +00:00
[HOT FIX] MS build issues regarding folder / command lenght usage or rc.exe (#2038)
This commit is contained in:
153
src/Ai/Class/Warlock/Strategy/AfflictionWarlockStrategy.cpp
Normal file
153
src/Ai/Class/Warlock/Strategy/AfflictionWarlockStrategy.cpp
Normal file
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "AfflictionWarlockStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
// ===== Action Node Factory =====
|
||||
class AfflictionWarlockStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
AfflictionWarlockStrategyActionNodeFactory()
|
||||
{
|
||||
creators["corruption"] = &corruption;
|
||||
creators["corruption on attacker"] = &corruption;
|
||||
creators["unstable affliction"] = &unstable_affliction;
|
||||
creators["unstable affliction on attacker"] = &unstable_affliction;
|
||||
creators["haunt"] = &haunt;
|
||||
creators["shadow bolt"] = &shadow_bolt;
|
||||
creators["drain soul"] = &drain_soul;
|
||||
creators["life tap"] = &life_tap;
|
||||
creators["shadowflame"] = &shadowflame;
|
||||
creators["seed of corruption on attacker"] = &seed_of_corruption;
|
||||
creators["seed of corruption"] = &seed_of_corruption;
|
||||
creators["rain of fire"] = &rain_of_fire;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* corruption(PlayerbotAI*) { return new ActionNode("corruption", {}, {}, {}); }
|
||||
static ActionNode* corruption_on_attacker(PlayerbotAI*) { return new ActionNode("corruption on attacker", {}, {}, {}); }
|
||||
static ActionNode* unstable_affliction(PlayerbotAI*) { return new ActionNode("unstable affliction", {}, {}, {}); }
|
||||
static ActionNode* unstable_affliction_on_attacker(PlayerbotAI*) { return new ActionNode("unstable affliction on attacker", {}, {}, {}); }
|
||||
static ActionNode* haunt(PlayerbotAI*) { return new ActionNode("haunt", {}, {}, {}); }
|
||||
static ActionNode* shadow_bolt(PlayerbotAI*) { return new ActionNode("shadow bolt", {}, {}, {}); }
|
||||
static ActionNode* drain_soul(PlayerbotAI*) { return new ActionNode("drain soul", {}, {}, {}); }
|
||||
static ActionNode* life_tap(PlayerbotAI*) { return new ActionNode("life tap", {}, {}, {}); }
|
||||
static ActionNode* shadowflame(PlayerbotAI*) { return new ActionNode("shadowflame", {}, {}, {}); }
|
||||
static ActionNode* seed_of_corruption_on_attacker(PlayerbotAI*) { return new ActionNode("seed of corruption on attacker", {}, {}, {}); }
|
||||
static ActionNode* seed_of_corruption(PlayerbotAI*) { return new ActionNode("seed of corruption", {}, {}, {}); }
|
||||
static ActionNode* rain_of_fire(PlayerbotAI*) { return new ActionNode("rain of fire", {}, {}, {}); }
|
||||
};
|
||||
|
||||
// ===== Single Target Strategy =====
|
||||
AfflictionWarlockStrategy::AfflictionWarlockStrategy(PlayerbotAI* botAI) : GenericWarlockStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new AfflictionWarlockStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
// ===== Default Actions =====
|
||||
std::vector<NextAction> AfflictionWarlockStrategy::getDefaultActions()
|
||||
{
|
||||
return {
|
||||
NextAction("corruption", 5.5f),
|
||||
NextAction("unstable affliction", 5.4f),
|
||||
NextAction("haunt", 5.3f),
|
||||
NextAction("shadow bolt", 5.2f),
|
||||
NextAction("shoot", 5.0f)
|
||||
};
|
||||
}
|
||||
|
||||
// ===== Trigger Initialization ===
|
||||
void AfflictionWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericWarlockStrategy::InitTriggers(triggers);
|
||||
|
||||
// Main DoT triggers for high uptime
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"corruption on attacker",
|
||||
{
|
||||
NextAction("corruption on attacker", 19.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"unstable affliction on attacker",
|
||||
{
|
||||
NextAction("unstable affliction on attacker", 19.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"corruption",
|
||||
{
|
||||
NextAction("corruption", 18.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"unstable affliction",
|
||||
{
|
||||
NextAction("unstable affliction", 17.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"haunt",
|
||||
{
|
||||
NextAction("haunt", 16.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// Drain Soul as execute if target is low HP // Shadow Trance for free casts
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"shadow trance",
|
||||
{
|
||||
NextAction("shadow bolt", 16.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"target critical health",
|
||||
{
|
||||
NextAction("drain soul", 15.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// Life Tap glyph buff, and Life Tap as filler
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"life tap glyph buff",
|
||||
{
|
||||
NextAction("life tap", 29.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"life tap",
|
||||
{
|
||||
NextAction("life tap", 5.1f)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"enemy too close for spell",
|
||||
{
|
||||
NextAction("flee", 39.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
24
src/Ai/Class/Warlock/Strategy/AfflictionWarlockStrategy.h
Normal file
24
src/Ai/Class/Warlock/Strategy/AfflictionWarlockStrategy.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_AFFLICTIONWARLOCKSTRATEGY_H
|
||||
#define _PLAYERBOT_AFFLICTIONWARLOCKSTRATEGY_H
|
||||
|
||||
#include "GenericWarlockStrategy.h"
|
||||
#include "CombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class AfflictionWarlockStrategy : public GenericWarlockStrategy
|
||||
{
|
||||
public:
|
||||
AfflictionWarlockStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "affli"; }
|
||||
std::vector<NextAction> getDefaultActions() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
189
src/Ai/Class/Warlock/Strategy/DemonologyWarlockStrategy.cpp
Normal file
189
src/Ai/Class/Warlock/Strategy/DemonologyWarlockStrategy.cpp
Normal file
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "DemonologyWarlockStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
// ===== Action Node Factory =====
|
||||
class DemonologyWarlockStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
DemonologyWarlockStrategyActionNodeFactory()
|
||||
{
|
||||
creators["metamorphosis"] = &metamorphosis;
|
||||
creators["demonic empowerment"] = &demonic_empowerment;
|
||||
creators["corruption"] = &corruption;
|
||||
creators["corruption on attacker"] = &corruption_on_attacker;
|
||||
creators["immolate"] = &immolate;
|
||||
creators["immolate on attacker"] = &immolate_on_attacker;
|
||||
creators["incinerate"] = &incinerate;
|
||||
creators["soul fire"] = &soul_fire;
|
||||
creators["shadow bolt"] = &shadow_bolt;
|
||||
creators["life tap"] = &life_tap;
|
||||
creators["immolation aura"] = &immolation_aura;
|
||||
creators["shadowflame"] = &shadowflame;
|
||||
creators["seed of corruption on attacker"] = &seed_of_corruption_on_attacker;
|
||||
creators["seed of corruption"] = &seed_of_corruption;
|
||||
creators["rain of fire"] = &rain_of_fire;
|
||||
creators["demon charge"] = &demon_charge;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* metamorphosis(PlayerbotAI*) { return new ActionNode("metamorphosis", {}, {}, {}); }
|
||||
static ActionNode* demonic_empowerment(PlayerbotAI*) { return new ActionNode("demonic empowerment", {}, {}, {}); }
|
||||
static ActionNode* corruption(PlayerbotAI*) { return new ActionNode("corruption", {}, {}, {}); }
|
||||
static ActionNode* corruption_on_attacker(PlayerbotAI*) { return new ActionNode("corruption on attacker", {}, {}, {}); }
|
||||
static ActionNode* immolate(PlayerbotAI*) { return new ActionNode("immolate", {}, {}, {}); }
|
||||
static ActionNode* immolate_on_attacker(PlayerbotAI*) { return new ActionNode("immolate on attacker", {}, {}, {}); }
|
||||
static ActionNode* incinerate(PlayerbotAI*) { return new ActionNode("incinerate", {}, {}, {}); }
|
||||
static ActionNode* soul_fire(PlayerbotAI*) { return new ActionNode("soul fire", {}, {}, {}); }
|
||||
static ActionNode* shadow_bolt(PlayerbotAI*) { return new ActionNode("shadow bolt", {}, {}, {}); }
|
||||
static ActionNode* life_tap(PlayerbotAI*) { return new ActionNode("life tap", {}, {}, {}); }
|
||||
static ActionNode* immolation_aura(PlayerbotAI*) { return new ActionNode("immolation aura", {}, {}, {}); }
|
||||
static ActionNode* shadowflame(PlayerbotAI*) { return new ActionNode("shadowflame", {}, {}, {}); }
|
||||
static ActionNode* seed_of_corruption_on_attacker(PlayerbotAI*) { return new ActionNode("seed of corruption on attacker", {}, {}, {}); }
|
||||
static ActionNode* seed_of_corruption(PlayerbotAI*) { return new ActionNode("seed of corruption", {}, {}, {}); }
|
||||
static ActionNode* rain_of_fire(PlayerbotAI*) { return new ActionNode("rain of fire", {}, {}, {}); }
|
||||
static ActionNode* demon_charge(PlayerbotAI*) { return new ActionNode("demon charge", {}, {}, {}); }
|
||||
};
|
||||
|
||||
// ===== Single Target Strategy =====
|
||||
DemonologyWarlockStrategy::DemonologyWarlockStrategy(PlayerbotAI* botAI) : GenericWarlockStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new DemonologyWarlockStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
// ===== Default Actions =====
|
||||
std::vector<NextAction> DemonologyWarlockStrategy::getDefaultActions()
|
||||
{
|
||||
return {
|
||||
NextAction("corruption", 5.5f),
|
||||
NextAction("immolate", 5.4f),
|
||||
NextAction("shadow bolt", 5.3f),
|
||||
NextAction("incinerate", 5.2f),
|
||||
NextAction("shoot", 5.0f) };
|
||||
}
|
||||
|
||||
// ===== Trigger Initialization ===
|
||||
void DemonologyWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericWarlockStrategy::InitTriggers(triggers);
|
||||
|
||||
// High priority cooldowns
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"metamorphosis",
|
||||
{
|
||||
NextAction("metamorphosis", 28.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"demonic empowerment",
|
||||
{
|
||||
NextAction("demonic empowerment", 28.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// Main DoT triggers for high uptime
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"corruption on attacker",
|
||||
{
|
||||
NextAction("corruption on attacker", 19.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"immolate on attacker",
|
||||
{
|
||||
NextAction("immolate on attacker", 19.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"corruption",
|
||||
{
|
||||
NextAction("corruption", 18.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"immolate",
|
||||
{
|
||||
NextAction("immolate", 17.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// Procs
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"decimation",
|
||||
{
|
||||
NextAction("soul fire", 17.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"molten core",
|
||||
{
|
||||
NextAction("incinerate", 16.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// Life Tap glyph buff, and Life Tap as filler
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"life tap glyph buff",
|
||||
{
|
||||
NextAction("life tap", 29.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"life tap",
|
||||
{
|
||||
NextAction("life tap", 5.1f)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"meta melee flee check",
|
||||
{
|
||||
NextAction("flee", 39.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Combat strategy to run to melee for Immolation Aura
|
||||
// Enabled by default for the Demonology spec
|
||||
// To enable, type "co +meta melee"
|
||||
// To disable, type "co -meta melee"
|
||||
MetaMeleeAoeStrategy::MetaMeleeAoeStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) {}
|
||||
|
||||
void MetaMeleeAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"immolation aura active",
|
||||
{
|
||||
NextAction("reach melee", 25.5f),
|
||||
NextAction("demon charge", 25.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
32
src/Ai/Class/Warlock/Strategy/DemonologyWarlockStrategy.h
Normal file
32
src/Ai/Class/Warlock/Strategy/DemonologyWarlockStrategy.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_DEMONOLOGYWARLOCKSTRATEGY_H
|
||||
#define _PLAYERBOT_DEMONOLOGYWARLOCKSTRATEGY_H
|
||||
|
||||
#include "GenericWarlockStrategy.h"
|
||||
#include "CombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class DemonologyWarlockStrategy : public GenericWarlockStrategy
|
||||
{
|
||||
public:
|
||||
DemonologyWarlockStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "demo"; }
|
||||
std::vector<NextAction> getDefaultActions() override;
|
||||
};
|
||||
|
||||
class MetaMeleeAoeStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
MetaMeleeAoeStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "meta melee"; }
|
||||
};
|
||||
#endif
|
||||
153
src/Ai/Class/Warlock/Strategy/DestructionWarlockStrategy.cpp
Normal file
153
src/Ai/Class/Warlock/Strategy/DestructionWarlockStrategy.cpp
Normal file
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "DestructionWarlockStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
// ===== Action Node Factory =====
|
||||
class DestructionWarlockStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
DestructionWarlockStrategyActionNodeFactory()
|
||||
{
|
||||
creators["immolate"] = &immolate;
|
||||
creators["conflagrate"] = &conflagrate;
|
||||
creators["chaos bolt"] = &chaos_bolt;
|
||||
creators["incinerate"] = &incinerate;
|
||||
creators["corruption"] = &corruption;
|
||||
creators["corruption on attacker"] = &corruption_on_attacker;
|
||||
creators["shadow bolt"] = &shadow_bolt;
|
||||
creators["shadowburn"] = &shadowburn;
|
||||
creators["life tap"] = &life_tap;
|
||||
creators["shadowfury"] = &shadowfury;
|
||||
creators["shadowflame"] = &shadowflame;
|
||||
creators["seed of corruption"] = &seed_of_corruption;
|
||||
creators["seed of corruption on attacker"] = &seed_of_corruption;
|
||||
creators["rain of fire"] = &rain_of_fire;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* immolate(PlayerbotAI*) { return new ActionNode("immolate", {}, {}, {}); }
|
||||
static ActionNode* conflagrate(PlayerbotAI*) { return new ActionNode("conflagrate", {}, {}, {}); }
|
||||
static ActionNode* chaos_bolt(PlayerbotAI*) { return new ActionNode("chaos bolt", {}, {}, {}); }
|
||||
static ActionNode* incinerate(PlayerbotAI*) { return new ActionNode("incinerate", {}, {}, {}); }
|
||||
static ActionNode* corruption(PlayerbotAI*) { return new ActionNode("corruption", {}, {}, {}); }
|
||||
static ActionNode* corruption_on_attacker(PlayerbotAI*) { return new ActionNode("corruption on attacker", {}, {}, {}); }
|
||||
static ActionNode* shadow_bolt(PlayerbotAI*) { return new ActionNode("shadow bolt", {}, {}, {}); }
|
||||
static ActionNode* shadowburn(PlayerbotAI*) { return new ActionNode("shadowburn", {}, {}, {}); }
|
||||
static ActionNode* life_tap(PlayerbotAI*) { return new ActionNode("life tap", {}, {}, {}); }
|
||||
static ActionNode* shadowfury(PlayerbotAI*) { return new ActionNode("shadowfury", {}, {}, {}); }
|
||||
static ActionNode* shadowflame(PlayerbotAI*) { return new ActionNode("shadowflame", {}, {}, {}); }
|
||||
static ActionNode* seed_of_corruption(PlayerbotAI*) { return new ActionNode("seed of corruption", {}, {}, {}); }
|
||||
static ActionNode* seed_of_corruption_on_attacker(PlayerbotAI*) { return new ActionNode("seed of corruption on attacker", {}, {}, {}); }
|
||||
static ActionNode* rain_of_fire(PlayerbotAI*) { return new ActionNode("rain of fire", {}, {}, {}); }
|
||||
};
|
||||
|
||||
// ===== Single Target Strategy =====
|
||||
DestructionWarlockStrategy::DestructionWarlockStrategy(PlayerbotAI* botAI) : GenericWarlockStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new DestructionWarlockStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
// ===== Default Actions =====
|
||||
std::vector<NextAction> DestructionWarlockStrategy::getDefaultActions()
|
||||
{
|
||||
return {
|
||||
NextAction("immolate", 5.9f),
|
||||
NextAction("conflagrate", 5.8f),
|
||||
NextAction("chaos bolt", 5.7f),
|
||||
NextAction("incinerate", 5.6f),
|
||||
NextAction("corruption", 5.3f), // Note: Corruption and Shadow Bolt won't be used after the character learns Incinerate at level 64
|
||||
NextAction("shadow bolt", 5.2f),
|
||||
NextAction("shoot", 5.0f)
|
||||
};
|
||||
}
|
||||
|
||||
// ===== Trigger Initialization ===
|
||||
void DestructionWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericWarlockStrategy::InitTriggers(triggers);
|
||||
|
||||
// Main DoT triggers for high uptime + high priority cooldowns
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"immolate",
|
||||
{
|
||||
NextAction("immolate", 20.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"conflagrate",
|
||||
{
|
||||
NextAction("conflagrate", 19.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"chaos bolt",
|
||||
{
|
||||
NextAction("chaos bolt", 19.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// Note: Corruption won't be used after the character learns Incinerate at level 64
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"corruption on attacker",
|
||||
{
|
||||
NextAction("corruption on attacker", 5.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"corruption",
|
||||
{
|
||||
NextAction("corruption", 5.4f)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// Shadowburn as execute if target is low HP
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"target critical health",
|
||||
{
|
||||
NextAction("shadowburn", 18.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// Life Tap glyph buff, and Life Tap as filler
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"life tap glyph buff",
|
||||
{
|
||||
NextAction("life tap", 29.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"life tap",
|
||||
{
|
||||
NextAction("life tap", 5.1f)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"enemy too close for spell",
|
||||
{
|
||||
NextAction("flee", 39.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
24
src/Ai/Class/Warlock/Strategy/DestructionWarlockStrategy.h
Normal file
24
src/Ai/Class/Warlock/Strategy/DestructionWarlockStrategy.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_DESTRUCTIONWARLOCKSTRATEGY_H
|
||||
#define _PLAYERBOT_DESTRUCTIONWARLOCKSTRATEGY_H
|
||||
|
||||
#include "GenericWarlockStrategy.h"
|
||||
#include "CombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class DestructionWarlockStrategy : public GenericWarlockStrategy
|
||||
{
|
||||
public:
|
||||
DestructionWarlockStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "destro"; }
|
||||
std::vector<NextAction> getDefaultActions() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,219 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "GenericWarlockNonCombatStrategy.h"
|
||||
#include "AiFactory.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class GenericWarlockNonCombatStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
GenericWarlockNonCombatStrategyActionNodeFactory()
|
||||
{
|
||||
creators["fel armor"] = &fel_armor;
|
||||
creators["demon armor"] = &demon_armor;
|
||||
creators["summon voidwalker"] = &summon_voidwalker;
|
||||
creators["summon felguard"] = &summon_felguard;
|
||||
creators["summon succubus"] = &summon_succubus;
|
||||
creators["summon felhunter"] = &summon_felhunter;
|
||||
}
|
||||
|
||||
// Pet skills are setup in pass-through fashion, so if one fails, it attempts to cast the next one
|
||||
// The order goes Felguard -> Felhunter -> Succubus -> Voidwalker -> Imp
|
||||
// Pets are summoned based on the non-combat strategy you have active, the warlock's level, and if they have a soul shard available
|
||||
|
||||
private:
|
||||
static ActionNode* fel_armor([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("fel armor",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("demon armor") },
|
||||
/*C*/ {});
|
||||
}
|
||||
|
||||
static ActionNode* demon_armor([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("demon armor",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("demon skin") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* summon_voidwalker([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("summon voidwalker",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("summon imp") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* summon_succubus([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("summon succubus",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("summon voidwalker") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* summon_felhunter([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("summon felhunter",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("summon succubus") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* summon_felguard([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("summon felguard",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("summon felhunter") },
|
||||
/*C*/ {});
|
||||
}
|
||||
};
|
||||
|
||||
GenericWarlockNonCombatStrategy::GenericWarlockNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericWarlockNonCombatStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericWarlockNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
NonCombatStrategy::InitTriggers(triggers);
|
||||
triggers.push_back(new TriggerNode("has pet", { NextAction("toggle pet spell", 60.0f) }));
|
||||
triggers.push_back(new TriggerNode("new pet", { NextAction("set pet stance", 60.0f) }));
|
||||
triggers.push_back(new TriggerNode("no pet", { NextAction("fel domination", 30.0f) }));
|
||||
triggers.push_back(new TriggerNode("no soul shard", { NextAction("create soul shard", 60.0f) }));
|
||||
triggers.push_back(new TriggerNode("too many soul shards", { NextAction("destroy soul shard", 60.0f) }));
|
||||
triggers.push_back(new TriggerNode("soul link", { NextAction("soul link", 28.0f) }));
|
||||
triggers.push_back(new TriggerNode("demon armor", { NextAction("fel armor", 27.0f) }));
|
||||
triggers.push_back(new TriggerNode("no healthstone", { NextAction("create healthstone", 26.0f) }));
|
||||
triggers.push_back(new TriggerNode("no soulstone", { NextAction("create soulstone", 25.0f) }));
|
||||
triggers.push_back(new TriggerNode("life tap", { NextAction("life tap", 23.0f) }));
|
||||
}
|
||||
|
||||
// Non-combat strategy for summoning a Imp
|
||||
// Enabled by default for the Destruction spec
|
||||
// To enable, type "nc +imp"
|
||||
// To disable, type "nc -imp"
|
||||
SummonImpStrategy::SummonImpStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SummonImpStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", { NextAction("summon imp", 29.0f) }));
|
||||
triggers.push_back(new TriggerNode("wrong pet", { NextAction("summon imp", 29.0f) }));
|
||||
}
|
||||
|
||||
// Non-combat strategy for summoning a Voidwalker
|
||||
// Disabled by default
|
||||
// To enable, type "nc +voidwalker"
|
||||
// To disable, type "nc -voidwalker"
|
||||
SummonVoidwalkerStrategy::SummonVoidwalkerStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SummonVoidwalkerStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", { NextAction("summon voidwalker", 29.0f) }));
|
||||
triggers.push_back(new TriggerNode("wrong pet", { NextAction("summon voidwalker", 29.0f) }));
|
||||
}
|
||||
|
||||
// Non-combat strategy for summoning a Succubus
|
||||
// Disabled by default
|
||||
// To enable, type "nc +succubus"
|
||||
// To disable, type "nc -succubus"
|
||||
SummonSuccubusStrategy::SummonSuccubusStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SummonSuccubusStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", { NextAction("summon succubus", 29.0f) }));
|
||||
triggers.push_back(new TriggerNode("wrong pet", { NextAction("summon succubus", 29.0f) }));
|
||||
}
|
||||
|
||||
// Non-combat strategy for summoning a Felhunter
|
||||
// Enabled by default for the Affliction spec
|
||||
// To enable, type "nc +felhunter"
|
||||
// To disable, type "nc -felhunter"
|
||||
SummonFelhunterStrategy::SummonFelhunterStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SummonFelhunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", { NextAction("summon felhunter", 29.0f) }));
|
||||
triggers.push_back(new TriggerNode("wrong pet", { NextAction("summon felhunter", 29.0f) }));
|
||||
}
|
||||
|
||||
// Non-combat strategy for summoning a Felguard
|
||||
// Enabled by default for the Demonology spec
|
||||
// To enable, type "nc +felguard"
|
||||
// To disable, type "nc -felguard"
|
||||
SummonFelguardStrategy::SummonFelguardStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SummonFelguardStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no pet", { NextAction("summon felguard", 29.0f) }));
|
||||
triggers.push_back(new TriggerNode("wrong pet", { NextAction("summon felguard", 29.0f) }));
|
||||
}
|
||||
|
||||
// Non-combat strategy for selecting themselves to receive soulstone
|
||||
// Disabled by default
|
||||
// To enable, type "nc +ss self"
|
||||
// To disable, type "nc -ss self"
|
||||
SoulstoneSelfStrategy::SoulstoneSelfStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SoulstoneSelfStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("soulstone", { NextAction("soulstone self", 24.0f) }));
|
||||
}
|
||||
|
||||
// Non-combat strategy for selecting the master to receive soulstone
|
||||
// Disabled by default
|
||||
// To enable, type "nc +ss master"
|
||||
// To disable, type "nc -ss master"
|
||||
SoulstoneMasterStrategy::SoulstoneMasterStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SoulstoneMasterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("soulstone", { NextAction("soulstone master", 24.0f) }));
|
||||
}
|
||||
|
||||
// Non-combat strategy for selecting tanks to receive soulstone
|
||||
// Disabled by default
|
||||
// To enable, type "nc +ss tank"
|
||||
// To disable, type "nc -ss tank"
|
||||
SoulstoneTankStrategy::SoulstoneTankStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SoulstoneTankStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("soulstone", { NextAction("soulstone tank", 24.0f) }));
|
||||
}
|
||||
|
||||
// Non-combat strategy for selecting healers to receive soulstone
|
||||
// Disabled by default
|
||||
// To enable, type "nc +ss healer"
|
||||
// To disable, type "nc -ss healer"
|
||||
SoulstoneHealerStrategy::SoulstoneHealerStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void SoulstoneHealerStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("soulstone", { NextAction("soulstone healer", 24.0f) }));
|
||||
}
|
||||
|
||||
// Non-combat strategy for using Spellstone
|
||||
// Enabled by default for Affliction and Demonology specs
|
||||
// To enable, type "nc +spellstone"
|
||||
// To disable, type "nc -spellstone"
|
||||
UseSpellstoneStrategy::UseSpellstoneStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void UseSpellstoneStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no spellstone", { NextAction("create spellstone", 24.0f) }));
|
||||
triggers.push_back(new TriggerNode("spellstone", { NextAction("spellstone", 24.0f) }));
|
||||
}
|
||||
|
||||
// Non-combat strategy for using Firestone
|
||||
// Enabled by default for the Destruction spec
|
||||
// To enable, type "nc +firestone"
|
||||
// To disable, type "nc -firestone"
|
||||
UseFirestoneStrategy::UseFirestoneStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai) {}
|
||||
|
||||
void UseFirestoneStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("no firestone", { NextAction("create firestone", 24.0f) }));
|
||||
triggers.push_back(new TriggerNode("firestone", { NextAction("firestone", 24.0f) }));
|
||||
}
|
||||
132
src/Ai/Class/Warlock/Strategy/GenericWarlockNonCombatStrategy.h
Normal file
132
src/Ai/Class/Warlock/Strategy/GenericWarlockNonCombatStrategy.h
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_GENERICWARLOCKNONCOMBATSTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICWARLOCKNONCOMBATSTRATEGY_H
|
||||
|
||||
#include "NonCombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericWarlockNonCombatStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericWarlockNonCombatStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "nc"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class SummonImpStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
SummonImpStrategy(PlayerbotAI* ai);
|
||||
virtual std::string const getName() override { return "imp"; }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class SummonVoidwalkerStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
SummonVoidwalkerStrategy(PlayerbotAI* ai);
|
||||
virtual std::string const getName() override { return "voidwalker"; }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class SummonSuccubusStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
SummonSuccubusStrategy(PlayerbotAI* ai);
|
||||
virtual std::string const getName() override { return "succubus"; }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class SummonFelhunterStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
SummonFelhunterStrategy(PlayerbotAI* ai);
|
||||
virtual std::string const getName() override { return "felhunter"; }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class SummonFelguardStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
SummonFelguardStrategy(PlayerbotAI* ai);
|
||||
virtual std::string const getName() override { return "felguard"; }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class SoulstoneSelfStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
SoulstoneSelfStrategy(PlayerbotAI* ai);
|
||||
virtual std::string const getName() override { return "ss self"; }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class SoulstoneMasterStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
SoulstoneMasterStrategy(PlayerbotAI* ai);
|
||||
virtual std::string const getName() override { return "ss master"; }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class SoulstoneTankStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
SoulstoneTankStrategy(PlayerbotAI* ai);
|
||||
virtual std::string const getName() override { return "ss tank"; }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class SoulstoneHealerStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
SoulstoneHealerStrategy(PlayerbotAI* ai);
|
||||
virtual std::string const getName() override { return "ss healer"; }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class UseSpellstoneStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
UseSpellstoneStrategy(PlayerbotAI* ai);
|
||||
virtual std::string const getName() override { return "spellstone"; }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class UseFirestoneStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
UseFirestoneStrategy(PlayerbotAI* ai);
|
||||
virtual std::string const getName() override { return "firestone"; }
|
||||
|
||||
public:
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
261
src/Ai/Class/Warlock/Strategy/GenericWarlockStrategy.cpp
Normal file
261
src/Ai/Class/Warlock/Strategy/GenericWarlockStrategy.cpp
Normal file
@@ -0,0 +1,261 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "GenericWarlockStrategy.h"
|
||||
#include "Strategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class GenericWarlockStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
GenericWarlockStrategyActionNodeFactory()
|
||||
{
|
||||
creators["banish on cc"] = &banish_on_cc;
|
||||
creators["fear on cc"] = &fear_on_cc;
|
||||
creators["spell lock"] = &spell_lock;
|
||||
creators["devour magic purge"] = &devour_magic_purge;
|
||||
creators["devour magic cleanse"] = &devour_magic_cleanse;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* banish_on_cc(PlayerbotAI*) { return new ActionNode("banish on cc", {}, {}, {}); }
|
||||
static ActionNode* fear_on_cc(PlayerbotAI*) { return new ActionNode("fear on cc", {}, {}, {}); }
|
||||
static ActionNode* spell_lock(PlayerbotAI*) { return new ActionNode("spell lock", {}, {}, {}); }
|
||||
static ActionNode* devour_magic_purge(PlayerbotAI*) { return new ActionNode("devour magic purge", {}, {}, {}); }
|
||||
static ActionNode* devour_magic_cleanse(PlayerbotAI*) { return new ActionNode("devour magic cleanse", {}, {}, {}); }
|
||||
};
|
||||
|
||||
GenericWarlockStrategy::GenericWarlockStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericWarlockStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
std::vector<NextAction> GenericWarlockStrategy::getDefaultActions()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
void GenericWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
CombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"low mana",
|
||||
{
|
||||
NextAction("life tap", 95.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"medium threat",
|
||||
{
|
||||
NextAction("soulshatter", 55.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"spell lock",
|
||||
{
|
||||
NextAction("spell lock", 40.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"no soul shard",
|
||||
{
|
||||
NextAction("create soul shard", 60.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"too many soul shards",
|
||||
{
|
||||
NextAction("destroy soul shard", 60.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"devour magic purge",
|
||||
{
|
||||
NextAction("devour magic purge", 50.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"devour magic cleanse",
|
||||
{
|
||||
NextAction("devour magic cleanse", 50.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// ===== AoE Strategy, 3+ enemies =====
|
||||
|
||||
void AoEWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"medium aoe",
|
||||
{
|
||||
NextAction("immolation aura", 26.0f),
|
||||
NextAction("shadowfury", 23.0f),
|
||||
NextAction("shadowflame", 22.5f),
|
||||
NextAction("seed of corruption on attacker", 22.0f),
|
||||
NextAction("seed of corruption", 21.5f),
|
||||
NextAction("rain of fire", 21.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode("rain of fire channel check",
|
||||
{
|
||||
NextAction("cancel channel", 21.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
void WarlockBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
// Placeholder for future boost triggers
|
||||
}
|
||||
|
||||
void WarlockPetStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
// Placeholder for future pet triggers
|
||||
}
|
||||
|
||||
void WarlockCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"banish",
|
||||
{
|
||||
NextAction("banish on cc", 33.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"fear",
|
||||
{
|
||||
NextAction("fear on cc", 32.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Combat strategy for using Curse of Agony
|
||||
// Enabled by default for the Affliction spec
|
||||
// To enable, type "co +curse of agony"
|
||||
// To disable, type "co -curse of agony"
|
||||
void WarlockCurseOfAgonyStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"curse of agony on attacker",
|
||||
{
|
||||
NextAction("curse of agony on attacker", 18.5f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"curse of agony",
|
||||
{
|
||||
NextAction("curse of agony", 17.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Combat strategy for using Curse of the Elements
|
||||
// Enabled by default for the Destruction spec
|
||||
// To enable, type "co +curse of elements"
|
||||
// To disable, type "co -curse of elements"
|
||||
void WarlockCurseOfTheElementsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"curse of the elements",
|
||||
{
|
||||
NextAction("curse of the elements", 29.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Combat strategy for using Curse of Doom
|
||||
// Disabled by default
|
||||
// To enable, type "co +curse of doom"
|
||||
// To disable, type "co -curse of doom"
|
||||
void WarlockCurseOfDoomStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"curse of doom",
|
||||
{
|
||||
NextAction("curse of doom", 29.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Combat strategy for using Curse of Exhaustion
|
||||
// Disabled by default
|
||||
// To enable, type "co +curse of exhaustion"
|
||||
// To disable, type "co -curse of exhaustion"
|
||||
void WarlockCurseOfExhaustionStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"curse of exhaustion",
|
||||
{
|
||||
NextAction("curse of exhaustion", 29.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Combat strategy for using Curse of Tongues
|
||||
// Disabled by default
|
||||
// To enable, type "co +curse of tongues"
|
||||
// To disable, type "co -curse of tongues"
|
||||
void WarlockCurseOfTonguesStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"curse of tongues",
|
||||
{
|
||||
NextAction("curse of tongues", 29.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Combat strategy for using Curse of Weakness
|
||||
// Disabled by default
|
||||
// To enable, type "co +curse of weakness"
|
||||
// To disable, type "co -curse of weakness"
|
||||
void WarlockCurseOfWeaknessStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"curse of weakness",
|
||||
{
|
||||
NextAction("curse of weakness", 29.0f)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
114
src/Ai/Class/Warlock/Strategy/GenericWarlockStrategy.h
Normal file
114
src/Ai/Class/Warlock/Strategy/GenericWarlockStrategy.h
Normal file
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_GENERICWARLOCKSTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICWARLOCKSTRATEGY_H
|
||||
|
||||
#include "CombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericWarlockStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericWarlockStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "warlock"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::vector<NextAction> getDefaultActions() override;
|
||||
uint32 GetType() const override { return CombatStrategy::GetType() | STRATEGY_TYPE_RANGED | STRATEGY_TYPE_DPS; }
|
||||
};
|
||||
|
||||
class AoEWarlockStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
AoEWarlockStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "aoe"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class WarlockBoostStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
WarlockBoostStrategy(PlayerbotAI* botAI) : Strategy(botAI){};
|
||||
|
||||
std::string const getName() override { return "boost"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class WarlockPetStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
WarlockPetStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "pet"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class WarlockCcStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
WarlockCcStrategy(PlayerbotAI* botAI) : Strategy(botAI){};
|
||||
|
||||
std::string const getName() override { return "cc"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class WarlockCurseOfAgonyStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
WarlockCurseOfAgonyStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "curse of agony"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class WarlockCurseOfTheElementsStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
WarlockCurseOfTheElementsStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "curse of elements"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class WarlockCurseOfDoomStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
WarlockCurseOfDoomStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "curse of doom"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class WarlockCurseOfExhaustionStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
WarlockCurseOfExhaustionStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "curse of exhaustion"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class WarlockCurseOfTonguesStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
WarlockCurseOfTonguesStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "curse of tongues"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class WarlockCurseOfWeaknessStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
WarlockCurseOfWeaknessStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
std::string const getName() override { return "curse of weakness"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
47
src/Ai/Class/Warlock/Strategy/TankWarlockStrategy.cpp
Normal file
47
src/Ai/Class/Warlock/Strategy/TankWarlockStrategy.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "TankWarlockStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
// Combat strategy for a Warlock Tank, for certain bosses like Twin Emperors
|
||||
// Priority is set to spam Searing Pain and use Shadow Ward on CD
|
||||
// Disabled by default
|
||||
// To enable, type "co +tank"
|
||||
// To disable, type "co -tank"
|
||||
|
||||
// ===== Action Node Factory =====
|
||||
class TankWarlockStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
TankWarlockStrategyActionNodeFactory()
|
||||
{
|
||||
creators["shadow ward"] = &shadow_ward;
|
||||
creators["searing pain"] = &searing_pain;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* shadow_ward(PlayerbotAI*) { return new ActionNode("shadow ward", {}, {}, {}); }
|
||||
static ActionNode* searing_pain(PlayerbotAI*) { return new ActionNode("searing pain", {}, {}, {}); }
|
||||
};
|
||||
|
||||
// ===== Warlock Tank Combat Strategy =====
|
||||
TankWarlockStrategy::TankWarlockStrategy(PlayerbotAI* botAI) : GenericWarlockStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new TankWarlockStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
std::vector<NextAction> TankWarlockStrategy::getDefaultActions()
|
||||
{
|
||||
// Shadow Ward is the highest priority, Searing Pain next.
|
||||
return {
|
||||
NextAction("shadow ward", 27.5f),
|
||||
NextAction("searing pain", 27.0f)
|
||||
};
|
||||
}
|
||||
|
||||
void TankWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
}
|
||||
23
src/Ai/Class/Warlock/Strategy/TankWarlockStrategy.h
Normal file
23
src/Ai/Class/Warlock/Strategy/TankWarlockStrategy.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
||||
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_TANKWARLOCKSTRATEGY_H
|
||||
#define _PLAYERBOT_TANKWARLOCKSTRATEGY_H
|
||||
|
||||
#include "GenericWarlockStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class TankWarlockStrategy : public GenericWarlockStrategy
|
||||
{
|
||||
public:
|
||||
TankWarlockStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "tank"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::vector<NextAction> getDefaultActions() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user