Skip to content

Commit

Permalink
NPCBots: Allow secondary, non-tanking Warrior bots to use Sunder Armor
Browse files Browse the repository at this point in the history
  • Loading branch information
trickerer committed Mar 14, 2024
1 parent e991150 commit 8a264d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/server/game/AI/NpcBots/bot_warrior_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,10 @@ class warrior_bot : public CreatureScript
return;
}
//SUNDER ARMOR
if (IsSpellReady(SUNDER_ARMOR_1, diff) && can_do_normal && IsTank() && Rand() < 55 && mytar->GetHealth() > me->GetMaxHealth() &&
dist < 5 && (!HasRole(BOT_ROLE_DPS) || !GetSpell(DEVASTATE_1)) && rage >= rcost(SUNDER_ARMOR_1))
if (IsSpellReady(SUNDER_ARMOR_1, diff) && can_do_normal && dist < 5 && Rand() < 45 &&
(IsTank() ? (mytar->GetHealth() > me->GetMaxHealth()) : (Rand() < 25 && mytar->GetHealth() > me->GetMaxHealth() * 2)) &&
(!HasRole(BOT_ROLE_DPS) || !CanBlock() || !GetSpell(DEVASTATE_1)) &&
(IsTank() || master->GetBotMgr()->HasBotWithSpec(BOT_SPEC_WARRIOR_PROTECTION, false)) && rage >= rcost(SUNDER_ARMOR_1))
{
AuraEffect const* sunder = mytar->GetAuraEffect(SUNDER_ARMOR_DEBUFF, 0);
if ((!sunder || sunder->GetBase()->GetStackAmount() < 5 || sunder->GetBase()->GetDuration() < 20000) &&
Expand Down

0 comments on commit 8a264d0

Please sign in to comment.