Skip to content

Commit

Permalink
Add whirlwind to arms warrior strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
davidonete committed May 28, 2024
1 parent e440df4 commit 4084221
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 48 deletions.
21 changes: 12 additions & 9 deletions playerbot/strategy/warrior/ArmsWarriorStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class ArmsWarriorStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
creators["mocking blow"] = &mocking_blow;
creators["heroic strike"] = &heroic_strike;
creators["mortal strike"] = &mortal_strike;
creators["whirlwind"] = &whirlwind;
}

private:
Expand All @@ -29,6 +30,8 @@ class ArmsWarriorStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
ACTION_NODE_A(heroic_strike, "heroic strike", "melee");

ACTION_NODE_A(mortal_strike, "mortal strike", "heroic strike");

ACTION_NODE_P(whirlwind, "whirlwind", "berserker stance");
};

ArmsWarriorStrategy::ArmsWarriorStrategy(PlayerbotAI* ai) : WarriorStrategy(ai)
Expand Down Expand Up @@ -63,6 +66,10 @@ void ArmsWarriorStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
"overpower",
NextAction::array(0, new NextAction("overpower", ACTION_HIGH), NULL)));

triggers.push_back(new TriggerNode(
"whirlwind",
NextAction::array(0, new NextAction("whirlwind", ACTION_NORMAL + 3), NULL)));

triggers.push_back(new TriggerNode(
"medium rage available",
NextAction::array(0, new NextAction("heroic strike", ACTION_NORMAL + 2), NULL)));
Expand Down Expand Up @@ -169,11 +176,11 @@ void ArmsWarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& trigger

triggers.push_back(new TriggerNode(
"melee light aoe",
NextAction::array(0, new NextAction("sweeping strikes", ACTION_HIGH), NULL)));
NextAction::array(0, new NextAction("sweeping strikes", ACTION_HIGH + 5), NULL)));

triggers.push_back(new TriggerNode(
"melee light aoe",
NextAction::array(0, new NextAction("oil of immolation", ACTION_HIGH), NULL)));
"melee medium aoe",
NextAction::array(0, new NextAction("whirlwind", ACTION_HIGH + 4), NULL)));
}

void ArmsWarriorAoeStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
Expand Down Expand Up @@ -830,15 +837,11 @@ void ArmsWarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& trigger

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("bladestorm", ACTION_HIGH + 1), NULL)));

triggers.push_back(new TriggerNode(
"melee light aoe",
NextAction::array(0, new NextAction("sweeping strikes", ACTION_HIGH), NULL)));
NextAction::array(0, new NextAction("bladestorm", ACTION_HIGH + 5), NULL)));

triggers.push_back(new TriggerNode(
"melee light aoe",
NextAction::array(0, new NextAction("oil of immolation", ACTION_HIGH), NULL)));
NextAction::array(0, new NextAction("sweeping strikes", ACTION_HIGH + 4), NULL)));
}

void ArmsWarriorAoeStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
Expand Down
24 changes: 24 additions & 0 deletions playerbot/strategy/warrior/FuryWarriorStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ void FuryWarriorRaidStrategy::InitDeadTriggers(std::list<TriggerNode*>& triggers
void FuryWarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
WarriorAoeStrategy::InitCombatTriggers(triggers);

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("whirlwind", ACTION_HIGH + 5), NULL)));

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("bloodthirst", ACTION_HIGH + 4), NULL)));
}

void FuryWarriorAoeStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
Expand Down Expand Up @@ -504,6 +512,14 @@ void FuryWarriorRaidStrategy::InitDeadTriggers(std::list<TriggerNode*>& triggers
void FuryWarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
WarriorAoeStrategy::InitCombatTriggers(triggers);

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("whirlwind", ACTION_HIGH + 5), NULL)));

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("bloodthirst", ACTION_HIGH + 4), NULL)));
}

void FuryWarriorAoeStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
Expand Down Expand Up @@ -857,6 +873,14 @@ void FuryWarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& trigger
void FuryWarriorAoeStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
{
WarriorAoeStrategy::InitNonCombatTriggers(triggers);

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("whirlwind", ACTION_HIGH + 5), NULL)));

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("bloodthirst", ACTION_HIGH + 4), NULL)));
}

void FuryWarriorAoePveStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
Expand Down
12 changes: 0 additions & 12 deletions playerbot/strategy/warrior/ProtectionWarriorStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,6 @@ void ProtectionWarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& t
triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("battle shout taunt", ACTION_HIGH), NULL)));

triggers.push_back(new TriggerNode(
"melee light aoe",
NextAction::array(0, new NextAction("oil of immolation", ACTION_HIGH), NULL)));
}

void ProtectionWarriorAoeStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
Expand Down Expand Up @@ -635,10 +631,6 @@ void ProtectionWarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& t
triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("battle shout taunt", ACTION_HIGH), NULL)));

triggers.push_back(new TriggerNode(
"melee light aoe",
NextAction::array(0, new NextAction("oil of immolation", ACTION_HIGH), NULL)));
}

void ProtectionWarriorAoeStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
Expand Down Expand Up @@ -1027,10 +1019,6 @@ void ProtectionWarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& t
triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("battle shout taunt", ACTION_HIGH), NULL)));

triggers.push_back(new TriggerNode(
"melee light aoe",
NextAction::array(0, new NextAction("oil of immolation", ACTION_HIGH), NULL)));
}

void ProtectionWarriorAoeStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
Expand Down
43 changes: 16 additions & 27 deletions playerbot/strategy/warrior/WarriorStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class WarriorStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
// berserker only
creators["berserker rage"] = &berserker_rage;
creators["recklessness"] = &recklessness;
creators["whirlwind"] = &whirlwind;
creators["pummel"] = &pummel;
creators["intercept"] = &intercept;
Expand Down Expand Up @@ -49,8 +48,6 @@ class WarriorStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
ACTION_NODE_P(recklessness, "recklessness", "berserker stance");
ACTION_NODE_P(whirlwind, "whirlwind", "berserker stance");
ACTION_NODE_P(pummel, "pummel", "berserker stance");
ACTION_NODE_P(intercept, "intercept", "berserker stance");
Expand Down Expand Up @@ -166,23 +163,19 @@ void WarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("whirlwind", ACTION_HIGH + 6), NULL)));

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("bloodthirst", ACTION_HIGH + 5), NULL)));

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("cleave", ACTION_HIGH + 4), NULL)));
NextAction::array(0, new NextAction("cleave", ACTION_HIGH + 3), NULL)));

triggers.push_back(new TriggerNode(
"thunder clap",
NextAction::array(0, new NextAction("thunder clap", ACTION_HIGH + 3), NULL)));
NextAction::array(0, new NextAction("thunder clap", ACTION_HIGH + 2), NULL)));

triggers.push_back(new TriggerNode(
"thunder clap on snare target",
NextAction::array(0, new NextAction("thunder clap on snare target", ACTION_HIGH + 2), NULL)));
NextAction::array(0, new NextAction("thunder clap on snare target", ACTION_HIGH + 1), NULL)));

triggers.push_back(new TriggerNode(
"melee light aoe",
NextAction::array(0, new NextAction("oil of immolation", ACTION_HIGH), NULL)));
}

void WarriorAoeStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
Expand Down Expand Up @@ -461,15 +454,7 @@ void WarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)

triggers.push_back(new TriggerNode(
"melee light aoe",
NextAction::array(0, new NextAction("sweeping strikes", ACTION_HIGH + 6), NULL)));

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("whirlwind", ACTION_HIGH + 5), NULL)));

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("bloodthirst", ACTION_HIGH + 4), NULL)));
NextAction::array(0, new NextAction("sweeping strikes", ACTION_HIGH + 4), NULL)));

triggers.push_back(new TriggerNode(
"melee medium aoe",
Expand All @@ -482,6 +467,10 @@ void WarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode(
"thunder clap on snare target",
NextAction::array(0, new NextAction("thunder clap on snare target", ACTION_HIGH + 1), NULL)));

triggers.push_back(new TriggerNode(
"melee light aoe",
NextAction::array(0, new NextAction("oil of immolation", ACTION_HIGH), NULL)));
}

void WarriorAoeStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
Expand Down Expand Up @@ -754,10 +743,6 @@ void WarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
{
AoeStrategy::InitCombatTriggers(triggers);

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("whirlwind", ACTION_HIGH + 4), NULL)));

triggers.push_back(new TriggerNode(
"melee medium aoe",
NextAction::array(0, new NextAction("cleave", ACTION_HIGH + 3), NULL)));
Expand All @@ -769,6 +754,10 @@ void WarriorAoeStrategy::InitCombatTriggers(std::list<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode(
"thunder clap on snare target",
NextAction::array(0, new NextAction("thunder clap on snare target", ACTION_HIGH + 1), NULL)));

triggers.push_back(new TriggerNode(
"melee light aoe",
NextAction::array(0, new NextAction("oil of immolation", ACTION_HIGH), NULL)));
}

void WarriorAoeStrategy::InitNonCombatTriggers(std::list<TriggerNode*>& triggers)
Expand Down

0 comments on commit 4084221

Please sign in to comment.