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

@@ -67,14 +67,17 @@ void MeleeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode("flame shock", NextAction::array(0, new NextAction("flame shock", 20.0f), nullptr)));
triggers.push_back(new TriggerNode(
"maelstrom weapon",
NextAction::array(0, new NextAction("lightning bolt", 25.0f), NULL)));
NextAction::array(0, new NextAction("lightning bolt", 25.0f), nullptr)));
triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_NORMAL + 7), nullptr)));
// triggers.push_back(new TriggerNode("enemy too close for melee", NextAction::array(0, new NextAction("move out of enemy contact", ACTION_NORMAL + 8), nullptr)));
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("strength of earth totem", ACTION_LIGHT_HEAL), nullptr)));
triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), nullptr)));
triggers.push_back(new TriggerNode(
"no fire totem",
NextAction::array(0, new NextAction("reach melee", 23.0f), new NextAction("magma totem", 22.0f), NULL)));
NextAction::array(0, new NextAction("reach melee", 23.0f), new NextAction("magma totem", 22.0f), nullptr)));
triggers.push_back(new TriggerNode(
"medium mana",
NextAction::array(0, new NextAction("shamanistic rage", 23.0f), nullptr)));
}
void MeleeAoeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)

View File

@@ -402,4 +402,10 @@ class CastWrathOfAirTotemAction : public CastTotemAction
public:
CastWrathOfAirTotemAction(PlayerbotAI* ai) : CastTotemAction(ai, "wrath of air totem") {}
};
class CastShamanisticRageAction : public CastBuffSpellAction
{
public:
CastShamanisticRageAction(PlayerbotAI* ai) : CastBuffSpellAction(ai, "shamanistic rage") {}
};
#endif

View File

@@ -212,6 +212,7 @@ class ShamanAiObjectContextInternal : public NamedObjectContext<Action>
creators["totem of wrath"] = &ShamanAiObjectContextInternal::totem_of_wrath;
creators["fire elemental totem"] = &ShamanAiObjectContextInternal::fire_elemental_totem;
creators["wrath of air totem"] = &ShamanAiObjectContextInternal::wrath_of_air_totem;
creators["shamanistic rage"] = &ShamanAiObjectContextInternal::shamanistic_rage;
}
private:
@@ -273,6 +274,8 @@ class ShamanAiObjectContextInternal : public NamedObjectContext<Action>
static Action* totem_of_wrath(PlayerbotAI* ai) { return new CastTotemOfWrathAction(ai); }
static Action* fire_elemental_totem(PlayerbotAI* ai) { return new CastFireElementalTotemAction(ai); }
static Action* wrath_of_air_totem(PlayerbotAI* ai) { return new CastWrathOfAirTotemAction(ai); }
static Action* shamanistic_rage(PlayerbotAI* ai) { return new CastShamanisticRageAction(ai); }
};