major class spells

This commit is contained in:
Yunfan Li
2023-09-02 22:37:11 +08:00
parent 5f5faf00cd
commit 14b94e20fb
42 changed files with 203 additions and 67 deletions

View File

@@ -263,7 +263,7 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
if (!player->InBattleground()) if (!player->InBattleground())
{ {
engine->addStrategies("racials", "chat", "default", "cast time", "duel", nullptr); engine->addStrategies("racials", "chat", "default", "cast time", "duel", "boost", nullptr);
} }
switch (player->getClass()) switch (player->getClass())
@@ -302,7 +302,7 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
else if (tab == 2) else if (tab == 2)
engine->addStrategies("heal", "bmana", nullptr); engine->addStrategies("heal", "bmana", nullptr);
else else
engine->addStrategies("melee", "melee aoe", "bdps", "threat", nullptr); engine->addStrategies("melee", "melee aoe", "bmana", "threat", nullptr);
engine->addStrategies("dps assist", "cure", "totems", nullptr); engine->addStrategies("dps assist", "cure", "totems", nullptr);
break; break;

View File

@@ -1642,7 +1642,6 @@ void PlayerbotFactory::InitSkills()
uint32 skillLevel = bot->getLevel() < 40 ? 0 : 1; uint32 skillLevel = bot->getLevel() < 40 ? 0 : 1;
uint32 dualWieldLevel = bot->getLevel() < 20 ? 0 : 1; uint32 dualWieldLevel = bot->getLevel() < 20 ? 0 : 1;
uint32 dualWieldLevelForRogue = bot->getLevel() < 10 ? 0 : 1;
SetRandomSkill(SKILL_DEFENSE); SetRandomSkill(SKILL_DEFENSE);
switch (bot->getClass()) switch (bot->getClass())
{ {
@@ -1736,7 +1735,7 @@ void PlayerbotFactory::InitSkills()
SetRandomSkill(SKILL_CROSSBOWS); SetRandomSkill(SKILL_CROSSBOWS);
SetRandomSkill(SKILL_FIST_WEAPONS); SetRandomSkill(SKILL_FIST_WEAPONS);
SetRandomSkill(SKILL_THROWN); SetRandomSkill(SKILL_THROWN);
bot->SetSkill(SKILL_DUAL_WIELD, 0, dualWieldLevelForRogue, dualWieldLevelForRogue); bot->SetSkill(SKILL_DUAL_WIELD, 0, 1, 1);
break; break;
case CLASS_DEATH_KNIGHT: case CLASS_DEATH_KNIGHT:
SetRandomSkill(SKILL_SWORDS); SetRandomSkill(SKILL_SWORDS);

View File

@@ -60,7 +60,7 @@ class CastDebuffSpellOnAttackerAction : public CastAuraSpellAction
Value<Unit*>* GetTargetValue() override; Value<Unit*>* GetTargetValue() override;
std::string const getName() override { return spell + " on attacker"; } std::string const getName() override { return spell + " on attacker"; }
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; } // ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
}; };
class CastDebuffSpellOnMeleeAttackerAction : public CastAuraSpellAction class CastDebuffSpellOnMeleeAttackerAction : public CastAuraSpellAction
@@ -70,7 +70,7 @@ class CastDebuffSpellOnMeleeAttackerAction : public CastAuraSpellAction
Value<Unit*>* GetTargetValue() override; Value<Unit*>* GetTargetValue() override;
std::string const getName() override { return spell + " on attacker"; } std::string const getName() override { return spell + " on attacker"; }
ActionThreatType getThreatType() override { return ActionThreatType::Aoe; } // ActionThreatType getThreatType() override { return ActionThreatType::Aoe; }
}; };
class CastBuffSpellAction : public CastAuraSpellAction class CastBuffSpellAction : public CastAuraSpellAction

View File

@@ -461,11 +461,11 @@ bool StoreLootAction::IsLootAllowed(uint32 itemid, PlayerbotAI* botAI)
{ {
if (quest->RequiredItemId[i] == itemid) if (quest->RequiredItemId[i] == itemid)
{ {
if (AI_VALUE2(uint32, "item count", proto->Name1) < quest->RequiredItemCount[i]) // if (AI_VALUE2(uint32, "item count", proto->Name1) < quest->RequiredItemCount[i])
{ // {
if (botAI->GetMaster() && sPlayerbotAIConfig->syncQuestWithPlayer) // if (botAI->GetMaster() && sPlayerbotAIConfig->syncQuestWithPlayer)
return false; //Quest is autocomplete for the bot so no item needed. // return false; //Quest is autocomplete for the bot so no item needed.
} // }
return true; return true;
} }

View File

@@ -758,6 +758,10 @@ bool MovementAction::IsMovingAllowed()
if (bot->GetMotionMaster()->GetMotionSlot(MOTION_SLOT_CONTROLLED)) { if (bot->GetMotionMaster()->GetMotionSlot(MOTION_SLOT_CONTROLLED)) {
return false; return false;
} }
// if (bot->HasUnitMovementFlag(MOVEMENTFLAG_FALLING)) {
// return false;
// }
return bot->GetMotionMaster()->GetCurrentMovementGeneratorType() != FLIGHT_MOTION_TYPE; return bot->GetMotionMaster()->GetCurrentMovementGeneratorType() != FLIGHT_MOTION_TYPE;
} }
@@ -779,7 +783,6 @@ void MovementAction::UpdateMovementState()
if (bot->IsFlying()) if (bot->IsFlying())
bot->UpdateSpeed(MOVE_FLIGHT, true); bot->UpdateSpeed(MOVE_FLIGHT, true);
// Temporary speed increase in group // Temporary speed increase in group
//if (botAI->HasRealPlayerMaster()) //if (botAI->HasRealPlayerMaster())
//bot->SetSpeedRate(MOVE_RUN, 1.1f); //bot->SetSpeedRate(MOVE_RUN, 1.1f);

View File

@@ -99,4 +99,5 @@ void BloodDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode("lose aggro", NextAction::array(0, new NextAction("dark command", ACTION_HIGH + 3), nullptr))); triggers.push_back(new TriggerNode("lose aggro", NextAction::array(0, new NextAction("dark command", ACTION_HIGH + 3), nullptr)));
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("blood tap", ACTION_HIGH + 5), triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("blood tap", ACTION_HIGH + 5),
new NextAction("vampiric blood", ACTION_HIGH + 3), new NextAction("death strike", ACTION_HIGH + 4), nullptr))); new NextAction("vampiric blood", ACTION_HIGH + 3), new NextAction("death strike", ACTION_HIGH + 4), nullptr)));
} }

View File

@@ -84,6 +84,7 @@ class DeathKnightTriggerFactoryInternal : public NamedObjectContext<Trigger>
creators["blood tap"] = &DeathKnightTriggerFactoryInternal::blood_tap; creators["blood tap"] = &DeathKnightTriggerFactoryInternal::blood_tap;
creators["raise dead"] = &DeathKnightTriggerFactoryInternal::raise_dead; creators["raise dead"] = &DeathKnightTriggerFactoryInternal::raise_dead;
creators["chains of ice"] = &DeathKnightTriggerFactoryInternal::chains_of_ice; creators["chains of ice"] = &DeathKnightTriggerFactoryInternal::chains_of_ice;
creators["unbreakable armor"] = &DeathKnightTriggerFactoryInternal::unbreakable_armor;
} }
private: private:
@@ -104,6 +105,7 @@ class DeathKnightTriggerFactoryInternal : public NamedObjectContext<Trigger>
static Trigger* blood_tap(PlayerbotAI* botAI) { return new BloodTapTrigger(botAI); } static Trigger* blood_tap(PlayerbotAI* botAI) { return new BloodTapTrigger(botAI); }
static Trigger* raise_dead(PlayerbotAI* botAI) { return new RaiseDeadTrigger(botAI); } static Trigger* raise_dead(PlayerbotAI* botAI) { return new RaiseDeadTrigger(botAI); }
static Trigger* chains_of_ice(PlayerbotAI* botAI) { return new ChainsOfIceSnareTrigger(botAI); } static Trigger* chains_of_ice(PlayerbotAI* botAI) { return new ChainsOfIceSnareTrigger(botAI); }
static Trigger* unbreakable_armor(PlayerbotAI* botAI) { return new UnbreakableArmorTrigger(botAI); }
}; };
class DeathKnightAiObjectContextInternal : public NamedObjectContext<Action> class DeathKnightAiObjectContextInternal : public NamedObjectContext<Action>

View File

@@ -17,11 +17,14 @@ bool PestilenceTrigger::IsActive() {
if (!SpellTrigger::IsActive()) { if (!SpellTrigger::IsActive()) {
return false; return false;
} }
if (!bot->HasAura(63334)) {
return false;
}
Aura *blood_plague = botAI->GetAura("blood plague", GetTarget(), true, true); Aura *blood_plague = botAI->GetAura("blood plague", GetTarget(), true, true);
Aura *frost_fever = botAI->GetAura("frost fever", GetTarget(), true, true); Aura *frost_fever = botAI->GetAura("frost fever", GetTarget(), true, true);
if ((blood_plague && blood_plague->GetDuration() <= 5000) || if ((blood_plague && blood_plague->GetDuration() <= 3000) ||
(frost_fever && frost_fever->GetDuration() <= 5000)) { (frost_fever && frost_fever->GetDuration() <= 3000)) {
return true; return true;
} }
return false; return false;
} }

