protected override void OnTick()
{
if ( m_Index++ == m_Poison.m_Count )
{
m_Mobile.SendLocalizedMessage( 502136 ); // The poison seems to have worn off.
m_Mobile.Poison = null;
Stop();
return;
}
int damage;
if ( m_LastDamage != 0 && Utility.RandomBool() )
{
damage = m_LastDamage;
}
else
{
damage = 1 + (int)(m_Mobile.Hits * m_Poison.m_Scalar);
if ( damage < m_Poison.m_Minimum )
damage = m_Poison.m_Minimum;
else if ( damage > m_Poison.m_Maximum )
damage = m_Poison.m_Maximum;
m_LastDamage = damage;
}
if ( m_From != null )
m_From.DoHarmful( m_Mobile, true );
m_From.Damage(damage, m_Mobile);
if ( 0.60 <= Utility.RandomDouble() ) // OSI: randomly revealed between first and third damage tick, guessing 60% chance
m_Mobile.RevealingAction();
if ( (m_Index % m_Poison.m_MessageInterval) == 0 )
m_Mobile.OnPoisoned( m_From, m_Poison, m_Poison );
}
}