mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Strategy] Enable cat strategy, remove threat by default, reset strategy on talents change
This commit is contained in:
@@ -279,7 +279,7 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
|
||||
{
|
||||
case CLASS_PRIEST:
|
||||
if (tab == 2) {
|
||||
engine->addStrategies("dps", "shadow debuff", "shadow aoe", "threat", nullptr);
|
||||
engine->addStrategies("dps", "shadow debuff", "shadow aoe", nullptr);
|
||||
} else if (tab == PRIEST_TAB_DISIPLINE) {
|
||||
engine->addStrategies("heal", nullptr);
|
||||
} else {
|
||||
@@ -290,11 +290,11 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
|
||||
break;
|
||||
case CLASS_MAGE:
|
||||
if (tab == 0)
|
||||
engine->addStrategies("arcane", "arcane aoe", "threat", nullptr);
|
||||
engine->addStrategies("arcane", "arcane aoe", nullptr);
|
||||
else if (tab == 1)
|
||||
engine->addStrategies("fire", "fire aoe", "threat", nullptr);
|
||||
engine->addStrategies("fire", "fire aoe", nullptr);
|
||||
else
|
||||
engine->addStrategies("frost", "frost aoe", "threat", nullptr);
|
||||
engine->addStrategies("frost", "frost aoe", nullptr);
|
||||
|
||||
engine->addStrategies("dps", "dps assist", "cure", nullptr);
|
||||
break;
|
||||
@@ -302,17 +302,17 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
|
||||
if (tab == 2)
|
||||
engine->addStrategies("tank", "tank assist", "aoe", "mark rti", nullptr);
|
||||
else if (player->getLevel() < 36 || tab == 0)
|
||||
engine->addStrategies("arms", "aoe", "dps assist", "threat", /*"behind",*/ nullptr);
|
||||
engine->addStrategies("arms", "aoe", "dps assist",/*"behind",*/ nullptr);
|
||||
else
|
||||
engine->addStrategies("fury", "aoe", "dps assist", "threat", /*"behind",*/ nullptr);
|
||||
engine->addStrategies("fury", "aoe", "dps assist",/*"behind",*/ nullptr);
|
||||
break;
|
||||
case CLASS_SHAMAN:
|
||||
if (tab == 0)
|
||||
engine->addStrategies("caster", "caster aoe", "bmana", "threat", nullptr);
|
||||
engine->addStrategies("caster", "caster aoe", "bmana",nullptr);
|
||||
else if (tab == 2)
|
||||
engine->addStrategies("heal", "bmana", nullptr);
|
||||
else
|
||||
engine->addStrategies("melee", "melee aoe", "bdps", "threat", nullptr);
|
||||
engine->addStrategies("melee", "melee aoe", "bdps", nullptr);
|
||||
|
||||
engine->addStrategies("dps assist", "cure", "totems", nullptr);
|
||||
break;
|
||||
@@ -328,38 +328,41 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
|
||||
case CLASS_DRUID:
|
||||
if (tab == 0)
|
||||
{
|
||||
engine->addStrategies("caster", "cure", "caster aoe", "threat", "dps assist", nullptr);
|
||||
engine->addStrategies("caster", "cure", "caster aoe", "dps assist", nullptr);
|
||||
engine->addStrategy("caster debuff");
|
||||
}
|
||||
else if (tab == 2)
|
||||
engine->addStrategies("heal", "cure", "dps assist", nullptr);
|
||||
else
|
||||
{
|
||||
engine->removeStrategy("flee");
|
||||
engine->addStrategies("bear", "tank assist", nullptr);
|
||||
if (player->GetLevel() >= 20 && !player->HasAura(16931)/*thick hide*/) {
|
||||
engine->addStrategies("cat", "dps assist", nullptr);
|
||||
} else {
|
||||
engine->addStrategies("bear", "tank assist", nullptr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CLASS_HUNTER:
|
||||
engine->addStrategies("dps", "aoe", "bdps", "threat", "dps assist", nullptr);
|
||||
engine->addStrategies("dps", "aoe", "bdps", "dps assist", nullptr);
|
||||
engine->addStrategy("dps debuff");
|
||||
break;
|
||||
case CLASS_ROGUE:
|
||||
if (tab == ROGUE_TAB_ASSASSINATION) {
|
||||
engine->addStrategies("melee", "threat", "dps assist", "aoe", /*"behind",*/ nullptr);
|
||||
engine->addStrategies("melee", "dps assist", "aoe", /*"behind",*/ nullptr);
|
||||
} else {
|
||||
engine->addStrategies("dps", "threat", "dps assist", "aoe", /*"behind",*/ nullptr);
|
||||
engine->addStrategies("dps", "dps assist", "aoe", /*"behind",*/ nullptr);
|
||||
}
|
||||
break;
|
||||
case CLASS_WARLOCK:
|
||||
engine->addStrategies("dps assist", "dps", "dps debuff", "aoe", "threat", nullptr);
|
||||
engine->addStrategies("dps assist", "dps", "dps debuff", "aoe", nullptr);
|
||||
break;
|
||||
case CLASS_DEATH_KNIGHT:
|
||||
if (tab == 0)
|
||||
engine->addStrategies("blood", "tank assist", nullptr);
|
||||
else if (tab == 1)
|
||||
engine->addStrategies("frost", "frost aoe", "dps assist", "threat", nullptr);
|
||||
engine->addStrategies("frost", "frost aoe", "dps assist", nullptr);
|
||||
else
|
||||
engine->addStrategies("unholy", "unholy aoe", "dps assist", "threat", nullptr);
|
||||
engine->addStrategies("unholy", "unholy aoe", "dps assist", nullptr);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -505,8 +508,13 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
|
||||
nonCombatEngine->addStrategies("dps assist", "cure", nullptr);
|
||||
break;
|
||||
case CLASS_DRUID:
|
||||
if (tab == 1)
|
||||
nonCombatEngine->addStrategy("tank assist");
|
||||
if (tab == 1) {
|
||||
if (player->GetLevel() >= 20 && !player->HasAura(16931)/*thick hide*/) {
|
||||
nonCombatEngine->addStrategy("dps assist");
|
||||
} else {
|
||||
nonCombatEngine->addStrategy("tank assist");
|
||||
}
|
||||
}
|
||||
else
|
||||
nonCombatEngine->addStrategies("dps assist", "cure", nullptr);
|
||||
break;
|
||||
|
||||
@@ -44,9 +44,11 @@ bool ChangeTalentsAction::Execute(Event event)
|
||||
} else if (param.find("spec ") != std::string::npos) {
|
||||
param = param.substr(5);
|
||||
out << SpecPick(param);
|
||||
botAI->ResetStrategies();
|
||||
} else if (param.find("apply ") != std::string::npos) {
|
||||
param = param.substr(6);
|
||||
out << SpecApply(param);
|
||||
botAI->ResetStrategies();
|
||||
} else {
|
||||
out << "Unknown command.";
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
|
||||
static ActionNode* dire_bear_form([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("dire bear form",
|
||||
/*P*/ nullptr,
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ NextAction::array(0, new NextAction("bear form"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ class CasterDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
|
||||
creators["insect swarm"] = &insect_swarm;
|
||||
creators["moonfire"] = &moonfire;
|
||||
creators["starfire"] = &starfire;
|
||||
creators["moonkin form"] = &moonkin_form;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -94,6 +95,15 @@ class CasterDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
static ActionNode* moonkin_form([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("moonkin form",
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CasterDruidStrategy::CasterDruidStrategy(PlayerbotAI* botAI) : GenericDruidStrategy(botAI)
|
||||
|
||||
@@ -51,7 +51,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
|
||||
static ActionNode* cat_form([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("cat form",
|
||||
/*P*/ nullptr,
|
||||
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
|
||||
/*A*/ nullptr,
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user