View File

@@ -14,7 +14,7 @@ BUFF_TRIGGER(BoneShieldTrigger, "bone shield");
BUFF_TRIGGER(ImprovedIcyTalonsTrigger, "improved icy talons"); BUFF_TRIGGER(ImprovedIcyTalonsTrigger, "improved icy talons");
DEBUFF_CHECKISOWNER_TRIGGER(PlagueStrikeDebuffTrigger, "blood plague"); DEBUFF_CHECKISOWNER_TRIGGER(PlagueStrikeDebuffTrigger, "blood plague");
DEBUFF_CHECKISOWNER_TRIGGER(IcyTouchDebuffTrigger, "frost fever"); DEBUFF_CHECKISOWNER_TRIGGER(IcyTouchDebuffTrigger, "frost fever");
BUFF_TRIGGER(UnbreakableArmorTrigger, "unbreakable armor");
class PlagueStrikeDebuffOnAttackerTrigger : public DebuffOnMeleeAttackerTrigger class PlagueStrikeDebuffOnAttackerTrigger : public DebuffOnMeleeAttackerTrigger
{ {
public: public:

View File

@@ -23,7 +23,6 @@ class FrostDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
//creators["deathchill"] = &deathchill; //creators["deathchill"] = &deathchill;
//creators["icebound fortitude"] = &icebound_fortitude; //creators["icebound fortitude"] = &icebound_fortitude;
//creators["mind freeze"] = &mind_freeze; //creators["mind freeze"] = &mind_freeze;
//creators["empower weapon"] = &empower_weapon;
//creators["hungering cold"] = &hungering_cold; //creators["hungering cold"] = &hungering_cold;
//creators["unbreakable armor"] = &unbreakable_armor; //creators["unbreakable armor"] = &unbreakable_armor;
//creators["improved icy talons"] = &improved_icy_talons; //creators["improved icy talons"] = &improved_icy_talons;
@@ -74,6 +73,7 @@ NextAction** FrostDKStrategy::getDefaultActions()
new NextAction("obliterate", ACTION_NORMAL + 5), new NextAction("obliterate", ACTION_NORMAL + 5),
new NextAction("frost strike", ACTION_NORMAL + 4), new NextAction("frost strike", ACTION_NORMAL + 4),
// new NextAction("death strike", ACTION_NORMAL + 3), // new NextAction("death strike", ACTION_NORMAL + 3),
new NextAction("empower rune weapon", ACTION_NORMAL + 2),
new NextAction("melee", ACTION_NORMAL), new NextAction("melee", ACTION_NORMAL),
NULL NULL
); );
@@ -82,9 +82,8 @@ NextAction** FrostDKStrategy::getDefaultActions()
void FrostDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void FrostDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{ {
GenericDKStrategy::InitTriggers(triggers); GenericDKStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("unbreakable armor", NextAction::array(0, new NextAction("unbreakable armor", ACTION_NORMAL + 4), nullptr)));
triggers.push_back(new TriggerNode("empower weapon", NextAction::array(0, new NextAction("empower weapon", ACTION_NORMAL + 4), nullptr))); // triggers.push_back(new TriggerNode("empower rune weapon", NextAction::array(0, new NextAction("empower rune weapon", ACTION_NORMAL + 4), nullptr)));
triggers.push_back(new TriggerNode("pestilence", NextAction::array(0, new NextAction("pestilence", ACTION_HIGH + 9), NULL)));
} }
void FrostDKAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void FrostDKAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)

View File

@@ -178,4 +178,5 @@ void GenericDKStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
new NextAction("pestilence", ACTION_NORMAL + 4), new NextAction("blood boil", ACTION_NORMAL + 3), nullptr))); new NextAction("pestilence", ACTION_NORMAL + 4), new NextAction("blood boil", ACTION_NORMAL + 3), nullptr)));
triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("howling blast", ACTION_NORMAL + 5), new NextAction("pestilence", ACTION_NORMAL + 4), triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("howling blast", ACTION_NORMAL + 5), new NextAction("pestilence", ACTION_NORMAL + 4),
new NextAction("hearth strike", ACTION_NORMAL + 3), new NextAction("blood boil", ACTION_NORMAL + 3), nullptr))); new NextAction("hearth strike", ACTION_NORMAL + 3), new NextAction("blood boil", ACTION_NORMAL + 3), nullptr)));
triggers.push_back(new TriggerNode("pestilence", NextAction::array(0, new NextAction("pestilence", ACTION_HIGH + 9), NULL)));
} }

View File

@@ -105,9 +105,9 @@ CasterDruidStrategy::CasterDruidStrategy(PlayerbotAI* botAI) : GenericDruidStrat
NextAction** CasterDruidStrategy::getDefaultActions() NextAction** CasterDruidStrategy::getDefaultActions()
{ {
return NextAction::array(0, return NextAction::array(0,
new NextAction("starfall", ACTION_NORMAL + 3), new NextAction("starfall", ACTION_NORMAL + 2),
new NextAction("wrath", ACTION_NORMAL + 1), new NextAction("wrath", ACTION_NORMAL + 1),
new NextAction("starfire", ACTION_NORMAL), // new NextAction("starfire", ACTION_NORMAL),
nullptr); nullptr);
} }
@@ -119,9 +119,11 @@ void CasterDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode("insect swarm", NextAction::array(0, new NextAction("insect swarm", ACTION_NORMAL + 5), nullptr))); triggers.push_back(new TriggerNode("insect swarm", NextAction::array(0, new NextAction("insect swarm", ACTION_NORMAL + 5), nullptr)));
triggers.push_back(new TriggerNode("moonfire", NextAction::array(0, new NextAction("moonfire", ACTION_NORMAL + 4), nullptr))); triggers.push_back(new TriggerNode("moonfire", NextAction::array(0, new NextAction("moonfire", ACTION_NORMAL + 4), nullptr)));
triggers.push_back(new TriggerNode("eclipse (solar)", NextAction::array(0, new NextAction("wrath", ACTION_NORMAL + 6), nullptr))); triggers.push_back(new TriggerNode("eclipse (solar)", NextAction::array(0, new NextAction("wrath", ACTION_NORMAL + 6), nullptr)));
triggers.push_back(new TriggerNode("eclipse (lunar) cooldown", NextAction::array(0, new NextAction("starfire", ACTION_NORMAL + 2), nullptr)));
triggers.push_back(new TriggerNode("eclipse (lunar)", NextAction::array(0, new NextAction("starfire", ACTION_NORMAL + 6), nullptr))); triggers.push_back(new TriggerNode("eclipse (lunar)", NextAction::array(0, new NextAction("starfire", ACTION_NORMAL + 6), nullptr)));
triggers.push_back(new TriggerNode("eclipse (solar) cooldown", NextAction::array(0, new NextAction("wrath", ACTION_NORMAL + 2), nullptr)));
triggers.push_back(new TriggerNode("moonfire", NextAction::array(0, new NextAction("moonfire", ACTION_NORMAL + 4), nullptr))); triggers.push_back(new TriggerNode("moonfire", NextAction::array(0, new NextAction("moonfire", ACTION_NORMAL + 4), nullptr)));
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 5), NULL))); triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 9), NULL)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr))); triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"party member remove curse", "party member remove curse",
@@ -134,9 +136,9 @@ void CasterDruidAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"light aoe", "light aoe",
NextAction::array(0, NextAction::array(0,
new NextAction("starfall", ACTION_NORMAL + 4), new NextAction("starfall", ACTION_NORMAL + 5),
new NextAction("insect swarm on attacker", ACTION_NORMAL + 3), new NextAction("insect swarm on attacker", ACTION_NORMAL + 3),
new NextAction("moonfire on attacker", ACTION_NORMAL + 2), new NextAction("moonfire on attacker", ACTION_NORMAL + 3),
NULL))); NULL)));
} }

View File

