/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\items\special\ToxicBrambleTrap.cs
Lines of code: 43
***********************************************************/


using System;
using Server;
using Server.Network;
using Server.Regions;
using Server.Mobiles;
using System.Collections;
using Server.Items;
using Server.Targeting;

namespace Server.Items
{
	public class ToxicBrambleTrap : BaseTrap
	{
		[Constructable]
		public ToxicBrambleTrap() : base(Utility.RandomList(12320, 12321, 12322, 12323, 12324))
		{
		}

		public override bool PassivelyTriggered{ get{ return true; } }
		public override TimeSpan PassiveTriggerDelay{ get{ return TimeSpan.Zero; } }
		public override int PassiveTriggerRange{ get{ return 0; } }
		public override TimeSpan ResetDelay{ get{ return TimeSpan.Zero; } }

		public override void OnTrigger( Mobile from )
		{
		
		if (!HarmItem.ShouldHarm(from))return;

			from.SendMessage("You scrape yourself against the brambles and become infected");
			from.PlaySound( 89 );
			Spells.SpellHelper.Damage( TimeSpan.FromTicks( 1 ), from, null, Utility.RandomMinMax( 10, 35 ));
			from.ApplyPoison( from, Poison.Lethal );
		}

		public ToxicBrambleTrap( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}
	}
}