Reorganizes Project (#41)

This commit is contained in:
Kamron Batman 2019-08-02 18:13:40 -07:00 • committed by GitHub
parent 08bf44af9a
commit 3614a66aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3499 changed files with 79 additions and 55 deletions

View file

@ -0,0 +1,61 @@
using System;
using Server.Engines.ConPVP;
namespace Server.Items
{
public abstract class BaseSpear : BaseMeleeWeapon
{
public BaseSpear(int itemID) : base(itemID)
{
}
public BaseSpear(Serial serial) : base(serial)
{
}
public override int DefHitSound => 0x23C;
public override int DefMissSound => 0x238;
public override SkillName DefSkill => SkillName.Fencing;
public override WeaponType DefType => WeaponType.Piercing;
public override WeaponAnimation DefAnimation => WeaponAnimation.Pierce2H;
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();
}
public override void OnHit(Mobile attacker, Mobile defender, double damageBonus = 1)
{
base.OnHit(attacker, defender, damageBonus);
if (!Core.AOS && Layer == Layer.TwoHanded &&
attacker.Skills.Anatomy.Value / 400.0 >= Utility.RandomDouble() &&
DuelContext.AllowSpecialAbility(attacker, "Paralyzing Blow", false))
{
defender.SendMessage("You receive a paralyzing blow!"); // Is this not localized?
defender.Freeze(TimeSpan.FromSeconds(2.0));
attacker.SendMessage("You deliver a paralyzing blow!"); // Is this not localized?
attacker.PlaySound(0x11C);
}
if (!Core.AOS && Poison != null && PoisonCharges > 0)
{
--PoisonCharges;
if (Utility.RandomDouble() >= 0.5) // 50% chance to poison
defender.ApplyPoison(attacker, Poison);
}
}
}
}