public static bool CanUseCallOfTheAncients
{
get
{
/* CotA should be used when the following conditions are met:
* If ignoring elites, when 3 monsters in 25 yards or 10 monsters in 50 yards are present, OR
* If using on hard elites only, when an elite with the required affix is present, OR
* If normal mode, when any elite is within 20 yards, OR
* If we have low health (use potion health)
* And not on the Heart of sin
*/
bool anyTime = (Settings.Combat.Barbarian.WOTBMode == BarbarianWOTBMode.WhenReady && !Player.IsInTown);
bool hasBuff = GetHasBuff(SNOPower.Barbarian_CallOfTheAncients);
bool hasInfiniteCasting = GetHasBuff(SNOPower.Pages_Buff_Infinite_Casting);
bool canCast = CanCast(SNOPower.Barbarian_CallOfTheAncients, CanCastFlags.NoTimer);
bool emergencyHealth = Player.CurrentHealthPct <= V.F("Barbarian.WOTB.EmergencyHealth");
bool result =
(!UseOOCBuff || anyTime) &&
//Player.PrimaryResource >= V.I("Barbarian.WOTB.MinFury") && // WOTB is "free" !
// Don't still have the buff
!hasBuff &&
canCast &&
(WOTBGoblins || WOTBIgnoreElites || WOTBElitesPresent || anyTime || emergencyHealth || hasInfiniteCasting);
return result;
}
}