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

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

View File

@@ -102,10 +102,10 @@ class CastAdrenalineRushAction : public CastBuffSpellAction
CastAdrenalineRushAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "adrenaline rush") { }
};
class CastKillingSpreeAction : public CastBuffSpellAction
class CastKillingSpreeAction : public CastMeleeSpellAction
{
public:
CastKillingSpreeAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "killing spree") { }
CastKillingSpreeAction(PlayerbotAI* botAI) : CastMeleeSpellAction(botAI, "killing spree") { }
};
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["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["adrenaline rush"] = &RogueTriggerFactoryInternal::adrenaline_rush;
}
private:
@@ -128,6 +129,7 @@ class RogueAiObjectContextInternal : public NamedObjectContext<Action>
creators["use instant poison on main hand"] = &RogueAiObjectContextInternal::use_instant_poison;
creators["use deadly poison on off hand"] = &RogueAiObjectContextInternal::use_deadly_poison;
creators["fan of knives"] = &RogueAiObjectContextInternal::fan_of_knives;
creators["killing spree"] = &RogueAiObjectContextInternal::killing_spree;
}
private:
@@ -162,6 +164,7 @@ class RogueAiObjectContextInternal : public NamedObjectContext<Action>
static Action* use_instant_poison(PlayerbotAI* ai) { return new UseInstantPoisonAction(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* killing_spree(PlayerbotAI* ai) { return new CastKillingSpreeAction(ai); }
};
RogueAiObjectContext::RogueAiObjectContext(PlayerbotAI* botAI) : AiObjectContext(botAI)

View File

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

View File

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