warlock and dk strategy port

This commit is contained in:
Yunfan Li
2023-06-03 14:01:20 +08:00
parent a44b310c0a
commit 0f483047e5
27 changed files with 562 additions and 88 deletions

View File

@@ -15,6 +15,7 @@ class GenericWarlockNonCombatStrategyActionNodeFactory : public NamedObjectFacto
creators["summon voidwalker"] = &summon_voidwalker;
creators["summon felguard"] = &summon_felguard;
creators["summon succubus"] = &summon_succubus;
creators["summon felhunter"] = &summon_felhunter;
}
private:
@@ -57,6 +58,14 @@ class GenericWarlockNonCombatStrategyActionNodeFactory : public NamedObjectFacto
/*A*/ NextAction::array(0, new NextAction("summon voidwalker"), nullptr),
/*C*/ nullptr);
}
static ActionNode* summon_felhunter([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("summon felhunter",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("summon imp"), nullptr),
/*C*/ nullptr);
}
};
GenericWarlockNonCombatStrategy::GenericWarlockNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
@@ -69,12 +78,38 @@ void GenericWarlockNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& tr
NonCombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("demon armor", NextAction::array(0, new NextAction("fel armor", 21.0f), nullptr)));
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("apply oil", 1.0f), nullptr)));
}
void WarlockPetStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("no pet", NextAction::array(0, new NextAction("summon felguard", 60.0f), nullptr)));
// TODO Warlock pets
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("apply oil", 1.0f), nullptr)));
}
SummonImpStrategy::SummonImpStrategy(PlayerbotAI* ai): NonCombatStrategy(ai) {}
void SummonImpStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode(
"no pet",
NextAction::array(0, new NextAction("summon imp", 11.0f), NULL)));
}
SummonFelguardStrategy::SummonFelguardStrategy(PlayerbotAI* ai): NonCombatStrategy(ai) {}
void SummonFelguardStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode(
"no pet",
NextAction::array(0, new NextAction("summon felguard", 11.0f), NULL)));
}
SummonFelhunterStrategy::SummonFelhunterStrategy(PlayerbotAI* ai): NonCombatStrategy(ai) {}
void SummonFelhunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode(
"no pet",
NextAction::array(0, new NextAction("summon felhunter", 11.0f), NULL)));
}