Miscs for spell casting

This commit is contained in:
Yunfan Li
2024-01-30 14:02:50 +08:00
parent 32eec3ebf1
commit 1a11ec0717
5 changed files with 17 additions and 10 deletions

View File

@@ -460,8 +460,14 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
nonCombatEngine->addStrategies("dps assist", "cure", nullptr); nonCombatEngine->addStrategies("dps assist", "cure", nullptr);
break; break;
case CLASS_PALADIN: case CLASS_PALADIN:
if (tab == 1) if (tab == 1) {
nonCombatEngine->addStrategies("bthreat", "tank assist", "bstats", "barmor", nullptr); nonCombatEngine->addStrategies("bthreat", "tank assist", "barmor", nullptr);
if (player->GetLevel() >= 20) {
nonCombatEngine->addStrategy("bstats");
} else {
nonCombatEngine->addStrategy("bdps");
}
}
else if (tab == 0) else if (tab == 0)
nonCombatEngine->addStrategies("dps assist", "bmana", "bcast", nullptr); nonCombatEngine->addStrategies("dps assist", "bmana", "bcast", nullptr);
else else

View File

@@ -61,7 +61,7 @@ class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
{ {
return new ActionNode ("crusader strike", return new ActionNode ("crusader strike",
/*P*/ nullptr, /*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("melee"), nullptr), /*A*/ nullptr,
/*C*/ nullptr); /*C*/ nullptr);
} }
ACTION_NODE_A(repentance, "repentance", "hammer of justice"); ACTION_NODE_A(repentance, "repentance", "hammer of justice");

View File

@@ -40,7 +40,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("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)));
} }
void PaladinCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers) void PaladinCcStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)

View File

@@ -40,7 +40,6 @@ NextAction** CasterShamanStrategy::getDefaultActions()
{ {
return NextAction::array(0, return NextAction::array(0,
new NextAction("lava burst", ACTION_DEFAULT + 0.2f), new NextAction("lava burst", ACTION_DEFAULT + 0.2f),
new NextAction("thunderstorm", ACTION_DEFAULT + 0.1f),
new NextAction("lightning bolt", ACTION_DEFAULT), new NextAction("lightning bolt", ACTION_DEFAULT),
NULL); NULL);
} }
@@ -57,9 +56,11 @@ void CasterShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode( triggers.push_back(new TriggerNode(
"no fire totem", "no fire totem",
NextAction::array(0, NextAction::array(0,
// new NextAction("fire elemental totem", 16.0f),
new NextAction("totem of wrath", 15.0f), NULL))); new NextAction("totem of wrath", 15.0f), NULL)));
triggers.push_back(new TriggerNode("enemy is close", NextAction::array(0, new NextAction("thunderstorm", ACTION_HIGH + 1), nullptr)));
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("thunderstorm", ACTION_HIGH + 1), nullptr)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr))); triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
} }

View File

@@ -13,7 +13,7 @@ class TankWarriorStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
creators["charge"] = &charge; creators["charge"] = &charge;
creators["sunder armor"] = &sunder_armor; creators["sunder armor"] = &sunder_armor;
creators["commanding shout"] = &commanding_shout; creators["commanding shout"] = &commanding_shout;
creators["shield slam"] = &shield_slam; // creators["shield slam"] = &shield_slam;
creators["devastate"] = &devastate; creators["devastate"] = &devastate;
creators["last stand"] = &last_stand; creators["last stand"] = &last_stand;
creators["heroic throw on snare target"] = &heroic_throw_on_snare_target; creators["heroic throw on snare target"] = &heroic_throw_on_snare_target;
@@ -27,7 +27,7 @@ class TankWarriorStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
ACTION_NODE_A(charge, "charge", "reach melee"); ACTION_NODE_A(charge, "charge", "reach melee");
ACTION_NODE_A(sunder_armor, "sunder armor", "melee"); ACTION_NODE_A(sunder_armor, "sunder armor", "melee");
ACTION_NODE_A(commanding_shout, "commanding shout", "battle shout"); ACTION_NODE_A(commanding_shout, "commanding shout", "battle shout");
ACTION_NODE_A(shield_slam, "shield slam", "heroic strike"); // ACTION_NODE_A(shield_slam, "shield slam", "heroic strike");
ACTION_NODE_A(devastate, "devastate", "sunder armor"); ACTION_NODE_A(devastate, "devastate", "sunder armor");
ACTION_NODE_A(last_stand, "last stand", "intimidating shout"); ACTION_NODE_A(last_stand, "last stand", "intimidating shout");
ACTION_NODE_A(heroic_throw_on_snare_target, "heroic throw on snare target", "taunt on snare target"); ACTION_NODE_A(heroic_throw_on_snare_target, "heroic throw on snare target", "taunt on snare target");
@@ -36,7 +36,7 @@ class TankWarriorStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
{ {
return new ActionNode("taunt", return new ActionNode("taunt",
/*P*/ nullptr, /*P*/ nullptr,
/*A*/ nullptr, /*A*/ NextAction::array(0, new NextAction("shield slam"), nullptr),
/*C*/ nullptr); /*C*/ nullptr);
} }
}; };
@@ -73,7 +73,7 @@ void TankWarriorStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
triggers.push_back(new TriggerNode("shield block", NextAction::array(0, new NextAction("shield block", ACTION_INTERRUPT + 1), nullptr))); triggers.push_back(new TriggerNode("shield block", NextAction::array(0, new NextAction("shield block", ACTION_INTERRUPT + 1), nullptr)));
triggers.push_back(new TriggerNode("revenge", NextAction::array(0, new NextAction("revenge", ACTION_HIGH + 2), nullptr))); triggers.push_back(new TriggerNode("revenge", NextAction::array(0, new NextAction("revenge", ACTION_HIGH + 2), nullptr)));
triggers.push_back(new TriggerNode("disarm", NextAction::array(0, new NextAction("disarm", ACTION_HIGH + 1), nullptr))); triggers.push_back(new TriggerNode("disarm", NextAction::array(0, new NextAction("disarm", ACTION_HIGH + 1), nullptr)));
triggers.push_back(new TriggerNode("lose aggro", NextAction::array(0, new NextAction("heroic throw taunt", ACTION_INTERRUPT + 1), nullptr))); triggers.push_back(new TriggerNode("lose aggro", NextAction::array(0, new NextAction("taunt", ACTION_INTERRUPT + 1), nullptr)));
triggers.push_back(new TriggerNode("taunt on snare target", NextAction::array(0, new NextAction("heroic throw on snare target", ACTION_INTERRUPT), nullptr))); triggers.push_back(new TriggerNode("taunt on snare target", NextAction::array(0, new NextAction("heroic throw on snare target", ACTION_INTERRUPT), nullptr)));
triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("shield wall", ACTION_MEDIUM_HEAL), nullptr))); triggers.push_back(new TriggerNode("low health", NextAction::array(0, new NextAction("shield wall", ACTION_MEDIUM_HEAL), nullptr)));
triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("last stand", ACTION_EMERGENCY + 3), nullptr))); triggers.push_back(new TriggerNode("critical health", NextAction::array(0, new NextAction("last stand", ACTION_EMERGENCY + 3), nullptr)));