Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
189
Scripts/Items/Tools/SmithHammer.cs
Normal file
189
Scripts/Items/Tools/SmithHammer.cs
Normal file
@@ -0,0 +1,189 @@
|
||||
using System;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute(0x13E3, 0x13E4)]
|
||||
public class SmithHammer : BaseTool
|
||||
{
|
||||
[Constructable]
|
||||
public SmithHammer()
|
||||
: base(0x13E3)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SmithHammer(int uses)
|
||||
: base(uses, 0x13E3)
|
||||
{
|
||||
this.Weight = 8.0;
|
||||
this.Layer = Layer.OneHanded;
|
||||
}
|
||||
|
||||
public SmithHammer(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override CraftSystem CraftSystem
|
||||
{
|
||||
get
|
||||
{
|
||||
return DefBlacksmithy.CraftSystem;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class SmithyHammer : BaseBashing, ITool
|
||||
{
|
||||
[Constructable]
|
||||
public SmithyHammer()
|
||||
: base(0x13E3)
|
||||
{
|
||||
Weight = 8.0;
|
||||
ShowUsesRemaining = true;
|
||||
}
|
||||
|
||||
#region ITool Members
|
||||
public CraftSystem CraftSystem { get { return DefBlacksmithy.CraftSystem; } }
|
||||
public bool BreakOnDepletion { get { return true; } }
|
||||
|
||||
public bool CheckAccessible(Mobile m, ref int num)
|
||||
{
|
||||
if (!IsChildOf(m) && Parent != m)
|
||||
{
|
||||
num = 1044263;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public SmithyHammer(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override WeaponAbility PrimaryAbility
|
||||
{
|
||||
get
|
||||
{
|
||||
return WeaponAbility.CrushingBlow;
|
||||
}
|
||||
}
|
||||
public override WeaponAbility SecondaryAbility
|
||||
{
|
||||
get
|
||||
{
|
||||
return WeaponAbility.ParalyzingBlow;
|
||||
}
|
||||
}
|
||||
public override int AosStrengthReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
public override int AosMinDamage
|
||||
{
|
||||
get
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
}
|
||||
public override int AosMaxDamage
|
||||
{
|
||||
get
|
||||
{
|
||||
return 17;
|
||||
}
|
||||
}
|
||||
public override int AosSpeed
|
||||
{
|
||||
get
|
||||
{
|
||||
return 40;
|
||||
}
|
||||
}
|
||||
public override float MlSpeed
|
||||
{
|
||||
get
|
||||
{
|
||||
return 3.25f;
|
||||
}
|
||||
}
|
||||
public override int OldStrengthReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
public override int InitMinHits
|
||||
{
|
||||
get
|
||||
{
|
||||
return 31;
|
||||
}
|
||||
}
|
||||
public override int InitMaxHits
|
||||
{
|
||||
get
|
||||
{
|
||||
return 70;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (this.CraftSystem != null && (IsChildOf(from.Backpack) || Parent == from))
|
||||
{
|
||||
int num = this.CraftSystem.CanCraft(from, this, null);
|
||||
|
||||
if (num > 0 && (num != 1044267 || !Core.SE)) // Blacksmithing shows the gump regardless of proximity of an anvil and forge after SE
|
||||
{
|
||||
from.SendLocalizedMessage(num);
|
||||
}
|
||||
else
|
||||
{
|
||||
CraftContext context = this.CraftSystem.GetContext(from);
|
||||
|
||||
from.SendGump(new CraftGump(from, this.CraftSystem, this, null));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user