public static async Task <bool> SaveMe() { // cache number of active enemies in combat and just use that for use/logging int enemiesInMelee = U.activeEnemies(Me.Location, 8f).Count(); //if (await I.UseItem(I.FindBestHealingPotion(), Me.HealthPercent < HS.HavocHealthPotionHp)) //{ // return true; //} #region Blur if (await S.Buff(SB.Blur, C.DefensiveColor, HS.HavocBlurUnits > 0 && (enemiesInMelee >= HS.HavocBlurUnits), string.Format($"Units:{enemiesInMelee}>={HS.HavocBlurUnits}"))) { return(true); } if (await S.Buff(SB.Blur, C.DefensiveColor, HS.HavocBlurHp > 0 && Me.HealthPercent < HS.HavocBlurHp, string.Format($"HP:{Me.HealthPercent.ToString("F0")}<{HS.HavocBlurHp}"))) { return(true); } #endregion #region Darkness if (await S.Buff(SB.Darkness, C.DefensiveColor, HS.HavocDarknessUnits > 0 && (enemiesInMelee >= HS.HavocDarknessUnits), string.Format($"Units:{enemiesInMelee}>={HS.HavocDarknessUnits}"))) { return(true); } if (await S.Buff(SB.Darkness, C.DefensiveColor, HS.HavocDarknessHp > 0 && Me.HealthPercent < HS.HavocDarknessHp, string.Format($"HP:{Me.HealthPercent.ToString("F0")}<{HS.HavocDarknessHp}"))) { return(true); } #endregion #region Chaos Nova if (await S.Buff(SB.ChaosNova, C.DefensiveColor, HS.HavocChaosNovaUnits > 0 && (enemiesInMelee >= HS.HavocChaosNovaUnits), string.Format($"Units:{enemiesInMelee}>={HS.HavocChaosNovaUnits}"))) { return(true); } if (await S.Buff(SB.ChaosNova, C.DefensiveColor, HS.HavocChaosNovaHp > 0 && Me.HealthPercent < HS.HavocChaosNovaHp, string.Format($"HP:{Me.HealthPercent.ToString("F0")}<{HS.HavocChaosNovaHp}"))) { return(true); } #endregion return(false); }