#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
8eae46895e
7512 changed files with 416187 additions and 0 deletions
42
Scripts/Items/Weapons/PoleArms/Bardiche.cs
Normal file
42
Scripts/Items/Weapons/PoleArms/Bardiche.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0xF4D, 0xF4E )]
|
||||
public class Bardiche : BasePoleArm
|
||||
{
|
||||
public override int UOStrengthReq{ get{ return 40; } }
|
||||
public override int UOMinDamage{ get{ return 5; } }
|
||||
public override int UOMaxDamage{ get{ return 43; } }
|
||||
public override int UOSpeed{ get{ return 26; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 31; } }
|
||||
public override int InitMaxHits{ get{ return 100; } }
|
||||
|
||||
[Constructable]
|
||||
public Bardiche() : base( 0xF4D )
|
||||
{
|
||||
Weight = 7.0;
|
||||
}
|
||||
|
||||
public Bardiche( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
117
Scripts/Items/Weapons/PoleArms/BasePoleArm.cs
Normal file
117
Scripts/Items/Weapons/PoleArms/BasePoleArm.cs
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Engines.Harvest;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BasePoleArm : BaseMeleeWeapon, IUsesRemaining
|
||||
{
|
||||
public override int DefHitSound{ get{ return 0x237; } }
|
||||
public override int DefMissSound{ get{ return 0x238; } }
|
||||
|
||||
public override SkillName DefSkill{ get{ return SkillName.Swords; } }
|
||||
public override WeaponType DefType{ get{ return WeaponType.Polearm; } }
|
||||
public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.Slash2H; } }
|
||||
|
||||
public virtual HarvestSystem HarvestSystem{ get{ return Lumberjacking.System; } }
|
||||
|
||||
private int m_UsesRemaining;
|
||||
private bool m_ShowUsesRemaining;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int UsesRemaining
|
||||
{
|
||||
get { return m_UsesRemaining; }
|
||||
set { m_UsesRemaining = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool ShowUsesRemaining
|
||||
{
|
||||
get { return m_ShowUsesRemaining; }
|
||||
set { m_ShowUsesRemaining = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public BasePoleArm( int itemID ) : base( itemID )
|
||||
{
|
||||
m_UsesRemaining = 150;
|
||||
}
|
||||
|
||||
public BasePoleArm( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( HarvestSystem == null )
|
||||
return;
|
||||
|
||||
if ( IsChildOf( from.Backpack ) || Parent == from )
|
||||
HarvestSystem.BeginHarvesting( from, this );
|
||||
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) 2 ); // version
|
||||
|
||||
writer.Write( (bool) m_ShowUsesRemaining );
|
||||
|
||||
writer.Write( (int) m_UsesRemaining );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
m_ShowUsesRemaining = reader.ReadBool();
|
||||
goto case 1;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
m_UsesRemaining = reader.ReadInt();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
if ( m_UsesRemaining < 1 )
|
||||
m_UsesRemaining = 150;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus )
|
||||
{
|
||||
base.OnHit( attacker, defender, damageBonus );
|
||||
|
||||
if ( (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && (attacker.Skills[SkillName.Tactics].Value / 400.0) >= Utility.RandomDouble() )
|
||||
{
|
||||
StatMod mod = defender.GetStatMod( "Concussion" );
|
||||
|
||||
if ( mod == null )
|
||||
{
|
||||
defender.SendMessage( "You receive a concussion blow!" );
|
||||
defender.AddStatMod( new StatMod( StatType.Int, "Concussion", -(defender.RawInt / 2), TimeSpan.FromSeconds( 30.0 ) ) );
|
||||
|
||||
attacker.SendMessage( "You deliver a concussion blow!" );
|
||||
attacker.PlaySound( 0x11C );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Weapons/PoleArms/Halberd.cs
Normal file
42
Scripts/Items/Weapons/PoleArms/Halberd.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x143E, 0x143F )]
|
||||
public class Halberd : BasePoleArm
|
||||
{
|
||||
public override int UOStrengthReq{ get{ return 45; } }
|
||||
public override int UOMinDamage{ get{ return 5; } }
|
||||
public override int UOMaxDamage{ get{ return 49; } }
|
||||
public override int UOSpeed{ get{ return 25; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 31; } }
|
||||
public override int InitMaxHits{ get{ return 80; } }
|
||||
|
||||
[Constructable]
|
||||
public Halberd() : base( 0x143E )
|
||||
{
|
||||
Weight = 16.0;
|
||||
}
|
||||
|
||||
public Halberd( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Weapons/PoleArms/Scythe.cs
Normal file
48
Scripts/Items/Weapons/PoleArms/Scythe.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Engines.Harvest;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x26BA, 0x26C4 )]
|
||||
public class Scythe : BasePoleArm
|
||||
{
|
||||
public override int UOStrengthReq{ get{ return 45; } }
|
||||
public override int UOMinDamage{ get{ return 15; } }
|
||||
public override int UOMaxDamage{ get{ return 18; } }
|
||||
public override int UOSpeed{ get{ return 32; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 31; } }
|
||||
public override int InitMaxHits{ get{ return 100; } }
|
||||
|
||||
public override HarvestSystem HarvestSystem{ get{ return null; } }
|
||||
|
||||
[Constructable]
|
||||
public Scythe() : base( 0x26BA )
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public Scythe( 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 == 15.0 )
|
||||
Weight = 5.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue