major class spells

This commit is contained in:
Yunfan Li
2023-09-02 22:37:11 +08:00
parent 5f5faf00cd
commit 14b94e20fb
42 changed files with 203 additions and 67 deletions

View File

@@ -142,8 +142,10 @@ void MageCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
void MageBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("arcane power", NextAction::array(0, new NextAction("arcane power", 41.0f), nullptr)));
triggers.push_back(new TriggerNode("icy veins", NextAction::array(0, new NextAction("icy veins", 50.0f), nullptr)));
triggers.push_back(new TriggerNode("presence of mind", NextAction::array(0, new NextAction("presence of mind", 42.0f), nullptr)));
triggers.push_back(new TriggerNode("arcane power", NextAction::array(0, new NextAction("arcane power", 41.0f), nullptr)));
triggers.push_back(new TriggerNode("mirror image", NextAction::array(0, new NextAction("mirror image", 41.0f), nullptr)));
}
void MageCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)

View File

@@ -242,4 +242,10 @@ class CastPresenceOfMindAction : public CastBuffSpellAction
CastPresenceOfMindAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "presence of mind") { }
};
class CastMirrorImageAction : public CastBuffSpellAction
{
public:
CastMirrorImageAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "mirror image") {}
};
#endif

View File

@@ -98,6 +98,7 @@ class MageTriggerFactoryInternal : public NamedObjectContext<Trigger>
creators["fire ward"] = &MageTriggerFactoryInternal::fire_ward;
creators["frost ward"] = &MageTriggerFactoryInternal::frost_ward;
creators["arcane blast stack"] = &MageTriggerFactoryInternal::arcane_blast_stack;
creators["mirror image"] = &MageTriggerFactoryInternal::mirror_image;
}
private:
@@ -123,6 +124,7 @@ class MageTriggerFactoryInternal : public NamedObjectContext<Trigger>
static Trigger* arcane_blast(PlayerbotAI* botAI) { return new ArcaneBlastTrigger(botAI); }
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); }
};
class MageAiObjectContextInternal : public NamedObjectContext<Action>
@@ -169,6 +171,7 @@ class MageAiObjectContextInternal : public NamedObjectContext<Action>
creators["counterspell on enemy healer"] = &MageAiObjectContextInternal::counterspell_on_enemy_healer;
creators["fire ward"] = &MageAiObjectContextInternal::fire_ward;
creators["frost ward"] = &MageAiObjectContextInternal::frost_ward;
creators["mirror image"] = &MageAiObjectContextInternal::mirror_image;
}
private:
@@ -211,6 +214,7 @@ class MageAiObjectContextInternal : public NamedObjectContext<Action>
static Action* invisibility(PlayerbotAI* botAI) { return new CastInvisibilityAction(botAI); }
static Action* evocation(PlayerbotAI* botAI) { return new CastEvocationAction(botAI); }
static Action* counterspell_on_enemy_healer(PlayerbotAI* botAI) { return new CastCounterspellOnEnemyHealerAction(botAI); }
static Action* mirror_image(PlayerbotAI* botAI) { return new CastMirrorImageAction(botAI); }
};
MageAiObjectContext::MageAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)

View File

@@ -6,6 +6,7 @@
#define _PLAYERBOT_MAGETRIGGERS_H
#include "CureTriggers.h"
#include "GenericTriggers.h"
#include "SharedDefines.h"
class PlayerbotAI;
@@ -137,4 +138,11 @@ class ArcaneBlastStackTrigger : public HasAuraStackTrigger {
public:
ArcaneBlastStackTrigger(PlayerbotAI* ai) : HasAuraStackTrigger(ai, "arcane blast", 3, 1) {}
};
class MirrorImageTrigger : public BoostTrigger
{
public:
MirrorImageTrigger(PlayerbotAI* ai) : BoostTrigger(ai, "mirror image") {}
};
#endif