@@ -108,6 +108,12 @@ class CastThornsOnPartyAction : public BuffOnPartyAction
CastThornsOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "thorns") { } CastThornsOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "thorns") { }
}; };
class CastThornsOnMainTankAction : public BuffOnMainTankAction
{
public:
CastThornsOnMainTankAction(PlayerbotAI* botAI) : BuffOnMainTankAction(botAI, "thorns", false) { }
};
class CastOmenOfClarityAction : public CastBuffSpellAction class CastOmenOfClarityAction : public CastBuffSpellAction
{ {
public: public:

View File

@@ -73,6 +73,7 @@ class DruidTriggerFactoryInternal : public NamedObjectContext<Trigger>
creators["omen of clarity"] = &DruidTriggerFactoryInternal::omen_of_clarity; creators["omen of clarity"] = &DruidTriggerFactoryInternal::omen_of_clarity;
creators["thorns"] = &DruidTriggerFactoryInternal::thorns; creators["thorns"] = &DruidTriggerFactoryInternal::thorns;
creators["thorns on party"] = &DruidTriggerFactoryInternal::thorns_on_party; creators["thorns on party"] = &DruidTriggerFactoryInternal::thorns_on_party;
creators["thorns on main tank"] = &DruidTriggerFactoryInternal::thorns_on_main_tank;
creators["bash"] = &DruidTriggerFactoryInternal::bash; creators["bash"] = &DruidTriggerFactoryInternal::bash;
creators["faerie fire (feral)"] = &DruidTriggerFactoryInternal::faerie_fire_feral; creators["faerie fire (feral)"] = &DruidTriggerFactoryInternal::faerie_fire_feral;
creators["faerie fire"] = &DruidTriggerFactoryInternal::faerie_fire; creators["faerie fire"] = &DruidTriggerFactoryInternal::faerie_fire;
@@ -96,6 +97,8 @@ class DruidTriggerFactoryInternal : public NamedObjectContext<Trigger>
creators["bash on enemy healer"] = &DruidTriggerFactoryInternal::bash_on_enemy_healer; creators["bash on enemy healer"] = &DruidTriggerFactoryInternal::bash_on_enemy_healer;
creators["nature's swiftness"] = &DruidTriggerFactoryInternal::natures_swiftness; creators["nature's swiftness"] = &DruidTriggerFactoryInternal::natures_swiftness;
creators["party member remove curse"] = &DruidTriggerFactoryInternal::party_member_remove_curse; creators["party member remove curse"] = &DruidTriggerFactoryInternal::party_member_remove_curse;
creators["eclipse (solar) cooldown"] = &DruidTriggerFactoryInternal::eclipse_solar_cooldown;
creators["eclipse (lunar) cooldown"] = &DruidTriggerFactoryInternal::eclipse_lunar_cooldown;
} }
private: private:
@@ -104,6 +107,7 @@ class DruidTriggerFactoryInternal : public NamedObjectContext<Trigger>
static Trigger* eclipse_lunar(PlayerbotAI* botAI) { return new EclipseLunarTrigger(botAI); } static Trigger* eclipse_lunar(PlayerbotAI* botAI) { return new EclipseLunarTrigger(botAI); }
static Trigger* thorns(PlayerbotAI* botAI) { return new ThornsTrigger(botAI); } static Trigger* thorns(PlayerbotAI* botAI) { return new ThornsTrigger(botAI); }
static Trigger* thorns_on_party(PlayerbotAI* botAI) { return new ThornsOnPartyTrigger(botAI); } static Trigger* thorns_on_party(PlayerbotAI* botAI) { return new ThornsOnPartyTrigger(botAI); }
static Trigger* thorns_on_main_tank(PlayerbotAI* botAI) { return new ThornsOnMainTankTrigger(botAI); }
static Trigger* bash(PlayerbotAI* botAI) { return new BashInterruptSpellTrigger(botAI); } static Trigger* bash(PlayerbotAI* botAI) { return new BashInterruptSpellTrigger(botAI); }
static Trigger* faerie_fire_feral(PlayerbotAI* botAI) { return new FaerieFireFeralTrigger(botAI); } static Trigger* faerie_fire_feral(PlayerbotAI* botAI) { return new FaerieFireFeralTrigger(botAI); }
static Trigger* insect_swarm(PlayerbotAI* botAI) { return new InsectSwarmTrigger(botAI); } static Trigger* insect_swarm(PlayerbotAI* botAI) { return new InsectSwarmTrigger(botAI); }
@@ -125,6 +129,8 @@ class DruidTriggerFactoryInternal : public NamedObjectContext<Trigger>
static Trigger* bash_on_enemy_healer(PlayerbotAI* botAI) { return new BashInterruptEnemyHealerSpellTrigger(botAI); } static Trigger* bash_on_enemy_healer(PlayerbotAI* botAI) { return new BashInterruptEnemyHealerSpellTrigger(botAI); }
static Trigger* omen_of_clarity(PlayerbotAI* botAI) { return new OmenOfClarityTrigger(botAI); } static Trigger* omen_of_clarity(PlayerbotAI* botAI) { return new OmenOfClarityTrigger(botAI); }
static Trigger* party_member_remove_curse(PlayerbotAI* ai) { return new DruidPartyMemberRemoveCurseTrigger(ai); } static Trigger* party_member_remove_curse(PlayerbotAI* ai) { return new DruidPartyMemberRemoveCurseTrigger(ai); }
static Trigger* eclipse_solar_cooldown(PlayerbotAI* ai) { return new EclipseSolarCooldownTrigger(ai); }
static Trigger* eclipse_lunar_cooldown(PlayerbotAI* ai) { return new EclipseLunarCooldownTrigger(ai); }
}; };
class DruidAiObjectContextInternal : public NamedObjectContext<Action> class DruidAiObjectContextInternal : public NamedObjectContext<Action>
@@ -172,6 +178,7 @@ class DruidAiObjectContextInternal : public NamedObjectContext<Action>
creators["survival instincts"] = &DruidAiObjectContextInternal::survival_instincts; creators["survival instincts"] = &DruidAiObjectContextInternal::survival_instincts;
creators["thorns"] = &DruidAiObjectContextInternal::thorns; creators["thorns"] = &DruidAiObjectContextInternal::thorns;
creators["thorns on party"] = &DruidAiObjectContextInternal::thorns_on_party; creators["thorns on party"] = &DruidAiObjectContextInternal::thorns_on_party;
creators["thorns on main tank"] = &DruidAiObjectContextInternal::thorns_on_main_tank;
creators["cure poison"] = &DruidAiObjectContextInternal::cure_poison; creators["cure poison"] = &DruidAiObjectContextInternal::cure_poison;
creators["cure poison on party"] = &DruidAiObjectContextInternal::cure_poison_on_party; creators["cure poison on party"] = &DruidAiObjectContextInternal::cure_poison_on_party;
creators["abolish poison"] = &DruidAiObjectContextInternal::abolish_poison; creators["abolish poison"] = &DruidAiObjectContextInternal::abolish_poison;
@@ -252,6 +259,7 @@ class DruidAiObjectContextInternal : public NamedObjectContext<Action>
static Action* survival_instincts(PlayerbotAI* botAI) { return new CastSurvivalInstinctsAction(botAI); } static Action* survival_instincts(PlayerbotAI* botAI) { return new CastSurvivalInstinctsAction(botAI); }
static Action* thorns(PlayerbotAI* botAI) { return new CastThornsAction(botAI); } static Action* thorns(PlayerbotAI* botAI) { return new CastThornsAction(botAI); }
static Action* thorns_on_party(PlayerbotAI* botAI) { return new CastThornsOnPartyAction(botAI); } static Action* thorns_on_party(PlayerbotAI* botAI) { return new CastThornsOnPartyAction(botAI); }
static Action* thorns_on_main_tank(PlayerbotAI* botAI) { return new CastThornsOnMainTankAction(botAI); }
static Action* cure_poison(PlayerbotAI* botAI) { return new CastCurePoisonAction(botAI); } static Action* cure_poison(PlayerbotAI* botAI) { return new CastCurePoisonAction(botAI); }
static Action* cure_poison_on_party(PlayerbotAI* botAI) { return new CastCurePoisonOnPartyAction(botAI); } static Action* cure_poison_on_party(PlayerbotAI* botAI) { return new CastCurePoisonOnPartyAction(botAI); }
static Action* abolish_poison(PlayerbotAI* botAI) { return new CastAbolishPoisonAction(botAI); } static Action* abolish_poison(PlayerbotAI* botAI) { return new CastAbolishPoisonAction(botAI); }

View File

@@ -6,7 +6,9 @@
#define _PLAYERBOT_DRUIDTRIGGERS_H #define _PLAYERBOT_DRUIDTRIGGERS_H
#include "CureTriggers.h" #include "CureTriggers.h"
#include "GenericTriggers.h"
#include "SharedDefines.h" #include "SharedDefines.h"
#include "Player.h"
class PlayerbotAI; class PlayerbotAI;
@@ -34,6 +36,13 @@ class ThornsOnPartyTrigger : public BuffOnPartyTrigger
bool IsActive() override; bool IsActive() override;
}; };
class ThornsOnMainTankTrigger : public BuffOnMainTankTrigger
{
public:
ThornsOnMainTankTrigger(PlayerbotAI* botAI) : BuffOnMainTankTrigger(botAI, "thorns", false, 2 * 2000) { }
};
class ThornsTrigger : public BuffTrigger class ThornsTrigger : public BuffTrigger
{ {
public: public:
@@ -183,4 +192,23 @@ class DruidPartyMemberRemoveCurseTrigger : public PartyMemberNeedCureTrigger
public: public:
DruidPartyMemberRemoveCurseTrigger(PlayerbotAI* ai) : PartyMemberNeedCureTrigger(ai, "druid remove curse", DISPEL_CURSE) {} DruidPartyMemberRemoveCurseTrigger(PlayerbotAI* ai) : PartyMemberNeedCureTrigger(ai, "druid remove curse", DISPEL_CURSE) {}
}; };
class EclipseSolarCooldownTrigger : public SpellCooldownTrigger
{
public:
EclipseSolarCooldownTrigger(PlayerbotAI* ai): SpellCooldownTrigger(ai, "eclipse (solar)") {}
bool IsActive() override {
return bot->HasSpellCooldown(48517);
}
};
class EclipseLunarCooldownTrigger : public SpellCooldownTrigger
{
public:
EclipseLunarCooldownTrigger(PlayerbotAI* ai): SpellCooldownTrigger(ai, "eclipse (lunar)") {}
bool IsActive() override {
return bot->HasSpellCooldown(48518);
}
};
#endif #endif

