mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Shaman maelstrom weapon
This commit is contained in:
@@ -72,11 +72,8 @@ void MeleeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
triggers.push_back(
|
triggers.push_back(
|
||||||
new TriggerNode("flame shock", NextAction::array(0, new NextAction("flame shock", 20.0f), nullptr)));
|
new TriggerNode("flame shock", NextAction::array(0, new NextAction("flame shock", 20.0f), nullptr)));
|
||||||
triggers.push_back(
|
triggers.push_back(
|
||||||
new TriggerNode("maelstrom weapon", NextAction::array(0, new NextAction("lightning bolt", 25.0f), nullptr)));
|
new TriggerNode("maelstrom weapon 4", 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("enemy too close for melee", NextAction::array(0, new NextAction("move out of
|
|
||||||
// enemy contact", ACTION_NORMAL + 8), nullptr)));
|
|
||||||
triggers.push_back(new TriggerNode(
|
triggers.push_back(new TriggerNode(
|
||||||
"medium aoe", NextAction::array(0, new NextAction("strength of earth totem", ACTION_LIGHT_HEAL), nullptr)));
|
"medium aoe", NextAction::array(0, new NextAction("strength of earth totem", ACTION_LIGHT_HEAL), nullptr)));
|
||||||
triggers.push_back(new TriggerNode(
|
triggers.push_back(new TriggerNode(
|
||||||
|
|||||||
@@ -51,11 +51,14 @@ bool CastMagmaTotemAction::isUseful() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CastFireNovaAction::isUseful() {
|
bool CastFireNovaAction::isUseful() {
|
||||||
|
Unit* target = AI_VALUE(Unit*, "current target");
|
||||||
|
if (!target)
|
||||||
|
return false;
|
||||||
Creature* fireTotem = bot->GetMap()->GetCreature(bot->m_SummonSlot[1]);
|
Creature* fireTotem = bot->GetMap()->GetCreature(bot->m_SummonSlot[1]);
|
||||||
if (!fireTotem)
|
if (!fireTotem)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (bot->GetDistance(fireTotem) > 8.0f)
|
if (target->GetDistance(fireTotem) > 8.0f)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return CastMeleeSpellAction::isUseful();
|
return CastMeleeSpellAction::isUseful();
|
||||||
|
|||||||
@@ -110,13 +110,17 @@ public:
|
|||||||
creators["no water totem"] = &ShamanATriggerFactoryInternal::no_water_totem;
|
creators["no water totem"] = &ShamanATriggerFactoryInternal::no_water_totem;
|
||||||
creators["no air totem"] = &ShamanATriggerFactoryInternal::no_air_totem;
|
creators["no air totem"] = &ShamanATriggerFactoryInternal::no_air_totem;
|
||||||
creators["earth shield on main tank"] = &ShamanATriggerFactoryInternal::earth_shield_on_main_tank;
|
creators["earth shield on main tank"] = &ShamanATriggerFactoryInternal::earth_shield_on_main_tank;
|
||||||
creators["maelstrom weapon"] = &ShamanATriggerFactoryInternal::maelstrom_weapon;
|
creators["maelstrom weapon 3"] = &ShamanATriggerFactoryInternal::maelstrom_weapon_3;
|
||||||
|
creators["maelstrom weapon 4"] = &ShamanATriggerFactoryInternal::maelstrom_weapon_4;
|
||||||
|
creators["maelstrom weapon 5"] = &ShamanATriggerFactoryInternal::maelstrom_weapon_5;
|
||||||
creators["flame shock"] = &ShamanATriggerFactoryInternal::flame_shock;
|
creators["flame shock"] = &ShamanATriggerFactoryInternal::flame_shock;
|
||||||
creators["wrath of air totem"] = &ShamanATriggerFactoryInternal::wrath_of_air_totem;
|
creators["wrath of air totem"] = &ShamanATriggerFactoryInternal::wrath_of_air_totem;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static Trigger* maelstrom_weapon(PlayerbotAI* botAI) { return new MaelstromWeaponTrigger(botAI); }
|
static Trigger* maelstrom_weapon_3(PlayerbotAI* botAI) { return new MaelstromWeaponTrigger(botAI, 3); }
|
||||||
|
static Trigger* maelstrom_weapon_4(PlayerbotAI* botAI) { return new MaelstromWeaponTrigger(botAI, 4); }
|
||||||
|
static Trigger* maelstrom_weapon_5(PlayerbotAI* botAI) { return new MaelstromWeaponTrigger(botAI, 5); }
|
||||||
static Trigger* heroism(PlayerbotAI* botAI) { return new HeroismTrigger(botAI); }
|
static Trigger* heroism(PlayerbotAI* botAI) { return new HeroismTrigger(botAI); }
|
||||||
static Trigger* bloodlust(PlayerbotAI* botAI) { return new BloodlustTrigger(botAI); }
|
static Trigger* bloodlust(PlayerbotAI* botAI) { return new BloodlustTrigger(botAI); }
|
||||||
static Trigger* elemental_mastery(PlayerbotAI* botAI) { return new ElementalMasteryTrigger(botAI); }
|
static Trigger* elemental_mastery(PlayerbotAI* botAI) { return new ElementalMasteryTrigger(botAI); }
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ public:
|
|||||||
class MaelstromWeaponTrigger : public HasAuraStackTrigger
|
class MaelstromWeaponTrigger : public HasAuraStackTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MaelstromWeaponTrigger(PlayerbotAI* botAI) : HasAuraStackTrigger(botAI, "maelstrom weapon", 5) {}
|
MaelstromWeaponTrigger(PlayerbotAI* botAI, int stack = 5) : HasAuraStackTrigger(botAI, "maelstrom weapon", stack) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class WindShearInterruptEnemyHealerSpellTrigger : public InterruptEnemyHealerTrigger
|
class WindShearInterruptEnemyHealerSpellTrigger : public InterruptEnemyHealerTrigger
|
||||||
|
|||||||
Reference in New Issue
Block a user