Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
32
Projects/Scripts/Items/Weapons/Ranged/AssassinsShortbow.cs
Normal file
32
Projects/Scripts/Items/Weapons/Ranged/AssassinsShortbow.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class AssassinsShortbow : MagicalShortbow
|
||||
{
|
||||
[Constructible]
|
||||
public AssassinsShortbow()
|
||||
{
|
||||
Attributes.AttackChance = 3;
|
||||
Attributes.WeaponDamage = 4;
|
||||
}
|
||||
|
||||
public AssassinsShortbow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1073512; // assassin's shortbow
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Projects/Scripts/Items/Weapons/Ranged/BarbedLongbow.cs
Normal file
31
Projects/Scripts/Items/Weapons/Ranged/BarbedLongbow.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class BarbedLongbow : ElvenCompositeLongbow
|
||||
{
|
||||
[Constructible]
|
||||
public BarbedLongbow()
|
||||
{
|
||||
Attributes.ReflectPhysical = 12;
|
||||
}
|
||||
|
||||
public BarbedLongbow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1073505; // barbed longbow
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
238
Projects/Scripts/Items/Weapons/Ranged/BaseRanged.cs
Normal file
238
Projects/Scripts/Items/Weapons/Ranged/BaseRanged.cs
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseRanged : BaseMeleeWeapon
|
||||
{
|
||||
private bool m_Balanced;
|
||||
|
||||
private Timer m_RecoveryTimer; // so we don't start too many timers
|
||||
private int m_Velocity;
|
||||
|
||||
public BaseRanged(int itemID) : base(itemID)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseRanged(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public abstract int EffectID{ get; }
|
||||
public abstract Type AmmoType{ get; }
|
||||
public abstract Item Ammo{ get; }
|
||||
|
||||
public override int DefHitSound => 0x234;
|
||||
public override int DefMissSound => 0x238;
|
||||
|
||||
public override SkillName DefSkill => SkillName.Archery;
|
||||
public override WeaponType DefType => WeaponType.Ranged;
|
||||
public override WeaponAnimation DefAnimation => WeaponAnimation.ShootXBow;
|
||||
|
||||
public override SkillName AccuracySkill => SkillName.Archery;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool Balanced
|
||||
{
|
||||
get => m_Balanced;
|
||||
set
|
||||
{
|
||||
m_Balanced = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Velocity
|
||||
{
|
||||
get => m_Velocity;
|
||||
set
|
||||
{
|
||||
m_Velocity = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override TimeSpan OnSwing(Mobile attacker, Mobile defender)
|
||||
{
|
||||
// WeaponAbility a = WeaponAbility.GetCurrentAbility( attacker );
|
||||
|
||||
// Make sure we've been standing still for .25/.5/1 second depending on Era
|
||||
if (Core.TickCount - attacker.LastMoveTime >= (Core.SE ? 250 : Core.AOS ? 500 : 1000) ||
|
||||
Core.AOS && WeaponAbility.GetCurrentAbility(attacker) is MovingShot)
|
||||
{
|
||||
bool canSwing = true;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
canSwing = !attacker.Paralyzed && !attacker.Frozen;
|
||||
|
||||
if (canSwing)
|
||||
canSwing = !(attacker.Spell is Spell sp) || !sp.IsCasting || !sp.BlocksMovement;
|
||||
}
|
||||
|
||||
#region Dueling
|
||||
if ((attacker as PlayerMobile)?.DuelContext?.CheckItemEquip(attacker, this) == false)
|
||||
canSwing = false;
|
||||
#endregion
|
||||
|
||||
if (canSwing && attacker.HarmfulCheck(defender))
|
||||
{
|
||||
attacker.DisruptiveAction();
|
||||
attacker.Send(new Swing(0, attacker, defender));
|
||||
|
||||
if (OnFired(attacker, defender))
|
||||
{
|
||||
if (CheckHit(attacker, defender))
|
||||
OnHit(attacker, defender);
|
||||
else
|
||||
OnMiss(attacker, defender);
|
||||
}
|
||||
}
|
||||
|
||||
attacker.RevealingAction();
|
||||
|
||||
return GetDelay(attacker);
|
||||
}
|
||||
|
||||
attacker.RevealingAction();
|
||||
|
||||
return TimeSpan.FromSeconds(0.25);
|
||||
}
|
||||
|
||||
public override void OnHit(Mobile attacker, Mobile defender, double damageBonus = 1)
|
||||
{
|
||||
if (attacker.Player && !defender.Player && (defender.Body.IsAnimal || defender.Body.IsMonster) &&
|
||||
0.4 >= Utility.RandomDouble())
|
||||
defender.AddToBackpack(Ammo);
|
||||
|
||||
if (Core.ML && m_Velocity > 0)
|
||||
{
|
||||
int bonus = (int)attacker.GetDistanceToSqrt(defender);
|
||||
|
||||
if (bonus > 0 && m_Velocity > Utility.Random(100))
|
||||
{
|
||||
AOS.Damage(defender, attacker, bonus * 3, 100, 0, 0, 0, 0);
|
||||
|
||||
if (attacker.Player)
|
||||
attacker.SendLocalizedMessage(1072794); // Your arrow hits its mark with velocity!
|
||||
|
||||
if (defender.Player)
|
||||
defender.SendLocalizedMessage(1072795); // You have been hit by an arrow with velocity!
|
||||
}
|
||||
}
|
||||
|
||||
base.OnHit(attacker, defender, damageBonus);
|
||||
}
|
||||
|
||||
public override void OnMiss(Mobile attacker, Mobile defender)
|
||||
{
|
||||
if (attacker.Player && 0.4 >= Utility.RandomDouble())
|
||||
{
|
||||
if (Core.SE)
|
||||
{
|
||||
if (attacker is PlayerMobile pm)
|
||||
{
|
||||
Type ammo = AmmoType;
|
||||
|
||||
if (pm.RecoverableAmmo.ContainsKey(ammo))
|
||||
pm.RecoverableAmmo[ammo]++;
|
||||
else
|
||||
pm.RecoverableAmmo.Add(ammo, 1);
|
||||
|
||||
if (!pm.Warmode)
|
||||
{
|
||||
if (m_RecoveryTimer == null)
|
||||
m_RecoveryTimer = Timer.DelayCall(TimeSpan.FromSeconds(10), pm.RecoverAmmo);
|
||||
|
||||
if (!m_RecoveryTimer.Running)
|
||||
m_RecoveryTimer.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Ammo.MoveToWorld(
|
||||
new Point3D(defender.X + Utility.RandomMinMax(-1, 1), defender.Y + Utility.RandomMinMax(-1, 1),
|
||||
defender.Z), defender.Map);
|
||||
}
|
||||
}
|
||||
|
||||
base.OnMiss(attacker, defender);
|
||||
}
|
||||
|
||||
public virtual bool OnFired(Mobile attacker, Mobile defender)
|
||||
{
|
||||
if (attacker.Player)
|
||||
{
|
||||
BaseQuiver quiver = attacker.FindItemOnLayer(Layer.Cloak) as BaseQuiver;
|
||||
Container pack = attacker.Backpack;
|
||||
|
||||
if (quiver == null || Utility.Random(100) >= quiver.LowerAmmoCost)
|
||||
{
|
||||
// consume ammo
|
||||
if (quiver?.ConsumeTotal(AmmoType) == true)
|
||||
quiver.InvalidateWeight();
|
||||
else if (pack?.ConsumeTotal(AmmoType) != true)
|
||||
return false;
|
||||
}
|
||||
else if (quiver.FindItemByType(AmmoType) == null && pack?.FindItemByType(AmmoType) == null)
|
||||
{
|
||||
// lower ammo cost should not work when we have no ammo at all
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
attacker.MovingEffect(defender, EffectID, 18, 1, false, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(3); // version
|
||||
|
||||
writer.Write(m_Balanced);
|
||||
writer.Write(m_Velocity);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 3:
|
||||
{
|
||||
m_Balanced = reader.ReadBool();
|
||||
m_Velocity = reader.ReadInt();
|
||||
|
||||
goto case 2;
|
||||
}
|
||||
case 2:
|
||||
case 1:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
/*m_EffectID =*/
|
||||
reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (version < 2)
|
||||
{
|
||||
WeaponAttributes.MageWeapon = 0;
|
||||
WeaponAttributes.UseBestSkill = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
61
Projects/Scripts/Items/Weapons/Ranged/Bow.cs
Normal file
61
Projects/Scripts/Items/Weapons/Ranged/Bow.cs
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flippable(0x13B2, 0x13B1)]
|
||||
public class Bow : BaseRanged
|
||||
{
|
||||
[Constructible]
|
||||
public Bow() : base(0x13B2)
|
||||
{
|
||||
Weight = 6.0;
|
||||
Layer = Layer.TwoHanded;
|
||||
}
|
||||
|
||||
public Bow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int EffectID => 0xF42;
|
||||
public override Type AmmoType => typeof(Arrow);
|
||||
public override Item Ammo => new Arrow();
|
||||
|
||||
public override WeaponAbility PrimaryAbility => WeaponAbility.ParalyzingBlow;
|
||||
public override WeaponAbility SecondaryAbility => WeaponAbility.MortalStrike;
|
||||
|
||||
public override int AosStrengthReq => 30;
|
||||
public override int AosMinDamage => Core.ML ? 15 : 16;
|
||||
public override int AosMaxDamage => Core.ML ? 19 : 18;
|
||||
public override int AosSpeed => 25;
|
||||
public override float MlSpeed => 4.25f;
|
||||
|
||||
public override int OldStrengthReq => 20;
|
||||
public override int OldMinDamage => 9;
|
||||
public override int OldMaxDamage => 41;
|
||||
public override int OldSpeed => 20;
|
||||
|
||||
public override int DefMaxRange => 10;
|
||||
|
||||
public override int InitMinHits => 31;
|
||||
public override int InitMaxHits => 60;
|
||||
|
||||
public override WeaponAnimation DefAnimation => WeaponAnimation.ShootBow;
|
||||
|
||||
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();
|
||||
|
||||
if (Weight == 7.0)
|
||||
Weight = 6.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
57
Projects/Scripts/Items/Weapons/Ranged/CompositeBow.cs
Normal file
57
Projects/Scripts/Items/Weapons/Ranged/CompositeBow.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flippable(0x26C2, 0x26CC)]
|
||||
public class CompositeBow : BaseRanged
|
||||
{
|
||||
[Constructible]
|
||||
public CompositeBow() : base(0x26C2)
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public CompositeBow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int EffectID => 0xF42;
|
||||
public override Type AmmoType => typeof(Arrow);
|
||||
public override Item Ammo => new Arrow();
|
||||
|
||||
public override WeaponAbility PrimaryAbility => WeaponAbility.ArmorIgnore;
|
||||
public override WeaponAbility SecondaryAbility => WeaponAbility.MovingShot;
|
||||
|
||||
public override int AosStrengthReq => 45;
|
||||
public override int AosMinDamage => Core.ML ? 13 : 15;
|
||||
public override int AosMaxDamage => 17;
|
||||
public override int AosSpeed => 25;
|
||||
public override float MlSpeed => 4.00f;
|
||||
|
||||
public override int OldStrengthReq => 45;
|
||||
public override int OldMinDamage => 15;
|
||||
public override int OldMaxDamage => 17;
|
||||
public override int OldSpeed => 25;
|
||||
|
||||
public override int DefMaxRange => 10;
|
||||
|
||||
public override int InitMinHits => 31;
|
||||
public override int InitMaxHits => 70;
|
||||
|
||||
public override WeaponAnimation DefAnimation => WeaponAnimation.ShootBow;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Projects/Scripts/Items/Weapons/Ranged/Crossbow.cs
Normal file
56
Projects/Scripts/Items/Weapons/Ranged/Crossbow.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flippable(0xF50, 0xF4F)]
|
||||
public class Crossbow : BaseRanged
|
||||
{
|
||||
[Constructible]
|
||||
public Crossbow() : base(0xF50)
|
||||
{
|
||||
Weight = 7.0;
|
||||
Layer = Layer.TwoHanded;
|
||||
}
|
||||
|
||||
public Crossbow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int EffectID => 0x1BFE;
|
||||
public override Type AmmoType => typeof(Bolt);
|
||||
public override Item Ammo => new Bolt();
|
||||
|
||||
public override WeaponAbility PrimaryAbility => WeaponAbility.ConcussionBlow;
|
||||
public override WeaponAbility SecondaryAbility => WeaponAbility.MortalStrike;
|
||||
|
||||
public override int AosStrengthReq => 35;
|
||||
public override int AosMinDamage => 18;
|
||||
public override int AosMaxDamage => Core.ML ? 22 : 20;
|
||||
public override int AosSpeed => 24;
|
||||
public override float MlSpeed => 4.50f;
|
||||
|
||||
public override int OldStrengthReq => 30;
|
||||
public override int OldMinDamage => 8;
|
||||
public override int OldMaxDamage => 43;
|
||||
public override int OldSpeed => 18;
|
||||
|
||||
public override int DefMaxRange => 8;
|
||||
|
||||
public override int InitMinHits => 31;
|
||||
public override int InitMaxHits => 80;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
32
Projects/Scripts/Items/Weapons/Ranged/FrozenLongbow.cs
Normal file
32
Projects/Scripts/Items/Weapons/Ranged/FrozenLongbow.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class FrozenLongbow : ElvenCompositeLongbow
|
||||
{
|
||||
[Constructible]
|
||||
public FrozenLongbow()
|
||||
{
|
||||
Attributes.WeaponSpeed = -5;
|
||||
Attributes.DefendChance = 10;
|
||||
}
|
||||
|
||||
public FrozenLongbow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1073507; // frozen longbow
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Projects/Scripts/Items/Weapons/Ranged/HeavyCrossbow.cs
Normal file
56
Projects/Scripts/Items/Weapons/Ranged/HeavyCrossbow.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flippable(0x13FD, 0x13FC)]
|
||||
public class HeavyCrossbow : BaseRanged
|
||||
{
|
||||
[Constructible]
|
||||
public HeavyCrossbow() : base(0x13FD)
|
||||
{
|
||||
Weight = 9.0;
|
||||
Layer = Layer.TwoHanded;
|
||||
}
|
||||
|
||||
public HeavyCrossbow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int EffectID => 0x1BFE;
|
||||
public override Type AmmoType => typeof(Bolt);
|
||||
public override Item Ammo => new Bolt();
|
||||
|
||||
public override WeaponAbility PrimaryAbility => WeaponAbility.MovingShot;
|
||||
public override WeaponAbility SecondaryAbility => WeaponAbility.Dismount;
|
||||
|
||||
public override int AosStrengthReq => 80;
|
||||
public override int AosMinDamage => Core.ML ? 20 : 19;
|
||||
public override int AosMaxDamage => Core.ML ? 24 : 20;
|
||||
public override int AosSpeed => 22;
|
||||
public override float MlSpeed => 5.00f;
|
||||
|
||||
public override int OldStrengthReq => 40;
|
||||
public override int OldMinDamage => 11;
|
||||
public override int OldMaxDamage => 56;
|
||||
public override int OldSpeed => 10;
|
||||
|
||||
public override int DefMaxRange => 8;
|
||||
|
||||
public override int InitMinHits => 31;
|
||||
public override int InitMaxHits => 100;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
91
Projects/Scripts/Items/Weapons/Ranged/JukaBow.cs
Normal file
91
Projects/Scripts/Items/Weapons/Ranged/JukaBow.cs
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flippable(0x13B2, 0x13B1)]
|
||||
public class JukaBow : Bow
|
||||
{
|
||||
[Constructible]
|
||||
public JukaBow()
|
||||
{
|
||||
}
|
||||
|
||||
public JukaBow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int AosStrengthReq => 80;
|
||||
public override int AosDexterityReq => 80;
|
||||
|
||||
public override int OldStrengthReq => 80;
|
||||
public override int OldDexterityReq => 80;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool IsModified => Hue == 0x453;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsModified)
|
||||
{
|
||||
from.SendMessage("That has already been modified.");
|
||||
}
|
||||
else if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendMessage("This must be in your backpack to modify it.");
|
||||
}
|
||||
else if (from.Skills.Fletching.Base < 100.0)
|
||||
{
|
||||
from.SendMessage("Only a grandmaster bowcrafter can modify this weapon.");
|
||||
}
|
||||
else
|
||||
{
|
||||
from.BeginTarget(2, false, TargetFlags.None, OnTargetGears);
|
||||
from.SendMessage("Select the gears you wish to use.");
|
||||
}
|
||||
}
|
||||
|
||||
public void OnTargetGears(Mobile from, object targ)
|
||||
{
|
||||
if (!(targ is Gears g) || !g.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendMessage(
|
||||
"Those are not gears."); // Apparently gears that aren't in your backpack aren't really gears at all. :-(
|
||||
}
|
||||
else if (IsModified)
|
||||
{
|
||||
from.SendMessage("That has already been modified.");
|
||||
}
|
||||
else if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendMessage("This must be in your backpack to modify it.");
|
||||
}
|
||||
else if (from.Skills.Fletching.Base < 100.0)
|
||||
{
|
||||
from.SendMessage("Only a grandmaster bowcrafter can modify this weapon.");
|
||||
}
|
||||
else
|
||||
{
|
||||
g.Consume();
|
||||
|
||||
Hue = 0x453;
|
||||
Slayer = (SlayerName)Utility.Random(2, 25);
|
||||
|
||||
from.SendMessage("You modify it.");
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Projects/Scripts/Items/Weapons/Ranged/LightweightShortbow.cs
Normal file
31
Projects/Scripts/Items/Weapons/Ranged/LightweightShortbow.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class LightweightShortbow : MagicalShortbow
|
||||
{
|
||||
[Constructible]
|
||||
public LightweightShortbow()
|
||||
{
|
||||
Balanced = true;
|
||||
}
|
||||
|
||||
public LightweightShortbow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1073510; // lightweight shortbow
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Projects/Scripts/Items/Weapons/Ranged/LongbowOfMight.cs
Normal file
31
Projects/Scripts/Items/Weapons/Ranged/LongbowOfMight.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class LongbowOfMight : ElvenCompositeLongbow
|
||||
{
|
||||
[Constructible]
|
||||
public LongbowOfMight()
|
||||
{
|
||||
Attributes.WeaponDamage = 5;
|
||||
}
|
||||
|
||||
public LongbowOfMight(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1073508; // longbow of might
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
32
Projects/Scripts/Items/Weapons/Ranged/MysticalShortbow.cs
Normal file
32
Projects/Scripts/Items/Weapons/Ranged/MysticalShortbow.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class MysticalShortbow : MagicalShortbow
|
||||
{
|
||||
[Constructible]
|
||||
public MysticalShortbow()
|
||||
{
|
||||
Attributes.SpellChanneling = 1;
|
||||
Attributes.CastSpeed = -1;
|
||||
}
|
||||
|
||||
public MysticalShortbow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1073511; // mystical shortbow
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Projects/Scripts/Items/Weapons/Ranged/RangersShortbow.cs
Normal file
31
Projects/Scripts/Items/Weapons/Ranged/RangersShortbow.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class RangersShortbow : MagicalShortbow
|
||||
{
|
||||
[Constructible]
|
||||
public RangersShortbow()
|
||||
{
|
||||
Attributes.WeaponSpeed = 5;
|
||||
}
|
||||
|
||||
public RangersShortbow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1073509; // ranger's shortbow
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
55
Projects/Scripts/Items/Weapons/Ranged/RepeatingCrossbow.cs
Normal file
55
Projects/Scripts/Items/Weapons/Ranged/RepeatingCrossbow.cs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flippable(0x26C3, 0x26CD)]
|
||||
public class RepeatingCrossbow : BaseRanged
|
||||
{
|
||||
[Constructible]
|
||||
public RepeatingCrossbow() : base(0x26C3)
|
||||
{
|
||||
Weight = 6.0;
|
||||
}
|
||||
|
||||
public RepeatingCrossbow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int EffectID => 0x1BFE;
|
||||
public override Type AmmoType => typeof(Bolt);
|
||||
public override Item Ammo => new Bolt();
|
||||
|
||||
public override WeaponAbility PrimaryAbility => WeaponAbility.DoubleStrike;
|
||||
public override WeaponAbility SecondaryAbility => WeaponAbility.MovingShot;
|
||||
|
||||
public override int AosStrengthReq => 30;
|
||||
public override int AosMinDamage => Core.ML ? 8 : 10;
|
||||
public override int AosMaxDamage => 12;
|
||||
public override int AosSpeed => 41;
|
||||
public override float MlSpeed => 2.75f;
|
||||
|
||||
public override int OldStrengthReq => 30;
|
||||
public override int OldMinDamage => 10;
|
||||
public override int OldMaxDamage => 12;
|
||||
public override int OldSpeed => 41;
|
||||
|
||||
public override int DefMaxRange => 7;
|
||||
|
||||
public override int InitMinHits => 31;
|
||||
public override int InitMaxHits => 80;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Projects/Scripts/Items/Weapons/Ranged/SlayerLongbow.cs
Normal file
31
Projects/Scripts/Items/Weapons/Ranged/SlayerLongbow.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class SlayerLongbow : ElvenCompositeLongbow
|
||||
{
|
||||
[Constructible]
|
||||
public SlayerLongbow()
|
||||
{
|
||||
Slayer2 = (SlayerName)Utility.RandomMinMax(1, 27);
|
||||
}
|
||||
|
||||
public SlayerLongbow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1073506; // slayer longbow
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue