/// <summary> /// Pick a target to hurl into the air. /// </summary> /// <returns>Whether or not a target was picked.</returns> private bool PickThrowTarget() { GameDragon dragon = Body as GameDragon; if (dragon == null) { return(false); } ArrayList inRangeLiving = new ArrayList(); foreach (GamePlayer player in dragon.GetPlayersInRadius((ushort)dragon.AttackRange)) { if (player.IsAlive && player.EffectList.GetOfType <NecromancerShadeEffect>() == null) { inRangeLiving.Add(player); } } foreach (GameNPC npc in dragon.GetNPCsInRadius((ushort)dragon.AttackRange)) { if (npc.IsAlive && npc.Brain != null && npc.Brain is IControlledBrain) { inRangeLiving.Add(npc); } } if (inRangeLiving.Count > 0) { return(dragon.CheckThrow((GameLiving)inRangeLiving[Util.Random(1, inRangeLiving.Count) - 1])); } return(false); }