#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
35
Scripts/Items/Weapons/Ranged/AssassinsShortbow.cs
Normal file
35
Scripts/Items/Weapons/Ranged/AssassinsShortbow.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AssassinsShortbow : MagicalShortbow
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1073512; } } // assassin's shortbow
|
||||
|
||||
[Constructable]
|
||||
public AssassinsShortbow()
|
||||
{
|
||||
Attributes.AttackChance = 3;
|
||||
Attributes.WeaponDamage = 4;
|
||||
}
|
||||
|
||||
public AssassinsShortbow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
34
Scripts/Items/Weapons/Ranged/BarbedLongbow.cs
Normal file
34
Scripts/Items/Weapons/Ranged/BarbedLongbow.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BarbedLongbow : ElvenCompositeLongbow
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1073505; } } // barbed longbow
|
||||
|
||||
[Constructable]
|
||||
public BarbedLongbow()
|
||||
{
|
||||
Attributes.ReflectPhysical = 12;
|
||||
}
|
||||
|
||||
public BarbedLongbow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
236
Scripts/Items/Weapons/Ranged/BaseRanged.cs
Normal file
236
Scripts/Items/Weapons/Ranged/BaseRanged.cs
Normal file
|
|
@ -0,0 +1,236 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
using Server.Spells;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseRanged : BaseMeleeWeapon
|
||||
{
|
||||
public abstract int EffectID{ get; }
|
||||
public abstract Type AmmoType{ get; }
|
||||
public abstract Item Ammo{ get; }
|
||||
|
||||
public override int DefHitSound{ get{ return 0x234; } }
|
||||
public override int DefMissSound{ get{ return 0x238; } }
|
||||
|
||||
public override SkillName DefSkill{ get{ return SkillName.Archery; } }
|
||||
public override WeaponType DefType{ get{ return WeaponType.Ranged; } }
|
||||
public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.ShootXBow; } }
|
||||
|
||||
public override SkillName AccuracySkill{ get{ return SkillName.Archery; } }
|
||||
|
||||
private Timer m_RecoveryTimer; // so we don't start too many timers
|
||||
private bool m_Balanced;
|
||||
private int m_Velocity;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Balanced
|
||||
{
|
||||
get{ return m_Balanced; }
|
||||
set{ m_Balanced = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Velocity
|
||||
{
|
||||
get{ return m_Velocity; }
|
||||
set{ m_Velocity = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public BaseRanged( int itemID ) : base( itemID )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseRanged( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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 )
|
||||
{
|
||||
Spell sp = attacker.Spell as Spell;
|
||||
|
||||
canSwing = ( sp == null || !sp.IsCasting || !sp.BlocksMovement );
|
||||
}
|
||||
}
|
||||
|
||||
#region Dueling
|
||||
if ( attacker is PlayerMobile )
|
||||
{
|
||||
PlayerMobile pm = (PlayerMobile)attacker;
|
||||
|
||||
if ( pm.DuelContext != null && !pm.DuelContext.CheckItemEquip( attacker, this ) )
|
||||
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 );
|
||||
}
|
||||
else
|
||||
{
|
||||
attacker.RevealingAction();
|
||||
|
||||
return TimeSpan.FromSeconds( 0.25 );
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
PlayerMobile p = attacker as PlayerMobile;
|
||||
|
||||
if ( p != null )
|
||||
{
|
||||
Type ammo = AmmoType;
|
||||
|
||||
if ( p.RecoverableAmmo.ContainsKey( ammo ) )
|
||||
p.RecoverableAmmo[ ammo ]++;
|
||||
else
|
||||
p.RecoverableAmmo.Add( ammo, 1 );
|
||||
|
||||
if ( !p.Warmode )
|
||||
{
|
||||
if ( m_RecoveryTimer == null )
|
||||
m_RecoveryTimer = Timer.DelayCall( TimeSpan.FromSeconds( 10 ), new TimerCallback( p.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 != null && quiver.ConsumeTotal( AmmoType, 1 ) )
|
||||
quiver.InvalidateWeight();
|
||||
else if ( pack == null || !pack.ConsumeTotal( AmmoType, 1 ) )
|
||||
return false;
|
||||
}
|
||||
else if ( quiver.FindItemByType( AmmoType ) == null && ( pack == 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( (int) 3 ); // version
|
||||
|
||||
writer.Write( (bool) m_Balanced );
|
||||
writer.Write( (int) 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
63
Scripts/Items/Weapons/Ranged/Bow.cs
Normal file
63
Scripts/Items/Weapons/Ranged/Bow.cs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13B2, 0x13B1 )]
|
||||
public class Bow : BaseRanged
|
||||
{
|
||||
public override int EffectID{ get{ return 0xF42; } }
|
||||
public override Type AmmoType{ get{ return typeof( Arrow ); } }
|
||||
public override Item Ammo{ get{ return new Arrow(); } }
|
||||
|
||||
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.ParalyzingBlow; } }
|
||||
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.MortalStrike; } }
|
||||
|
||||
public override int AosStrengthReq{ get{ return 30; } }
|
||||
public override int AosMinDamage{ get{ return Core.ML ? 15 : 16; } }
|
||||
public override int AosMaxDamage{ get{ return Core.ML ? 19 : 18; } }
|
||||
public override int AosSpeed{ get{ return 25; } }
|
||||
public override float MlSpeed{ get{ return 4.25f; } }
|
||||
|
||||
public override int OldStrengthReq{ get{ return 20; } }
|
||||
public override int OldMinDamage{ get{ return 9; } }
|
||||
public override int OldMaxDamage{ get{ return 41; } }
|
||||
public override int OldSpeed{ get{ return 20; } }
|
||||
|
||||
public override int DefMaxRange{ get{ return 10; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 31; } }
|
||||
public override int InitMaxHits{ get{ return 60; } }
|
||||
|
||||
public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.ShootBow; } }
|
||||
|
||||
[Constructable]
|
||||
public Bow() : base( 0x13B2 )
|
||||
{
|
||||
Weight = 6.0;
|
||||
Layer = Layer.TwoHanded;
|
||||
}
|
||||
|
||||
public Bow( 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();
|
||||
|
||||
if ( Weight == 7.0 )
|
||||
Weight = 6.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
59
Scripts/Items/Weapons/Ranged/CompositeBow.cs
Normal file
59
Scripts/Items/Weapons/Ranged/CompositeBow.cs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x26C2, 0x26CC )]
|
||||
public class CompositeBow : BaseRanged
|
||||
{
|
||||
public override int EffectID{ get{ return 0xF42; } }
|
||||
public override Type AmmoType{ get{ return typeof( Arrow ); } }
|
||||
public override Item Ammo{ get{ return new Arrow(); } }
|
||||
|
||||
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.ArmorIgnore; } }
|
||||
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.MovingShot; } }
|
||||
|
||||
public override int AosStrengthReq{ get{ return 45; } }
|
||||
public override int AosMinDamage{ get{ return Core.ML ? 13 : 15; } }
|
||||
public override int AosMaxDamage{ get{ return 17; } }
|
||||
public override int AosSpeed{ get{ return 25; } }
|
||||
public override float MlSpeed{ get{ return 4.00f; } }
|
||||
|
||||
public override int OldStrengthReq{ get{ return 45; } }
|
||||
public override int OldMinDamage{ get{ return 15; } }
|
||||
public override int OldMaxDamage{ get{ return 17; } }
|
||||
public override int OldSpeed{ get{ return 25; } }
|
||||
|
||||
public override int DefMaxRange{ get{ return 10; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 31; } }
|
||||
public override int InitMaxHits{ get{ return 70; } }
|
||||
|
||||
public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.ShootBow; } }
|
||||
|
||||
[Constructable]
|
||||
public CompositeBow() : base( 0x26C2 )
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public CompositeBow( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
58
Scripts/Items/Weapons/Ranged/Crossbow.cs
Normal file
58
Scripts/Items/Weapons/Ranged/Crossbow.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0xF50, 0xF4F )]
|
||||
public class Crossbow : BaseRanged
|
||||
{
|
||||
public override int EffectID{ get{ return 0x1BFE; } }
|
||||
public override Type AmmoType{ get{ return typeof( Bolt ); } }
|
||||
public override Item Ammo{ get{ return new Bolt(); } }
|
||||
|
||||
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.ConcussionBlow; } }
|
||||
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.MortalStrike; } }
|
||||
|
||||
public override int AosStrengthReq{ get{ return 35; } }
|
||||
public override int AosMinDamage{ get{ return 18; } }
|
||||
public override int AosMaxDamage{ get{ return Core.ML ? 22 : 20; } }
|
||||
public override int AosSpeed{ get{ return 24; } }
|
||||
public override float MlSpeed{ get{ return 4.50f; } }
|
||||
|
||||
public override int OldStrengthReq{ get{ return 30; } }
|
||||
public override int OldMinDamage{ get{ return 8; } }
|
||||
public override int OldMaxDamage{ get{ return 43; } }
|
||||
public override int OldSpeed{ get{ return 18; } }
|
||||
|
||||
public override int DefMaxRange{ get{ return 8; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 31; } }
|
||||
public override int InitMaxHits{ get{ return 80; } }
|
||||
|
||||
[Constructable]
|
||||
public Crossbow() : base( 0xF50 )
|
||||
{
|
||||
Weight = 7.0;
|
||||
Layer = Layer.TwoHanded;
|
||||
}
|
||||
|
||||
public Crossbow( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Scripts/Items/Weapons/Ranged/FrozenLongbow.cs
Normal file
35
Scripts/Items/Weapons/Ranged/FrozenLongbow.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FrozenLongbow : ElvenCompositeLongbow
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1073507; } } // frozen longbow
|
||||
|
||||
[Constructable]
|
||||
public FrozenLongbow()
|
||||
{
|
||||
Attributes.WeaponSpeed = -5;
|
||||
Attributes.DefendChance = 10;
|
||||
}
|
||||
|
||||
public FrozenLongbow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
58
Scripts/Items/Weapons/Ranged/HeavyCrossbow.cs
Normal file
58
Scripts/Items/Weapons/Ranged/HeavyCrossbow.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13FD, 0x13FC )]
|
||||
public class HeavyCrossbow : BaseRanged
|
||||
{
|
||||
public override int EffectID{ get{ return 0x1BFE; } }
|
||||
public override Type AmmoType{ get{ return typeof( Bolt ); } }
|
||||
public override Item Ammo{ get{ return new Bolt(); } }
|
||||
|
||||
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.MovingShot; } }
|
||||
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.Dismount; } }
|
||||
|
||||
public override int AosStrengthReq{ get{ return 80; } }
|
||||
public override int AosMinDamage{ get{ return Core.ML ? 20 : 19; } }
|
||||
public override int AosMaxDamage{ get{ return Core.ML ? 24 : 20; } }
|
||||
public override int AosSpeed{ get{ return 22; } }
|
||||
public override float MlSpeed{ get{ return 5.00f; } }
|
||||
|
||||
public override int OldStrengthReq{ get{ return 40; } }
|
||||
public override int OldMinDamage{ get{ return 11; } }
|
||||
public override int OldMaxDamage{ get{ return 56; } }
|
||||
public override int OldSpeed{ get{ return 10; } }
|
||||
|
||||
public override int DefMaxRange{ get{ return 8; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 31; } }
|
||||
public override int InitMaxHits{ get{ return 100; } }
|
||||
|
||||
[Constructable]
|
||||
public HeavyCrossbow() : base( 0x13FD )
|
||||
{
|
||||
Weight = 9.0;
|
||||
Layer = Layer.TwoHanded;
|
||||
}
|
||||
|
||||
public HeavyCrossbow( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
97
Scripts/Items/Weapons/Ranged/JukaBow.cs
Normal file
97
Scripts/Items/Weapons/Ranged/JukaBow.cs
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13B2, 0x13B1 )]
|
||||
public class JukaBow : Bow
|
||||
{
|
||||
public override int AosStrengthReq{ get{ return 80; } }
|
||||
public override int AosDexterityReq{ get{ return 80; } }
|
||||
|
||||
public override int OldStrengthReq{ get{ return 80; } }
|
||||
public override int OldDexterityReq{ get{ return 80; } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsModified
|
||||
{
|
||||
get{ return ( Hue == 0x453 ); }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public JukaBow()
|
||||
{
|
||||
}
|
||||
|
||||
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[SkillName.Fletching].Base < 100.0 )
|
||||
{
|
||||
from.SendMessage( "Only a grandmaster bowcrafter can modify this weapon." );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.BeginTarget( 2, false, Targeting.TargetFlags.None, new TargetCallback( OnTargetGears ) );
|
||||
from.SendMessage( "Select the gears you wish to use." );
|
||||
}
|
||||
}
|
||||
|
||||
public void OnTargetGears( Mobile from, object targ )
|
||||
{
|
||||
Gears g = targ as Gears;
|
||||
|
||||
if ( g == null || !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[SkillName.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 JukaBow( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
34
Scripts/Items/Weapons/Ranged/LightweightShortbow.cs
Normal file
34
Scripts/Items/Weapons/Ranged/LightweightShortbow.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LightweightShortbow : MagicalShortbow
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1073510; } } // lightweight shortbow
|
||||
|
||||
[Constructable]
|
||||
public LightweightShortbow()
|
||||
{
|
||||
Balanced = true;
|
||||
}
|
||||
|
||||
public LightweightShortbow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
34
Scripts/Items/Weapons/Ranged/LongbowOfMight.cs
Normal file
34
Scripts/Items/Weapons/Ranged/LongbowOfMight.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LongbowOfMight : ElvenCompositeLongbow
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1073508; } } // longbow of might
|
||||
|
||||
[Constructable]
|
||||
public LongbowOfMight()
|
||||
{
|
||||
Attributes.WeaponDamage = 5;
|
||||
}
|
||||
|
||||
public LongbowOfMight( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Scripts/Items/Weapons/Ranged/MysticalShortbow.cs
Normal file
35
Scripts/Items/Weapons/Ranged/MysticalShortbow.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MysticalShortbow : MagicalShortbow
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1073511; } } // mystical shortbow
|
||||
|
||||
[Constructable]
|
||||
public MysticalShortbow()
|
||||
{
|
||||
Attributes.SpellChanneling = 1;
|
||||
Attributes.CastSpeed = -1;
|
||||
}
|
||||
|
||||
public MysticalShortbow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
34
Scripts/Items/Weapons/Ranged/RangersShortbow.cs
Normal file
34
Scripts/Items/Weapons/Ranged/RangersShortbow.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RangersShortbow : MagicalShortbow
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1073509; } } // ranger's shortbow
|
||||
|
||||
[Constructable]
|
||||
public RangersShortbow()
|
||||
{
|
||||
Attributes.WeaponSpeed = 5;
|
||||
}
|
||||
|
||||
public RangersShortbow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
57
Scripts/Items/Weapons/Ranged/RepeatingCrossbow.cs
Normal file
57
Scripts/Items/Weapons/Ranged/RepeatingCrossbow.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x26C3, 0x26CD )]
|
||||
public class RepeatingCrossbow : BaseRanged
|
||||
{
|
||||
public override int EffectID{ get{ return 0x1BFE; } }
|
||||
public override Type AmmoType{ get{ return typeof( Bolt ); } }
|
||||
public override Item Ammo{ get{ return new Bolt(); } }
|
||||
|
||||
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.DoubleStrike; } }
|
||||
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.MovingShot; } }
|
||||
|
||||
public override int AosStrengthReq{ get{ return 30; } }
|
||||
public override int AosMinDamage{ get{ return Core.ML ? 8 : 10; } }
|
||||
public override int AosMaxDamage{ get{ return 12; } }
|
||||
public override int AosSpeed{ get{ return 41; } }
|
||||
public override float MlSpeed{ get{ return 2.75f; } }
|
||||
|
||||
public override int OldStrengthReq{ get{ return 30; } }
|
||||
public override int OldMinDamage{ get{ return 10; } }
|
||||
public override int OldMaxDamage{ get{ return 12; } }
|
||||
public override int OldSpeed{ get{ return 41; } }
|
||||
|
||||
public override int DefMaxRange{ get{ return 7; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 31; } }
|
||||
public override int InitMaxHits{ get{ return 80; } }
|
||||
|
||||
[Constructable]
|
||||
public RepeatingCrossbow() : base( 0x26C3 )
|
||||
{
|
||||
Weight = 6.0;
|
||||
}
|
||||
|
||||
public RepeatingCrossbow( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
34
Scripts/Items/Weapons/Ranged/SlayerLongbow.cs
Normal file
34
Scripts/Items/Weapons/Ranged/SlayerLongbow.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SlayerLongbow : ElvenCompositeLongbow
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1073506; } } // slayer longbow
|
||||
|
||||
[Constructable]
|
||||
public SlayerLongbow()
|
||||
{
|
||||
Slayer2 = (SlayerName) Utility.RandomMinMax( 1, 27 );
|
||||
}
|
||||
|
||||
public SlayerLongbow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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