mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Big update.
This commit is contained in:
81
src/strategy/deathknight/BloodDKStrategy.cpp
Normal file
81
src/strategy/deathknight/BloodDKStrategy.cpp
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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 "BloodDKStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class BloodDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
BloodDKStrategyActionNodeFactory()
|
||||
{
|
||||
//creators["melee"] = &melee;
|
||||
//creators["blood strike"] = &blood_strike;
|
||||
creators["rune strike"] = &rune_strike;
|
||||
creators["heart strike"] = &heart_strike;
|
||||
creators["death strike"] = &death_strike;
|
||||
//creators["death grip"] = &death_grip;
|
||||
//creators["plague strike"] = &plague_strike;
|
||||
//creators["pestilence"] = &pestilence;
|
||||
//creators["icy touch"] = &icy_touch;
|
||||
//creators["obliterate"] = &obliterate;
|
||||
//creators["blood boil"] = &blood_boil;
|
||||
//creators["mark of_blood"] = &mark_of_blood;
|
||||
//creators["blood presence"] = &blood_presence;
|
||||
//creators["rune tap"] = &rune_tap;
|
||||
//creators["vampiric blood"] = &vampiric_blood;
|
||||
//creators["death pact"] = &death_pact;
|
||||
//creators["death rune_mastery"] = &death_rune_mastery;
|
||||
//creators["hysteria"] = &hysteria;
|
||||
//creators["dancing weapon"] = &dancing_weapon;
|
||||
//creators["dark command"] = &dark_command;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* rune_strike(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("rune strike",
|
||||
/*P*/ NextAction::array(0, new NextAction("frost presence"), nullptr),
|
||||
/*A*/ NextAction::array(0, new NextAction("death coil"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* heart_strike(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("heart strike",
|
||||
/*P*/ NextAction::array(0, new NextAction("frost presence"), nullptr),
|
||||
/*A*/ NextAction::array(0, new NextAction("death strike"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* death_strike(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("death strike",
|
||||
/*P*/ NextAction::array(0, new NextAction("frost presence"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
BloodDKStrategy::BloodDKStrategy(PlayerbotAI* botAI) : GenericDKStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new BloodDKStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
NextAction** BloodDKStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("melee", ACTION_NORMAL + 2), new NextAction("heart strike", ACTION_NORMAL + 5),
|
||||
new NextAction("death strike", ACTION_NORMAL + 4), new NextAction("rune strike", ACTION_NORMAL + 3), nullptr);
|
||||
}
|
||||
|
||||
void BloodDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericDKStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("rune strike", NextAction::array(0, new NextAction("rune strike", ACTION_NORMAL + 3), nullptr)));
|
||||
triggers.push_back(new TriggerNode("blood tap", NextAction::array(0, new NextAction("blood tap", ACTION_HIGH + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("lose aggro", NextAction::array(0, new NextAction("dark command", ACTION_HIGH + 3), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("blood tap", ACTION_HIGH + 5),
|
||||
new NextAction("vampiric blood", ACTION_HIGH + 3), new NextAction("death strike", ACTION_HIGH + 4), nullptr)));
|
||||
}
|
||||
23
src/strategy/deathknight/BloodDKStrategy.h
Normal file
23
src/strategy/deathknight/BloodDKStrategy.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_BLOODDKSTRATEGY_H
|
||||
#define _PLAYERBOT_BLOODDKSTRATEGY_H
|
||||
|
||||
#include "GenericDKStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class BloodDKStrategy : public GenericDKStrategy
|
||||
{
|
||||
public:
|
||||
BloodDKStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "blood"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_TANK | STRATEGY_TYPE_MELEE; }
|
||||
};
|
||||
|
||||
#endif
|
||||
31
src/strategy/deathknight/DKActions.cpp
Normal file
31
src/strategy/deathknight/DKActions.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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 "DKActions.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
NextAction** CastDeathchillAction::getPrerequisites()
|
||||
{
|
||||
return NextAction::merge(NextAction::array(0, new NextAction("frost presence"), nullptr), CastSpellAction::getPrerequisites());
|
||||
}
|
||||
|
||||
NextAction** CastDarkCommandAction::getPrerequisites()
|
||||
{
|
||||
return NextAction::merge(NextAction::array(0, new NextAction("blood presence"), nullptr), CastSpellAction::getPrerequisites());
|
||||
}
|
||||
|
||||
NextAction** CastUnholyMeleeSpellAction::getPrerequisites()
|
||||
{
|
||||
return NextAction::merge(NextAction::array(0, new NextAction("unholy presence"), nullptr), CastMeleeSpellAction::getPrerequisites());
|
||||
}
|
||||
|
||||
NextAction** CastFrostMeleeSpellAction::getPrerequisites()
|
||||
{
|
||||
return NextAction::merge(NextAction::array(0, new NextAction("frost presence"), nullptr), CastMeleeSpellAction::getPrerequisites());
|
||||
}
|
||||
|
||||
NextAction** CastBloodMeleeSpellAction::getPrerequisites()
|
||||
{
|
||||
return NextAction::merge(NextAction::array(0, new NextAction("blood presence"), nullptr), CastMeleeSpellAction::getPrerequisites());
|
||||
}
|
||||
321
src/strategy/deathknight/DKActions.h
Normal file
321
src/strategy/deathknight/DKActions.h
Normal file
@@ -0,0 +1,321 @@
|
||||
/*
|
||||
* 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_DKACTIONS_H
|
||||
#define _PLAYERBOT_DKACTIONS_H
|
||||
|
||||
#include "GenericSpellActions.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class CastBloodPresenceAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastBloodPresenceAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "blood presence") { }
|
||||
};
|
||||
|
||||
class CastFrostPresenceAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastFrostPresenceAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "frost presence") { }
|
||||
};
|
||||
|
||||
class CastUnholyPresenceAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastUnholyPresenceAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "unholy presence") { }
|
||||
};
|
||||
|
||||
class CastDeathchillAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastDeathchillAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "deathchill") { }
|
||||
|
||||
NextAction** getPrerequisites() override;
|
||||
};
|
||||
|
||||
class CastDarkCommandAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastDarkCommandAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "dark command") { }
|
||||
|
||||
NextAction** getPrerequisites() override;
|
||||
};
|
||||
|
||||
BEGIN_RANGED_SPELL_ACTION(CastDeathGripAction, "death grip")
|
||||
END_SPELL_ACTION()
|
||||
|
||||
// Unholy presence
|
||||
class CastUnholyMeleeSpellAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastUnholyMeleeSpellAction(PlayerbotAI* botAI, std::string const spell) : CastMeleeSpellAction(botAI, spell) { }
|
||||
|
||||
NextAction** getPrerequisites() override;
|
||||
};
|
||||
|
||||
// Frost presence
|
||||
class CastFrostMeleeSpellAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastFrostMeleeSpellAction(PlayerbotAI* botAI, std::string const spell) : CastMeleeSpellAction(botAI, spell) { }
|
||||
|
||||
NextAction** getPrerequisites() override;
|
||||
};
|
||||
|
||||
// Blood presence
|
||||
class CastBloodMeleeSpellAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastBloodMeleeSpellAction(PlayerbotAI* botAI, std::string const spell) : CastMeleeSpellAction(botAI, spell) { }
|
||||
|
||||
NextAction** getPrerequisites() override;
|
||||
};
|
||||
|
||||
class CastRuneStrikeAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastRuneStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "rune strike") { }
|
||||
};
|
||||
|
||||
//debuff
|
||||
BEGIN_DEBUFF_ACTION(CastPestilenceAction, "pestilence")
|
||||
END_SPELL_ACTION()
|
||||
|
||||
//debuff
|
||||
BEGIN_DEBUFF_ACTION(CastHowlingBlastAction, "howling blast")
|
||||
END_SPELL_ACTION()
|
||||
|
||||
//debuff it
|
||||
BEGIN_DEBUFF_ACTION(CastIcyTouchAction, "icy touch")
|
||||
END_SPELL_ACTION()
|
||||
|
||||
class CastIcyTouchOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
||||
{
|
||||
public:
|
||||
CastIcyTouchOnAttackerAction(PlayerbotAI* botAI) : CastDebuffSpellOnAttackerAction(botAI, "icy touch") { }
|
||||
};
|
||||
|
||||
//debuff ps
|
||||
BEGIN_DEBUFF_ACTION(CastPlagueStrikeAction, "plague strike")
|
||||
END_SPELL_ACTION()
|
||||
|
||||
class CastPlagueStrikeOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
||||
{
|
||||
public:
|
||||
CastPlagueStrikeOnAttackerAction(PlayerbotAI* botAI) : CastDebuffSpellOnAttackerAction(botAI, "plague strike") { }
|
||||
};
|
||||
|
||||
//debuff
|
||||
BEGIN_DEBUFF_ACTION(CastMarkOfBloodAction, "mark of blood")
|
||||
END_SPELL_ACTION()
|
||||
|
||||
class CastMarkOfBloodOnAttackerAction : public CastDebuffSpellOnAttackerAction
|
||||
{
|
||||
public:
|
||||
CastMarkOfBloodOnAttackerAction(PlayerbotAI* botAI) : CastDebuffSpellOnAttackerAction(botAI, "mark of blood") { }
|
||||
};
|
||||
|
||||
class CastUnholyBlightAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastUnholyBlightAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "unholy blight") { }
|
||||
};
|
||||
|
||||
class CastSummonGargoyleAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastSummonGargoyleAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "summon gargoyle") { }
|
||||
};
|
||||
|
||||
class CastGhoulFrenzyAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastGhoulFrenzyAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "ghoul frenzy") { }
|
||||
};
|
||||
|
||||
BEGIN_MELEE_SPELL_ACTION(CastCorpseExplosionAction, "corpse explosion")
|
||||
END_SPELL_ACTION()
|
||||
|
||||
BEGIN_MELEE_SPELL_ACTION(CastAntiMagicShellAction, "anti magic shell")
|
||||
END_SPELL_ACTION()
|
||||
|
||||
BEGIN_MELEE_SPELL_ACTION(CastAntiMagicZoneAction, "anti magic zone")
|
||||
END_SPELL_ACTION()
|
||||
|
||||
class CastChbotAInsOfIceAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastChbotAInsOfIceAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "chbotAIns of ice") { }
|
||||
};
|
||||
|
||||
class CastHungeringColdAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastHungeringColdAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "hungering cold") { }
|
||||
};
|
||||
|
||||
class CastHeartStrikeAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastHeartStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "heart strike") { }
|
||||
};
|
||||
|
||||
class CastBloodStrikeAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastBloodStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "blood strike") { }
|
||||
};
|
||||
|
||||
class CastFrostStrikeAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastFrostStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "frost strike") { }
|
||||
};
|
||||
|
||||
class CastObliterateAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastObliterateAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "obliterate") { }
|
||||
};
|
||||
|
||||
class CastDeathStrikeAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastDeathStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "death strike") { }
|
||||
};
|
||||
|
||||
class CastScourgeStrikeAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastScourgeStrikeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "scorgue strike") { }
|
||||
};
|
||||
|
||||
class CastDeathCoilAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastDeathCoilAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "death coill") { }
|
||||
};
|
||||
|
||||
class CastBloodBoilAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastBloodBoilAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "blood boil") { }
|
||||
};
|
||||
|
||||
class CastDeathAndDecayAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastDeathAndDecayAction(PlayerbotAI* botAI) : CastSpellAction(botAI, "death and decay") { }
|
||||
};
|
||||
|
||||
class CastHornOfWinterAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastHornOfWinterAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "horn of winter") { }
|
||||
};
|
||||
|
||||
class CastImprovedIcyTalonsAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastImprovedIcyTalonsAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "improved icy talons") { }
|
||||
};
|
||||
|
||||
class CastBoneShieldAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastBoneShieldAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "bone shield") { }
|
||||
};
|
||||
|
||||
class CastDeathPactAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastDeathPactAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "death pact") { }
|
||||
};
|
||||
|
||||
class CastDeathRuneMasteryAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastDeathRuneMasteryAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "death rune mastery") { }
|
||||
};
|
||||
|
||||
class CastDancingWeaponAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastDancingWeaponAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "dancing weapon") { }
|
||||
};
|
||||
|
||||
class CastEmpowerRuneWeaponAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastEmpowerRuneWeaponAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "empower rune weapon") { }
|
||||
};
|
||||
|
||||
class CastArmyOfTheDeadAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastArmyOfTheDeadAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "army of the dead") { }
|
||||
};
|
||||
|
||||
class CastRbotAIseDeadAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastRbotAIseDeadAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "rbotAIse dead") { }
|
||||
};
|
||||
|
||||
class CastKillingMachineAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastKillingMachineAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "killing machine") { }
|
||||
};
|
||||
|
||||
class CastIceboundFortitudeAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastIceboundFortitudeAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "icebound fortitude") { }
|
||||
};
|
||||
|
||||
class CastUnbreakableArmorAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastUnbreakableArmorAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "unbreakable armor") { }
|
||||
};
|
||||
|
||||
class CastVampiricBloodAction : public CastBuffSpellAction
|
||||
{
|
||||
public:
|
||||
CastVampiricBloodAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "vampiric blood") { }
|
||||
};
|
||||
|
||||
class CastMindFreezeAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastMindFreezeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "mind freeze") { }
|
||||
};
|
||||
|
||||
class CastStrangulateAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastStrangulateAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "strangulate") { }
|
||||
};
|
||||
|
||||
class CastMindFreezeOnEnemyHealerAction : public CastSpellOnEnemyHealerAction
|
||||
{
|
||||
public:
|
||||
CastMindFreezeOnEnemyHealerAction(PlayerbotAI* botAI) : CastSpellOnEnemyHealerAction(botAI, "mind freeze") { }
|
||||
};
|
||||
|
||||
class CastRuneTapAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastRuneTapAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "rune tap") { }
|
||||
};
|
||||
|
||||
class CastBloodTapAction : public CastMeleeSpellAction
|
||||
{
|
||||
public:
|
||||
CastBloodTapAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "blood tap") { }
|
||||
};
|
||||
|
||||
#endif
|
||||
234
src/strategy/deathknight/DKAiObjectContext.cpp
Normal file
234
src/strategy/deathknight/DKAiObjectContext.cpp
Normal file
@@ -0,0 +1,234 @@
|
||||
/*
|
||||
* 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 "DKAiObjectContext.h"
|
||||
#include "BloodDKStrategy.h"
|
||||
#include "DKActions.h"
|
||||
#include "DKTriggers.h"
|
||||
#include "FrostDKStrategy.h"
|
||||
#include "GenericDKNonCombatStrategy.h"
|
||||
#include "UnholyDKStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
#include "PullStrategy.h"
|
||||
|
||||
class DeathKnightStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
{
|
||||
public:
|
||||
DeathKnightStrategyFactoryInternal()
|
||||
{
|
||||
creators["nc"] = &DeathKnightStrategyFactoryInternal::nc;
|
||||
creators["pull"] = &DeathKnightStrategyFactoryInternal::pull;
|
||||
creators["frost aoe"] = &DeathKnightStrategyFactoryInternal::frost_aoe;
|
||||
creators["unholy aoe"] = &DeathKnightStrategyFactoryInternal::unholy_aoe;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* nc(PlayerbotAI* botAI) { return new GenericDKNonCombatStrategy(botAI); }
|
||||
static Strategy* pull(PlayerbotAI* botAI) { return new PullStrategy(botAI, "icy touch"); }
|
||||
static Strategy* frost_aoe(PlayerbotAI* botAI) { return new FrostDKAoeStrategy(botAI); }
|
||||
static Strategy* unholy_aoe(PlayerbotAI* botAI) { return new UnholyDKAoeStrategy(botAI); }
|
||||
};
|
||||
|
||||
class DeathKnightCombatStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
{
|
||||
public:
|
||||
DeathKnightCombatStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
|
||||
{
|
||||
creators["tank"] = &DeathKnightCombatStrategyFactoryInternal::blood;
|
||||
creators["blood"] = &DeathKnightCombatStrategyFactoryInternal::blood;
|
||||
creators["frost"] = &DeathKnightCombatStrategyFactoryInternal::frost_dps;
|
||||
creators["unholy"] = &DeathKnightCombatStrategyFactoryInternal::unholy_dps;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* frost_dps(PlayerbotAI* botAI) { return new FrostDKStrategy(botAI); }
|
||||
static Strategy* unholy_dps(PlayerbotAI* botAI) { return new UnholyDKStrategy(botAI); }
|
||||
static Strategy* tank(PlayerbotAI* botAI) { return new BloodDKStrategy(botAI); }
|
||||
static Strategy* blood(PlayerbotAI* botAI) { return new BloodDKStrategy(botAI); }
|
||||
};
|
||||
|
||||
class DeathKnightDKBuffStrategyFactoryInternal : public NamedObjectContext<Strategy>
|
||||
{
|
||||
public:
|
||||
DeathKnightDKBuffStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
|
||||
{
|
||||
|
||||
creators["bdps"] = &DeathKnightDKBuffStrategyFactoryInternal::bdps;
|
||||
}
|
||||
|
||||
private:
|
||||
static Strategy* bdps(PlayerbotAI* botAI) { return new DKBuffDpsStrategy(botAI); }
|
||||
};
|
||||
|
||||
class DeathKnightTriggerFactoryInternal : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
DeathKnightTriggerFactoryInternal()
|
||||
{
|
||||
creators["bone shield"] = &DeathKnightTriggerFactoryInternal::bone_shield;
|
||||
creators["pestilence"] = &DeathKnightTriggerFactoryInternal::pestilence;
|
||||
creators["blood strike"] = &DeathKnightTriggerFactoryInternal::blood_strike;
|
||||
creators["plague strike"] = &DeathKnightTriggerFactoryInternal::plague_strike;
|
||||
creators["plague strike on attacker"] = &DeathKnightTriggerFactoryInternal::plague_strike_on_attacker;
|
||||
creators["icy touch"] = &DeathKnightTriggerFactoryInternal::icy_touch;
|
||||
creators["death coil"] = &DeathKnightTriggerFactoryInternal::death_coil;
|
||||
creators["icy touch on attacker"] = &DeathKnightTriggerFactoryInternal::icy_touch_on_attacker;
|
||||
creators["improved icy talons"] = &DeathKnightTriggerFactoryInternal::improved_icy_talons;
|
||||
creators["plague strike"] = &DeathKnightTriggerFactoryInternal::plague_strike;
|
||||
creators["horn of winter"] = &DeathKnightTriggerFactoryInternal::horn_of_winter;
|
||||
creators["mind freeze"] = &DeathKnightTriggerFactoryInternal::mind_freeze;
|
||||
creators["mind freeze on enemy healer"] = &DeathKnightTriggerFactoryInternal::mind_freeze_on_enemy_healer;
|
||||
creators["strangulate"] = &DeathKnightTriggerFactoryInternal::strangulate;
|
||||
creators["strangulate on enemy healer"] = &DeathKnightTriggerFactoryInternal::strangulate_on_enemy_healer;
|
||||
creators["blood tap"] = &DeathKnightTriggerFactoryInternal::blood_tap;
|
||||
creators["rbotAIse dead"] = &DeathKnightTriggerFactoryInternal::rbotAIse_dead;
|
||||
creators["chbotAIns of ice"] = &DeathKnightTriggerFactoryInternal::chbotAIns_of_ice;
|
||||
}
|
||||
|
||||
private:
|
||||
static Trigger* bone_shield(PlayerbotAI* botAI) { return new BoneShieldTrigger(botAI); }
|
||||
static Trigger* pestilence(PlayerbotAI* botAI) { return new PestilenceTrigger(botAI); }
|
||||
static Trigger* blood_strike(PlayerbotAI* botAI) { return new BloodStrikeTrigger(botAI); }
|
||||
static Trigger* plague_strike(PlayerbotAI* botAI) { return new PlagueStrikeDebuffTrigger(botAI); }
|
||||
static Trigger* plague_strike_on_attacker(PlayerbotAI* botAI) { return new PlagueStrikeDebuffOnAttackerTrigger(botAI); }
|
||||
static Trigger* icy_touch(PlayerbotAI* botAI) { return new IcyTouchDebuffTrigger(botAI); }
|
||||
static Trigger* death_coil(PlayerbotAI* botAI) { return new DeathCoilTrigger(botAI); }
|
||||
static Trigger* icy_touch_on_attacker(PlayerbotAI* botAI) { return new IcyTouchDebuffOnAttackerTrigger(botAI); }
|
||||
static Trigger* improved_icy_talons(PlayerbotAI* botAI) { return new ImprovedIcyTalonsTrigger(botAI); }
|
||||
static Trigger* horn_of_winter(PlayerbotAI* botAI) { return new HornOfWinterTrigger(botAI); }
|
||||
static Trigger* mind_freeze(PlayerbotAI* botAI) { return new MindFreezeInterruptSpellTrigger(botAI); }
|
||||
static Trigger* mind_freeze_on_enemy_healer(PlayerbotAI* botAI) { return new MindFreezeOnEnemyHealerTrigger(botAI); }
|
||||
static Trigger* strangulate(PlayerbotAI* botAI) { return new StrangulateInterruptSpellTrigger(botAI); }
|
||||
static Trigger* strangulate_on_enemy_healer(PlayerbotAI* botAI) { return new StrangulateOnEnemyHealerTrigger(botAI); }
|
||||
static Trigger* blood_tap(PlayerbotAI* botAI) { return new BloodTapTrigger(botAI); }
|
||||
static Trigger* rbotAIse_dead(PlayerbotAI* botAI) { return new RbotAIseDeadTrigger(botAI); }
|
||||
static Trigger* chbotAIns_of_ice(PlayerbotAI* botAI) { return new ChbotAInsOfIceSnareTrigger(botAI); }
|
||||
};
|
||||
|
||||
class DeathKnightAiObjectContextInternal : public NamedObjectContext<Action>
|
||||
{
|
||||
public:
|
||||
DeathKnightAiObjectContextInternal()
|
||||
{
|
||||
// Unholy
|
||||
creators["bone shield"] = &DeathKnightAiObjectContextInternal::bone_shield;
|
||||
creators["plague strike"] = &DeathKnightAiObjectContextInternal::plague_strike;
|
||||
creators["plague strike on attacker"] = &DeathKnightAiObjectContextInternal::plague_strike_on_attacker;
|
||||
creators["death grip"] = &DeathKnightAiObjectContextInternal::death_grip;
|
||||
creators["death coil"] = &DeathKnightAiObjectContextInternal::death_coil;
|
||||
creators["death strike"] = &DeathKnightAiObjectContextInternal::death_strike;
|
||||
creators["unholy blight"] = &DeathKnightAiObjectContextInternal::unholy_blight;
|
||||
creators["scourge strike"] = &DeathKnightAiObjectContextInternal::scourge_strike;
|
||||
creators["death and decay"] = &DeathKnightAiObjectContextInternal::death_and_decay;
|
||||
creators["unholy pressence"] = &DeathKnightAiObjectContextInternal::unholy_pressence;
|
||||
creators["rbotAIse dead"] = &DeathKnightAiObjectContextInternal::rbotAIse_dead;
|
||||
creators["army of the dead"] = &DeathKnightAiObjectContextInternal::army_of_the_dead;
|
||||
creators["summon gargoyle"] = &DeathKnightAiObjectContextInternal::summon_gargoyle;
|
||||
creators["anti magic shell"] = &DeathKnightAiObjectContextInternal::anti_magic_shell;
|
||||
creators["anti magic zone"] = &DeathKnightAiObjectContextInternal::anti_magic_zone;
|
||||
creators["ghoul frenzy"] = &DeathKnightAiObjectContextInternal::ghoul_frenzy;
|
||||
creators["corpse explosion"] = &DeathKnightAiObjectContextInternal::corpse_explosion;
|
||||
// Frost
|
||||
creators["icy touch"] = &DeathKnightAiObjectContextInternal::icy_touch;
|
||||
creators["icy touch on attacker"] = &DeathKnightAiObjectContextInternal::icy_touch_on_attacker;
|
||||
creators["obliterate"] = &DeathKnightAiObjectContextInternal::obliterate;
|
||||
creators["howling blast"] = &DeathKnightAiObjectContextInternal::howling_blast;
|
||||
creators["frost strike"] = &DeathKnightAiObjectContextInternal::frost_strike;
|
||||
creators["chbotAIns of ice"] = &DeathKnightAiObjectContextInternal::chbotAIns_of_ice;
|
||||
creators["rune strike"] = &DeathKnightAiObjectContextInternal::rune_strike;
|
||||
//creators["icy clutch"] = &DeathKnightAiObjectContextInternal::icy_clutch;
|
||||
creators["horn of winter"] = &DeathKnightAiObjectContextInternal::horn_of_winter;
|
||||
creators["killing machine"] = &DeathKnightAiObjectContextInternal::killing_machine;
|
||||
creators["frost presence"] = &DeathKnightAiObjectContextInternal::frost_presence;
|
||||
creators["deathchill"] = &DeathKnightAiObjectContextInternal::deathchill;
|
||||
creators["icebound fortitude"] = &DeathKnightAiObjectContextInternal::icebound_fortitude;
|
||||
creators["mind freeze"] = &DeathKnightAiObjectContextInternal::mind_freeze;
|
||||
creators["empower rune weapon"] = &DeathKnightAiObjectContextInternal::empower_rune_weapon;
|
||||
creators["hungering cold"] = &DeathKnightAiObjectContextInternal::hungering_cold;
|
||||
creators["unbreakable armor"] = &DeathKnightAiObjectContextInternal::unbreakable_armor;
|
||||
creators["improved icy talons"] = &DeathKnightAiObjectContextInternal::improved_icy_talons;
|
||||
// blood
|
||||
creators["blood strike"] = &DeathKnightAiObjectContextInternal::blood_strike;
|
||||
creators["blood tap"] = &DeathKnightAiObjectContextInternal::blood_tap;
|
||||
creators["pestilence"] = &DeathKnightAiObjectContextInternal::pestilence;
|
||||
creators["strangulate"] = &DeathKnightAiObjectContextInternal::strangulate;
|
||||
creators["blood boil"] = &DeathKnightAiObjectContextInternal::blood_boil;
|
||||
creators["heart strike"] = &DeathKnightAiObjectContextInternal::heart_strike;
|
||||
creators["mark of_blood"] = &DeathKnightAiObjectContextInternal::mark_of_blood;
|
||||
creators["blood presence"] = &DeathKnightAiObjectContextInternal::blood_presence;
|
||||
creators["rune tap"] = &DeathKnightAiObjectContextInternal::rune_tap;
|
||||
creators["vampiric blood"] = &DeathKnightAiObjectContextInternal::vampiric_blood;
|
||||
creators["death pact"] = &DeathKnightAiObjectContextInternal::death_pact;
|
||||
creators["death rune_mastery"] = &DeathKnightAiObjectContextInternal::death_rune_mastery;
|
||||
//creators["hysteria"] = &DeathKnightAiObjectContextInternal::hysteria;
|
||||
creators["dancing weapon"] = &DeathKnightAiObjectContextInternal::dancing_weapon;
|
||||
creators["dark command"] = &DeathKnightAiObjectContextInternal::dark_command;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
// Unholy
|
||||
static Action* bone_shield(PlayerbotAI* botAI) { return new CastBoneShieldAction(botAI); }
|
||||
static Action* plague_strike(PlayerbotAI* botAI) { return new CastPlagueStrikeAction(botAI); }
|
||||
static Action* plague_strike_on_attacker(PlayerbotAI* botAI) { return new CastPlagueStrikeOnAttackerAction(botAI); }
|
||||
static Action* death_grip(PlayerbotAI* botAI) { return new CastDeathGripAction(botAI); }
|
||||
static Action* death_coil(PlayerbotAI* botAI) { return new CastDeathCoilAction(botAI); }
|
||||
static Action* death_strike(PlayerbotAI* botAI) { return new CastDeathStrikeAction(botAI); }
|
||||
static Action* unholy_blight(PlayerbotAI* botAI) { return new CastUnholyBlightAction(botAI); }
|
||||
static Action* scourge_strike(PlayerbotAI* botAI) { return new CastScourgeStrikeAction(botAI); }
|
||||
static Action* death_and_decay(PlayerbotAI* botAI) { return new CastDeathAndDecayAction(botAI); }
|
||||
static Action* unholy_pressence(PlayerbotAI* botAI) { return new CastUnholyPresenceAction(botAI); }
|
||||
static Action* rbotAIse_dead(PlayerbotAI* botAI) { return new CastRbotAIseDeadAction(botAI); }
|
||||
static Action* army_of_the_dead(PlayerbotAI* botAI) { return new CastArmyOfTheDeadAction(botAI); }
|
||||
static Action* summon_gargoyle(PlayerbotAI* botAI) { return new CastSummonGargoyleAction(botAI); }
|
||||
static Action* anti_magic_shell(PlayerbotAI* botAI) { return new CastAntiMagicShellAction(botAI); }
|
||||
static Action* anti_magic_zone(PlayerbotAI* botAI) { return new CastAntiMagicZoneAction(botAI); }
|
||||
static Action* ghoul_frenzy(PlayerbotAI* botAI) { return new CastGhoulFrenzyAction(botAI); }
|
||||
static Action* corpse_explosion(PlayerbotAI* botAI) { return new CastCorpseExplosionAction(botAI); }
|
||||
// Frost
|
||||
static Action* icy_touch(PlayerbotAI* botAI) { return new CastIcyTouchAction(botAI); }
|
||||
static Action* icy_touch_on_attacker(PlayerbotAI* botAI) { return new CastIcyTouchOnAttackerAction(botAI); }
|
||||
static Action* obliterate(PlayerbotAI* botAI) { return new CastObliterateAction(botAI); }
|
||||
static Action* howling_blast(PlayerbotAI* botAI) { return new CastHowlingBlastAction(botAI); }
|
||||
static Action* frost_strike(PlayerbotAI* botAI) { return new CastFrostStrikeAction(botAI); }
|
||||
static Action* chbotAIns_of_ice(PlayerbotAI* botAI) { return new CastChbotAInsOfIceAction(botAI); }
|
||||
static Action* rune_strike(PlayerbotAI* botAI) { return new CastRuneStrikeAction(botAI); }
|
||||
//static Action* icy_clutch(PlayerbotAI* botAI) { return new CastIcyClutchAction(botAI); }
|
||||
static Action* horn_of_winter(PlayerbotAI* botAI) { return new CastHornOfWinterAction(botAI); }
|
||||
static Action* killing_machine(PlayerbotAI* botAI) { return new CastKillingMachineAction(botAI); }
|
||||
static Action* frost_presence(PlayerbotAI* botAI) { return new CastFrostPresenceAction(botAI); }
|
||||
static Action* deathchill(PlayerbotAI* botAI) { return new CastDeathchillAction(botAI); }
|
||||
static Action* icebound_fortitude(PlayerbotAI* botAI) { return new CastIceboundFortitudeAction(botAI); }
|
||||
static Action* mind_freeze(PlayerbotAI* botAI) { return new CastMindFreezeAction(botAI); }
|
||||
static Action* empower_rune_weapon(PlayerbotAI* botAI) { return new CastEmpowerRuneWeaponAction(botAI); }
|
||||
static Action* hungering_cold(PlayerbotAI* botAI) { return new CastHungeringColdAction(botAI); }
|
||||
static Action* unbreakable_armor(PlayerbotAI* botAI) { return new CastUnbreakableArmorAction(botAI); }
|
||||
static Action* improved_icy_talons(PlayerbotAI* botAI) { return new CastImprovedIcyTalonsAction(botAI); }
|
||||
// blood
|
||||
static Action* blood_strike(PlayerbotAI* botAI) { return new CastBloodStrikeAction(botAI); }
|
||||
static Action* blood_tap(PlayerbotAI* botAI) { return new CastBloodTapAction(botAI); }
|
||||
static Action* pestilence(PlayerbotAI* botAI) { return new CastPestilenceAction(botAI); }
|
||||
static Action* strangulate(PlayerbotAI* botAI) { return new CastStrangulateAction(botAI); }
|
||||
static Action* blood_boil(PlayerbotAI* botAI) { return new CastBloodBoilAction(botAI); }
|
||||
static Action* heart_strike(PlayerbotAI* botAI) { return new CastHeartStrikeAction(botAI); }
|
||||
static Action* mark_of_blood(PlayerbotAI* botAI) { return new CastMarkOfBloodAction(botAI); }
|
||||
static Action* blood_presence(PlayerbotAI* botAI) { return new CastBloodPresenceAction(botAI); }
|
||||
static Action* rune_tap(PlayerbotAI* botAI) { return new CastRuneTapAction(botAI); }
|
||||
static Action* vampiric_blood(PlayerbotAI* botAI) { return new CastVampiricBloodAction(botAI); }
|
||||
static Action* death_pact(PlayerbotAI* botAI) { return new CastDeathPactAction(botAI); }
|
||||
static Action* death_rune_mastery(PlayerbotAI* botAI) { return new CastDeathRuneMasteryAction(botAI); }
|
||||
//static Action* hysteria(PlayerbotAI* botAI) { return new CastHysteriaAction(botAI); }
|
||||
static Action* dancing_weapon(PlayerbotAI* botAI) { return new CastDancingWeaponAction(botAI); }
|
||||
static Action* dark_command(PlayerbotAI* botAI) { return new CastDarkCommandAction(botAI); }
|
||||
static Action* mind_freeze_on_enemy_healer(PlayerbotAI* botAI) { return new CastMindFreezeOnEnemyHealerAction(botAI); }
|
||||
};
|
||||
|
||||
DKAiObjectContext::DKAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)
|
||||
{
|
||||
strategyContexts.Add(new DeathKnightStrategyFactoryInternal());
|
||||
strategyContexts.Add(new DeathKnightCombatStrategyFactoryInternal());
|
||||
strategyContexts.Add(new DeathKnightDKBuffStrategyFactoryInternal());
|
||||
actionContexts.Add(new DeathKnightAiObjectContextInternal());
|
||||
triggerContexts.Add(new DeathKnightTriggerFactoryInternal());
|
||||
}
|
||||
18
src/strategy/deathknight/DKAiObjectContext.h
Normal file
18
src/strategy/deathknight/DKAiObjectContext.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_DKAIOBJECTCONTEXT_H
|
||||
#define _PLAYERBOT_DKAIOBJECTCONTEXT_H
|
||||
|
||||
#include "AiObjectContext.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class DKAiObjectContext : public AiObjectContext
|
||||
{
|
||||
public:
|
||||
DKAiObjectContext(PlayerbotAI* botAI);
|
||||
};
|
||||
|
||||
#endif
|
||||
12
src/strategy/deathknight/DKTriggers.cpp
Normal file
12
src/strategy/deathknight/DKTriggers.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* 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 "DKTriggers.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
bool DKPresenceTrigger::IsActive()
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
return !botAI->HasAura("blood presence", target) && !botAI->HasAura("unholy presence", target) && !botAI->HasAura("frost presence", target);
|
||||
}
|
||||
116
src/strategy/deathknight/DKTriggers.h
Normal file
116
src/strategy/deathknight/DKTriggers.h
Normal file
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* 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_DKTRIGGERS_H
|
||||
#define _PLAYERBOT_DKTRIGGERS_H
|
||||
|
||||
#include "GenericTriggers.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
BUFF_TRIGGER(HornOfWinterTrigger, "horn of winter");
|
||||
BUFF_TRIGGER(BoneShieldTrigger, "bone shield");
|
||||
BUFF_TRIGGER(ImprovedIcyTalonsTrigger, "improved icy talons");
|
||||
DEBUFF_TRIGGER(PlagueStrikeDebuffTrigger, "plague strike");
|
||||
DEBUFF_TRIGGER(IcyTouchDebuffTrigger, "icy touch");
|
||||
|
||||
class PlagueStrikeDebuffOnAttackerTrigger : public DebuffOnAttackerTrigger
|
||||
{
|
||||
public:
|
||||
PlagueStrikeDebuffOnAttackerTrigger(PlayerbotAI* botAI) : DebuffOnAttackerTrigger(botAI, "plague strike") { }
|
||||
};
|
||||
|
||||
class IcyTouchDebuffOnAttackerTrigger : public DebuffOnAttackerTrigger
|
||||
{
|
||||
public:
|
||||
IcyTouchDebuffOnAttackerTrigger(PlayerbotAI* botAI) : DebuffOnAttackerTrigger(botAI, "icy touch") { }
|
||||
};
|
||||
|
||||
class DKPresenceTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
DKPresenceTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "blood presence") { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class BloodTapTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
BloodTapTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "blood tap") { }
|
||||
};
|
||||
|
||||
class RbotAIseDeadTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
RbotAIseDeadTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "rbotAIse dead") { }
|
||||
};
|
||||
|
||||
class RuneStrikeTrigger : public SpellCanBeCastTrigger
|
||||
{
|
||||
public:
|
||||
RuneStrikeTrigger(PlayerbotAI* botAI) : SpellCanBeCastTrigger(botAI, "rune strike") { }
|
||||
};
|
||||
|
||||
class DeathCoilTrigger : public SpellCanBeCastTrigger
|
||||
{
|
||||
public:
|
||||
DeathCoilTrigger(PlayerbotAI* botAI) : SpellCanBeCastTrigger(botAI, "death coil") { }
|
||||
};
|
||||
|
||||
class PestilenceTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
PestilenceTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "pestilence") { }
|
||||
};
|
||||
|
||||
class BloodStrikeTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
BloodStrikeTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "blood strike") { }
|
||||
};
|
||||
|
||||
class HowlingBlastTrigger : public DebuffTrigger
|
||||
{
|
||||
public:
|
||||
HowlingBlastTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "howling blast") { }
|
||||
};
|
||||
|
||||
class MindFreezeInterruptSpellTrigger : public InterruptSpellTrigger
|
||||
{
|
||||
public:
|
||||
MindFreezeInterruptSpellTrigger(PlayerbotAI* botAI) : InterruptSpellTrigger(botAI, "mind freeze") { }
|
||||
};
|
||||
|
||||
class StrangulateInterruptSpellTrigger : public InterruptSpellTrigger
|
||||
{
|
||||
public:
|
||||
StrangulateInterruptSpellTrigger(PlayerbotAI* botAI) : InterruptSpellTrigger(botAI, "strangulate") { }
|
||||
};
|
||||
|
||||
class KillingMachineTrigger : public BoostTrigger
|
||||
{
|
||||
public:
|
||||
KillingMachineTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "killing machine") { }
|
||||
};
|
||||
|
||||
class MindFreezeOnEnemyHealerTrigger : public InterruptEnemyHealerTrigger
|
||||
{
|
||||
public:
|
||||
MindFreezeOnEnemyHealerTrigger(PlayerbotAI* botAI) : InterruptEnemyHealerTrigger(botAI, "mind freeze") { }
|
||||
};
|
||||
|
||||
class ChbotAInsOfIceSnareTrigger : public SnareTargetTrigger
|
||||
{
|
||||
public:
|
||||
ChbotAInsOfIceSnareTrigger(PlayerbotAI* botAI) : SnareTargetTrigger(botAI, "chbotAIns of ice") { }
|
||||
};
|
||||
|
||||
class StrangulateOnEnemyHealerTrigger : public InterruptEnemyHealerTrigger
|
||||
{
|
||||
public:
|
||||
StrangulateOnEnemyHealerTrigger(PlayerbotAI* botAI) : InterruptEnemyHealerTrigger(botAI, "strangulate") { }
|
||||
};
|
||||
|
||||
#endif
|
||||
86
src/strategy/deathknight/FrostDKStrategy.cpp
Normal file
86
src/strategy/deathknight/FrostDKStrategy.cpp
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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 "FrostDKStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class FrostDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
FrostDKStrategyActionNodeFactory()
|
||||
{
|
||||
//creators["icy touch"] = &icy_touch;
|
||||
creators["obliterate"] = &obliterate;
|
||||
creators["howling blast"] = &howling_blast;
|
||||
creators["frost strike"] = &frost_strike;
|
||||
//creators["chbotAIns of ice"] = &chbotAIns_of_ice;
|
||||
creators["rune strike"] = &rune_strike;
|
||||
//creators["icy clutch"] = &icy_clutch;
|
||||
//creators["horn of winter"] = &horn_of_winter;
|
||||
//creators["killing machine"] = &killing_machine;
|
||||
//creators["frost presence"] = &frost_presence;
|
||||
//creators["deathchill"] = &deathchill;
|
||||
//creators["icebound fortitude"] = &icebound_fortitude;
|
||||
//creators["mind freeze"] = &mind_freeze;
|
||||
//creators["empower weapon"] = &empower_weapon;
|
||||
//creators["hungering cold"] = &hungering_cold;
|
||||
//creators["unbreakable armor"] = &unbreakable_armor;
|
||||
//creators["improved icy talons"] = &improved_icy_talons;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* obliterate(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("obliterate",
|
||||
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
|
||||
/*A*/ NextAction::array(0, new NextAction("frost strike"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* rune_strike(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("rune strike",
|
||||
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
|
||||
/*A*/ NextAction::array(0, new NextAction("melee"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* frost_strike(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("frost strike",
|
||||
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* howling_blast(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("howling blast",
|
||||
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
|
||||
/*A*/ NextAction::array(0, new NextAction("icy touch"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
FrostDKStrategy::FrostDKStrategy(PlayerbotAI* botAI) : GenericDKStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new FrostDKStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
NextAction** FrostDKStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("melee", ACTION_NORMAL), new NextAction("frost strike", ACTION_NORMAL + 5), new NextAction("obliterate", ACTION_NORMAL + 4), nullptr);
|
||||
}
|
||||
|
||||
void FrostDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericDKStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("empower weapon", NextAction::array(0, new NextAction("empower weapon", ACTION_NORMAL + 4), nullptr)));
|
||||
}
|
||||
|
||||
void FrostDKAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("howling blast", ACTION_NORMAL + 4), nullptr)));
|
||||
}
|
||||
32
src/strategy/deathknight/FrostDKStrategy.h
Normal file
32
src/strategy/deathknight/FrostDKStrategy.h
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.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_FROSTDKSTRATEGY_H
|
||||
#define _PLAYERBOT_FROSTDKSTRATEGY_H
|
||||
|
||||
#include "GenericDKStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class FrostDKStrategy : public GenericDKStrategy
|
||||
{
|
||||
public:
|
||||
FrostDKStrategy(PlayerbotAI* botAI);
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "frost"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_COMBAT | STRATEGY_TYPE_DPS | STRATEGY_TYPE_MELEE; }
|
||||
};
|
||||
|
||||
class FrostDKAoeStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
FrostDKAoeStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "frost aoe"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
52
src/strategy/deathknight/GenericDKNonCombatStrategy.cpp
Normal file
52
src/strategy/deathknight/GenericDKNonCombatStrategy.cpp
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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 "GenericDKNonCombatStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class GenericDKNonCombatStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
GenericDKNonCombatStrategyActionNodeFactory()
|
||||
{
|
||||
creators["bone shield"] = &bone_shield;
|
||||
creators["horn of winter"] = &horn_of_winter;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* bone_shield(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("bone shield",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* horn_of_winter(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("horn of winter",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
GenericDKNonCombatStrategy::GenericDKNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericDKNonCombatStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericDKNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
NonCombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("raise dead", NextAction::array(0, new NextAction("raise dead", ACTION_NORMAL + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("horn of winter", NextAction::array(0, new NextAction("horn of winter", 21.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("bone shield", NextAction::array(0, new NextAction("bone shield", 21.0f), nullptr)));
|
||||
}
|
||||
|
||||
void DKBuffDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("improved icy talons", NextAction::array(0, new NextAction("improved icy talons", 19.0f), nullptr)));
|
||||
}
|
||||
31
src/strategy/deathknight/GenericDKNonCombatStrategy.h
Normal file
31
src/strategy/deathknight/GenericDKNonCombatStrategy.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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_GENERICDKNONCOMBATSTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICDKNONCOMBATSTRATEGY_H
|
||||
|
||||
#include "GenericDKStrategy.h"
|
||||
#include "NonCombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericDKNonCombatStrategy : public NonCombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericDKNonCombatStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "nc"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
class DKBuffDpsStrategy : public Strategy
|
||||
{
|
||||
public:
|
||||
DKBuffDpsStrategy(PlayerbotAI* botAI) : Strategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "bdps"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
182
src/strategy/deathknight/GenericDKStrategy.cpp
Normal file
182
src/strategy/deathknight/GenericDKStrategy.cpp
Normal file
@@ -0,0 +1,182 @@
|
||||
#/*
|
||||
* 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 "GenericDKStrategy.h"
|
||||
#include "DKAiObjectContext.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
GenericDKStrategyActionNodeFactory()
|
||||
{
|
||||
//blood
|
||||
//creators["rune tap"] = &rune_tap; cd
|
||||
//creators["vampiric blood"] = &vampiric_blood;
|
||||
//creators["death pact"] = &death_pact;
|
||||
//creators["hysteria"] = &hysteria; boost party
|
||||
//creators["dancing rune weapon"] = &dancing_rune_weapon; //cd
|
||||
//creators["dark command"] = &dark_command; taunt
|
||||
|
||||
//frost
|
||||
//creators["chbotAIns of ice"] = &chbotAIns_of_ice;
|
||||
//creators["icy clutch"] = &icy_clutch;
|
||||
creators["horn of winter"] = &horn_of_winter;
|
||||
creators["killing machine"] = &killing_machine; // buff
|
||||
//creators["deathchill"] = &deathchill; //boost
|
||||
creators["icebound fortitude"] = &icebound_fortitude;
|
||||
//creators["mind freeze"] = &mind_freeze; interrupt
|
||||
//creators["empower rune weapon"] = &empower_rune_weapon; boost
|
||||
//creators["hungering cold"] = &hungering_cold; snare
|
||||
//creators["unbreakable armor"] = &unbreakable_armor; boost +cd
|
||||
//creators["improved icy talons"] = &improved_icy_talons; boost party
|
||||
|
||||
//unholy
|
||||
//creators["death and decay"] = &death_and_decay;
|
||||
//creators["rbotAIse dead"] = &rbotAIse_dead;
|
||||
//creators["army of the dead"] = &army of the dead;
|
||||
//creators["summon gargoyle"] = &army of the dead;
|
||||
//creators["anti magic shell"] = &anti_magic_shell; cd
|
||||
creators["anti magic zone"] = &anti_magic_zone;
|
||||
//creators["ghoul frenzy"] = &ghoul_frenzy;
|
||||
creators["corpse explosion"] = &corpse_explosion;
|
||||
creators["bone shield"] = &bone_shield;
|
||||
creators["heart strike"] = &heart_strike;
|
||||
creators["death grip"] = &death_grip;
|
||||
creators["plague strike"] = &plague_strike;
|
||||
creators["pestilence"] = &pestilence;
|
||||
creators["icy touch"] = &icy_touch;
|
||||
|
||||
}
|
||||
private:
|
||||
static ActionNode* death_coil(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("death coil",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("death strike"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* death_grip(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("death grip",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("icy touch"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* plague_strike(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("plague strike",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* icy_touch(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("icy touch",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* heart_strike(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("heart strike",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("blood strike"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* pestilence(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("pestilence",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* horn_of_winter(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("horn of winter",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* bone_shield(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("bone shield",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* killing_machine(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("killing machine",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("improved icy talons"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* corpse_explosion(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("corpse explosion",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* anti_magic_zone(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("anti magic zone",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("anti magic shell"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* icebound_fortitude(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("icebound fortitude",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
GenericDKStrategy::GenericDKStrategy(PlayerbotAI* botAI) : MeleeCombatStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new GenericDKStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
void GenericDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
MeleeCombatStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("high aoe", NextAction::array(0, new NextAction("anti magic shell", ACTION_NORMAL + 3), nullptr)));
|
||||
triggers.push_back(new TriggerNode("death coil", NextAction::array(0, new NextAction("death coil", ACTION_NORMAL + 3), nullptr)));
|
||||
triggers.push_back(new TriggerNode("critical aoe heal", NextAction::array(0, new NextAction("anti magic zone", ACTION_EMERGENCY + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("rbotAIse dead", ACTION_NORMAL + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("mind freeze", NextAction::array(0, new NextAction("mind freeze", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("bone shield", NextAction::array(0, new NextAction("bone shield", ACTION_NORMAL + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("horn of winter", NextAction::array(0, new NextAction("horn of winter", ACTION_NORMAL + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("mind freeze on enemy healer", NextAction::array(0, new NextAction("mind freeze on enemy healer", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("icy touch", ACTION_NORMAL + 9),
|
||||
new NextAction("death grip", ACTION_NORMAL + 9), new NextAction("reach melee", ACTION_NORMAL + 8), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("icebound fortitude", ACTION_HIGH + 5), new NextAction("rune tap", ACTION_HIGH + 4), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium health", NextAction::array(0, new NextAction("rune tap", ACTION_NORMAL + 4), new NextAction("death strike", ACTION_NORMAL + 3), nullptr)));
|
||||
triggers.push_back(new TriggerNode("icy touch on attacker", NextAction::array(0, new NextAction("icy touch", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("icy touch", NextAction::array(0, new NextAction("icy touch", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("plague strike", NextAction::array(0, new NextAction("plague strike", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("plague strike on attacker", NextAction::array(0, new NextAction("plague strike", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("high aoe", NextAction::array(0, new NextAction("unholy blight", ACTION_NORMAL + 6), new NextAction("death and decay", ACTION_NORMAL + 5),
|
||||
new NextAction("pestilence", ACTION_NORMAL + 4), new NextAction("blood boil", ACTION_NORMAL + 3), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("death and decay", ACTION_NORMAL + 5),
|
||||
new NextAction("pestilence", ACTION_NORMAL + 4), new NextAction("blood boil", ACTION_NORMAL + 3), nullptr)));
|
||||
triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("howling blast", ACTION_NORMAL + 5), new NextAction("pestilence", ACTION_NORMAL + 4),
|
||||
new NextAction("hearth strike", ACTION_NORMAL + 3), new NextAction("blood boil", ACTION_NORMAL + 3), nullptr)));
|
||||
}
|
||||
21
src/strategy/deathknight/GenericDKStrategy.h
Normal file
21
src/strategy/deathknight/GenericDKStrategy.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 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_GENERICDKSTRATEGY_H
|
||||
#define _PLAYERBOT_GENERICDKSTRATEGY_H
|
||||
|
||||
#include "MeleeCombatStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class GenericDKStrategy : public MeleeCombatStrategy
|
||||
{
|
||||
public:
|
||||
GenericDKStrategy(PlayerbotAI* botAI);
|
||||
|
||||
std::string const getName() override { return "DK"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
76
src/strategy/deathknight/UnholyDKStrategy.cpp
Normal file
76
src/strategy/deathknight/UnholyDKStrategy.cpp
Normal file
@@ -0,0 +1,76 @@
|
||||
#/*
|
||||
* 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 "UnholyDKStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class UnholyDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
UnholyDKStrategyActionNodeFactory()
|
||||
{
|
||||
// Unholy
|
||||
//creators["bone shield"] = &bone_shield;
|
||||
//creators["plague strike"] = &plague_strike;
|
||||
//creators["death grip"] = &death_grip;
|
||||
//creators["death coil"] = &death_coil;
|
||||
creators["death strike"] = &death_strike;
|
||||
//creators["unholy blight"] = &unholy_blight;
|
||||
creators["scourge strike"] = &scourge_strike;
|
||||
//creators["death and decay"] = &death_and_decay;
|
||||
//creators["unholy pressence"] = &unholy_pressence;
|
||||
//creators["rbotAIse dead"] = &rbotAIse_dead;
|
||||
//creators["army of the dead"] = &army of the dead;
|
||||
//creators["summon gargoyle"] = &army of the dead;
|
||||
//creators["anti magic shell"] = &anti_magic_shell;
|
||||
//creators["anti magic zone"] = &anti_magic_zone;
|
||||
//creators["ghoul frenzy"] = &ghoul_frenzy;
|
||||
creators["corpse explosion"] = &corpse_explosion;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* death_strike(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("death strike",
|
||||
/*P*/ NextAction::array(0, new NextAction("unholy pressence"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* corpse_explosion(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("corpse explosion",
|
||||
/*P*/ NextAction::array(0, new NextAction("unholy pressence"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* scourge_strike(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("scourge strike",
|
||||
/*P*/ NextAction::array(0, new NextAction("unholy pressence"), nullptr),
|
||||
/*A*/ NextAction::array(0, new NextAction("death strike"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
NextAction** UnholyDKStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("melee", ACTION_NORMAL), new NextAction("scourge strike" , ACTION_NORMAL + 3), nullptr);
|
||||
}
|
||||
|
||||
void UnholyDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
GenericDKStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("ghoul frenzy", ACTION_NORMAL + 2), nullptr)));
|
||||
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("death pact", ACTION_EMERGENCY + 1), nullptr)));
|
||||
}
|
||||
|
||||
void UnholyDKAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("loot avbotAIlable", NextAction::array(0, new NextAction("corpse explosion", ACTION_NORMAL + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("death and decay", ACTION_NORMAL + 3),
|
||||
new NextAction("corpse explosion", ACTION_NORMAL + 3), nullptr)));
|
||||
}
|
||||
32
src/strategy/deathknight/UnholyDKStrategy.h
Normal file
32
src/strategy/deathknight/UnholyDKStrategy.h
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.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_UNHOLYDKSTRATEGY_H
|
||||
#define _PLAYERBOT_UNHOLYDKSTRATEGY_H
|
||||
|
||||
#include "GenericDKStrategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class UnholyDKStrategy : public GenericDKStrategy
|
||||
{
|
||||
public:
|
||||
UnholyDKStrategy(PlayerbotAI* botAI) : GenericDKStrategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "unholy"; }
|
||||
NextAction** getDefaultActions() override;
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_COMBAT | STRATEGY_TYPE_DPS | STRATEGY_TYPE_MELEE; }
|
||||
};
|
||||
|
||||
class UnholyDKAoeStrategy : public CombatStrategy
|
||||
{
|
||||
public:
|
||||
UnholyDKAoeStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) { }
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "unholy aoe"; }
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user