Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
47
Projects/Scripts/Items/Traps/GiantSpikeTrap.cs
Normal file
47
Projects/Scripts/Items/Traps/GiantSpikeTrap.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GiantSpikeTrap : BaseTrap
|
||||
{
|
||||
[Constructible]
|
||||
public GiantSpikeTrap() : base(1)
|
||||
{
|
||||
}
|
||||
|
||||
public GiantSpikeTrap(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool PassivelyTriggered => true;
|
||||
public override TimeSpan PassiveTriggerDelay => TimeSpan.Zero;
|
||||
public override int PassiveTriggerRange => 3;
|
||||
public override TimeSpan ResetDelay => TimeSpan.FromSeconds(0.0);
|
||||
|
||||
public override void OnTrigger(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel > AccessLevel.Player)
|
||||
return;
|
||||
|
||||
Effects.SendLocationEffect(Location, Map, 0x1D99, 48, 2, GetEffectHue(), 0);
|
||||
|
||||
if (from.Alive && CheckRange(from.Location, 0))
|
||||
SpellHelper.Damage(TimeSpan.FromTicks(1), from, from, Utility.Dice(10, 7, 0));
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue