mage and paladin strategy port

This commit is contained in:
Yunfan Li
2023-06-03 20:16:35 +08:00
parent 0f483047e5
commit e68a22d968
26 changed files with 414 additions and 172 deletions

View File

@@ -48,13 +48,24 @@ ArcaneMageStrategy::ArcaneMageStrategy(PlayerbotAI* botAI) : GenericMageStrategy
NextAction** ArcaneMageStrategy::getDefaultActions()
{
return NextAction::array(0, new NextAction("arcane barrage", 10.0f), nullptr);
return NextAction::array(0, new NextAction("arcane blast", 10.0f), NULL);
}
void ArcaneMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericMageStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("arcane blast", NextAction::array(0, new NextAction("arcane blast", 15.0f), nullptr)));
triggers.push_back(new TriggerNode("missile barrage", NextAction::array(0, new NextAction("arcane missiles", 15.0f), nullptr)));
triggers.push_back(new TriggerNode("arcane blast stack", NextAction::array(0, new NextAction("arcane missiles", 15.0f), NULL)));
}
void ArcaneMageAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
// triggers.push_back(new TriggerNode(
// "high aoe",
// NextAction::array(0, new NextAction("arcane explosion", 39.0f), NULL)));
triggers.push_back(new TriggerNode(
"medium aoe",
NextAction::array(0, new NextAction("blizzard", 40.0f), NULL)));
}

View File

@@ -19,4 +19,13 @@ class ArcaneMageStrategy : public GenericMageStrategy
NextAction** getDefaultActions() override;
};
class ArcaneMageAoeStrategy : public CombatStrategy
{
public:
ArcaneMageAoeStrategy(PlayerbotAI* ai) : CombatStrategy(ai) {}
public:
virtual void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "arcane aoe"; }
};
#endif

View File

@@ -7,17 +7,17 @@
NextAction** FireMageStrategy::getDefaultActions()
{
return NextAction::array(0, new NextAction("scorch", 7.0f), new NextAction("fireball", 6.0f), new NextAction("fire blast", 5.0f), nullptr);
return NextAction::array(0, new NextAction("fireball", ACTION_NORMAL + 1), NULL);
}
void FireMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericMageStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("pyroblast", NextAction::array(0, new NextAction("pyroblast", 10.0f), nullptr)));
// triggers.push_back(new TriggerNode("pyroblast", NextAction::array(0, new NextAction("pyroblast", 10.0f), nullptr)));
triggers.push_back(new TriggerNode("hot streak", NextAction::array(0, new NextAction("pyroblast", 25.0f), nullptr)));
triggers.push_back(new TriggerNode("combustion", NextAction::array(0, new NextAction("combustion", 50.0f), nullptr)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("dragon's breath", 70.0f), nullptr)));
// triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("dragon's breath", 70.0f), nullptr)));
}
void FireMageAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)

View File

@@ -22,6 +22,7 @@ class MageStrategyFactoryInternal : public NamedObjectContext<Strategy>
creators["pull"] = &MageStrategyFactoryInternal::pull;
creators["fire aoe"] = &MageStrategyFactoryInternal::fire_aoe;
creators["frost aoe"] = &MageStrategyFactoryInternal::frost_aoe;
creators["arcane aoe"] = &MageStrategyFactoryInternal::arcane_aoe;
creators["cure"] = &MageStrategyFactoryInternal::cure;
creators["buff"] = &MageStrategyFactoryInternal::buff;
creators["boost"] = &MageStrategyFactoryInternal::boost;
@@ -33,6 +34,7 @@ class MageStrategyFactoryInternal : public NamedObjectContext<Strategy>
static Strategy* pull(PlayerbotAI* botAI) { return new PullStrategy(botAI, "shoot"); }
static Strategy* fire_aoe(PlayerbotAI* botAI) { return new FireMageAoeStrategy(botAI); }
static Strategy* frost_aoe(PlayerbotAI* botAI) { return new FrostMageAoeStrategy(botAI); }
static Strategy* arcane_aoe(PlayerbotAI* botAI) { return new ArcaneMageAoeStrategy(botAI); }
static Strategy* cure(PlayerbotAI* botAI) { return new MageCureStrategy(botAI); }
static Strategy* buff(PlayerbotAI* botAI) { return new MageBuffStrategy(botAI); }
static Strategy* boost(PlayerbotAI* botAI) { return new MageBoostStrategy(botAI); }
@@ -95,7 +97,7 @@ class MageTriggerFactoryInternal : public NamedObjectContext<Trigger>
creators["presence of mind"] = &MageTriggerFactoryInternal::presence_of_mind;
creators["fire ward"] = &MageTriggerFactoryInternal::fire_ward;
creators["frost ward"] = &MageTriggerFactoryInternal::frost_ward;
creators["arcane blast stack"] = &MageTriggerFactoryInternal::arcane_blast_stack;
}
private:
@@ -120,6 +122,7 @@ class MageTriggerFactoryInternal : public NamedObjectContext<Trigger>
static Trigger* missile_barrage(PlayerbotAI* botAI) { return new MissileBarrageTrigger(botAI); }
static Trigger* arcane_blast(PlayerbotAI* botAI) { return new ArcaneBlastTrigger(botAI); }
static Trigger* counterspell_enemy_healer(PlayerbotAI* botAI) { return new CounterspellEnemyHealerTrigger(botAI); }
static Trigger* arcane_blast_stack(PlayerbotAI* botAI) { return new ArcaneBlastStackTrigger(botAI); }
};
class MageAiObjectContextInternal : public NamedObjectContext<Action>

View File

@@ -133,4 +133,8 @@ class PresenceOfMindTrigger : public BuffTrigger
PresenceOfMindTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "presence of mind") { }
};
class ArcaneBlastStackTrigger : public HasAuraStackTrigger {
public:
ArcaneBlastStackTrigger(PlayerbotAI* ai) : HasAuraStackTrigger(ai, "arcane blast", 3, 1) {}
};
#endif