View File

@@ -118,5 +118,5 @@ void GenericDruidBuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
NonCombatStrategy::InitTriggers(triggers); NonCombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("mark of the wild on party", NextAction::array(0, new NextAction("mark of the wild on party", 13.0f), nullptr))); triggers.push_back(new TriggerNode("mark of the wild on party", NextAction::array(0, new NextAction("mark of the wild on party", 13.0f), nullptr)));
// triggers.push_back(new TriggerNode("thorns on party", NextAction::array(0, new NextAction("thorns on party", 11.0f), nullptr))); triggers.push_back(new TriggerNode("thorns on main tank", NextAction::array(0, new NextAction("thorns on main tank", 11.0f), nullptr)));
} }

View File

@@ -142,8 +142,10 @@ void MageCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
void MageBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void MageBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{ {
triggers.push_back(new TriggerNode("arcane power", NextAction::array(0, new NextAction("arcane power", 41.0f), nullptr))); triggers.push_back(new TriggerNode("icy veins", NextAction::array(0, new NextAction("icy veins", 50.0f), nullptr)));
triggers.push_back(new TriggerNode("presence of mind", NextAction::array(0, new NextAction("presence of mind", 42.0f), nullptr))); triggers.push_back(new TriggerNode("presence of mind", NextAction::array(0, new NextAction("presence of mind", 42.0f), nullptr)));
triggers.push_back(new TriggerNode("arcane power", NextAction::array(0, new NextAction("arcane power", 41.0f), nullptr)));
triggers.push_back(new TriggerNode("mirror image", NextAction::array(0, new NextAction("mirror image", 41.0f), nullptr)));
} }
void MageCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void MageCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)

View File

@@ -242,4 +242,10 @@ class CastPresenceOfMindAction : public CastBuffSpellAction
CastPresenceOfMindAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "presence of mind") { } CastPresenceOfMindAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "presence of mind") { }
}; };
class CastMirrorImageAction : public CastBuffSpellAction
{
public:
CastMirrorImageAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "mirror image") {}
};
#endif #endif

View File

@@ -98,6 +98,7 @@ class MageTriggerFactoryInternal : public NamedObjectContext<Trigger>
creators["fire ward"] = &MageTriggerFactoryInternal::fire_ward; creators["fire ward"] = &MageTriggerFactoryInternal::fire_ward;
creators["frost ward"] = &MageTriggerFactoryInternal::frost_ward; creators["frost ward"] = &MageTriggerFactoryInternal::frost_ward;
creators["arcane blast stack"] = &MageTriggerFactoryInternal::arcane_blast_stack; creators["arcane blast stack"] = &MageTriggerFactoryInternal::arcane_blast_stack;
creators["mirror image"] = &MageTriggerFactoryInternal::mirror_image;
} }
private: private:
@@ -123,6 +124,7 @@ class MageTriggerFactoryInternal : public NamedObjectContext<Trigger>
static Trigger* arcane_blast(PlayerbotAI* botAI) { return new ArcaneBlastTrigger(botAI); } static Trigger* arcane_blast(PlayerbotAI* botAI) { return new ArcaneBlastTrigger(botAI); }
static Trigger* counterspell_enemy_healer(PlayerbotAI* botAI) { return new CounterspellEnemyHealerTrigger(botAI); } static Trigger* counterspell_enemy_healer(PlayerbotAI* botAI) { return new CounterspellEnemyHealerTrigger(botAI); }
static Trigger* arcane_blast_stack(PlayerbotAI* botAI) { return new ArcaneBlastStackTrigger(botAI); } static Trigger* arcane_blast_stack(PlayerbotAI* botAI) { return new ArcaneBlastStackTrigger(botAI); }
static Trigger* mirror_image(PlayerbotAI* botAI) { return new MirrorImageTrigger(botAI); }
}; };
class MageAiObjectContextInternal : public NamedObjectContext<Action> class MageAiObjectContextInternal : public NamedObjectContext<Action>
@@ -169,6 +171,7 @@ class MageAiObjectContextInternal : public NamedObjectContext<Action>
creators["counterspell on enemy healer"] = &MageAiObjectContextInternal::counterspell_on_enemy_healer; creators["counterspell on enemy healer"] = &MageAiObjectContextInternal::counterspell_on_enemy_healer;
creators["fire ward"] = &MageAiObjectContextInternal::fire_ward; creators["fire ward"] = &MageAiObjectContextInternal::fire_ward;
creators["frost ward"] = &MageAiObjectContextInternal::frost_ward; creators["frost ward"] = &MageAiObjectContextInternal::frost_ward;
creators["mirror image"] = &MageAiObjectContextInternal::mirror_image;
} }
private: private:
@@ -211,6 +214,7 @@ class MageAiObjectContextInternal : public NamedObjectContext<Action>
static Action* invisibility(PlayerbotAI* botAI) { return new CastInvisibilityAction(botAI); } static Action* invisibility(PlayerbotAI* botAI) { return new CastInvisibilityAction(botAI); }
static Action* evocation(PlayerbotAI* botAI) { return new CastEvocationAction(botAI); } static Action* evocation(PlayerbotAI* botAI) { return new CastEvocationAction(botAI); }
static Action* counterspell_on_enemy_healer(PlayerbotAI* botAI) { return new CastCounterspellOnEnemyHealerAction(botAI); } static Action* counterspell_on_enemy_healer(PlayerbotAI* botAI) { return new CastCounterspellOnEnemyHealerAction(botAI); }
static Action* mirror_image(PlayerbotAI* botAI) { return new CastMirrorImageAction(botAI); }
}; };
MageAiObjectContext::MageAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI) MageAiObjectContext::MageAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)

View File

@@ -6,6 +6,7 @@
#define _PLAYERBOT_MAGETRIGGERS_H #define _PLAYERBOT_MAGETRIGGERS_H
#include "CureTriggers.h" #include "CureTriggers.h"
#include "GenericTriggers.h"
#include "SharedDefines.h" #include "SharedDefines.h"
class PlayerbotAI; class PlayerbotAI;
@@ -137,4 +138,11 @@ class ArcaneBlastStackTrigger : public HasAuraStackTrigger {
public: public:
ArcaneBlastStackTrigger(PlayerbotAI* ai) : HasAuraStackTrigger(ai, "arcane blast", 3, 1) {} ArcaneBlastStackTrigger(PlayerbotAI* ai) : HasAuraStackTrigger(ai, "arcane blast", 3, 1) {}
}; };
class MirrorImageTrigger : public BoostTrigger
{
public:
MirrorImageTrigger(PlayerbotAI* ai) : BoostTrigger(ai, "mirror image") {}
};
#endif #endif

View File

