public static void SpillAcid(Mobile from, bool yamandon)
{
ArrayList targets = GetAllAttackers(from, 2);
if (yamandon)
{
targets.Add(from);
}
Effects.SendLocationParticles(EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration), 0x3728, 8, 20, 76, 3, 5042, 0);
if (targets.Count == 0)
{
return;
}
foreach (Mobile m in targets)
{
m.FixedParticles(0x374A, 10, 15, 5021, EffectLayer.Waist);
m.PlaySound(0x474);
if (yamandon)
{
m.ApplyPoison(from, Poison.GetPoison(4));
}
else
{
m.ApplyPoison(from, Poison.GetPoison(Utility.Random(5) - (from.GetDistanceToSqrt(m) > 1 ? 1 : 0)));
}
m.SendLocalizedMessage(1070820); // The creature spills a pool of acidic slime!
}
}