mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-19 01:54:35 +00:00
[HOT FIX] MS build issues regarding folder / command lenght usage or rc.exe (#2038)
This commit is contained in:
212
src/Ai/Class/Paladin/Strategy/DpsPaladinStrategy.cpp
Normal file
212
src/Ai/Class/Paladin/Strategy/DpsPaladinStrategy.cpp
Normal file
@@ -0,0 +1,212 @@
|
||||
/*
|
||||
* 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 "DpsPaladinStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
#include "Strategy.h"
|
||||
|
||||
class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
DpsPaladinStrategyActionNodeFactory()
|
||||
{
|
||||
creators["sanctity aura"] = &sanctity_aura;
|
||||
creators["retribution aura"] = &retribution_aura;
|
||||
creators["seal of corruption"] = &seal_of_corruption;
|
||||
creators["seal of vengeance"] = &seal_of_vengeance;
|
||||
creators["seal of command"] = &seal_of_command;
|
||||
creators["blessing of might"] = &blessing_of_might;
|
||||
creators["crusader strike"] = &crusader_strike;
|
||||
creators["repentance"] = &repentance;
|
||||
creators["repentance on enemy healer"] = &repentance_on_enemy_healer;
|
||||
creators["repentance on snare target"] = &repentance_on_snare_target;
|
||||
creators["repentance of shield"] = &repentance_or_shield;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* seal_of_corruption([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"seal of corruption",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("seal of vengeance") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* seal_of_vengeance([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"seal of vengeance",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("seal of command") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* seal_of_command([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"seal of command",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("seal of righteousness") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* blessing_of_might([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"blessing of might",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("blessing of kings") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* crusader_strike([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"crusader strike",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* repentance([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"repentance",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("hammer of justice") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* repentance_on_enemy_healer([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"repentance on enemy healer",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("hammer of justice on enemy healer") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* repentance_on_snare_target([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"repentance on snare target",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("hammer of justice on snare target") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* sanctity_aura([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"sanctity aura",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("retribution aura") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* retribution_aura([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"retribution aura",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("devotion aura") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* repentance_or_shield([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"repentance",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("divine shield") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
DpsPaladinStrategy::DpsPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new DpsPaladinStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
std::vector<NextAction> DpsPaladinStrategy::getDefaultActions()
|
||||
{
|
||||
return {
|
||||
NextAction("hammer of wrath", ACTION_DEFAULT + 0.6f),
|
||||
NextAction("judgement of wisdom", ACTION_DEFAULT + 0.5f),
|
||||
NextAction("crusader strike", ACTION_DEFAULT + 0.4f),
|
||||
NextAction("divine storm", ACTION_DEFAULT + 0.3f),
|
||||
NextAction("consecration", ACTION_DEFAULT + 0.1f),
|
||||
NextAction("melee", ACTION_DEFAULT)
|
||||
};
|
||||
}
|
||||
|
||||
void DpsPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericPaladinStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"art of war",
|
||||
{
|
||||
NextAction("exorcism", ACTION_DEFAULT + 0.2f)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"seal",
|
||||
{
|
||||
NextAction("seal of corruption", ACTION_HIGH)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"low mana",
|
||||
{
|
||||
NextAction("seal of wisdom", ACTION_HIGH + 5)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"avenging wrath",
|
||||
{
|
||||
NextAction("avenging wrath", ACTION_HIGH + 2)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"medium aoe",
|
||||
{
|
||||
NextAction("divine storm", ACTION_HIGH + 4),
|
||||
NextAction("consecration", ACTION_HIGH + 3)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"enemy out of melee",
|
||||
{
|
||||
NextAction("reach melee", ACTION_HIGH + 1)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
24
src/Ai/Class/Paladin/Strategy/DpsPaladinStrategy.h
Normal file
24
src/Ai/Class/Paladin/Strategy/DpsPaladinStrategy.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_DPSPALADINSTRATEGY_H
|
||||
#define _PLAYERBOT_DPSPALADINSTRATEGY_H
|
||||
|
||||
#include "GenericPaladinStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class DpsPaladinStrategy : public GenericPaladinStrategy
|
||||
{
|
||||
public:
|
||||
DpsPaladinStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "dps"; }
|
||||
std::vector<NextAction> getDefaultActions() override;
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_COMBAT | STRATEGY_TYPE_DPS | STRATEGY_TYPE_MELEE; }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
#include "GenericPaladinNonCombatStrategy.h"
|
||||
|
||||
#include "GenericPaladinStrategyActionNodeFactory.h"
|
||||
#include "Playerbots.h"
|
||||
#include "AiFactory.h"
|
||||
|
||||
GenericPaladinNonCombatStrategy::GenericPaladinNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericPaladinStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericPaladinNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
NonCombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("party member dead", { NextAction("redemption", ACTION_CRITICAL_HEAL + 10) }));
|
||||
triggers.push_back(new TriggerNode("party member almost full health", { NextAction("flash of light on party", 25.0f) }));
|
||||
triggers.push_back(new TriggerNode("party member medium health", { NextAction("flash of light on party", 26.0f) }));
|
||||
triggers.push_back(new TriggerNode("party member low health", { NextAction("holy light on party", 27.0f) }));
|
||||
triggers.push_back(new TriggerNode("party member critical health", { NextAction("holy light on party", 28.0f) }));
|
||||
|
||||
int specTab = AiFactory::GetPlayerSpecTab(botAI->GetBot());
|
||||
if (specTab == 0 || specTab == 1) // Holy or Protection
|
||||
triggers.push_back(new TriggerNode("often", { NextAction("apply oil", 1.0f) }));
|
||||
if (specTab == 2) // Retribution
|
||||
triggers.push_back(new TriggerNode("often", { NextAction("apply stone", 1.0f) }));
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* 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_GENERICPALADINNONCOMBATSTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICPALADINNONCOMBATSTRATEGY_H
|
||||
|
||||
#include "NonCombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericPaladinNonCombatStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericPaladinNonCombatStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "nc"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
87
src/Ai/Class/Paladin/Strategy/GenericPaladinStrategy.cpp
Normal file
87
src/Ai/Class/Paladin/Strategy/GenericPaladinStrategy.cpp
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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 "GenericPaladinStrategy.h"
|
||||
|
||||
#include "GenericPaladinStrategyActionNodeFactory.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
GenericPaladinStrategy::GenericPaladinStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericPaladinStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
CombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("critical health", { NextAction("divine shield",
|
||||
ACTION_HIGH + 5) }));
|
||||
triggers.push_back(
|
||||
new TriggerNode("hammer of justice interrupt",
|
||||
{ NextAction("hammer of justice", ACTION_INTERRUPT) }));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"hammer of justice on enemy healer",
|
||||
{ NextAction("hammer of justice on enemy healer", ACTION_INTERRUPT) }));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"hammer of justice on snare target",
|
||||
{ NextAction("hammer of justice on snare target", ACTION_INTERRUPT) }));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"critical health", { NextAction("lay on hands", ACTION_EMERGENCY) }));
|
||||
triggers.push_back(
|
||||
new TriggerNode("party member critical health",
|
||||
{ NextAction("lay on hands on party", ACTION_EMERGENCY + 1) }));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"protect party member",
|
||||
{ NextAction("blessing of protection on party", ACTION_EMERGENCY + 2) }));
|
||||
triggers.push_back(
|
||||
new TriggerNode("high mana", { NextAction("divine plea", ACTION_HIGH) }));
|
||||
}
|
||||
|
||||
void PaladinCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode(
|
||||
"cleanse cure disease", { NextAction("cleanse disease", ACTION_DISPEL + 2) }));
|
||||
triggers.push_back(
|
||||
new TriggerNode("cleanse party member cure disease",
|
||||
{ NextAction("cleanse disease on party", ACTION_DISPEL + 1) }));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"cleanse cure poison", { NextAction("cleanse poison", ACTION_DISPEL + 2) }));
|
||||
triggers.push_back(
|
||||
new TriggerNode("cleanse party member cure poison",
|
||||
{ NextAction("cleanse poison on party", ACTION_DISPEL + 1) }));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"cleanse cure magic", { NextAction("cleanse magic", ACTION_DISPEL + 2) }));
|
||||
triggers.push_back(
|
||||
new TriggerNode("cleanse party member cure magic",
|
||||
{ NextAction("cleanse magic on party", ACTION_DISPEL + 1) }));
|
||||
}
|
||||
|
||||
void PaladinBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
|
||||
// triggers.push_back(new TriggerNode("divine favor", { NextAction("divine favor",
|
||||
// ACTION_HIGH + 1) }));
|
||||
}
|
||||
|
||||
void PaladinCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("turn undead", { NextAction("turn undead", ACTION_HIGH + 1) }));
|
||||
}
|
||||
|
||||
void PaladinHealerDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("healer should attack",
|
||||
{
|
||||
NextAction("hammer of wrath", ACTION_DEFAULT + 0.6f),
|
||||
NextAction("holy shock", ACTION_DEFAULT + 0.5f),
|
||||
NextAction("shield of righteousness", ACTION_DEFAULT + 0.4f),
|
||||
NextAction("judgement of light", ACTION_DEFAULT + 0.3f),
|
||||
NextAction("consecration", ACTION_DEFAULT + 0.2f),
|
||||
NextAction("exorcism", ACTION_DEFAULT+ 0.1f),
|
||||
}));
|
||||
}
|
||||
58
src/Ai/Class/Paladin/Strategy/GenericPaladinStrategy.h
Normal file
58
src/Ai/Class/Paladin/Strategy/GenericPaladinStrategy.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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_GENERICPALADINSTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICPALADINSTRATEGY_H
|
||||
|
||||
#include "CombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericPaladinStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericPaladinStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "paladin"; }
|
||||
};
|
||||
|
||||
class PaladinCureStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinCureStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cure"; }
|
||||
};
|
||||
|
||||
class PaladinBoostStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinBoostStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "boost"; }
|
||||
};
|
||||
|
||||
class PaladinCcStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinCcStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cc"; }
|
||||
};
|
||||
|
||||
class PaladinHealerDpsStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinHealerDpsStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "healer dps"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,258 @@
|
||||
/*
|
||||
* 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_GENERICPALADINSTRATEGYACTIONNODEFACTORY_H
|
||||
#define _PLAYERBOT_GENERICPALADINSTRATEGYACTIONNODEFACTORY_H
|
||||
|
||||
#include "Action.h"
|
||||
#include "NamedObjectContext.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
GenericPaladinStrategyActionNodeFactory()
|
||||
{
|
||||
// creators["seal of light"] = &seal_of_light;
|
||||
creators["cleanse poison"] = &cleanse_poison;
|
||||
creators["cleanse disease"] = &cleanse_disease;
|
||||
creators["cleanse magic"] = &cleanse_magic;
|
||||
creators["cleanse poison on party"] = &cleanse_poison_on_party;
|
||||
creators["cleanse disease on party"] = &cleanse_disease_on_party;
|
||||
creators["seal of wisdom"] = &seal_of_wisdom;
|
||||
creators["seal of justice"] = &seal_of_justice;
|
||||
creators["hand of reckoning"] = &hand_of_reckoning;
|
||||
creators["judgement"] = &judgement;
|
||||
creators["judgement of wisdom"] = &judgement_of_wisdom;
|
||||
creators["divine shield"] = &divine_shield;
|
||||
creators["flash of light"] = &flash_of_light;
|
||||
creators["flash of light on party"] = &flash_of_light_on_party;
|
||||
creators["holy wrath"] = &holy_wrath;
|
||||
creators["lay on hands"] = &lay_on_hands;
|
||||
creators["lay on hands on party"] = &lay_on_hands_on_party;
|
||||
creators["hammer of wrath"] = &hammer_of_wrath;
|
||||
creators["retribution aura"] = &retribution_aura;
|
||||
creators["blessing of kings"] = &blessing_of_kings;
|
||||
creators["blessing of wisdom"] = &blessing_of_wisdom;
|
||||
creators["blessing of kings on party"] = &blessing_of_kings_on_party;
|
||||
creators["blessing of wisdom on party"] = &blessing_of_wisdom_on_party;
|
||||
creators["blessing of sanctuary on party"] = &blessing_of_sanctuary_on_party;
|
||||
creators["blessing of sanctuary"] = &blessing_of_sanctuary;
|
||||
creators["seal of command"] = &seal_of_command;
|
||||
creators["taunt spell"] = &hand_of_reckoning;
|
||||
creators["righteous defense"] = &righteous_defense;
|
||||
creators["avenger's shield"] = &avengers_shield;
|
||||
creators["divine sacrifice"] = &divine_sacrifice;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* blessing_of_sanctuary(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("blessing of sanctuary",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* blessing_of_kings(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("blessing of kings",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* blessing_of_wisdom(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("blessing of wisdom",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* blessing_of_kings_on_party(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("blessing of kings on party",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* blessing_of_wisdom_on_party(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("blessing of wisdom on party",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* blessing_of_sanctuary_on_party(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("blessing of sanctuary on party",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* retribution_aura(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("retribution aura",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("devotion aura") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* lay_on_hands(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("lay on hands",
|
||||
/*P*/ {},
|
||||
/*A*/ {}, // { NextAction("divine shield"), new
|
||||
// NextAction("flash of light"), NULL),
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* lay_on_hands_on_party(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("lay on hands on party",
|
||||
/*P*/ {},
|
||||
/*A*/ {}, // { NextAction("flash of light"), NULL),
|
||||
/*C*/ {});
|
||||
}
|
||||
// static ActionNode* seal_of_light(PlayerbotAI* /* ai */)
|
||||
// {
|
||||
// return new ActionNode ("seal of light",
|
||||
// /*P*/ NULL,
|
||||
// /*A*/ { NextAction("seal of justice"), NULL),
|
||||
// /*C*/ NULL);
|
||||
// }
|
||||
static ActionNode* cleanse_poison(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("cleanse poison",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("purify poison") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* cleanse_magic(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("cleanse magic",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* cleanse_disease(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("cleanse disease",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("purify disease") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* cleanse_poison_on_party(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("cleanse poison on party",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("purify poison on party") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* cleanse_disease_on_party(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("cleanse disease on party",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("purify disease on party") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* seal_of_wisdom(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode ("seal of wisdom",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("seal of righteousness") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* seal_of_justice(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("seal of justice",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("seal of righteousness") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* hand_of_reckoning(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("hand of reckoning",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("righteous defense") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* righteous_defense(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("righteous defense",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("avenger's shield") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* avengers_shield(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("avenger's shield",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("judgement of wisdom") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* divine_sacrifice(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("divine sacrifice",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ { NextAction("cancel divine sacrifice") });
|
||||
}
|
||||
static ActionNode* judgement_of_wisdom(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("judgement of wisdom",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("judgement of light") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* judgement(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("judgement",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* divine_shield(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("divine shield",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("divine protection") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* flash_of_light(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("flash of light",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("holy light") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* flash_of_light_on_party(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("flash of light on party",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("holy light on party") },
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* holy_wrath(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("holy wrath",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* hammer_of_wrath(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("hammer of wrath",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {});
|
||||
}
|
||||
static ActionNode* seal_of_command(PlayerbotAI* /* ai */)
|
||||
{
|
||||
return new ActionNode("seal of command",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("seal of righteousness") },
|
||||
/*C*/ {});
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
124
src/Ai/Class/Paladin/Strategy/HealPaladinStrategy.cpp
Normal file
124
src/Ai/Class/Paladin/Strategy/HealPaladinStrategy.cpp
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* 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 "HealPaladinStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
#include "Strategy.h"
|
||||
|
||||
class HealPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
};
|
||||
|
||||
HealPaladinStrategy::HealPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new HealPaladinStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
std::vector<NextAction> HealPaladinStrategy::getDefaultActions()
|
||||
{
|
||||
return { NextAction("judgement of light", ACTION_DEFAULT) };
|
||||
}
|
||||
|
||||
void HealPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericPaladinStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"seal",
|
||||
{
|
||||
NextAction("seal of wisdom", ACTION_HIGH)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"medium mana",
|
||||
{
|
||||
NextAction("divine illumination", ACTION_HIGH + 2)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"low mana",
|
||||
{
|
||||
NextAction("divine favor", ACTION_HIGH + 1)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"party member to heal out of spell range",
|
||||
{
|
||||
NextAction("reach party member to heal", ACTION_EMERGENCY + 3)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"medium group heal setting",
|
||||
{
|
||||
NextAction("divine sacrifice", ACTION_CRITICAL_HEAL + 5),
|
||||
NextAction("avenging wrath", ACTION_HIGH + 4),
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"party member critical health",
|
||||
{
|
||||
NextAction("holy shock on party", ACTION_CRITICAL_HEAL + 6),
|
||||
NextAction("divine sacrifice", ACTION_CRITICAL_HEAL + 5),
|
||||
NextAction("holy light on party", ACTION_CRITICAL_HEAL + 4)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"party member low health",
|
||||
{
|
||||
NextAction("holy light on party", ACTION_MEDIUM_HEAL + 5)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"party member medium health",
|
||||
{
|
||||
NextAction("holy light on party", ACTION_LIGHT_HEAL + 9),
|
||||
NextAction("flash of light on party", ACTION_LIGHT_HEAL + 8)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"party member almost full health",
|
||||
{
|
||||
NextAction("flash of light on party", ACTION_LIGHT_HEAL + 3)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"beacon of light on main tank",
|
||||
{
|
||||
NextAction("beacon of light on main tank", ACTION_CRITICAL_HEAL + 7)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"sacred shield on main tank",
|
||||
{
|
||||
NextAction("sacred shield on main tank", ACTION_CRITICAL_HEAL + 6)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
24
src/Ai/Class/Paladin/Strategy/HealPaladinStrategy.h
Normal file
24
src/Ai/Class/Paladin/Strategy/HealPaladinStrategy.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_HEALPALADINSTRATEGY_H
|
||||
#define _PLAYERBOT_HEALPALADINSTRATEGY_H
|
||||
|
||||
#include "GenericPaladinStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class HealPaladinStrategy : public GenericPaladinStrategy
|
||||
{
|
||||
public:
|
||||
HealPaladinStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "heal"; }
|
||||
std::vector<NextAction> getDefaultActions() override;
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_HEAL | STRATEGY_TYPE_RANGED; }
|
||||
};
|
||||
|
||||
#endif
|
||||
243
src/Ai/Class/Paladin/Strategy/OffhealRetPaladinStrategy.cpp
Normal file
243
src/Ai/Class/Paladin/Strategy/OffhealRetPaladinStrategy.cpp
Normal file
@@ -0,0 +1,243 @@
|
||||
/*
|
||||
* 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 "OffhealRetPaladinStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
#include "Strategy.h"
|
||||
|
||||
class OffhealRetPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
OffhealRetPaladinStrategyActionNodeFactory()
|
||||
{
|
||||
creators["retribution aura"] = &retribution_aura;
|
||||
creators["seal of corruption"] = &seal_of_corruption;
|
||||
creators["seal of vengeance"] = &seal_of_vengeance;
|
||||
creators["seal of command"] = &seal_of_command;
|
||||
creators["blessing of might"] = &blessing_of_might;
|
||||
creators["crusader strike"] = &crusader_strike;
|
||||
creators["divine plea"] = &divine_plea;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* retribution_aura([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"retribution aura",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("devotion aura") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* seal_of_corruption([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"seal of corruption",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("seal of vengeance") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* seal_of_vengeance([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"seal of vengeance",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("seal of command") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* seal_of_command([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"seal of command",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("seal of righteousness") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* blessing_of_might([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"blessing of might",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("blessing of kings") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* crusader_strike([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"crusader strike",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* divine_plea([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"divine plea",
|
||||
/*P*/ {},
|
||||
/*A*/ {},
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
OffhealRetPaladinStrategy::OffhealRetPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new OffhealRetPaladinStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
std::vector<NextAction> OffhealRetPaladinStrategy::getDefaultActions()
|
||||
{
|
||||
return {
|
||||
NextAction("hammer of wrath", ACTION_DEFAULT + 0.6f),
|
||||
NextAction("judgement of wisdom", ACTION_DEFAULT + 0.5f),
|
||||
NextAction("crusader strike", ACTION_DEFAULT + 0.4f),
|
||||
NextAction("divine storm", ACTION_DEFAULT + 0.3f),
|
||||
NextAction("melee", ACTION_DEFAULT)
|
||||
};
|
||||
}
|
||||
|
||||
void OffhealRetPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericPaladinStrategy::InitTriggers(triggers);
|
||||
|
||||
// Damage Triggers
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"seal",
|
||||
{
|
||||
NextAction("seal of corruption", ACTION_HIGH)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"low mana",
|
||||
{
|
||||
NextAction("seal of wisdom", ACTION_HIGH + 5),
|
||||
NextAction("divine plea", ACTION_HIGH + 4)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"art of war",
|
||||
{
|
||||
NextAction("exorcism", ACTION_HIGH + 1)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"avenging wrath",
|
||||
{
|
||||
NextAction("avenging wrath", ACTION_HIGH + 2)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"medium aoe",
|
||||
{
|
||||
NextAction("divine storm", ACTION_HIGH + 4),
|
||||
NextAction("consecration", ACTION_HIGH + 3)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"enemy out of melee",
|
||||
{
|
||||
NextAction("reach melee", ACTION_HIGH + 1)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"retribution aura",
|
||||
{
|
||||
NextAction("retribution aura", ACTION_NORMAL)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"blessing of might",
|
||||
{
|
||||
NextAction("blessing of might", ACTION_NORMAL + 1)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"low health",
|
||||
{
|
||||
NextAction("holy light", ACTION_CRITICAL_HEAL + 2)
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// Healing Triggers
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"party member critical health",
|
||||
{
|
||||
NextAction("holy shock on party", ACTION_CRITICAL_HEAL + 6),
|
||||
NextAction("holy light on party", ACTION_CRITICAL_HEAL + 4)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"party member low health",
|
||||
{
|
||||
NextAction("holy light on party", ACTION_MEDIUM_HEAL + 5)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"party member medium health",
|
||||
{
|
||||
NextAction("flash of light on party", ACTION_LIGHT_HEAL + 8)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"party member almost full health",
|
||||
{
|
||||
NextAction("flash of light on party", ACTION_LIGHT_HEAL + 3)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"party member to heal out of spell range",
|
||||
{
|
||||
NextAction("reach party member to heal", ACTION_EMERGENCY + 3)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"beacon of light on main tank",
|
||||
{
|
||||
NextAction("beacon of light on main tank", ACTION_CRITICAL_HEAL + 7)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
27
src/Ai/Class/Paladin/Strategy/OffhealRetPaladinStrategy.h
Normal file
27
src/Ai/Class/Paladin/Strategy/OffhealRetPaladinStrategy.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* 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_OFFHEALRETPALADINSTRATEGY_H
|
||||
#define _PLAYERBOT_OFFHEALRETPALADINSTRATEGY_H
|
||||
|
||||
#include "GenericPaladinStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class OffhealRetPaladinStrategy : public GenericPaladinStrategy
|
||||
{
|
||||
public:
|
||||
OffhealRetPaladinStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "offheal"; }
|
||||
std::vector<NextAction> getDefaultActions() override;
|
||||
uint32 GetType() const override
|
||||
{
|
||||
return STRATEGY_TYPE_COMBAT | STRATEGY_TYPE_DPS | STRATEGY_TYPE_HEAL | STRATEGY_TYPE_MELEE;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
94
src/Ai/Class/Paladin/Strategy/PaladinBuffStrategies.cpp
Normal file
94
src/Ai/Class/Paladin/Strategy/PaladinBuffStrategies.cpp
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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 "PaladinBuffStrategies.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
|
||||
void PaladinBuffManaStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("blessing of wisdom on party",
|
||||
{ NextAction("blessing of wisdom on party", 11.0f) }));
|
||||
|
||||
triggers.push_back(new TriggerNode("blessing of kings on party",
|
||||
{ NextAction("blessing of kings on party", 10.5f) }));
|
||||
}
|
||||
|
||||
void PaladinBuffHealthStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("blessing of sanctuary on party",
|
||||
{ NextAction("blessing of sanctuary on party", 11.0f) }));
|
||||
}
|
||||
|
||||
void PaladinBuffDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("blessing of might on party",
|
||||
{ NextAction("blessing of might on party", 11.0f) }));
|
||||
}
|
||||
|
||||
void PaladinShadowResistanceStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("shadow resistance aura",
|
||||
{ NextAction("shadow resistance aura", ACTION_NORMAL) }));
|
||||
}
|
||||
|
||||
void PaladinFrostResistanceStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(
|
||||
new TriggerNode("frost resistance aura",
|
||||
{ NextAction("frost resistance aura", ACTION_NORMAL) }));
|
||||
}
|
||||
|
||||
void PaladinFireResistanceStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode(
|
||||
"fire resistance aura", { NextAction("fire resistance aura", ACTION_NORMAL) }));
|
||||
}
|
||||
|
||||
void PaladinBuffArmorStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("devotion aura",
|
||||
{ NextAction("devotion aura", ACTION_NORMAL) }));
|
||||
}
|
||||
|
||||
void PaladinBuffAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode(
|
||||
"retribution aura", { NextAction("retribution aura", ACTION_NORMAL) }));
|
||||
}
|
||||
|
||||
void PaladinBuffCastStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode(
|
||||
"concentration aura", { NextAction("concentration aura", ACTION_NORMAL) }));
|
||||
}
|
||||
|
||||
void PaladinBuffSpeedStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode(
|
||||
"crusader aura", { NextAction("crusader aura", ACTION_NORMAL) }));
|
||||
}
|
||||
|
||||
void PaladinBuffThreatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode(
|
||||
"righteous fury", { NextAction("righteous fury", ACTION_HIGH + 8) }));
|
||||
}
|
||||
|
||||
void PaladinBuffStatsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
// First Sanctuary (prio > Kings)
|
||||
triggers.push_back(
|
||||
new TriggerNode("blessing of sanctuary on party",
|
||||
{ NextAction("blessing of sanctuary on party", 12.0f) }));
|
||||
|
||||
// After Kings
|
||||
triggers.push_back(
|
||||
new TriggerNode("blessing of kings on party",
|
||||
{ NextAction("blessing of kings on party", 11.0f) }));
|
||||
}
|
||||
121
src/Ai/Class/Paladin/Strategy/PaladinBuffStrategies.h
Normal file
121
src/Ai/Class/Paladin/Strategy/PaladinBuffStrategies.h
Normal file
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* 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_PALADINBUFFSTRATEGIES_H
|
||||
#define _PLAYERBOT_PALADINBUFFSTRATEGIES_H
|
||||
|
||||
#include "Strategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class PaladinBuffManaStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinBuffManaStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bmana"; }
|
||||
};
|
||||
|
||||
class PaladinBuffHealthStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinBuffHealthStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bhealth"; }
|
||||
};
|
||||
|
||||
class PaladinBuffDpsStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinBuffDpsStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bdps"; }
|
||||
};
|
||||
|
||||
class PaladinBuffArmorStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinBuffArmorStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "barmor"; }
|
||||
};
|
||||
|
||||
class PaladinBuffAoeStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinBuffAoeStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "baoe"; }
|
||||
};
|
||||
|
||||
class PaladinBuffCastStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinBuffCastStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bcast"; }
|
||||
};
|
||||
|
||||
class PaladinBuffSpeedStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinBuffSpeedStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bspeed"; }
|
||||
};
|
||||
|
||||
class PaladinBuffThreatStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinBuffThreatStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bthreat"; }
|
||||
};
|
||||
|
||||
class PaladinBuffStatsStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinBuffStatsStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bstats"; }
|
||||
};
|
||||
|
||||
class PaladinShadowResistanceStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinShadowResistanceStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "rshadow"; }
|
||||
};
|
||||
|
||||
class PaladinFrostResistanceStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinFrostResistanceStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "rfrost"; }
|
||||
};
|
||||
|
||||
class PaladinFireResistanceStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PaladinFireResistanceStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "rfire"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
201
src/Ai/Class/Paladin/Strategy/TankPaladinStrategy.cpp
Normal file
201
src/Ai/Class/Paladin/Strategy/TankPaladinStrategy.cpp
Normal file
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
* 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 "TankPaladinStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
|
||||
class TankPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
TankPaladinStrategyActionNodeFactory()
|
||||
{
|
||||
creators["seal of corruption"] = &seal_of_corruption;
|
||||
creators["seal of vengeance"] = &seal_of_vengeance;
|
||||
creators["seal of command"] = &seal_of_command;
|
||||
creators["hand of reckoning"] = &hand_of_reckoning;
|
||||
creators["taunt spell"] = &hand_of_reckoning;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* seal_of_command([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"seal of command",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("seal of corruption") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
static ActionNode* seal_of_corruption([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"seal of corruption",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("seal of vengeance") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* seal_of_vengeance([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"seal of vengeance",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("seal of righteousness") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
|
||||
static ActionNode* hand_of_reckoning([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode(
|
||||
"hand of reckoning",
|
||||
/*P*/ {},
|
||||
/*A*/ { NextAction("righteous defense") },
|
||||
/*C*/ {}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
TankPaladinStrategy::TankPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new TankPaladinStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
std::vector<NextAction> TankPaladinStrategy::getDefaultActions()
|
||||
{
|
||||
return {
|
||||
NextAction("shield of righteousness", ACTION_DEFAULT + 0.6f),
|
||||
NextAction("hammer of the righteous", ACTION_DEFAULT + 0.5f),
|
||||
NextAction("judgement of wisdom", ACTION_DEFAULT + 0.4f),
|
||||
NextAction("melee", ACTION_DEFAULT)
|
||||
};
|
||||
}
|
||||
|
||||
void TankPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericPaladinStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"seal",
|
||||
{
|
||||
NextAction("seal of corruption", ACTION_HIGH)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"low mana",
|
||||
{
|
||||
NextAction("seal of wisdom", ACTION_HIGH + 9)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(new TriggerNode(
|
||||
"light aoe",
|
||||
{
|
||||
NextAction("avenger's shield", ACTION_HIGH + 5)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"medium aoe",
|
||||
{
|
||||
NextAction("consecration", ACTION_HIGH + 7),
|
||||
NextAction("avenger's shield", ACTION_HIGH + 6)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"lose aggro",
|
||||
{
|
||||
NextAction("hand of reckoning", ACTION_HIGH + 7)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"medium health",
|
||||
{ NextAction("holy shield", ACTION_HIGH + 4)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"low health",
|
||||
{
|
||||
NextAction("holy shield", ACTION_HIGH + 4)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"critical health",
|
||||
{
|
||||
NextAction("holy shield", ACTION_HIGH + 4)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"avenging wrath",
|
||||
{
|
||||
NextAction("avenging wrath", ACTION_HIGH + 2)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"target critical health",
|
||||
{
|
||||
NextAction("hammer of wrath", ACTION_CRITICAL_HEAL)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"righteous fury",
|
||||
{
|
||||
NextAction("righteous fury", ACTION_HIGH + 8)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"medium group heal setting",
|
||||
{
|
||||
NextAction("divine sacrifice", ACTION_HIGH + 5)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"enough mana",
|
||||
{
|
||||
NextAction("consecration", ACTION_HIGH + 4)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"not facing target",
|
||||
{
|
||||
NextAction("set facing", ACTION_NORMAL + 7)
|
||||
}
|
||||
)
|
||||
);
|
||||
triggers.push_back(
|
||||
new TriggerNode(
|
||||
"enemy out of melee",
|
||||
{
|
||||
NextAction("reach melee", ACTION_HIGH + 1)
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
24
src/Ai/Class/Paladin/Strategy/TankPaladinStrategy.h
Normal file
24
src/Ai/Class/Paladin/Strategy/TankPaladinStrategy.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_TANKPALADINSTRATEGY_H
|
||||
#define _PLAYERBOT_TANKPALADINSTRATEGY_H
|
||||
|
||||
#include "GenericPaladinStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class TankPaladinStrategy : public GenericPaladinStrategy
|
||||
{
|
||||
public:
|
||||
TankPaladinStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "tank"; }
|
||||
std::vector<NextAction> getDefaultActions() override;
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_TANK | STRATEGY_TYPE_MELEE; }
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user