@@ -79,8 +79,9 @@ DpsPaladinStrategy::DpsPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrat
NextAction** DpsPaladinStrategy::getDefaultActions() NextAction** DpsPaladinStrategy::getDefaultActions()
{ {
return NextAction::array(0, new NextAction("crusader strike", ACTION_NORMAL + 6), return NextAction::array(0,
new NextAction("judgement of wisdom", ACTION_NORMAL + 5), new NextAction("judgement of wisdom", ACTION_NORMAL + 6),
new NextAction("crusader strike", ACTION_NORMAL + 5),
new NextAction("divine storm", ACTION_NORMAL + 4), new NextAction("divine storm", ACTION_NORMAL + 4),
new NextAction("consecration", ACTION_NORMAL + 3), new NextAction("consecration", ACTION_NORMAL + 3),
new NextAction("melee", ACTION_NORMAL), new NextAction("melee", ACTION_NORMAL),
@@ -95,7 +96,7 @@ void DpsPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
"seal", "seal",
NextAction::array(0, new NextAction("seal of corruption", ACTION_HIGH), NULL))); NextAction::array(0, new NextAction("seal of corruption", ACTION_HIGH), NULL)));
// triggers.push_back(new TriggerNode("seal", NextAction::array(0, new NextAction("seal of command", 90.0f), nullptr))); // triggers.push_back(new TriggerNode("seal", NextAction::array(0, new NextAction("seal of command", 90.0f), nullptr)));
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("seal of wisdom", 91.0f), nullptr))); triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("seal of wisdom", ACTION_HIGH + 5), nullptr)));
// triggers.push_back(new TriggerNode("sanctity aura", NextAction::array(0, new NextAction("sanctity aura", 90.0f), nullptr))); // triggers.push_back(new TriggerNode("sanctity aura", NextAction::array(0, new NextAction("sanctity aura", 90.0f), nullptr)));
// triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("repentance or shield", ACTION_CRITICAL_HEAL + 3), new NextAction("holy light", ACTION_CRITICAL_HEAL + 2), nullptr))); // triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("repentance or shield", ACTION_CRITICAL_HEAL + 3), new NextAction("holy light", ACTION_CRITICAL_HEAL + 2), nullptr)));
// triggers.push_back(new TriggerNode("judgement of wisdom", NextAction::array(0, new NextAction("judgement of wisdom", ACTION_NORMAL + 10), nullptr))); // triggers.push_back(new TriggerNode("judgement of wisdom", NextAction::array(0, new NextAction("judgement of wisdom", ACTION_NORMAL + 10), nullptr)));
@@ -106,10 +107,10 @@ void DpsPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
// triggers.push_back(new TriggerNode("repentance", NextAction::array(0, new NextAction("repentance", ACTION_INTERRUPT + 2), nullptr))); // triggers.push_back(new TriggerNode("repentance", NextAction::array(0, new NextAction("repentance", ACTION_INTERRUPT + 2), nullptr)));
// triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("divine storm", ACTION_HIGH + 1), new NextAction("consecration", ACTION_HIGH + 1), nullptr))); // triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("divine storm", ACTION_HIGH + 1), new NextAction("consecration", ACTION_HIGH + 1), nullptr)));
triggers.push_back(new TriggerNode("art of war", NextAction::array(0, new NextAction("exorcism", ACTION_HIGH + 2), nullptr))); triggers.push_back(new TriggerNode("art of war", NextAction::array(0, new NextAction("exorcism", ACTION_HIGH + 2), nullptr)));
triggers.push_back(new TriggerNode("target critical health", NextAction::array(0, new NextAction("hammer of wrath", ACTION_CRITICAL_HEAL), nullptr))); triggers.push_back(new TriggerNode("target critical health", NextAction::array(0, new NextAction("hammer of wrath", ACTION_HIGH), nullptr)));
triggers.push_back(new TriggerNode( // triggers.push_back(new TriggerNode(
"not facing target", // "not facing target",
NextAction::array(0, new NextAction("set facing", ACTION_NORMAL + 7), NULL))); // NextAction::array(0, new NextAction("set facing", ACTION_NORMAL + 7), NULL)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"enemy out of melee", "enemy out of melee",

View File

@@ -39,6 +39,7 @@ void PaladinCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
void PaladinBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void PaladinBoostStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{ {
triggers.push_back(new TriggerNode("avenging wrath", NextAction::array(0, new NextAction("avenging wrath", ACTION_HIGH + 2), nullptr)));
triggers.push_back(new TriggerNode("divine favor", NextAction::array(0, new NextAction("divine favor", ACTION_HIGH + 1), nullptr))); triggers.push_back(new TriggerNode("divine favor", NextAction::array(0, new NextAction("divine favor", ACTION_HIGH + 1), nullptr)));
} }

View File

@@ -375,4 +375,10 @@ class CastSacredShieldOnMainTankAction : public BuffOnMainTankAction
public: public:
CastSacredShieldOnMainTankAction(PlayerbotAI* ai) : BuffOnMainTankAction(ai, "sacred shield", false) {} CastSacredShieldOnMainTankAction(PlayerbotAI* ai) : BuffOnMainTankAction(ai, "sacred shield", false) {}
}; };
class CastAvengingWrathAction : public CastBuffSpellAction
{
public:
CastAvengingWrathAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "avenging wrath") {}
};
#endif #endif

View File

@@ -134,6 +134,8 @@ class PaladinTriggerFactoryInternal : public NamedObjectContext<Trigger>
creators["blessing of kings on party"] = &PaladinTriggerFactoryInternal::blessing_of_kings_on_party; creators["blessing of kings on party"] = &PaladinTriggerFactoryInternal::blessing_of_kings_on_party;
creators["blessing of wisdom on party"] = &PaladinTriggerFactoryInternal::blessing_of_wisdom_on_party; creators["blessing of wisdom on party"] = &PaladinTriggerFactoryInternal::blessing_of_wisdom_on_party;
creators["blessing of might on party"] = &PaladinTriggerFactoryInternal::blessing_of_might_on_party; creators["blessing of might on party"] = &PaladinTriggerFactoryInternal::blessing_of_might_on_party;
creators["avenging wrath"] = &PaladinTriggerFactoryInternal::avenging_wrath;
} }
private: private:
@@ -177,6 +179,8 @@ class PaladinTriggerFactoryInternal : public NamedObjectContext<Trigger>
static Trigger* blessing_of_kings_on_party(PlayerbotAI* botAI) { return new BlessingOfKingsOnPartyTrigger(botAI); } static Trigger* blessing_of_kings_on_party(PlayerbotAI* botAI) { return new BlessingOfKingsOnPartyTrigger(botAI); }
static Trigger* blessing_of_wisdom_on_party(PlayerbotAI* botAI) { return new BlessingOfWisdomOnPartyTrigger(botAI); } static Trigger* blessing_of_wisdom_on_party(PlayerbotAI* botAI) { return new BlessingOfWisdomOnPartyTrigger(botAI); }
static Trigger* blessing_of_might_on_party(PlayerbotAI* botAI) { return new BlessingOfMightOnPartyTrigger(botAI); } static Trigger* blessing_of_might_on_party(PlayerbotAI* botAI) { return new BlessingOfMightOnPartyTrigger(botAI); }
static Trigger* avenging_wrath(PlayerbotAI* botAI) { return new AvengingWrathTrigger(botAI); }
}; };
class PaladinAiObjectContextInternal : public NamedObjectContext<Action> class PaladinAiObjectContextInternal : public NamedObjectContext<Action>
@@ -257,6 +261,7 @@ class PaladinAiObjectContextInternal : public NamedObjectContext<Action>
creators["shield of righteousness"] = &PaladinAiObjectContextInternal::shield_of_righteousness; creators["shield of righteousness"] = &PaladinAiObjectContextInternal::shield_of_righteousness;
creators["beacon of light on main tank"] = &PaladinAiObjectContextInternal::beacon_of_light_on_main_tank; creators["beacon of light on main tank"] = &PaladinAiObjectContextInternal::beacon_of_light_on_main_tank;
creators["sacred shield on main tank"] = &PaladinAiObjectContextInternal::sacred_shield_on_main_tank; creators["sacred shield on main tank"] = &PaladinAiObjectContextInternal::sacred_shield_on_main_tank;
creators["avenging wrath"] = &PaladinAiObjectContextInternal::avenging_wrath;
} }
private: private:
@@ -333,6 +338,7 @@ class PaladinAiObjectContextInternal : public NamedObjectContext<Action>
static Action* shield_of_righteousness(PlayerbotAI* ai) { return new ShieldOfRighteousnessAction(ai); } static Action* shield_of_righteousness(PlayerbotAI* ai) { return new ShieldOfRighteousnessAction(ai); }
static Action* beacon_of_light_on_main_tank(PlayerbotAI* ai) { return new CastBeaconOfLightOnMainTankAction(ai); } static Action* beacon_of_light_on_main_tank(PlayerbotAI* ai) { return new CastBeaconOfLightOnMainTankAction(ai); }
static Action* sacred_shield_on_main_tank(PlayerbotAI* ai) { return new CastSacredShieldOnMainTankAction(ai); } static Action* sacred_shield_on_main_tank(PlayerbotAI* ai) { return new CastSacredShieldOnMainTankAction(ai); }
static Action* avenging_wrath(PlayerbotAI* ai) { return new CastAvengingWrathAction(ai); }
}; };
PaladinAiObjectContext::PaladinAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI) PaladinAiObjectContext::PaladinAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)

View File

@@ -6,6 +6,7 @@
#define _PLAYERBOT_PALADINTRIGGERS_H #define _PLAYERBOT_PALADINTRIGGERS_H
#include "CureTriggers.h" #include "CureTriggers.h"
#include "GenericTriggers.h"
#include "SharedDefines.h" #include "SharedDefines.h"
#include "Unit.h" #include "Unit.h"
@@ -216,4 +217,10 @@ class BlessingOfMightOnPartyTrigger : public BuffOnPartyTrigger
public: public:
BlessingOfMightOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "blessing of might,blessing of wisdom", 2 * 2000) { } BlessingOfMightOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "blessing of might,blessing of wisdom", 2 * 2000) { }
}; };
class AvengingWrathTrigger : public BoostTrigger
{
public:
AvengingWrathTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "avenging wrath") {}
};
#endif #endif

View File

