From 4043edfba3ae5c36eee41914116ffc73b5cbaee7 Mon Sep 17 00:00:00 2001 From: Bobblybook Date: Tue, 23 Jul 2024 20:00:05 +1000 Subject: [PATCH] Freeze snare testing --- src/strategy/mage/FrostMageStrategy.cpp | 10 +++++++++- src/strategy/mage/MageAiObjectContext.cpp | 4 ++++ src/strategy/mage/MageTriggers.h | 18 +++++++++++++++--- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/strategy/mage/FrostMageStrategy.cpp b/src/strategy/mage/FrostMageStrategy.cpp index f396e272..beaae78d 100644 --- a/src/strategy/mage/FrostMageStrategy.cpp +++ b/src/strategy/mage/FrostMageStrategy.cpp @@ -74,7 +74,7 @@ void FrostMageStrategy::InitTriggers(std::vector& triggers) triggers.push_back(new TriggerNode("has pet", NextAction::array(0, new NextAction("toggle pet spell", ACTION_HIGH + 1), nullptr))); triggers.push_back(new TriggerNode("ice barrier", NextAction::array(0, new NextAction("ice barrier", ACTION_HIGH), nullptr))); - triggers.push_back(new TriggerNode("brain freeze", NextAction::array(0, new NextAction("frostfire bolt", 60.0f), nullptr))); + triggers.push_back(new TriggerNode("brain freeze", NextAction::array(0, new NextAction("frostfire bolt", ACTION_NORMAL + 3), nullptr))); // Combo cast the last charge of fingers of frost for double crits. // Should only do this on the final charge of FoF. triggers.push_back(new TriggerNode("fingers of frost single", NextAction::array(0, @@ -84,6 +84,14 @@ void FrostMageStrategy::InitTriggers(std::vector& triggers) // May not need this, frostbolt is the default action so probably don't need to specify. // Maybe uncomment if you find the mage is prioritising auxillary spells while this buff is up, and wasting the proc. // triggers.push_back(new TriggerNode("fingers of frost double", NextAction::array(0, new NextAction("frostbolt", ACTION_NORMAL), nullptr))); + triggers.push_back(new TriggerNode("frost nova on target", NextAction::array(0, + new NextAction("fireball", ACTION_NORMAL + 2), + new NextAction("scorch", ACTION_NORMAL + 1), + nullptr))); + triggers.push_back(new TriggerNode("frostbite on target", NextAction::array(0, + new NextAction("arcane missiles", ACTION_NORMAL + 2), + new NextAction("arcane explosion", ACTION_NORMAL + 1), + nullptr))); } void FrostMageAoeStrategy::InitTriggers(std::vector& triggers) diff --git a/src/strategy/mage/MageAiObjectContext.cpp b/src/strategy/mage/MageAiObjectContext.cpp index c92e463b..ebfeb406 100644 --- a/src/strategy/mage/MageAiObjectContext.cpp +++ b/src/strategy/mage/MageAiObjectContext.cpp @@ -104,6 +104,8 @@ class MageTriggerFactoryInternal : public NamedObjectContext creators["frost ward"] = &MageTriggerFactoryInternal::frost_ward; creators["arcane blast stack"] = &MageTriggerFactoryInternal::arcane_blast_stack; creators["mirror image"] = &MageTriggerFactoryInternal::mirror_image; + creators["frost nova on target"] = &MageTriggerFactoryInternal::mirror_image; + creators["frostbite on target"] = &MageTriggerFactoryInternal::mirror_image; } private: @@ -135,6 +137,8 @@ class MageTriggerFactoryInternal : public NamedObjectContext static Trigger* counterspell_enemy_healer(PlayerbotAI* botAI) { return new CounterspellEnemyHealerTrigger(botAI); } static Trigger* arcane_blast_stack(PlayerbotAI* botAI) { return new ArcaneBlastStackTrigger(botAI); } static Trigger* mirror_image(PlayerbotAI* botAI) { return new MirrorImageTrigger(botAI); } + static Trigger* frost_nova_on_target(PlayerbotAI* botAI) { return new FrostNovaOnTargetTrigger(botAI); } + static Trigger* frostbite_on_target(PlayerbotAI* botAI) { return new FrostbiteOnTargetTrigger(botAI); } }; class MageAiObjectContextInternal : public NamedObjectContext diff --git a/src/strategy/mage/MageTriggers.h b/src/strategy/mage/MageTriggers.h index e67dba9d..77ca40c6 100644 --- a/src/strategy/mage/MageTriggers.h +++ b/src/strategy/mage/MageTriggers.h @@ -167,13 +167,25 @@ class PresenceOfMindTrigger : public BuffTrigger class ArcaneBlastStackTrigger : public HasAuraStackTrigger { public: - ArcaneBlastStackTrigger(PlayerbotAI* ai) : HasAuraStackTrigger(ai, "arcane blast", 3, 1) {} + ArcaneBlastStackTrigger(PlayerbotAI* botAI) : HasAuraStackTrigger(botAI, "arcane blast", 3, 1) {} }; -class MirrorImageTrigger : public BoostTrigger +class MirrorImageTrigger : public BoostTrigger { public: - MirrorImageTrigger(PlayerbotAI* ai) : BoostTrigger(ai, "mirror image") {} + MirrorImageTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "mirror image") {} +}; + +class FrostNovaOnTargetTrigger : public DebuffTrigger +{ + public: + FrostNovaOnTargetTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frost nova", 1, false, 2.0f) {} +}; + +class FrostbiteOnTargetTrigger : public DebuffTrigger +{ + public: + FrostbiteOnTargetTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frostbite", 1, false, 2.0f) {} }; #endif