// Acid Cloud
if (!bBuffsOnly && !bAvoidanceEmergency && hashPowerHotbarAbilities.Contains(SNOPower.Witchdoctor_AcidCloud) && !playerStatus.bIsIncapacitated &&
// Stop from spamming same skill twice in a row
powerLastSnoPowerUsed != SNOPower.Witchdoctor_AcidCloud &&
// 1+ elites within range, or 3+ greys within range, or current primary target is an elite itself
(iElitesWithinRange[RANGE_30] > 0 || iAnythingWithinRange[RANGE_30] >= 2 || targetCurrent.bThisEliteRareUnique || targetCurrent.bThisTreasureGoblin) &&
GilesUseTimer(SNOPower.Witchdoctor_AcidCloud) &&
playerStatus.dCurrentEnergy >= 172 && playerStatus.dCurrentEnergyPct >= 0.5 && PowerManager.CanCast(SNOPower.Witchdoctor_AcidCloud))
{
// For distant monsters, try to target a little bit in-front of them (as they run towards us), if it's not a treasure goblin
float fExtraDistance = 0f;
if (targetCurrent.fCentreDistance > 17f && !targetCurrent.bThisTreasureGoblin)
{
fExtraDistance = targetCurrent.fCentreDistance - 17f;
if (fExtraDistance > 5f)
fExtraDistance = 5f;
if (targetCurrent.fCentreDistance - fExtraDistance < 15f)
fExtraDistance -= 2;
}
Vector3 vNewTarget = MathEx.CalculatePointFrom(targetCurrent.vThisPosition, playerStatus.vCurrentPosition, targetCurrent.fCentreDistance - fExtraDistance);
return new GilesPower(SNOPower.Witchdoctor_AcidCloud, 30f, vNewTarget, iCurrentWorldID, -1, USE_COMBAT_ONLY, USE_SLOWLY);
}