Army of the dead

This commit is contained in:
Yunfan Li
2024-04-10 20:32:43 +08:00
parent 17ddf6fbc5
commit 00a3436d77
6 changed files with 15 additions and 6 deletions

View File

@@ -99,7 +99,7 @@ void BloodDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode("rune strike", NextAction::array(0, new NextAction("rune strike", ACTION_NORMAL + 3), nullptr))); 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("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("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), triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("army of the dead", ACTION_HIGH + 5),
new NextAction("vampiric blood", ACTION_HIGH + 3), new NextAction("death strike", ACTION_HIGH + 4), nullptr))); new NextAction("vampiric blood", ACTION_HIGH + 4), new NextAction("death strike", ACTION_HIGH + 3), nullptr)));
// triggers.push_back(new TriggerNode("army of the dead", NextAction::array(0, new NextAction("army of the dead", ACTION_HIGH + 6), nullptr)));
} }

View File

@@ -89,6 +89,7 @@ class DeathKnightTriggerFactoryInternal : public NamedObjectContext<Trigger>
creators["freezing fog"] = &DeathKnightTriggerFactoryInternal::freezing_fog; creators["freezing fog"] = &DeathKnightTriggerFactoryInternal::freezing_fog;
creators["no desolation"] = &DeathKnightTriggerFactoryInternal::no_desolation; creators["no desolation"] = &DeathKnightTriggerFactoryInternal::no_desolation;
creators["death and decay cooldown"] = &DeathKnightTriggerFactoryInternal::death_and_decay_cooldown; creators["death and decay cooldown"] = &DeathKnightTriggerFactoryInternal::death_and_decay_cooldown;
creators["army of the dead"] = &DeathKnightTriggerFactoryInternal::army_of_the_dead;
} }
private: private:
@@ -114,7 +115,7 @@ class DeathKnightTriggerFactoryInternal : public NamedObjectContext<Trigger>
static Trigger* freezing_fog(PlayerbotAI* botAI) { return new FreezingFogTrigger(botAI); } static Trigger* freezing_fog(PlayerbotAI* botAI) { return new FreezingFogTrigger(botAI); }
static Trigger* no_desolation(PlayerbotAI* botAI) { return new DesolationTrigger(botAI); } static Trigger* no_desolation(PlayerbotAI* botAI) { return new DesolationTrigger(botAI); }
static Trigger* death_and_decay_cooldown(PlayerbotAI* botAI) { return new DeathAndDecayCooldownTrigger(botAI); } static Trigger* death_and_decay_cooldown(PlayerbotAI* botAI) { return new DeathAndDecayCooldownTrigger(botAI); }
static Trigger* army_of_the_dead(PlayerbotAI* botAI) { return new ArmyOfTheDeadTrigger(botAI); }
}; };
class DeathKnightAiObjectContextInternal : public NamedObjectContext<Action> class DeathKnightAiObjectContextInternal : public NamedObjectContext<Action>

View File

@@ -153,4 +153,10 @@ class DeathAndDecayCooldownTrigger : public SpellCooldownTrigger
bool IsActive() override; bool IsActive() override;
}; };
class ArmyOfTheDeadTrigger : public BoostTrigger
{
public:
ArmyOfTheDeadTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "army of the dead") { }
};
#endif #endif

View File

@@ -91,6 +91,7 @@ NextAction** FrostDKStrategy::getDefaultActions()
void FrostDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void FrostDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{ {
GenericDKStrategy::InitTriggers(triggers); GenericDKStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("army of the dead", NextAction::array(0, new NextAction("army of the dead", ACTION_HIGH + 6), nullptr)));
triggers.push_back(new TriggerNode("unbreakable armor", NextAction::array(0, new NextAction("unbreakable armor", ACTION_NORMAL + 4), nullptr))); triggers.push_back(new TriggerNode("unbreakable armor", NextAction::array(0, new NextAction("unbreakable armor", ACTION_NORMAL + 4), nullptr)));
triggers.push_back(new TriggerNode("high blood rune", NextAction::array(0, new NextAction("blood strike", ACTION_NORMAL + 1), nullptr))); triggers.push_back(new TriggerNode("high blood rune", NextAction::array(0, new NextAction("blood strike", ACTION_NORMAL + 1), nullptr)));
triggers.push_back(new TriggerNode("freezing fog", NextAction::array(0, new NextAction("howling blast", ACTION_HIGH + 1), nullptr))); triggers.push_back(new TriggerNode("freezing fog", NextAction::array(0, new NextAction("howling blast", ACTION_HIGH + 1), nullptr)));

View File

@@ -86,6 +86,7 @@ void UnholyDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
GenericDKStrategy::InitTriggers(triggers); GenericDKStrategy::InitTriggers(triggers);
// triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction(, ACTION_NORMAL + 2), nullptr))); // triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction(, ACTION_NORMAL + 2), nullptr)));
triggers.push_back(new TriggerNode("army of the dead", NextAction::array(0, new NextAction("army of the dead", ACTION_HIGH + 6), nullptr)));
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("death pact", ACTION_HIGH + 5), nullptr))); triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("death pact", ACTION_HIGH + 5), nullptr)));
triggers.push_back(new TriggerNode("no desolation", NextAction::array(0, new NextAction("blood strike", ACTION_HIGH + 4), nullptr))); triggers.push_back(new TriggerNode("no desolation", NextAction::array(0, new NextAction("blood strike", ACTION_HIGH + 4), nullptr)));
triggers.push_back(new TriggerNode("death and decay cooldown", triggers.push_back(new TriggerNode("death and decay cooldown",

View File

@@ -81,8 +81,8 @@ DpsPaladinStrategy::DpsPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrat
NextAction** DpsPaladinStrategy::getDefaultActions() NextAction** DpsPaladinStrategy::getDefaultActions()
{ {
return NextAction::array(0, return NextAction::array(0,
new NextAction("judgement of wisdom", ACTION_DEFAULT + 0.4f), new NextAction("crusader strike", ACTION_DEFAULT + 0.4f),
new NextAction("crusader strike", ACTION_DEFAULT + 0.3f), new NextAction("judgement of wisdom", ACTION_DEFAULT + 0.3f),
new NextAction("divine storm", ACTION_DEFAULT + 0.2f), new NextAction("divine storm", ACTION_DEFAULT + 0.2f),
new NextAction("melee consecration", ACTION_DEFAULT + 0.1f), new NextAction("melee consecration", ACTION_DEFAULT + 0.1f),
new NextAction("melee", ACTION_DEFAULT), new NextAction("melee", ACTION_DEFAULT),