@@ -25,6 +25,13 @@ class TankPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
// /*A*/ NextAction::array(0, new NextAction("seal of righteousness"), nullptr), // /*A*/ NextAction::array(0, new NextAction("seal of righteousness"), nullptr),
// /*C*/ nullptr); // /*C*/ nullptr);
// } // }
static ActionNode* seal_of_command([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("seal of command",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of corruption"), nullptr),
/*C*/ nullptr);
}
static ActionNode* seal_of_corruption([[maybe_unused]] PlayerbotAI* botAI) static ActionNode* seal_of_corruption([[maybe_unused]] PlayerbotAI* botAI)
{ {
return new ActionNode ("seal of corruption", return new ActionNode ("seal of corruption",
@@ -36,14 +43,6 @@ class TankPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
static ActionNode* seal_of_vengeance([[maybe_unused]] PlayerbotAI* botAI) static ActionNode* seal_of_vengeance([[maybe_unused]] PlayerbotAI* botAI)
{ {
return new ActionNode ("seal of vengeance", return new ActionNode ("seal of vengeance",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of command"), nullptr),
/*C*/ nullptr);
}
static ActionNode* seal_of_command([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("seal of command",
/*P*/ nullptr, /*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("seal of righteousness"), nullptr), /*A*/ NextAction::array(0, new NextAction("seal of righteousness"), nullptr),
/*C*/ nullptr); /*C*/ nullptr);
@@ -72,8 +71,8 @@ void TankPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{ {
GenericPaladinStrategy::InitTriggers(triggers); GenericPaladinStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("seal", NextAction::array(0, new NextAction("seal of corruption", 90.0f), nullptr))); triggers.push_back(new TriggerNode("seal", NextAction::array(0, new NextAction("seal of command", ACTION_HIGH), nullptr)));
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("seal of wisdom", 91.0f), nullptr))); triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("seal of wisdom", ACTION_HIGH + 9), nullptr)));
// triggers.push_back(new TriggerNode("devotion aura", NextAction::array(0, new NextAction("devotion aura", 90.0f), NULL))); // triggers.push_back(new TriggerNode("devotion aura", NextAction::array(0, new NextAction("devotion aura", 90.0f), NULL)));
triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("avenger's shield", ACTION_HIGH + 5), nullptr))); triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("avenger's shield", ACTION_HIGH + 5), nullptr)));

View File

@@ -90,7 +90,7 @@ SPELL_ACTION(CastSilenceAction, "silence");
ENEMY_HEALER_ACTION(CastSilenceOnEnemyHealerAction, "silence"); ENEMY_HEALER_ACTION(CastSilenceOnEnemyHealerAction, "silence");
// shadow talents 2.4.3 // shadow talents 2.4.3
DEBUFF_CHECKISOWNER_ACTION(CastVampiricTouchAction, "vampiric touch"); DEBUFF_CHECKISOWNER_ACTION(CastVampiricTouchAction, "vampiric touch");
DEBUFF_ENEMY_ACTION(CastVampiricTouchOnAttackerAction, "vampiric touch");
// racials // racials
DEBUFF_CHECKISOWNER_ACTION(CastDevouringPlagueAction, "devouring plague"); DEBUFF_CHECKISOWNER_ACTION(CastDevouringPlagueAction, "devouring plague");
BUFF_ACTION(CastTouchOfWeaknessAction, "touch of weakness"); BUFF_ACTION(CastTouchOfWeaknessAction, "touch of weakness");

View File

@@ -77,6 +77,7 @@ class PriestTriggerFactoryInternal : public NamedObjectContext<Trigger>
creators["divine spirit on party"] = &PriestTriggerFactoryInternal::divine_spirit_on_party; creators["divine spirit on party"] = &PriestTriggerFactoryInternal::divine_spirit_on_party;
creators["inner fire"] = &PriestTriggerFactoryInternal::inner_fire; creators["inner fire"] = &PriestTriggerFactoryInternal::inner_fire;
creators["vampiric touch"] = &PriestTriggerFactoryInternal::vampiric_touch; creators["vampiric touch"] = &PriestTriggerFactoryInternal::vampiric_touch;
creators["vampiric touch on attacker"] = &PriestTriggerFactoryInternal::vampiric_touch_on_attacker;
creators["shadowform"] = &PriestTriggerFactoryInternal::shadowform; creators["shadowform"] = &PriestTriggerFactoryInternal::shadowform;
creators["vampiric embrace"] = &PriestTriggerFactoryInternal::vampiric_embrace; creators["vampiric embrace"] = &PriestTriggerFactoryInternal::vampiric_embrace;
creators["power infusion"] = &PriestTriggerFactoryInternal::power_infusion; creators["power infusion"] = &PriestTriggerFactoryInternal::power_infusion;
@@ -103,6 +104,7 @@ class PriestTriggerFactoryInternal : public NamedObjectContext<Trigger>
static Trigger* vampiric_embrace(PlayerbotAI* botAI) { return new VampiricEmbraceTrigger(botAI); } static Trigger* vampiric_embrace(PlayerbotAI* botAI) { return new VampiricEmbraceTrigger(botAI); }
static Trigger* shadowform(PlayerbotAI* botAI) { return new ShadowformTrigger(botAI); } static Trigger* shadowform(PlayerbotAI* botAI) { return new ShadowformTrigger(botAI); }
static Trigger* vampiric_touch(PlayerbotAI* botAI) { return new VampiricTouchTrigger(botAI); } static Trigger* vampiric_touch(PlayerbotAI* botAI) { return new VampiricTouchTrigger(botAI); }
static Trigger* vampiric_touch_on_attacker(PlayerbotAI* botAI) { return new VampiricTouchOnAttackerTrigger(botAI); }
static Trigger* devouring_plague(PlayerbotAI* botAI) { return new DevouringPlagueTrigger(botAI); } static Trigger* devouring_plague(PlayerbotAI* botAI) { return new DevouringPlagueTrigger(botAI); }
static Trigger* shadow_word_pain(PlayerbotAI* botAI) { return new PowerWordPainTrigger(botAI); } static Trigger* shadow_word_pain(PlayerbotAI* botAI) { return new PowerWordPainTrigger(botAI); }
static Trigger* shadow_word_pain_on_attacker(PlayerbotAI* botAI) { return new PowerWordPainOnAttackerTrigger(botAI); } static Trigger* shadow_word_pain_on_attacker(PlayerbotAI* botAI) { return new PowerWordPainOnAttackerTrigger(botAI); }
@@ -182,6 +184,7 @@ class PriestAiObjectContextInternal : public NamedObjectContext<Action>
creators["circle of healing"] = &PriestAiObjectContextInternal::circle_of_healing; creators["circle of healing"] = &PriestAiObjectContextInternal::circle_of_healing;
creators["psychic scream"] = &PriestAiObjectContextInternal::psychic_scream; creators["psychic scream"] = &PriestAiObjectContextInternal::psychic_scream;
creators["vampiric touch"] = &PriestAiObjectContextInternal::vampiric_touch; creators["vampiric touch"] = &PriestAiObjectContextInternal::vampiric_touch;
creators["vampiric touch on attacker"] = &PriestAiObjectContextInternal::vampiric_touch_on_attacker;
creators["vampiric embrace"] = &PriestAiObjectContextInternal::vampiric_embrace; creators["vampiric embrace"] = &PriestAiObjectContextInternal::vampiric_embrace;
creators["dispersion"] = &PriestAiObjectContextInternal::dispersion; creators["dispersion"] = &PriestAiObjectContextInternal::dispersion;
creators["shadow protection"] = &PriestAiObjectContextInternal::shadow_protection; creators["shadow protection"] = &PriestAiObjectContextInternal::shadow_protection;
@@ -230,6 +233,7 @@ class PriestAiObjectContextInternal : public NamedObjectContext<Action>
static Action* dispersion(PlayerbotAI* botAI) { return new CastDispersionAction(botAI); } static Action* dispersion(PlayerbotAI* botAI) { return new CastDispersionAction(botAI); }
static Action* vampiric_embrace(PlayerbotAI* botAI) { return new CastVampiricEmbraceAction(botAI); } static Action* vampiric_embrace(PlayerbotAI* botAI) { return new CastVampiricEmbraceAction(botAI); }
static Action* vampiric_touch(PlayerbotAI* botAI) { return new CastVampiricTouchAction(botAI); } static Action* vampiric_touch(PlayerbotAI* botAI) { return new CastVampiricTouchAction(botAI); }
static Action* vampiric_touch_on_attacker(PlayerbotAI* botAI) { return new CastVampiricTouchOnAttackerAction(botAI); }
static Action* psychic_scream(PlayerbotAI* botAI) { return new CastPsychicScreamAction(botAI); } static Action* psychic_scream(PlayerbotAI* botAI) { return new CastPsychicScreamAction(botAI); }
static Action* circle_of_healing(PlayerbotAI* botAI) { return new CastCircleOfHealingAction(botAI); } static Action* circle_of_healing(PlayerbotAI* botAI) { return new CastCircleOfHealingAction(botAI); }
static Action* resurrection(PlayerbotAI* botAI) { return new CastResurrectionAction(botAI); } static Action* resurrection(PlayerbotAI* botAI) { return new CastResurrectionAction(botAI); }

View File

