#region Venom Spit
private DateTime m_NextVenomSpit;
public void BeginVenomSpit()
{
PlayerMobile m = Combatant as PlayerMobile;
// Mobile m = Combatant;
if (m == null || m.Deleted || !m.Alive || !Alive || m_NextVenomSpit > DateTime.Now || !CanBeHarmful(m))
return;
PlaySound(0x133);
MovingEffect(m, 0x36E4, 1, 0, false, false, 2654, 0);
TimeSpan delay = TimeSpan.FromSeconds(GetDistanceToSqrt(m) / 5.0);
Timer.DelayCall<Mobile>(delay, EndVenomSpit, m);
m_NextVenomSpit = DateTime.Now + TimeSpan.FromSeconds(5);
}
public void EndVenomSpit(Mobile m)
{
if (m == null || m.Deleted || !m.Alive || !Alive)
return;
if (0.5 >= Utility.RandomDouble())
{
m.ApplyPoison(this, Poison.Lethal);
}
else
m.ApplyPoison(this, Poison.Deadly);
AOS.Damage(m, Utility.RandomMinMax(10, 15), 0, 0, 0, 100, 0);
m.Stam -= Utility.Random(35, 20);
m.Mana -= Utility.Random(35, 20);
m.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You have just been hit with snake venom; the acidic fluid burns your skin!");
}
#endregion
public override void OnGotMeleeAttack(Mobile attacker)
{
if (attacker.Weapon is BaseRanged)
BeginVenomSpit();
base.OnGotMeleeAttack(attacker);
}