General improvement on init and strats (#1064)

* Potions strats and potions init

* Druid and shaman spell in low level

* Ammo init improvement

* Rogue low level

* Fix melee attack action (for caster with no mana)

* Disable pet spells that reduce dps

* Talents improvement

* Remove CanFreeMove check

* Reduce penalty for non-dagger weapon for rogue
This commit is contained in:
Yunfan Li
2025-03-08 19:36:06 +08:00
committed by GitHub
parent 7dff970e37
commit 24efa7efa2
30 changed files with 207 additions and 104 deletions

View File

@@ -10,6 +10,8 @@ public:
{
creators["mutilate"] = &mutilate;
creators["envenom"] = &envenom;
creators["backstab"] = &backstab;
creators["rupture"] = &rupture;
}
private:
@@ -17,16 +19,30 @@ private:
{
return new ActionNode("mutilate",
/*P*/ NULL,
/*A*/ NextAction::array(0, new NextAction("sinister strike"), NULL),
/*A*/ NextAction::array(0, new NextAction("backstab"), nullptr),
/*C*/ NULL);
}
static ActionNode* envenom(PlayerbotAI* ai)
{
return new ActionNode("envenom",
/*P*/ NULL,
/*A*/ NextAction::array(0, new NextAction("eviscerate"), NULL),
/*A*/ NextAction::array(0, new NextAction("rupture"), nullptr),
/*C*/ NULL);
}
static ActionNode* backstab(PlayerbotAI* ai)
{
return new ActionNode("backstab",
/*P*/ NULL,
/*A*/ NextAction::array(0, new NextAction("sinister strike"), nullptr),
/*C*/ NULL);
}
static ActionNode* rupture(PlayerbotAI* botAI)
{
return new ActionNode("rupture",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("eviscerate"), nullptr),
/*C*/ nullptr);
}
};
AssassinationRogueStrategy::AssassinationRogueStrategy(PlayerbotAI* ai) : MeleeCombatStrategy(ai)
@@ -48,7 +64,7 @@ void AssassinationRogueStrategy::InitTriggers(std::vector<TriggerNode*>& trigger
new NextAction("ambush", ACTION_HIGH + 6), nullptr)));
triggers.push_back(new TriggerNode("high energy available",
NextAction::array(0, new NextAction("mutilate", ACTION_NORMAL + 3), NULL)));
NextAction::array(0, new NextAction("mutilate", ACTION_NORMAL + 3), nullptr)));
triggers.push_back(new TriggerNode(
"hunger for blood", NextAction::array(0, new NextAction("hunger for blood", ACTION_HIGH + 6), NULL)));
@@ -57,8 +73,13 @@ void AssassinationRogueStrategy::InitTriggers(std::vector<TriggerNode*>& trigger
NextAction::array(0, new NextAction("slice and dice", ACTION_HIGH + 5), NULL)));
triggers.push_back(new TriggerNode("combo points 3 available",
NextAction::array(0, new NextAction("envenom", ACTION_HIGH + 4), NULL)));
NextAction::array(0, new NextAction("envenom", ACTION_HIGH + 5),
new NextAction("eviscerate", ACTION_HIGH + 3), nullptr)));
triggers.push_back(new TriggerNode("target with combo points almost dead",
NextAction::array(0, new NextAction("envenom", ACTION_HIGH + 4),
new NextAction("eviscerate", ACTION_HIGH + 2), nullptr)));
triggers.push_back(
new TriggerNode("expose armor", NextAction::array(0, new NextAction("expose armor", ACTION_HIGH + 3), NULL)));
@@ -69,8 +90,8 @@ void AssassinationRogueStrategy::InitTriggers(std::vector<TriggerNode*>& trigger
new TriggerNode("low health", NextAction::array(0, new NextAction("evasion", ACTION_HIGH + 9),
new NextAction("feint", ACTION_HIGH + 8), nullptr)));
triggers.push_back(
new TriggerNode("critical health", NextAction::array(0, new NextAction("cloak of shadows", ACTION_HIGH + 7), nullptr)));
triggers.push_back(new TriggerNode(
"critical health", NextAction::array(0, new NextAction("cloak of shadows", ACTION_HIGH + 7), nullptr)));
triggers.push_back(
new TriggerNode("kick", NextAction::array(0, new NextAction("kick", ACTION_INTERRUPT + 2), NULL)));

View File

@@ -44,6 +44,17 @@ bool CastVanishAction::isUseful()
return !botAI->HasAura(23333, bot) && !botAI->HasAura(23335, bot) && !botAI->HasAura(34976, bot);
}
bool CastEnvenomAction::isUseful()
{
return AI_VALUE2(uint8, "energy", "self target") >= 35;
}
bool CastEnvenomAction::isPossible()
{
// alternate to eviscerate if talents unlearned
return botAI->HasAura(58410, bot) /* Master Poisoner */;
}
bool CastTricksOfTheTradeOnMainTankAction::isUseful()
{
return CastSpellAction::isUseful() && AI_VALUE2(float, "distance", GetTargetName()) < 20.0f;

View File

@@ -127,10 +127,12 @@ public:
CastKickOnEnemyHealerAction(PlayerbotAI* botAI) : CastSpellOnEnemyHealerAction(botAI, "kick") {}
};
class EnvenomAction : public CastMeleeSpellAction
class CastEnvenomAction : public CastMeleeSpellAction
{
public:
EnvenomAction(PlayerbotAI* ai) : CastMeleeSpellAction(ai, "envenom") {}
CastEnvenomAction(PlayerbotAI* ai) : CastMeleeSpellAction(ai, "envenom") {}
bool isUseful() override;
bool isPossible() override;
};
class CastTricksOfTheTradeOnMainTankAction : public BuffOnMainTankAction

View File

@@ -173,7 +173,7 @@ private:
static Action* check_stealth(PlayerbotAI* botAI) { return new CheckStealthAction(botAI); }
static Action* sap(PlayerbotAI* botAI) { return new CastSapAction(botAI); }
static Action* unstealth(PlayerbotAI* botAI) { return new UnstealthAction(botAI); }
static Action* envenom(PlayerbotAI* ai) { return new EnvenomAction(ai); }
static Action* envenom(PlayerbotAI* ai) { return new CastEnvenomAction(ai); }
static Action* tricks_of_the_trade_on_main_tank(PlayerbotAI* ai)
{
return new CastTricksOfTheTradeOnMainTankAction(ai);