@@ -14,6 +14,7 @@ DEBUFF_CHECKISOWNER_TRIGGER(HolyFireTrigger, "holy fire");
DEBUFF_CHECKISOWNER_TRIGGER(PowerWordPainTrigger, "shadow word: pain"); DEBUFF_CHECKISOWNER_TRIGGER(PowerWordPainTrigger, "shadow word: pain");
DEBUFF_ENEMY_TRIGGER(PowerWordPainOnAttackerTrigger, "shadow word: pain"); DEBUFF_ENEMY_TRIGGER(PowerWordPainOnAttackerTrigger, "shadow word: pain");
DEBUFF_CHECKISOWNER_TRIGGER(VampiricTouchTrigger, "vampiric touch"); DEBUFF_CHECKISOWNER_TRIGGER(VampiricTouchTrigger, "vampiric touch");
DEBUFF_ENEMY_TRIGGER(VampiricTouchOnAttackerTrigger, "vampiric touch on attacker");
BUFF_TRIGGER(VampiricEmbraceTrigger, "vampiric embrace"); BUFF_TRIGGER(VampiricEmbraceTrigger, "vampiric embrace");
CURE_TRIGGER(DispelMagicTrigger, "dispel magic", DISPEL_MAGIC); CURE_TRIGGER(DispelMagicTrigger, "dispel magic", DISPEL_MAGIC);
CURE_PARTY_TRIGGER(DispelMagicPartyMemberTrigger, "dispel magic", DISPEL_MAGIC); CURE_PARTY_TRIGGER(DispelMagicPartyMemberTrigger, "dispel magic", DISPEL_MAGIC);

View File

@@ -38,8 +38,9 @@ void ShadowPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
void ShadowPriestAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void ShadowPriestAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{ {
triggers.push_back(new TriggerNode("shadow word: pain on attacker", NextAction::array(0, new NextAction("shadow word: pain on attacker", ACTION_HIGH + 1), nullptr))); triggers.push_back(new TriggerNode("shadow word: pain on attacker", NextAction::array(0, new NextAction("shadow word: pain on attacker", ACTION_NORMAL + 5), nullptr)));
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("mind sear", ACTION_HIGH + 4), nullptr))); triggers.push_back(new TriggerNode("vampiric touch on attacker", NextAction::array(0, new NextAction("vampiric touch on attacker", ACTION_NORMAL + 4), nullptr)));
// triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("mind sear", ACTION_HIGH + 4), nullptr)));
} }
void ShadowPriestDebuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void ShadowPriestDebuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)

View File

@@ -70,7 +70,9 @@ DpsRogueStrategy::DpsRogueStrategy(PlayerbotAI* botAI) : MeleeCombatStrategy(bot
NextAction** DpsRogueStrategy::getDefaultActions() NextAction** DpsRogueStrategy::getDefaultActions()
{ {
return NextAction::array(0, new NextAction("melee", ACTION_NORMAL), NULL); return NextAction::array(0,
new NextAction("killing spree", ACTION_NORMAL + 1),
new NextAction("melee", ACTION_NORMAL), NULL);
} }
void DpsRogueStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void DpsRogueStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
@@ -105,9 +107,9 @@ void DpsRogueStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
"kick on enemy healer", "kick on enemy healer",
NextAction::array(0, new NextAction("kick on enemy healer", ACTION_INTERRUPT + 1), NULL))); NextAction::array(0, new NextAction("kick on enemy healer", ACTION_INTERRUPT + 1), NULL)));
triggers.push_back(new TriggerNode( // triggers.push_back(new TriggerNode(
"behind target", // "behind target",
NextAction::array(0, new NextAction("backstab", ACTION_NORMAL), NULL))); // NextAction::array(0, new NextAction("backstab", ACTION_NORMAL), NULL)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"light aoe", "light aoe",

View File

@@ -102,10 +102,10 @@ class CastAdrenalineRushAction : public CastBuffSpellAction
CastAdrenalineRushAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "adrenaline rush") { } CastAdrenalineRushAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "adrenaline rush") { }
}; };
class CastKillingSpreeAction : public CastBuffSpellAction class CastKillingSpreeAction : public CastMeleeSpellAction
{ {
public: public:
CastKillingSpreeAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "killing spree") { } CastKillingSpreeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "killing spree") { }
}; };
class CastKickOnEnemyHealerAction : public CastSpellOnEnemyHealerAction class CastKickOnEnemyHealerAction : public CastSpellOnEnemyHealerAction

View File

@@ -72,6 +72,7 @@ class RogueTriggerFactoryInternal : public NamedObjectContext<Trigger>
creators["main hand weapon no enchant"] = &RogueTriggerFactoryInternal::main_hand_weapon_no_enchant; creators["main hand weapon no enchant"] = &RogueTriggerFactoryInternal::main_hand_weapon_no_enchant;
creators["off hand weapon no enchant"] = &RogueTriggerFactoryInternal::off_hand_weapon_no_enchant; creators["off hand weapon no enchant"] = &RogueTriggerFactoryInternal::off_hand_weapon_no_enchant;
creators["tricks of the trade on main tank"] = &RogueTriggerFactoryInternal::tricks_of_the_trade_on_main_tank; creators["tricks of the trade on main tank"] = &RogueTriggerFactoryInternal::tricks_of_the_trade_on_main_tank;
creators["adrenaline rush"] = &RogueTriggerFactoryInternal::adrenaline_rush;
} }
private: private:
@@ -128,6 +129,7 @@ class RogueAiObjectContextInternal : public NamedObjectContext<Action>
creators["use instant poison on main hand"] = &RogueAiObjectContextInternal::use_instant_poison; creators["use instant poison on main hand"] = &RogueAiObjectContextInternal::use_instant_poison;
creators["use deadly poison on off hand"] = &RogueAiObjectContextInternal::use_deadly_poison; creators["use deadly poison on off hand"] = &RogueAiObjectContextInternal::use_deadly_poison;
creators["fan of knives"] = &RogueAiObjectContextInternal::fan_of_knives; creators["fan of knives"] = &RogueAiObjectContextInternal::fan_of_knives;
creators["killing spree"] = &RogueAiObjectContextInternal::killing_spree;
} }
private: private:
@@ -162,6 +164,7 @@ class RogueAiObjectContextInternal : public NamedObjectContext<Action>
static Action* use_instant_poison(PlayerbotAI* ai) { return new UseInstantPoisonAction(ai); } static Action* use_instant_poison(PlayerbotAI* ai) { return new UseInstantPoisonAction(ai); }
static Action* use_deadly_poison(PlayerbotAI* ai) { return new UseDeadlyPoisonAction(ai); } static Action* use_deadly_poison(PlayerbotAI* ai) { return new UseDeadlyPoisonAction(ai); }
static Action* fan_of_knives(PlayerbotAI* ai) { return new FanOfKnivesAction(ai); } static Action* fan_of_knives(PlayerbotAI* ai) { return new FanOfKnivesAction(ai); }
static Action* killing_spree(PlayerbotAI* ai) { return new CastKillingSpreeAction(ai); }
}; };
RogueAiObjectContext::RogueAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI) RogueAiObjectContext::RogueAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)

View File

@@ -6,10 +6,10 @@
#include "Playerbots.h" #include "Playerbots.h"
#include "ServerFacade.h" #include "ServerFacade.h"
bool AdrenalineRushTrigger::isPossible() // bool AdrenalineRushTrigger::isPossible()
{ // {
return !botAI->HasAura("stealth", bot); // return !botAI->HasAura("stealth", bot);
} // }
bool UnstealthTrigger::IsActive() bool UnstealthTrigger::IsActive()
{ {

View File

@@ -21,12 +21,12 @@ class SliceAndDiceTrigger : public BuffTrigger
SliceAndDiceTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "slice and dice") { } SliceAndDiceTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "slice and dice") { }
}; };
class AdrenalineRushTrigger : public BuffTrigger class AdrenalineRushTrigger : public BoostTrigger
{ {
public: public:
AdrenalineRushTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "adrenaline rush") { } AdrenalineRushTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "adrenaline rush") { }
bool isPossible(); // bool isPossible();
}; };
class RuptureTrigger : public DebuffTrigger class RuptureTrigger : public DebuffTrigger

View File

@@ -67,14 +67,17 @@ void MeleeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode("flame shock", NextAction::array(0, new NextAction("flame shock", 20.0f), nullptr))); triggers.push_back(new TriggerNode("flame shock", NextAction::array(0, new NextAction("flame shock", 20.0f), nullptr)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"maelstrom weapon", "maelstrom weapon",
NextAction::array(0, new NextAction("lightning bolt", 25.0f), NULL))); NextAction::array(0, new NextAction("lightning bolt", 25.0f), nullptr)));
triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_NORMAL + 7), nullptr))); triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_NORMAL + 7), nullptr)));
// triggers.push_back(new TriggerNode("enemy too close for melee", NextAction::array(0, new NextAction("move out of enemy contact", ACTION_NORMAL + 8), nullptr))); // triggers.push_back(new TriggerNode("enemy too close for melee", NextAction::array(0, new NextAction("move out of enemy contact", ACTION_NORMAL + 8), nullptr)));
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("strength of earth totem", ACTION_LIGHT_HEAL), nullptr))); triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("strength of earth totem", ACTION_LIGHT_HEAL), nullptr)));
triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), nullptr))); triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), nullptr)));
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"no fire totem", "no fire totem",
NextAction::array(0, new NextAction("reach melee", 23.0f), new NextAction("magma totem", 22.0f), NULL))); NextAction::array(0, new NextAction("reach melee", 23.0f), new NextAction("magma totem", 22.0f), nullptr)));
triggers.push_back(new TriggerNode(
"medium mana",
NextAction::array(0, new NextAction("shamanistic rage", 23.0f), nullptr)));
} }
void MeleeAoeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void MeleeAoeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)

