shaman, rogue strategy port, use item action.

This commit is contained in:
Yunfan Li
2023-06-08 10:37:13 +08:00
parent 231b0b51e4
commit 89d24b646c
34 changed files with 664 additions and 109 deletions

View File

@@ -11,6 +11,7 @@ class CasterShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
CasterShamanStrategyActionNodeFactory()
{
creators["magma totem"] = &magma_totem;
creators["totem of wrath"] = &totem_of_wrath;
}
private:
@@ -21,6 +22,13 @@ class CasterShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
/*A*/ nullptr,
/*C*/ NextAction::array(0, new NextAction("fire nova"), nullptr));
}
static ActionNode* totem_of_wrath(PlayerbotAI* botAI)
{
return new ActionNode ("totem of wrath",
/*P*/ NULL,
/*A*/ NextAction::array(0, new NextAction("flametongue totem"), NULL),
/*C*/ NULL);
}
};
CasterShamanStrategy::CasterShamanStrategy(PlayerbotAI* botAI) : GenericShamanStrategy(botAI)
@@ -30,7 +38,10 @@ CasterShamanStrategy::CasterShamanStrategy(PlayerbotAI* botAI) : GenericShamanSt
NextAction** CasterShamanStrategy::getDefaultActions()
{
return NextAction::array(0, new NextAction("lightning bolt", 10.0f), nullptr);
return NextAction::array(0,
new NextAction("lava burst", 11.0f),
new NextAction("lightning bolt", 10.0f),
NULL);
}
void CasterShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
@@ -39,10 +50,16 @@ void CasterShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode("enemy out of spell", NextAction::array(0, new NextAction("reach spell", ACTION_NORMAL + 9), nullptr)));
triggers.push_back(new TriggerNode("shaman weapon", NextAction::array(0, new NextAction("flametongue weapon", 23.0f), nullptr)));
triggers.push_back(new TriggerNode("searing totem", NextAction::array(0, new NextAction("searing totem", 19.0f), nullptr)));
triggers.push_back(new TriggerNode("shock", NextAction::array(0, new NextAction("earth shock", 20.0f), nullptr)));
triggers.push_back(new TriggerNode("frost shock snare", NextAction::array(0, new NextAction("frost shock", 21.0f), nullptr)));
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("flametongue totem", ACTION_LIGHT_HEAL), nullptr)));
// triggers.push_back(new TriggerNode("searing totem", NextAction::array(0, new NextAction("searing totem", 19.0f), nullptr)));
triggers.push_back(new TriggerNode("flame shock", NextAction::array(0, new NextAction("flame shock", 20.0f), nullptr)));
// triggers.push_back(new TriggerNode("frost shock snare", NextAction::array(0, new NextAction("frost shock", 21.0f), nullptr)));
triggers.push_back(new TriggerNode(
"no fire totem",
NextAction::array(0, new NextAction("totem of wrath", 15.0f), NULL)));
triggers.push_back(new TriggerNode(
"enemy too close for spell",
NextAction::array(0, new NextAction("flee", 49.0f), NULL)));
}
void CasterAoeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)