Improve class spell and use trinket

This commit is contained in:
Yunfan Li
2024-08-14 18:18:01 +08:00
parent c778e303df
commit a1cb9dea05
47 changed files with 377 additions and 108 deletions

View File

@@ -10,7 +10,11 @@
class DpsHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
DpsHunterStrategyActionNodeFactory() { creators["aimed shot"] = &aimed_shot; }
DpsHunterStrategyActionNodeFactory()
{
creators["aimed shot"] = &aimed_shot;
creators["steady shot"] = &steady_shot;
}
private:
static ActionNode* aimed_shot([[maybe_unused]] PlayerbotAI* botAI)
@@ -20,6 +24,13 @@ private:
/*A*/ NextAction::array(0, new NextAction("multi-shot"), nullptr),
/*C*/ nullptr);
}
static ActionNode* steady_shot([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("steady shot",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("arcane shot"), nullptr),
/*C*/ nullptr);
}
};
DpsHunterStrategy::DpsHunterStrategy(PlayerbotAI* botAI) : GenericHunterStrategy(botAI)
@@ -32,7 +43,7 @@ NextAction** DpsHunterStrategy::getDefaultActions()
return NextAction::array(
0, new NextAction("kill shot", ACTION_DEFAULT + 0.6f), new NextAction("chimera shot", ACTION_DEFAULT + 0.5f),
new NextAction("explosive shot", ACTION_DEFAULT + 0.4f), new NextAction("aimed shot", ACTION_DEFAULT + 0.3f),
new NextAction("arcane shot", ACTION_DEFAULT + 0.2f), new NextAction("steady shot", ACTION_DEFAULT + 0.1f),
/*new NextAction("arcane shot", ACTION_DEFAULT + 0.2f),*/ new NextAction("steady shot", ACTION_DEFAULT + 0.1f),
new NextAction("auto shot", ACTION_DEFAULT), nullptr);
// return NextAction::array(0, new NextAction("explosive shot", 11.0f), new NextAction("auto shot", 10.0f), new
// NextAction("auto attack", 9.0f), nullptr);

View File

@@ -97,6 +97,9 @@ void GenericHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(
new TriggerNode("misdirection on main tank",
NextAction::array(0, new NextAction("misdirection on main tank", ACTION_HIGH + 7), NULL)));
triggers.push_back(
new TriggerNode("low health", NextAction::array(0, new NextAction("deterrence", ACTION_HIGH + 5), nullptr)));
triggers.push_back(new TriggerNode("tranquilizing shot enrage",
NextAction::array(0, new NextAction("tranquilizing shot", 61.0f), NULL)));
triggers.push_back(new TriggerNode("tranquilizing shot magic",

View File

@@ -32,8 +32,11 @@ public:
BEGIN_RANGED_SPELL_ACTION(CastArcaneShotAction, "arcane shot")
END_SPELL_ACTION()
BEGIN_RANGED_SPELL_ACTION(CastExplosiveShotAction, "explosive shot")
END_SPELL_ACTION()
class CastExplosiveShotAction : public CastDebuffSpellAction
{
public:
CastExplosiveShotAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "explosive shot", true, 0.0f) {}
};
BEGIN_RANGED_SPELL_ACTION(CastAimedShotAction, "aimed shot")
END_SPELL_ACTION()
@@ -160,6 +163,12 @@ public:
CastRapidFireAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "rapid fire") {}
};
class CastDeterrenceAction : public CastBuffSpellAction
{
public:
CastDeterrenceAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "deterrence") {}
};
class CastReadinessAction : public CastBuffSpellAction
{
public:

View File

@@ -149,6 +149,7 @@ public:
creators["freezing trap"] = &HunterAiObjectContextInternal::freezing_trap;
creators["rapid fire"] = &HunterAiObjectContextInternal::rapid_fire;
creators["boost"] = &HunterAiObjectContextInternal::rapid_fire;
creators["deterrence"] = &HunterAiObjectContextInternal::deterrence;
creators["readiness"] = &HunterAiObjectContextInternal::readiness;
creators["aspect of the hawk"] = &HunterAiObjectContextInternal::aspect_of_the_hawk;
creators["aspect of the monkey"] = &HunterAiObjectContextInternal::aspect_of_the_monkey;
@@ -200,6 +201,7 @@ private:
static Action* black_arrow(PlayerbotAI* botAI) { return new CastBlackArrow(botAI); }
static Action* freezing_trap(PlayerbotAI* botAI) { return new CastFreezingTrap(botAI); }
static Action* rapid_fire(PlayerbotAI* botAI) { return new CastRapidFireAction(botAI); }
static Action* deterrence(PlayerbotAI* botAI) { return new CastDeterrenceAction(botAI); }
static Action* readiness(PlayerbotAI* botAI) { return new CastReadinessAction(botAI); }
static Action* aspect_of_the_hawk(PlayerbotAI* botAI) { return new CastAspectOfTheHawkAction(botAI); }
static Action* aspect_of_the_monkey(PlayerbotAI* botAI) { return new CastAspectOfTheMonkeyAction(botAI); }