View File

@@ -402,4 +402,10 @@ class CastWrathOfAirTotemAction : public CastTotemAction
public: public:
CastWrathOfAirTotemAction(PlayerbotAI* ai) : CastTotemAction(ai, "wrath of air totem") {} CastWrathOfAirTotemAction(PlayerbotAI* ai) : CastTotemAction(ai, "wrath of air totem") {}
}; };
class CastShamanisticRageAction : public CastBuffSpellAction
{
public:
CastShamanisticRageAction(PlayerbotAI* ai) : CastBuffSpellAction(ai, "shamanistic rage") {}
};
#endif #endif

View File

@@ -212,6 +212,7 @@ class ShamanAiObjectContextInternal : public NamedObjectContext<Action>
creators["totem of wrath"] = &ShamanAiObjectContextInternal::totem_of_wrath; creators["totem of wrath"] = &ShamanAiObjectContextInternal::totem_of_wrath;
creators["fire elemental totem"] = &ShamanAiObjectContextInternal::fire_elemental_totem; creators["fire elemental totem"] = &ShamanAiObjectContextInternal::fire_elemental_totem;
creators["wrath of air totem"] = &ShamanAiObjectContextInternal::wrath_of_air_totem; creators["wrath of air totem"] = &ShamanAiObjectContextInternal::wrath_of_air_totem;
creators["shamanistic rage"] = &ShamanAiObjectContextInternal::shamanistic_rage;
} }
private: private:
@@ -273,6 +274,8 @@ class ShamanAiObjectContextInternal : public NamedObjectContext<Action>
static Action* totem_of_wrath(PlayerbotAI* ai) { return new CastTotemOfWrathAction(ai); } static Action* totem_of_wrath(PlayerbotAI* ai) { return new CastTotemOfWrathAction(ai); }
static Action* fire_elemental_totem(PlayerbotAI* ai) { return new CastFireElementalTotemAction(ai); } static Action* fire_elemental_totem(PlayerbotAI* ai) { return new CastFireElementalTotemAction(ai); }
static Action* wrath_of_air_totem(PlayerbotAI* ai) { return new CastWrathOfAirTotemAction(ai); } static Action* wrath_of_air_totem(PlayerbotAI* ai) { return new CastWrathOfAirTotemAction(ai); }
static Action* shamanistic_rage(PlayerbotAI* ai) { return new CastShamanisticRageAction(ai); }
}; };

View File

@@ -239,6 +239,15 @@ bool SpellNoCooldownTrigger::IsActive()
return !bot->HasSpellCooldown(spellId); return !bot->HasSpellCooldown(spellId);
} }
bool SpellCooldownTrigger::IsActive()
{
uint32 spellId = AI_VALUE2(uint32, "spell id", name);
if (!spellId)
return false;
return bot->HasSpellCooldown(spellId);
}
RandomTrigger::RandomTrigger(PlayerbotAI* botAI, std::string const name, int32 probability) : Trigger(botAI, name), probability(probability), lastCheck(getMSTime()) RandomTrigger::RandomTrigger(PlayerbotAI* botAI, std::string const name, int32 probability) : Trigger(botAI, name), probability(probability), lastCheck(getMSTime())
{ {
} }

View File

@@ -143,6 +143,15 @@ class SpellNoCooldownTrigger : public SpellTrigger
bool IsActive() override; bool IsActive() override;
}; };
class SpellCooldownTrigger : public SpellTrigger
{
public:
SpellCooldownTrigger(PlayerbotAI* botAI, std::string const spell) : SpellTrigger(botAI, spell) { }
std::string const GetTargetName() override { return "self target"; }
bool IsActive() override;
};
// TODO: check other targets // TODO: check other targets
class InterruptSpellTrigger : public SpellTrigger class InterruptSpellTrigger : public SpellTrigger
{ {
@@ -470,7 +479,6 @@ class HasAuraTrigger : public Trigger
std::string const GetTargetName() override { return "self target"; } std::string const GetTargetName() override { return "self target"; }
bool IsActive() override; bool IsActive() override;
}; };
class HasAuraStackTrigger : public Trigger { class HasAuraStackTrigger : public Trigger {
@@ -750,7 +758,7 @@ class HasAreaDebuffTrigger : public Trigger {
class BuffOnMainTankTrigger : public BuffTrigger class BuffOnMainTankTrigger : public BuffTrigger
{ {
public: public:
BuffOnMainTankTrigger(PlayerbotAI* botAI, std::string spell, bool checkIsOwner = false) : BuffTrigger(botAI, spell, 1, checkIsOwner) {} BuffOnMainTankTrigger(PlayerbotAI* botAI, std::string spell, bool checkIsOwner = false, int checkInterval = 1) : BuffTrigger(botAI, spell, checkInterval, checkIsOwner) {}
public: public:
virtual Value<Unit*>* GetTargetValue(); virtual Value<Unit*>* GetTargetValue();
}; };

View File

@@ -78,19 +78,23 @@ void DpsWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"decimation", "decimation",
NextAction::array(0, new NextAction("soul fire", 16.0f), NULL))); NextAction::array(0, new NextAction("soul fire", 16.0f), NULL)));
triggers.push_back(new TriggerNode(
"metamorphosis",
NextAction::array(0, new NextAction("metamorphosis", 20.0f), NULL)));
} }
void DpsAoeWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void DpsAoeWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{ {
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("rain of fire", 37.0f), nullptr))); triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("rain of fire", 37.0f), nullptr)));
triggers.push_back(new TriggerNode("corruption on attacker", NextAction::array(0, new NextAction("corruption on attacker", 27.0f), nullptr))); triggers.push_back(new TriggerNode("corruption on attacker", NextAction::array(0, new NextAction("corruption on attacker", 27.0f), nullptr)));
// triggers.push_back(new TriggerNode("curse of agony on attacker", NextAction::array(0, new NextAction("curse of agony on attacker", 28.0f), nullptr)));
triggers.push_back(new TriggerNode("unstable affliction on attacker", NextAction::array(0, new NextAction("unstable affliction on attacker", 26.0f), NULL))); triggers.push_back(new TriggerNode("unstable affliction on attacker", NextAction::array(0, new NextAction("unstable affliction on attacker", 26.0f), NULL)));
triggers.push_back(new TriggerNode("curse of agony on attacker", NextAction::array(0, new NextAction("curse of agony on attacker", 25.0f), nullptr)));
} }
void DpsWarlockDebuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void DpsWarlockDebuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{ {
triggers.push_back(new TriggerNode("corruption", NextAction::array(0, new NextAction("corruption", 22.0f), nullptr))); triggers.push_back(new TriggerNode("corruption", NextAction::array(0, new NextAction("corruption", 22.0f), nullptr)));
triggers.push_back(new TriggerNode("curse of agony", NextAction::array(0, new NextAction("curse of agony", 20.0f), nullptr)));
triggers.push_back(new TriggerNode("unstable affliction", NextAction::array(0, new NextAction("unstable affliction", 21.0f), NULL))); triggers.push_back(new TriggerNode("unstable affliction", NextAction::array(0, new NextAction("unstable affliction", 21.0f), NULL)));
triggers.push_back(new TriggerNode("curse of agony", NextAction::array(0, new NextAction("curse of agony", 20.0f), nullptr)));
} }

View File

@@ -63,6 +63,6 @@ void FuryWarriorStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
triggers.push_back(new TriggerNode("berserker rage", NextAction::array(0, new NextAction("berserker rage", ACTION_HIGH + 2), nullptr))); triggers.push_back(new TriggerNode("berserker rage", NextAction::array(0, new NextAction("berserker rage", ACTION_HIGH + 2), nullptr)));
triggers.push_back(new TriggerNode("bloodrage", NextAction::array(0, new NextAction("bloodrage", ACTION_HIGH + 2), nullptr))); triggers.push_back(new TriggerNode("bloodrage", NextAction::array(0, new NextAction("bloodrage", ACTION_HIGH + 2), nullptr)));
triggers.push_back(new TriggerNode("death wish", NextAction::array(0, new NextAction("death wish", ACTION_HIGH + 2), nullptr))); triggers.push_back(new TriggerNode("death wish", NextAction::array(0, new NextAction("death wish", ACTION_HIGH + 2), nullptr)));
triggers.push_back(new TriggerNode("rampage", NextAction::array(0, new NextAction("rampage", ACTION_INTERRUPT + 1), nullptr))); // triggers.push_back(new TriggerNode("rampage", NextAction::array(0, new NextAction("rampage", ACTION_INTERRUPT + 1), nullptr)));
triggers.push_back(new TriggerNode("high rage available", NextAction::array(0, new NextAction("heroic strike", ACTION_HIGH + 1), NULL))); triggers.push_back(new TriggerNode("high rage available", NextAction::array(0, new NextAction("heroic strike", ACTION_HIGH + 1), NULL)));
} }