mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-26 06:56:24 +00:00
Big update.
This commit is contained in:
59
src/strategy/priest/GenericPriestStrategy.cpp
Normal file
59
src/strategy/priest/GenericPriestStrategy.cpp
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "GenericPriestStrategy.h"
|
||||
#include "GenericPriestStrategyActionNodeFactory.h"
|
||||
#include "HealPriestStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
GenericPriestStrategy::GenericPriestStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericPriestStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
CombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("medium health", NextAction::array(0, new NextAction("greater heal", 25.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("power word: shield", 61.0f), new NextAction("greater heal", 60.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("remove shadowform", 72.0f), new NextAction("power word: shield", 71.0f), new NextAction("flash heal", 70.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member critical health", NextAction::array(0, new NextAction("remove shadowform", 62.0f), new NextAction("power word: shield on party", 61.0f), new NextAction("flash heal on party", 60.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium threat", NextAction::array(0, new NextAction("fade", 55.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("enemy is close", NextAction::array(0, new NextAction("psychic scream", 50.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("inner focus", 42.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("symbol of hope", ACTION_EMERGENCY), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("consume magic", 10.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("desperate prayer", ACTION_EMERGENCY), nullptr)));
|
||||
triggers.push_back(new TriggerNode("enemy is close", NextAction::array(0, new NextAction("elune's grace", ACTION_EMERGENCY), nullptr)));
|
||||
triggers.push_back(new TriggerNode("chastise", NextAction::array(0, new NextAction("chastise", ACTION_INTERRUPT), nullptr)));
|
||||
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("pain suppression", ACTION_EMERGENCY + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("protect party member", NextAction::array(0, new NextAction("pain suppression on party", ACTION_EMERGENCY), nullptr)));
|
||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("apply oil", 1.0f), nullptr)));
|
||||
}
|
||||
|
||||
PriestCureStrategy::PriestCureStrategy(PlayerbotAI* botAI) : Strategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new CurePriestStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void PriestCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("dispel magic", NextAction::array(0, new NextAction("dispel magic", 41.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("dispel magic on party", NextAction::array(0, new NextAction("dispel magic on party", 40.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("cure disease", NextAction::array(0, new NextAction("abolish disease", 31.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member cure disease", NextAction::array(0, new NextAction("abolish disease on party", 30.0f), nullptr)));
|
||||
}
|
||||
|
||||
void PriestBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("inner focus", NextAction::array(0, new NextAction("inner focus", 42.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("power infusion", NextAction::array(0, new NextAction("power infusion", 41.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("boost", NextAction::array(0, new NextAction("shadowfiend", 20.0f), nullptr)));
|
||||
}
|
||||
|
||||
void PriestCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("shackle undead", NextAction::array(0, new NextAction("shackle undead", 31.0f), nullptr)));
|
||||
}
|
||||
47
src/strategy/priest/GenericPriestStrategy.h
Normal file
47
src/strategy/priest/GenericPriestStrategy.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_GENERICPRIESTSTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICPRIESTSTRATEGY_H
|
||||
|
||||
#include "CombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericPriestStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericPriestStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class PriestCureStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PriestCureStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cure"; }
|
||||
};
|
||||
|
||||
class PriestBoostStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PriestBoostStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "boost"; }
|
||||
};
|
||||
|
||||
class PriestCcStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
PriestCcStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "cc"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
57
src/strategy/priest/GenericPriestStrategyActionNodeFactory.h
Normal file
57
src/strategy/priest/GenericPriestStrategyActionNodeFactory.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_GENERICPRIESTSTRATEGYACTIONNODEFACTORY_H
|
||||
#define _PLAYERBOT_GENERICPRIESTSTRATEGYACTIONNODEFACTORY_H
|
||||
|
||||
#include "Action.h"
|
||||
#include "NamedObjectContext.h"
|
||||
|
||||
class GenericPriestStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
GenericPriestStrategyActionNodeFactory()
|
||||
{
|
||||
creators["power word: shield"] = &power_word_shield;
|
||||
creators["power word: shield on party"] = &power_word_shield_on_party;
|
||||
creators["greater heal"] = &greater_heal;
|
||||
creators["greater heal on party"] = &greater_heal_on_party;
|
||||
creators["heal"] = &heal;
|
||||
creators["heal on party"] = &heal_on_party;
|
||||
creators["flash heal"] = &flash_heal;
|
||||
creators["flash heal on party"] = &flash_heal_on_party;
|
||||
creators["psychic scream"] = &psychic_scream;
|
||||
creators["lightwell"] = &lightwell;
|
||||
creators["circle of healing"] = &circle_of_healing;
|
||||
}
|
||||
|
||||
private:
|
||||
ACTION_NODE_A(power_word_shield, "power word: shield", "renew");
|
||||
ACTION_NODE_A(power_word_shield_on_party, "power word: shield on party", "renew on party");
|
||||
ACTION_NODE_A(greater_heal, "greater heal", "heal");
|
||||
ACTION_NODE_A(greater_heal_on_party, "greater heal on party", "heal on party");
|
||||
ACTION_NODE_A(heal, "heal", "lesser heal");
|
||||
ACTION_NODE_A(heal_on_party, "heal on party", "lesser heal on party");
|
||||
ACTION_NODE_A(flash_heal, "flash heal", "greater heal");
|
||||
ACTION_NODE_A(flash_heal_on_party, "flash heal on party", "greater heal on party");
|
||||
ACTION_NODE_A(psychic_scream, "psychic scream", "fade");
|
||||
ACTION_NODE_A(lightwell, "lightwell", "circle of healing");
|
||||
ACTION_NODE_A(circle_of_healing, "circle of healing", "prayer of healing");
|
||||
};
|
||||
|
||||
class CurePriestStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
CurePriestStrategyActionNodeFactory()
|
||||
{
|
||||
creators["abolish disease"] = &abolish_disease;
|
||||
creators["abolish disease on party"] = &abolish_disease_on_party;
|
||||
}
|
||||
|
||||
private:
|
||||
ACTION_NODE_A(abolish_disease, "abolish disease", "cure disease");
|
||||
ACTION_NODE_A(abolish_disease_on_party, "abolish disease on party", "cure disease on party");
|
||||
};
|
||||
|
||||
#endif
|
||||
32
src/strategy/priest/HealPriestStrategy.cpp
Normal file
32
src/strategy/priest/HealPriestStrategy.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "HealPriestStrategy.h"
|
||||
#include "GenericPriestStrategyActionNodeFactory.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
HealPriestStrategy::HealPriestStrategy(PlayerbotAI* botAI) : GenericPriestStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericPriestStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
NextAction** HealPriestStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("reach party member to heal", 1.0f), nullptr);
|
||||
}
|
||||
|
||||
void HealPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericPriestStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("almost full health", NextAction::array(0, new NextAction("renew", 43.f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member almost full health", NextAction::array(0, new NextAction("heal on party", 41.0f), new NextAction("renew on party", 40.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member medium health", NextAction::array(0, new NextAction("greater heal on party", 47.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member low health", NextAction::array(0, new NextAction("power word: shield on party", 51.0f), new NextAction("greater heal on party", 50.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member to heal out of spell range", NextAction::array(0, new NextAction("reach party member to heal", ACTION_CRITICAL_HEAL), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe heal", NextAction::array(0, new NextAction("prayer of mending", 49.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe heal", NextAction::array(0, new NextAction("circle of healing", 48.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("binding heal", NextAction::array(0, new NextAction("binding heal", 52.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("shadowfiend", ACTION_HIGH), nullptr)));
|
||||
}
|
||||
23
src/strategy/priest/HealPriestStrategy.h
Normal file
23
src/strategy/priest/HealPriestStrategy.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_HEALPRIESTSTRATEGY_H
|
||||
#define _PLAYERBOT_HEALPRIESTSTRATEGY_H
|
||||
|
||||
#include "GenericPriestStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class HealPriestStrategy : public GenericPriestStrategy
|
||||
{
|
||||
public:
|
||||
HealPriestStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
NextAction** getDefaultActions() override;
|
||||
std::string const getName() override { return "heal"; }
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_HEAL; }
|
||||
};
|
||||
|
||||
#endif
|
||||
44
src/strategy/priest/HolyPriestStrategy.cpp
Normal file
44
src/strategy/priest/HolyPriestStrategy.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "HolyPriestStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class HolyPriestStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
HolyPriestStrategyActionNodeFactory()
|
||||
{
|
||||
creators["smite"] = &smite;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* smite(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("smite",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("shoot"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
HolyPriestStrategy::HolyPriestStrategy(PlayerbotAI* botAI) : HealPriestStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new HolyPriestStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
NextAction** HolyPriestStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("smite", 10.0f), new NextAction("mana burn", 9.0f), new NextAction("starshards", 8.0f), nullptr);
|
||||
}
|
||||
|
||||
void HolyPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
HealPriestStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("holy fire", NextAction::array(0, new NextAction("holy fire", ACTION_NORMAL + 9), nullptr)));
|
||||
triggers.push_back(new TriggerNode("shadowfiend", NextAction::array(0, new NextAction("shadowfiend", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("shadowfiend", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("mana burn", ACTION_HIGH), nullptr)));
|
||||
}
|
||||
23
src/strategy/priest/HolyPriestStrategy.h
Normal file
23
src/strategy/priest/HolyPriestStrategy.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_HOLYPRIESTSTRATEGY_H
|
||||
#define _PLAYERBOT_HOLYPRIESTSTRATEGY_H
|
||||
|
||||
#include "HealPriestStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class HolyPriestStrategy : public HealPriestStrategy
|
||||
{
|
||||
public:
|
||||
HolyPriestStrategy(PlayerbotAI* botAI);
|
||||
|
||||
NextAction** getDefaultActions() override;
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "holy"; }
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_DPS|STRATEGY_TYPE_RANGED; }
|
||||
};
|
||||
|
||||
#endif
|
||||
23
src/strategy/priest/PriestActions.cpp
Normal file
23
src/strategy/priest/PriestActions.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "PriestActions.h"
|
||||
#include "Event.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
bool CastRemoveShadowformAction::isUseful()
|
||||
{
|
||||
return botAI->HasAura("shadowform", AI_VALUE(Unit*, "self target"));
|
||||
}
|
||||
|
||||
bool CastRemoveShadowformAction::isPossible()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CastRemoveShadowformAction::Execute(Event event)
|
||||
{
|
||||
botAI->RemoveAura("shadowform");
|
||||
return true;
|
||||
}
|
||||
119
src/strategy/priest/PriestActions.h
Normal file
119
src/strategy/priest/PriestActions.h
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_PRIESTACTIONS_H
|
||||
#define _PLAYERBOT_PRIESTACTIONS_H
|
||||
|
||||
#include "GenericSpellActions.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
// disc
|
||||
BUFF_ACTION(CastPowerWordFortitudeAction, "power word: fortitude");
|
||||
BUFF_PARTY_ACTION(CastPowerWordFortitudeOnPartyAction, "power word: fortitude");
|
||||
BUFF_PARTY_ACTION(CastPrayerOfFortitudeOnPartyAction, "prayer of fortitude");
|
||||
BUFF_ACTION(CastPowerWordShieldAction, "power word: shield");
|
||||
HEAL_PARTY_ACTION(CastPowerWordShieldOnPartyAction, "power word: shield");
|
||||
BUFF_ACTION(CastInnerFireAction, "inner fire");
|
||||
CURE_ACTION(CastDispelMagicAction, "dispel magic");
|
||||
CURE_PARTY_ACTION(CastDispelMagicOnPartyAction, "dispel magic", DISPEL_MAGIC);
|
||||
SPELL_ACTION(CastDispelMagicOnTargetAction, "dispel magic");
|
||||
CC_ACTION(CastShackleUndeadAction, "shackle undead");
|
||||
SPELL_ACTION_U(CastManaBurnAction, "mana burn", AI_VALUE2(uint8, "mana", "self target") < 50 && AI_VALUE2(uint8, "mana", "current target") >= 20);
|
||||
BUFF_ACTION(CastLevitateAction, "levitate");
|
||||
BUFF_ACTION(CastDivineSpiritAction, "divine spirit");
|
||||
BUFF_PARTY_ACTION(CastDivineSpiritOnPartyAction, "divine spirit");
|
||||
BUFF_PARTY_ACTION(CastPrayerOfSpiritOnPartyAction, "prayer of spirit");
|
||||
// disc 2.4.3
|
||||
SPELL_ACTION(CastMassDispelAction, "mass dispel");
|
||||
|
||||
// disc talents
|
||||
BUFF_ACTION(CastPowerInfusionAction, "power infusion");
|
||||
BUFF_PARTY_ACTION(CastPowerInfusionOnPartyAction, "power infusion");
|
||||
BUFF_ACTION(CastInnerFocusAction, "inner focus");
|
||||
// disc 2.4.3 talents
|
||||
BUFF_ACTION(CastPainSuppressionAction, "pain suppression");
|
||||
PROTECT_ACTION(CastPainSuppressionProtectAction, "pain suppression");
|
||||
|
||||
// holy
|
||||
HEAL_ACTION(CastLesserHealAction, "lesser heal");
|
||||
HEAL_PARTY_ACTION(CastLesserHealOnPartyAction, "lesser heal");
|
||||
HEAL_ACTION(CastHealAction, "heal");
|
||||
HEAL_PARTY_ACTION(CastHealOnPartyAction, "heal");
|
||||
HEAL_ACTION(CastGreaterHealAction, "greater heal");
|
||||
HEAL_PARTY_ACTION(CastGreaterHealOnPartyAction, "greater heal");
|
||||
HEAL_ACTION(CastFlashHealAction, "flash heal");
|
||||
HEAL_PARTY_ACTION(CastFlashHealOnPartyAction, "flash heal");
|
||||
HEAL_ACTION(CastRenewAction, "renew");
|
||||
HEAL_PARTY_ACTION(CastRenewOnPartyAction, "renew");
|
||||
// holy 2.4.3
|
||||
HEAL_PARTY_ACTION(CastPrayerOfMendingAction, "prayer of mending");
|
||||
HEAL_PARTY_ACTION(CastBindingHealAction, "binding heal");
|
||||
|
||||
BUFF_ACTION(CastPrayerOfHealingAction, "prayer of healing");
|
||||
AOE_HEAL_ACTION(CastLightwellAction, "lightwell");
|
||||
AOE_HEAL_ACTION(CastCircleOfHealingAction, "circle of healing");
|
||||
|
||||
SPELL_ACTION(CastSmiteAction, "smite");
|
||||
SPELL_ACTION(CastHolyNovaAction, "holy nova");
|
||||
|
||||
RESS_ACTION(CastResurrectionAction, "resurrection");
|
||||
|
||||
CURE_ACTION(CastCureDiseaseAction, "cure disease");
|
||||
CURE_PARTY_ACTION(CastCureDiseaseOnPartyAction, "cure disease", DISPEL_DISEASE);
|
||||
CURE_ACTION(CastAbolishDiseaseAction, "abolish disease");
|
||||
CURE_PARTY_ACTION(CastAbolishDiseaseOnPartyAction, "abolish disease", DISPEL_DISEASE);
|
||||
|
||||
DEBUFF_ACTION(CastHolyFireAction, "holy fire");
|
||||
// shadow 2.4.3
|
||||
BUFF_ACTION(CastShadowfiendAction, "shadowfiend");
|
||||
SPELL_ACTION(CastShadowWordDeathAction, "shadow word: death");
|
||||
|
||||
// shadow
|
||||
DEBUFF_ACTION(CastPowerWordPainAction, "shadow word: pain");
|
||||
DEBUFF_ENEMY_ACTION(CastPowerWordPainOnAttackerAction, "shadow word: pain");
|
||||
SPELL_ACTION(CastMindBlastAction, "mind blast");
|
||||
SPELL_ACTION(CastPsychicScreamAction, "psychic scream");
|
||||
DEBUFF_ACTION(CastMindSootheAction, "mind soothe");
|
||||
BUFF_ACTION_U(CastFadeAction, "fade", bot->GetGroup());
|
||||
BUFF_ACTION(CastShadowProtectionAction, "shadow protection");
|
||||
BUFF_PARTY_ACTION(CastShadowProtectionOnPartyAction, "shadow protection");
|
||||
BUFF_PARTY_ACTION(CastPrayerOfShadowProtectionAction, "prayer of shadow protection");
|
||||
|
||||
// shadow talents
|
||||
SPELL_ACTION(CastMindFlayAction, "mind flay");
|
||||
DEBUFF_ACTION(CastVampiricEmbraceAction, "vampiric embrace");
|
||||
BUFF_ACTION(CastShadowformAction, "shadowform");
|
||||
SPELL_ACTION(CastSilenceAction, "silence");
|
||||
ENEMY_HEALER_ACTION(CastSilenceOnEnemyHealerAction, "silence");
|
||||
// shadow talents 2.4.3
|
||||
DEBUFF_ACTION(CastVampiricTouchAction, "vampiric touch");
|
||||
|
||||
// racials
|
||||
DEBUFF_ACTION(CastDevouringPlagueAction, "devouring plague");
|
||||
BUFF_ACTION(CastTouchOfWeaknessAction, "touch of weakness");
|
||||
DEBUFF_ACTION(CastHexOfWeaknessAction, "hex of weakness");
|
||||
BUFF_ACTION(CastShadowguardAction, "shadowguard");
|
||||
HEAL_ACTION(CastDesperatePrayerAction, "desperate prayer");
|
||||
BUFF_ACTION(CastFearWardAction, "fear ward");
|
||||
BUFF_PARTY_ACTION(CastFearWardOnPartyAction, "fear ward");
|
||||
SPELL_ACTION_U(CastStarshardsAction, "starshards", (AI_VALUE2(uint8, "mana", "self target") > 50 && AI_VALUE(Unit*, "current target") && AI_VALUE2(float, "distance", "current target") > 15.0f));
|
||||
BUFF_ACTION(CastElunesGraceAction, "elune's grace");
|
||||
BUFF_ACTION(CastFeedbackAction, "feedback");
|
||||
BUFF_ACTION(CastSymbolOfHopeAction, "symbol of hope");
|
||||
SPELL_ACTION(CastConsumeMagicAction, "consume magic");
|
||||
SNARE_ACTION(CastChastiseAction, "chastise");
|
||||
|
||||
class CastRemoveShadowformAction : public Action
|
||||
{
|
||||
public:
|
||||
CastRemoveShadowformAction(PlayerbotAI* botAI) : Action(botAI, "remove shadowform") { }
|
||||
|
||||
bool isUseful() override;
|
||||
bool isPossible() override;
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
304
src/strategy/priest/PriestAiObjectContext.cpp
Normal file
304
src/strategy/priest/PriestAiObjectContext.cpp
Normal file
@@ -0,0 +1,304 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "PriestAiObjectContext.h"
|
||||
#include "HolyPriestStrategy.h"
|
||||
#include "PriestActions.h"
|
||||
#include "PriestNonCombatStrategy.h"
|
||||
#include "PriestTriggers.h"
|
||||
#include "ShadowPriestStrategy.h"
|
||||
#include "NamedObjectContext.h"
|
||||
#include "PullStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class PriestStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
{
|
||||
public:
|
||||
PriestStrategyFactoryInternal()
|
||||
{
|
||||
creators["nc"] = &PriestStrategyFactoryInternal::nc;
|
||||
creators["pull"] = &PriestStrategyFactoryInternal::pull;
|
||||
creators["aoe"] = &PriestStrategyFactoryInternal::shadow_aoe;
|
||||
creators["shadow aoe"] = &PriestStrategyFactoryInternal::shadow_aoe;
|
||||
creators["dps debuff"] = &PriestStrategyFactoryInternal::shadow_debuff;
|
||||
creators["shadow debuff"] = &PriestStrategyFactoryInternal::shadow_debuff;
|
||||
creators["cure"] = &PriestStrategyFactoryInternal::cure;
|
||||
creators["buff"] = &PriestStrategyFactoryInternal::buff;
|
||||
creators["boost"] = &PriestStrategyFactoryInternal::boost;
|
||||
creators["rshadow"] = &PriestStrategyFactoryInternal::rshadow;
|
||||
creators["cc"] = &PriestStrategyFactoryInternal::cc;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* cc(PlayerbotAI* botAI) { return new PriestCcStrategy(botAI); }
|
||||
static Strategy* rshadow(PlayerbotAI* botAI) { return new PriestShadowResistanceStrategy(botAI); }
|
||||
static Strategy* boost(PlayerbotAI* botAI) { return new PriestBoostStrategy(botAI); }
|
||||
static Strategy* buff(PlayerbotAI* botAI) { return new PriestBuffStrategy(botAI); }
|
||||
static Strategy* nc(PlayerbotAI* botAI) { return new PriestNonCombatStrategy(botAI); }
|
||||
static Strategy* shadow_aoe(PlayerbotAI* botAI) { return new ShadowPriestAoeStrategy(botAI); }
|
||||
static Strategy* pull(PlayerbotAI* botAI) { return new PullStrategy(botAI, "shoot"); }
|
||||
static Strategy* shadow_debuff(PlayerbotAI* botAI) { return new ShadowPriestDebuffStrategy(botAI); }
|
||||
static Strategy* cure(PlayerbotAI* botAI) { return new PriestCureStrategy(botAI); }
|
||||
};
|
||||
|
||||
class PriestCombatStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
{
|
||||
public:
|
||||
PriestCombatStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
|
||||
{
|
||||
creators["heal"] = &PriestCombatStrategyFactoryInternal::heal;
|
||||
creators["shadow"] = &PriestCombatStrategyFactoryInternal::dps;
|
||||
creators["dps"] = &PriestCombatStrategyFactoryInternal::dps;
|
||||
creators["holy"] = &PriestCombatStrategyFactoryInternal::holy;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* heal(PlayerbotAI* botAI) { return new HealPriestStrategy(botAI); }
|
||||
static Strategy* dps(PlayerbotAI* botAI) { return new ShadowPriestStrategy(botAI); }
|
||||
static Strategy* holy(PlayerbotAI* botAI) { return new HolyPriestStrategy(botAI); }
|
||||
};
|
||||
|
||||
class PriestTriggerFactoryInternal : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
PriestTriggerFactoryInternal()
|
||||
{
|
||||
creators["devouring plague"] = &PriestTriggerFactoryInternal::devouring_plague;
|
||||
creators["shadow word: pain"] = &PriestTriggerFactoryInternal::shadow_word_pain;
|
||||
creators["shadow word: pain on attacker"] = &PriestTriggerFactoryInternal::shadow_word_pain_on_attacker;
|
||||
creators["dispel magic"] = &PriestTriggerFactoryInternal::dispel_magic;
|
||||
creators["dispel magic on party"] = &PriestTriggerFactoryInternal::dispel_magic_party_member;
|
||||
creators["cure disease"] = &PriestTriggerFactoryInternal::cure_disease;
|
||||
creators["party member cure disease"] = &PriestTriggerFactoryInternal::party_member_cure_disease;
|
||||
creators["power word: fortitude"] = &PriestTriggerFactoryInternal::power_word_fortitude;
|
||||
creators["power word: fortitude on party"] = &PriestTriggerFactoryInternal::power_word_fortitude_on_party;
|
||||
creators["divine spirit"] = &PriestTriggerFactoryInternal::divine_spirit;
|
||||
creators["divine spirit on party"] = &PriestTriggerFactoryInternal::divine_spirit_on_party;
|
||||
creators["inner fire"] = &PriestTriggerFactoryInternal::inner_fire;
|
||||
creators["vampiric touch"] = &PriestTriggerFactoryInternal::vampiric_touch;
|
||||
creators["shadowform"] = &PriestTriggerFactoryInternal::shadowform;
|
||||
creators["vampiric embrace"] = &PriestTriggerFactoryInternal::vampiric_embrace;
|
||||
creators["power infusion"] = &PriestTriggerFactoryInternal::power_infusion;
|
||||
creators["inner focus"] = &PriestTriggerFactoryInternal::inner_focus;
|
||||
creators["shadow protection"] = &PriestTriggerFactoryInternal::shadow_protection;
|
||||
creators["shadow protection on party"] = &PriestTriggerFactoryInternal::shadow_protection_on_party;
|
||||
creators["shackle undead"] = &PriestTriggerFactoryInternal::shackle_undead;
|
||||
creators["prayer of fortitude on party"] = &PriestTriggerFactoryInternal::prayer_of_fortitude_on_party;
|
||||
creators["prayer of spirit on party"] = &PriestTriggerFactoryInternal::prayer_of_spirit_on_party;
|
||||
creators["holy fire"] = &PriestTriggerFactoryInternal::holy_fire;
|
||||
creators["touch of weakness"] = &PriestTriggerFactoryInternal::touch_of_weakness;
|
||||
creators["hex of weakness"] = &PriestTriggerFactoryInternal::hex_of_weakness;
|
||||
creators["shadowguard"] = &PriestTriggerFactoryInternal::shadowguard;
|
||||
creators["fear ward"] = &PriestTriggerFactoryInternal::fear_ward;
|
||||
creators["feedback"] = &PriestTriggerFactoryInternal::feedback;
|
||||
creators["binding heal"] = &PriestTriggerFactoryInternal::binding_heal;
|
||||
creators["chastise"] = &PriestTriggerFactoryInternal::chastise;
|
||||
creators["silence"] = &PriestTriggerFactoryInternal::silence;
|
||||
creators["silence on enemy healer"] = &PriestTriggerFactoryInternal::silence_on_enemy_healer;
|
||||
creators["shadowfiend"] = &PriestTriggerFactoryInternal::shadowfiend;
|
||||
}
|
||||
|
||||
private:
|
||||
static Trigger* vampiric_embrace(PlayerbotAI* botAI) { return new VampiricEmbraceTrigger(botAI); }
|
||||
static Trigger* shadowform(PlayerbotAI* botAI) { return new ShadowformTrigger(botAI); }
|
||||
static Trigger* vampiric_touch(PlayerbotAI* botAI) { return new VampiricTouchTrigger(botAI); }
|
||||
static Trigger* devouring_plague(PlayerbotAI* botAI) { return new DevouringPlagueTrigger(botAI); }
|
||||
static Trigger* shadow_word_pain(PlayerbotAI* botAI) { return new PowerWordPainTrigger(botAI); }
|
||||
static Trigger* shadow_word_pain_on_attacker(PlayerbotAI* botAI) { return new PowerWordPainOnAttackerTrigger(botAI); }
|
||||
static Trigger* dispel_magic(PlayerbotAI* botAI) { return new DispelMagicTrigger(botAI); }
|
||||
static Trigger* dispel_magic_party_member(PlayerbotAI* botAI) { return new DispelMagicPartyMemberTrigger(botAI); }
|
||||
static Trigger* cure_disease(PlayerbotAI* botAI) { return new CureDiseaseTrigger(botAI); }
|
||||
static Trigger* party_member_cure_disease(PlayerbotAI* botAI) { return new PartyMemberCureDiseaseTrigger(botAI); }
|
||||
static Trigger* power_word_fortitude(PlayerbotAI* botAI) { return new PowerWordFortitudeTrigger(botAI); }
|
||||
static Trigger* power_word_fortitude_on_party(PlayerbotAI* botAI) { return new PowerWordFortitudeOnPartyTrigger(botAI); }
|
||||
static Trigger* divine_spirit(PlayerbotAI* botAI) { return new DivineSpiritTrigger(botAI); }
|
||||
static Trigger* divine_spirit_on_party(PlayerbotAI* botAI) { return new DivineSpiritOnPartyTrigger(botAI); }
|
||||
static Trigger* inner_fire(PlayerbotAI* botAI) { return new InnerFireTrigger(botAI); }
|
||||
static Trigger* power_infusion(PlayerbotAI* botAI) { return new PowerInfusionTrigger(botAI); }
|
||||
static Trigger* inner_focus(PlayerbotAI* botAI) { return new InnerFocusTrigger(botAI); }
|
||||
static Trigger* shadow_protection_on_party(PlayerbotAI* botAI) { return new ShadowProtectionOnPartyTrigger(botAI); }
|
||||
static Trigger* shadow_protection(PlayerbotAI* botAI) { return new ShadowProtectionTrigger(botAI); }
|
||||
static Trigger* shackle_undead(PlayerbotAI* botAI) { return new ShackleUndeadTrigger(botAI); }
|
||||
static Trigger* prayer_of_fortitude_on_party(PlayerbotAI* botAI) { return new PrayerOfFortitudeTrigger(botAI); }
|
||||
static Trigger* prayer_of_spirit_on_party(PlayerbotAI* botAI) { return new PrayerOfSpiritTrigger(botAI); }
|
||||
static Trigger* feedback(PlayerbotAI* botAI) { return new FeedbackTrigger(botAI); }
|
||||
static Trigger* fear_ward(PlayerbotAI* botAI) { return new FearWardTrigger(botAI); }
|
||||
static Trigger* shadowguard(PlayerbotAI* botAI) { return new ShadowguardTrigger(botAI); }
|
||||
static Trigger* hex_of_weakness(PlayerbotAI* botAI) { return new HexOfWeaknessTrigger(botAI); }
|
||||
static Trigger* touch_of_weakness(PlayerbotAI* botAI) { return new TouchOfWeaknessTrigger(botAI); }
|
||||
static Trigger* holy_fire(PlayerbotAI* botAI) { return new HolyFireTrigger(botAI); }
|
||||
static Trigger* shadowfiend(PlayerbotAI* botAI) { return new ShadowfiendTrigger(botAI); }
|
||||
static Trigger* silence_on_enemy_healer(PlayerbotAI* botAI) { return new SilenceEnemyHealerTrigger(botAI); }
|
||||
static Trigger* silence(PlayerbotAI* botAI) { return new SilenceTrigger(botAI); }
|
||||
static Trigger* chastise(PlayerbotAI* botAI) { return new ChastiseTrigger(botAI); }
|
||||
static Trigger* binding_heal(PlayerbotAI* botAI) { return new BindingHealTrigger(botAI); }
|
||||
};
|
||||
|
||||
class PriestAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
{
|
||||
public:
|
||||
PriestAiObjectContextInternal()
|
||||
{
|
||||
creators["power infusion"] = &PriestAiObjectContextInternal::power_infusion;
|
||||
creators["inner focus"] = &PriestAiObjectContextInternal::inner_focus;
|
||||
creators["shadow word: pain"] = &PriestAiObjectContextInternal::shadow_word_pain;
|
||||
creators["shadow word: pain on attacker"] = &PriestAiObjectContextInternal::shadow_word_pain_on_attacker;
|
||||
creators["devouring plague"] = &PriestAiObjectContextInternal::devouring_plague;
|
||||
creators["mind flay"] = &PriestAiObjectContextInternal::mind_flay;
|
||||
creators["holy fire"] = &PriestAiObjectContextInternal::holy_fire;
|
||||
creators["smite"] = &PriestAiObjectContextInternal::smite;
|
||||
creators["mind blast"] = &PriestAiObjectContextInternal::mind_blast;
|
||||
creators["shadowform"] = &PriestAiObjectContextInternal::shadowform;
|
||||
creators["remove shadowform"] = &PriestAiObjectContextInternal::remove_shadowform;
|
||||
creators["holy nova"] = &PriestAiObjectContextInternal::holy_nova;
|
||||
creators["power word: fortitude"] = &PriestAiObjectContextInternal::power_word_fortitude;
|
||||
creators["power word: fortitude on party"] = &PriestAiObjectContextInternal::power_word_fortitude_on_party;
|
||||
creators["divine spirit"] = &PriestAiObjectContextInternal::divine_spirit;
|
||||
creators["divine spirit on party"] = &PriestAiObjectContextInternal::divine_spirit_on_party;
|
||||
creators["power word: shield"] = &PriestAiObjectContextInternal::power_word_shield;
|
||||
creators["power word: shield on party"] = &PriestAiObjectContextInternal::power_word_shield_on_party;
|
||||
creators["renew"] = &PriestAiObjectContextInternal::renew;
|
||||
creators["renew on party"] = &PriestAiObjectContextInternal::renew_on_party;
|
||||
creators["greater heal"] = &PriestAiObjectContextInternal::greater_heal;
|
||||
creators["greater heal on party"] = &PriestAiObjectContextInternal::greater_heal_on_party;
|
||||
creators["heal"] = &PriestAiObjectContextInternal::heal;
|
||||
creators["heal on party"] = &PriestAiObjectContextInternal::heal_on_party;
|
||||
creators["lesser heal"] = &PriestAiObjectContextInternal::lesser_heal;
|
||||
creators["lesser heal on party"] = &PriestAiObjectContextInternal::lesser_heal_on_party;
|
||||
creators["flash heal"] = &PriestAiObjectContextInternal::flash_heal;
|
||||
creators["flash heal on party"] = &PriestAiObjectContextInternal::flash_heal_on_party;
|
||||
creators["dispel magic"] = &PriestAiObjectContextInternal::dispel_magic;
|
||||
creators["dispel magic on party"] = &PriestAiObjectContextInternal::dispel_magic_on_party;
|
||||
creators["dispel magic on target"] = &PriestAiObjectContextInternal::dispel_magic_on_target;
|
||||
creators["cure disease"] = &PriestAiObjectContextInternal::cure_disease;
|
||||
creators["cure disease on party"] = &PriestAiObjectContextInternal::cure_disease_on_party;
|
||||
creators["abolish disease"] = &PriestAiObjectContextInternal::abolish_disease;
|
||||
creators["abolish disease on party"] = &PriestAiObjectContextInternal::abolish_disease_on_party;
|
||||
creators["fade"] = &PriestAiObjectContextInternal::fade;
|
||||
creators["inner fire"] = &PriestAiObjectContextInternal::inner_fire;
|
||||
creators["resurrection"] = &PriestAiObjectContextInternal::resurrection;
|
||||
creators["circle of healing"] = &PriestAiObjectContextInternal::circle_of_healing;
|
||||
creators["psychic scream"] = &PriestAiObjectContextInternal::psychic_scream;
|
||||
creators["vampiric touch"] = &PriestAiObjectContextInternal::vampiric_touch;
|
||||
creators["vampiric embrace"] = &PriestAiObjectContextInternal::vampiric_embrace;
|
||||
//creators["dispersion"] = &PriestAiObjectContextInternal::dispersion;
|
||||
creators["shadow protection"] = &PriestAiObjectContextInternal::shadow_protection;
|
||||
creators["shadow protection on party"] = &PriestAiObjectContextInternal::shadow_protection_on_party;
|
||||
creators["shackle undead"] = &PriestAiObjectContextInternal::shackle_undead;
|
||||
creators["prayer of fortitude on party"] = &PriestAiObjectContextInternal::prayer_of_fortitude_on_party;
|
||||
creators["prayer of spirit on party"] = &PriestAiObjectContextInternal::prayer_of_spirit_on_party;
|
||||
creators["power infusion on party"] = &PriestAiObjectContextInternal::power_infusion_on_party;
|
||||
creators["silence"] = &PriestAiObjectContextInternal::silence;
|
||||
creators["silence on enemy healer"] = &PriestAiObjectContextInternal::silence_on_enemy_healer;
|
||||
creators["mana burn"] = &PriestAiObjectContextInternal::mana_burn;
|
||||
creators["levitate"] = &PriestAiObjectContextInternal::levitate;
|
||||
creators["prayer of healing"] = &PriestAiObjectContextInternal::prayer_of_healing;
|
||||
creators["lightwell"] = &PriestAiObjectContextInternal::lightwell;
|
||||
creators["mind soothe"] = &PriestAiObjectContextInternal::mind_soothe;
|
||||
creators["touch of weakness"] = &PriestAiObjectContextInternal::touch_of_weakness;
|
||||
creators["hex of weakness"] = &PriestAiObjectContextInternal::hex_of_weakness;
|
||||
creators["shadowguard"] = &PriestAiObjectContextInternal::shadowguard;
|
||||
creators["desperate prayer"] = &PriestAiObjectContextInternal::desperate_prayer;
|
||||
creators["fear ward"] = &PriestAiObjectContextInternal::fear_ward;
|
||||
creators["fear ward on party"] = &PriestAiObjectContextInternal::fear_ward_on_party;
|
||||
creators["starshards"] = &PriestAiObjectContextInternal::starshards;
|
||||
creators["elune's grace"] = &PriestAiObjectContextInternal::elunes_grace;
|
||||
creators["feedback"] = &PriestAiObjectContextInternal::feedback;
|
||||
creators["symbol of hope"] = &PriestAiObjectContextInternal::symbol_of_hope;
|
||||
creators["consume magic"] = &PriestAiObjectContextInternal::consume_magic;
|
||||
creators["chastise"] = &PriestAiObjectContextInternal::chastise;
|
||||
creators["shadow word: death"] = &PriestAiObjectContextInternal::shadow_word_death;
|
||||
creators["shadowfiend"] = &PriestAiObjectContextInternal::shadowfiend;
|
||||
creators["mass dispel"] = &PriestAiObjectContextInternal::mass_dispel;
|
||||
creators["pain suppression"] = &PriestAiObjectContextInternal::pain_suppression;
|
||||
creators["pain suppression on party"] = &PriestAiObjectContextInternal::pain_suppression_on_party;
|
||||
creators["prayer of mending"] = &PriestAiObjectContextInternal::prayer_of_mending;
|
||||
creators["binding heal"] = &PriestAiObjectContextInternal::binding_heal;
|
||||
}
|
||||
|
||||
private:
|
||||
static Action* shadow_protection_on_party(PlayerbotAI* botAI) { return new CastShadowProtectionOnPartyAction(botAI); }
|
||||
static Action* shadow_protection(PlayerbotAI* botAI) { return new CastShadowProtectionAction(botAI); }
|
||||
static Action* power_infusion(PlayerbotAI* botAI) { return new CastPowerInfusionAction(botAI); }
|
||||
static Action* inner_focus(PlayerbotAI* botAI) { return new CastInnerFocusAction(botAI); }
|
||||
//static Action* dispersion(PlayerbotAI* botAI) { return new CastDispersionAction(botAI); }
|
||||
static Action* vampiric_embrace(PlayerbotAI* botAI) { return new CastVampiricEmbraceAction(botAI); }
|
||||
static Action* vampiric_touch(PlayerbotAI* botAI) { return new CastVampiricTouchAction(botAI); }
|
||||
static Action* psychic_scream(PlayerbotAI* botAI) { return new CastPsychicScreamAction(botAI); }
|
||||
static Action* circle_of_healing(PlayerbotAI* botAI) { return new CastCircleOfHealingAction(botAI); }
|
||||
static Action* resurrection(PlayerbotAI* botAI) { return new CastResurrectionAction(botAI); }
|
||||
static Action* shadow_word_pain(PlayerbotAI* botAI) { return new CastPowerWordPainAction(botAI); }
|
||||
static Action* shadow_word_pain_on_attacker(PlayerbotAI* botAI) { return new CastPowerWordPainOnAttackerAction(botAI); }
|
||||
static Action* devouring_plague(PlayerbotAI* botAI) { return new CastDevouringPlagueAction(botAI); }
|
||||
static Action* mind_flay(PlayerbotAI* botAI) { return new CastMindFlayAction(botAI); }
|
||||
static Action* holy_fire(PlayerbotAI* botAI) { return new CastHolyFireAction(botAI); }
|
||||
static Action* smite(PlayerbotAI* botAI) { return new CastSmiteAction(botAI); }
|
||||
static Action* mind_blast(PlayerbotAI* botAI) { return new CastMindBlastAction(botAI); }
|
||||
static Action* shadowform(PlayerbotAI* botAI) { return new CastShadowformAction(botAI); }
|
||||
static Action* remove_shadowform(PlayerbotAI* botAI) { return new CastRemoveShadowformAction(botAI); }
|
||||
static Action* holy_nova(PlayerbotAI* botAI) { return new CastHolyNovaAction(botAI); }
|
||||
static Action* power_word_fortitude(PlayerbotAI* botAI) { return new CastPowerWordFortitudeAction(botAI); }
|
||||
static Action* power_word_fortitude_on_party(PlayerbotAI* botAI) { return new CastPowerWordFortitudeOnPartyAction(botAI); }
|
||||
static Action* divine_spirit(PlayerbotAI* botAI) { return new CastDivineSpiritAction(botAI); }
|
||||
static Action* divine_spirit_on_party(PlayerbotAI* botAI) { return new CastDivineSpiritOnPartyAction(botAI); }
|
||||
static Action* power_word_shield(PlayerbotAI* botAI) { return new CastPowerWordShieldAction(botAI); }
|
||||
static Action* power_word_shield_on_party(PlayerbotAI* botAI) { return new CastPowerWordShieldOnPartyAction(botAI); }
|
||||
static Action* renew(PlayerbotAI* botAI) { return new CastRenewAction(botAI); }
|
||||
static Action* renew_on_party(PlayerbotAI* botAI) { return new CastRenewOnPartyAction(botAI); }
|
||||
static Action* greater_heal(PlayerbotAI* botAI) { return new CastGreaterHealAction(botAI); }
|
||||
static Action* greater_heal_on_party(PlayerbotAI* botAI) { return new CastGreaterHealOnPartyAction(botAI); }
|
||||
static Action* heal(PlayerbotAI* botAI) { return new CastHealAction(botAI); }
|
||||
static Action* heal_on_party(PlayerbotAI* botAI) { return new CastHealOnPartyAction(botAI); }
|
||||
static Action* lesser_heal(PlayerbotAI* botAI) { return new CastLesserHealAction(botAI); }
|
||||
static Action* lesser_heal_on_party(PlayerbotAI* botAI) { return new CastLesserHealOnPartyAction(botAI); }
|
||||
static Action* flash_heal(PlayerbotAI* botAI) { return new CastFlashHealAction(botAI); }
|
||||
static Action* flash_heal_on_party(PlayerbotAI* botAI) { return new CastFlashHealOnPartyAction(botAI); }
|
||||
static Action* dispel_magic(PlayerbotAI* botAI) { return new CastDispelMagicAction(botAI); }
|
||||
static Action* dispel_magic_on_party(PlayerbotAI* botAI) { return new CastDispelMagicOnPartyAction(botAI); }
|
||||
static Action* dispel_magic_on_target(PlayerbotAI* botAI) { return new CastDispelMagicOnTargetAction(botAI); }
|
||||
static Action* cure_disease(PlayerbotAI* botAI) { return new CastCureDiseaseAction(botAI); }
|
||||
static Action* cure_disease_on_party(PlayerbotAI* botAI) { return new CastCureDiseaseOnPartyAction(botAI); }
|
||||
static Action* abolish_disease(PlayerbotAI* botAI) { return new CastAbolishDiseaseAction(botAI); }
|
||||
static Action* abolish_disease_on_party(PlayerbotAI* botAI) { return new CastAbolishDiseaseOnPartyAction(botAI); }
|
||||
static Action* fade(PlayerbotAI* botAI) { return new CastFadeAction(botAI); }
|
||||
static Action* inner_fire(PlayerbotAI* botAI) { return new CastInnerFireAction(botAI); }
|
||||
static Action* shackle_undead(PlayerbotAI* botAI) { return new CastShackleUndeadAction(botAI); }
|
||||
static Action* prayer_of_spirit_on_party(PlayerbotAI* botAI) { return new CastPrayerOfSpiritOnPartyAction(botAI); }
|
||||
static Action* prayer_of_fortitude_on_party(PlayerbotAI* botAI) { return new CastPrayerOfFortitudeOnPartyAction(botAI); }
|
||||
static Action* feedback(PlayerbotAI* botAI) { return new CastFeedbackAction(botAI); }
|
||||
static Action* elunes_grace(PlayerbotAI* botAI) { return new CastElunesGraceAction(botAI); }
|
||||
static Action* starshards(PlayerbotAI* botAI) { return new CastStarshardsAction(botAI); }
|
||||
static Action* fear_ward_on_party(PlayerbotAI* botAI) { return new CastFearWardOnPartyAction(botAI); }
|
||||
static Action* fear_ward(PlayerbotAI* botAI) { return new CastFearWardAction(botAI); }
|
||||
static Action* desperate_prayer(PlayerbotAI* botAI) { return new CastDesperatePrayerAction(botAI); }
|
||||
static Action* shadowguard(PlayerbotAI* botAI) { return new CastShadowguardAction(botAI); }
|
||||
static Action* hex_of_weakness(PlayerbotAI* botAI) { return new CastHexOfWeaknessAction(botAI); }
|
||||
static Action* touch_of_weakness(PlayerbotAI* botAI) { return new CastTouchOfWeaknessAction(botAI); }
|
||||
static Action* mind_soothe(PlayerbotAI* botAI) { return new CastMindSootheAction(botAI); }
|
||||
static Action* lightwell(PlayerbotAI* botAI) { return new CastLightwellAction(botAI); }
|
||||
static Action* prayer_of_healing(PlayerbotAI* botAI) { return new CastPrayerOfHealingAction(botAI); }
|
||||
static Action* levitate(PlayerbotAI* botAI) { return new CastLevitateAction(botAI); }
|
||||
static Action* mana_burn(PlayerbotAI* botAI) { return new CastManaBurnAction(botAI); }
|
||||
static Action* silence_on_enemy_healer(PlayerbotAI* botAI) { return new CastSilenceOnEnemyHealerAction(botAI); }
|
||||
static Action* silence(PlayerbotAI* botAI) { return new CastSilenceAction(botAI); }
|
||||
static Action* power_infusion_on_party(PlayerbotAI* botAI) { return new CastPowerInfusionOnPartyAction(botAI); }
|
||||
static Action* binding_heal(PlayerbotAI* botAI) { return new CastBindingHealAction(botAI); }
|
||||
static Action* prayer_of_mending(PlayerbotAI* botAI) { return new CastPrayerOfMendingAction(botAI); }
|
||||
static Action* pain_suppression_on_party(PlayerbotAI* botAI) { return new CastPainSuppressionProtectAction(botAI); }
|
||||
static Action* pain_suppression(PlayerbotAI* botAI) { return new CastPainSuppressionAction(botAI); }
|
||||
static Action* mass_dispel(PlayerbotAI* botAI) { return new CastMassDispelAction(botAI); }
|
||||
static Action* shadowfiend(PlayerbotAI* botAI) { return new CastShadowfiendAction(botAI); }
|
||||
static Action* shadow_word_death(PlayerbotAI* botAI) { return new CastShadowWordDeathAction(botAI); }
|
||||
static Action* chastise(PlayerbotAI* botAI) { return new CastChastiseAction(botAI); }
|
||||
static Action* consume_magic(PlayerbotAI* botAI) { return new CastConsumeMagicAction(botAI); }
|
||||
static Action* symbol_of_hope(PlayerbotAI* botAI) { return new CastSymbolOfHopeAction(botAI); }
|
||||
};
|
||||
|
||||
PriestAiObjectContext::PriestAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
|
||||
{
|
||||
strategyContexts.Add(new PriestStrategyFactoryInternal());
|
||||
strategyContexts.Add(new PriestCombatStrategyFactoryInternal());
|
||||
actionContexts.Add(new PriestAiObjectContextInternal());
|
||||
triggerContexts.Add(new PriestTriggerFactoryInternal());
|
||||
}
|
||||
18
src/strategy/priest/PriestAiObjectContext.h
Normal file
18
src/strategy/priest/PriestAiObjectContext.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_PRIESTAIOBJECTCONTEXT_H
|
||||
#define _PLAYERBOT_PRIESTAIOBJECTCONTEXT_H
|
||||
|
||||
#include "AiObjectContext.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class PriestAiObjectContext : public AiObjectContext
|
||||
{
|
||||
public:
|
||||
PriestAiObjectContext(PlayerbotAI* botAI);
|
||||
};
|
||||
|
||||
#endif
|
||||
51
src/strategy/priest/PriestNonCombatStrategy.cpp
Normal file
51
src/strategy/priest/PriestNonCombatStrategy.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "PriestNonCombatStrategy.h"
|
||||
#include "PriestNonCombatStrategyActionNodeFactory.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
PriestNonCombatStrategy::PriestNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new PriestNonCombatStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void PriestNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
NonCombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("power word: fortitude", NextAction::array(0, new NextAction("power word: fortitude", 12.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("divine spirit", NextAction::array(0, new NextAction("divine spirit", 14.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("inner fire", NextAction::array(0, new NextAction("inner fire", 10.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("greater heal", 70.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member critical health", NextAction::array(0, new NextAction("greater heal on party", 60.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium health", NextAction::array(0, new NextAction("renew", 41.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member medium health", NextAction::array(0, new NextAction("renew on party", 40.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe heal", NextAction::array(0, new NextAction("lightwell", 42.f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("party member dead", NextAction::array(0, new NextAction("remove shadowform", 51.0f), new NextAction("resurrection", 50.0f), nullptr)));
|
||||
//triggers.push_back(new TriggerNode("swimming", NextAction::array(0, new NextAction("levitate", 1.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("apply oil", 1.0f), nullptr)));
|
||||
}
|
||||
|
||||
void PriestBuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
NonCombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("prayer of fortitude on party", NextAction::array(0, new NextAction("prayer of fortitude on party", 12.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("prayer of spirit on party", NextAction::array(0, new NextAction("prayer of spirit on party", 14.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("power word: fortitude on party", NextAction::array(0, new NextAction("power word: fortitude on party", 11.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("divine spirit on party", NextAction::array(0, new NextAction("divine spirit on party", 13.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("fear ward", NextAction::array(0, new NextAction("fear ward", 10.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("touch of weakness", NextAction::array(0, new NextAction("touch of weakness", 10.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("shadowguard", NextAction::array(0, new NextAction("shadowguard", 10.0f), nullptr)));
|
||||
}
|
||||
|
||||
void PriestShadowResistanceStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
NonCombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("shadow protection", NextAction::array(0, new NextAction("shadow protection", 12.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("shadow protection on party", NextAction::array(0, new NextAction("shadow protection on party", 11.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("shadow protection on party", NextAction::array(0, new NextAction("shadow protection on party", 10.0f), nullptr)));
|
||||
}
|
||||
39
src/strategy/priest/PriestNonCombatStrategy.h
Normal file
39
src/strategy/priest/PriestNonCombatStrategy.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_PRIESTNONCOMBATSTRATEGY_H
|
||||
#define _PLAYERBOT_PRIESTNONCOMBATSTRATEGY_H
|
||||
|
||||
#include "NonCombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class PriestNonCombatStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
PriestNonCombatStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "nc"; }
|
||||
};
|
||||
|
||||
class PriestBuffStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
PriestBuffStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "buff"; }
|
||||
};
|
||||
|
||||
class PriestShadowResistanceStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
PriestShadowResistanceStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "rshadow"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_PRIESTNONCOMBATSTRATEGYACTIONNODEFACTORY_H
|
||||
#define _PLAYERBOT_PRIESTNONCOMBATSTRATEGYACTIONNODEFACTORY_H
|
||||
|
||||
#include "Action.h"
|
||||
#include "NamedObjectContext.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class PriestNonCombatStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
PriestNonCombatStrategyActionNodeFactory()
|
||||
{
|
||||
creators["power word: shield"] = &power_word_shield;
|
||||
creators["power word: shield on party"] = &power_word_shield_on_party;
|
||||
creators["circle of healing"] = &circle_of_healing;
|
||||
creators["prayer of healing"] = &prayer_of_healing;
|
||||
creators["greater heal"] = &greater_heal;
|
||||
creators["heal"] = &heal;
|
||||
creators["greater heal on party"] = &greater_heal_on_party;
|
||||
creators["heal on party"] = &heal_on_party;
|
||||
creators["lightwell"] = &lightwell;
|
||||
}
|
||||
|
||||
private:
|
||||
ACTION_NODE_A(greater_heal, "greater heal", "heal");
|
||||
ACTION_NODE_A(heal, "heal", "lesser heal");
|
||||
ACTION_NODE_A(greater_heal_on_party, "greater heal on party", "heal on party");
|
||||
ACTION_NODE_A(heal_on_party, "heal on party", "lesser heal on party");
|
||||
ACTION_NODE_A(lightwell, "lightwell", "circle of healing");
|
||||
ACTION_NODE_A(circle_of_healing, "circle of healing", "prayer of healing");
|
||||
ACTION_NODE_A(prayer_of_healing, "prayer of healing", "renew on party");
|
||||
ACTION_NODE_A(power_word_shield, "power word: shield", "renew");
|
||||
ACTION_NODE_A(power_word_shield_on_party, "power word: shield on party", "renew on party");
|
||||
};
|
||||
|
||||
#endif
|
||||
68
src/strategy/priest/PriestTriggers.cpp
Normal file
68
src/strategy/priest/PriestTriggers.cpp
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "PriestTriggers.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
bool PowerWordFortitudeOnPartyTrigger::IsActive()
|
||||
{
|
||||
return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("power word : fortitude", GetTarget()) && !botAI->HasAura("prayer of fortitude", GetTarget());
|
||||
}
|
||||
|
||||
bool PowerWordFortitudeTrigger::IsActive()
|
||||
{
|
||||
return BuffTrigger::IsActive() && !botAI->HasAura("power word: fortitude", GetTarget()) && !botAI->HasAura("prayer of fortitude", GetTarget());
|
||||
}
|
||||
|
||||
bool DivineSpiritOnPartyTrigger::IsActive()
|
||||
{
|
||||
return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("divine spirit", GetTarget()) && !botAI->HasAura("prayer of spirit", GetTarget());
|
||||
}
|
||||
|
||||
bool DivineSpiritTrigger::IsActive()
|
||||
{
|
||||
return BuffTrigger::IsActive() && !botAI->HasAura("divine spirit", GetTarget()) && !botAI->HasAura("prayer of spirit", GetTarget());
|
||||
}
|
||||
|
||||
bool PrayerOfFortitudeTrigger::IsActive()
|
||||
{
|
||||
return BuffOnPartyTrigger::IsActive() &&
|
||||
!botAI->HasAura("prayer of fortitude", GetTarget()) &&
|
||||
botAI->GetBot()->IsInSameGroupWith((Player*)GetTarget()) &&
|
||||
botAI->GetBuffedCount((Player*)GetTarget(), "prayer of fortitude") < 4 && !botAI->GetBuffedCount((Player*)GetTarget(), "power word: fortitude");
|
||||
}
|
||||
|
||||
bool PrayerOfSpiritTrigger::IsActive()
|
||||
{
|
||||
return BuffOnPartyTrigger::IsActive() &&
|
||||
!botAI->HasAura("prayer of spirit", GetTarget()) &&
|
||||
botAI->GetBot()->IsInSameGroupWith((Player*)GetTarget()) &&
|
||||
//botAI->GetManaPercent() > 50 &&
|
||||
botAI->GetBuffedCount((Player*) GetTarget(), "prayer of spirit") < 4 && !botAI->GetBuffedCount((Player*) GetTarget(), "divine spirit");
|
||||
}
|
||||
|
||||
bool InnerFireTrigger::IsActive()
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
return SpellTrigger::IsActive() && !botAI->HasAura(spell, target);
|
||||
}
|
||||
|
||||
bool ShadowformTrigger::IsActive()
|
||||
{
|
||||
return !botAI->HasAura("shadowform", bot);
|
||||
}
|
||||
|
||||
bool ShadowfiendTrigger::IsActive()
|
||||
{
|
||||
return BoostTrigger::IsActive() && !bot->HasSpellCooldown(34433);
|
||||
}
|
||||
|
||||
BindingHealTrigger::BindingHealTrigger(PlayerbotAI* botAI) : PartyMemberLowHealthTrigger(botAI, "binding heal", sPlayerbotAIConfig->lowHealth, 0)
|
||||
{
|
||||
}
|
||||
|
||||
bool BindingHealTrigger::IsActive()
|
||||
{
|
||||
return PartyMemberLowHealthTrigger::IsActive() && AI_VALUE2(uint8, "health", "self target") < sPlayerbotAIConfig->mediumHealth;
|
||||
}
|
||||
99
src/strategy/priest/PriestTriggers.h
Normal file
99
src/strategy/priest/PriestTriggers.h
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_PRIESTTRIGGERS_H
|
||||
#define _PLAYERBOT_PRIESTTRIGGERS_H
|
||||
|
||||
#include "CureTriggers.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
DEBUFF_TRIGGER(HolyFireTrigger, "holy fire");
|
||||
DEBUFF_TRIGGER(PowerWordPainTrigger, "shadow word: pain");
|
||||
DEBUFF_ENEMY_TRIGGER(PowerWordPainOnAttackerTrigger, "shadow word: pain");
|
||||
DEBUFF_TRIGGER(VampiricTouchTrigger, "vampiric touch");
|
||||
DEBUFF_TRIGGER(VampiricEmbraceTrigger, "vampiric embrace");
|
||||
CURE_TRIGGER(DispelMagicTrigger, "dispel magic", DISPEL_MAGIC);
|
||||
CURE_PARTY_TRIGGER(DispelMagicPartyMemberTrigger, "dispel magic", DISPEL_MAGIC);
|
||||
CURE_TRIGGER(CureDiseaseTrigger, "cure disease", DISPEL_DISEASE);
|
||||
CURE_PARTY_TRIGGER(PartyMemberCureDiseaseTrigger, "cure disease", DISPEL_DISEASE);
|
||||
BUFF_TRIGGER_A(InnerFireTrigger, "inner fire");
|
||||
BUFF_TRIGGER_A(ShadowformTrigger, "shadowform");
|
||||
BUFF_TRIGGER(PowerInfusionTrigger, "power infusion");
|
||||
BUFF_TRIGGER(InnerFocusTrigger, "inner focus");
|
||||
BUFF_TRIGGER(ShadowProtectionTrigger, "shadow protection");
|
||||
BUFF_PARTY_TRIGGER(ShadowProtectionOnPartyTrigger, "shadow protection");
|
||||
CC_TRIGGER(ShackleUndeadTrigger, "shackle undead");
|
||||
INTERRUPT_TRIGGER(SilenceTrigger, "silence");
|
||||
INTERRUPT_HEALER_TRIGGER(SilenceEnemyHealerTrigger, "silence");
|
||||
|
||||
// racials
|
||||
DEBUFF_TRIGGER(DevouringPlagueTrigger, "devouring plague");
|
||||
BUFF_TRIGGER(TouchOfWeaknessTrigger, "touch of weakness");
|
||||
DEBUFF_TRIGGER(HexOfWeaknessTrigger, "hex of weakness");
|
||||
BUFF_TRIGGER(ShadowguardTrigger, "shadowguard");
|
||||
BUFF_TRIGGER(FearWardTrigger, "fear ward");
|
||||
DEFLECT_TRIGGER(FeedbackTrigger, "feedback");
|
||||
SNARE_TRIGGER(ChastiseTrigger, "chastise");
|
||||
|
||||
BOOST_TRIGGER_A(ShadowfiendTrigger, "shadowfiend");
|
||||
|
||||
class PowerWordFortitudeOnPartyTrigger : public BuffOnPartyTrigger
|
||||
{
|
||||
public:
|
||||
PowerWordFortitudeOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "power word: fortitude", 4) { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class PowerWordFortitudeTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
PowerWordFortitudeTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "power word: fortitude", 4) { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class DivineSpiritOnPartyTrigger : public BuffOnPartyTrigger
|
||||
{
|
||||
public:
|
||||
DivineSpiritOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "divine spirit", 4) { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class DivineSpiritTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
DivineSpiritTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "divine spirit", 4) { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class PrayerOfFortitudeTrigger : public BuffOnPartyTrigger
|
||||
{
|
||||
public:
|
||||
PrayerOfFortitudeTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "prayer of fortitude", 3) { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class PrayerOfSpiritTrigger : public BuffOnPartyTrigger
|
||||
{
|
||||
public:
|
||||
PrayerOfSpiritTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "prayer of spirit", 2) { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class BindingHealTrigger : public PartyMemberLowHealthTrigger
|
||||
{
|
||||
public:
|
||||
BindingHealTrigger(PlayerbotAI* botAI);
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
46
src/strategy/priest/ShadowPriestStrategy.cpp
Normal file
46
src/strategy/priest/ShadowPriestStrategy.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "ShadowPriestStrategy.h"
|
||||
#include "ShadowPriestStrategyActionNodeFactory.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
ShadowPriestStrategy::ShadowPriestStrategy(PlayerbotAI* botAI) : GenericPriestStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new ShadowPriestStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
NextAction** ShadowPriestStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("mind blast", 10.0f), new NextAction("mana burn", 9.0f), new NextAction("starshards", 8.0f), new NextAction("shoot", 7.0f), nullptr);
|
||||
}
|
||||
|
||||
void ShadowPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericPriestStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("enemy out of spell", NextAction::array(0, new NextAction("reach spell", ACTION_MOVE + 9), nullptr)));
|
||||
triggers.push_back(new TriggerNode("shadowform", NextAction::array(0, new NextAction("shadowform", ACTION_HIGH), nullptr)));
|
||||
//triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("dispersion", ACTION_EMERGENCY + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("vampiric embrace", NextAction::array(0, new NextAction("vampiric embrace", 16.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("silence", NextAction::array(0, new NextAction("silence", ACTION_INTERRUPT + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("silence on enemy healer", NextAction::array(0, new NextAction("silence on enemy healer", ACTION_INTERRUPT), nullptr)));
|
||||
triggers.push_back(new TriggerNode("shadowfiend", NextAction::array(0, new NextAction("shadowfiend", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("shadowfiend", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("mana burn", ACTION_HIGH), nullptr)));
|
||||
}
|
||||
|
||||
void ShadowPriestAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("shadow word: pain on attacker", NextAction::array(0, new NextAction("shadow word: pain on attacker", 11.0f), nullptr)));
|
||||
}
|
||||
|
||||
void ShadowPriestDebuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("devouring plague", NextAction::array(0, new NextAction("devouring plague", 13.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("vampiric touch", NextAction::array(0, new NextAction("vampiric touch", 11.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("shadow word: pain", NextAction::array(0, new NextAction("shadow word: pain", 12.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("feedback", NextAction::array(0, new NextAction("feedback", 80.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("hex of weakness", NextAction::array(0, new NextAction("hex of weakness", 10.0f), nullptr)));
|
||||
}
|
||||
41
src/strategy/priest/ShadowPriestStrategy.h
Normal file
41
src/strategy/priest/ShadowPriestStrategy.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_SHADOWPRIESTSTRATEGY_H
|
||||
#define _PLAYERBOT_SHADOWPRIESTSTRATEGY_H
|
||||
|
||||
#include "GenericPriestStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class ShadowPriestStrategy : public GenericPriestStrategy
|
||||
{
|
||||
public:
|
||||
ShadowPriestStrategy(PlayerbotAI* botAI);
|
||||
|
||||
NextAction** getDefaultActions() override;
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "shadow"; }
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_DPS|STRATEGY_TYPE_RANGED; }
|
||||
};
|
||||
|
||||
class ShadowPriestAoeStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
ShadowPriestAoeStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "shadow aoe"; }
|
||||
};
|
||||
|
||||
class ShadowPriestDebuffStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
ShadowPriestDebuffStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "shadow debuff"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
40
src/strategy/priest/ShadowPriestStrategyActionNodeFactory.h
Normal file
40
src/strategy/priest/ShadowPriestStrategyActionNodeFactory.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_SHADOWPRIESTSTRATEGYACTIONNODEFACTORY_H
|
||||
#define _PLAYERBOT_SHADOWPRIESTSTRATEGYACTIONNODEFACTORY_H
|
||||
|
||||
#include "Action.h"
|
||||
#include "NamedObjectContext.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class ShadowPriestStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
ShadowPriestStrategyActionNodeFactory()
|
||||
{
|
||||
creators["mind blast"] = &mind_blast;
|
||||
creators["dispersion"] = &dispersion;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* mind_blast(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("mind blast",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("mind flay"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* dispersion(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("dispersion",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("mana potion"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user