198 lines
5.3 KiB
C#
198 lines
5.3 KiB
C#
using System;
|
|
using Server.Items;
|
|
|
|
namespace Server.Items
|
|
{
|
|
[FlipableAttribute( 0x13CD, 0x13C5 )]
|
|
public class AcolyteArms : BaseArmor
|
|
{
|
|
public override int LabelNumber{ get{ return 1074307; } }
|
|
public override int BasePhysicalResistance{ get{ return 7; } }
|
|
public override int BaseFireResistance{ get{ return 7; } }
|
|
public override int BaseColdResistance{ get{ return 3; } }
|
|
public override int BasePoisonResistance{ get{ return 4; } }
|
|
public override int BaseEnergyResistance{ get{ return 4; } }
|
|
|
|
public override int InitMinHits{ get{ return 30; } }
|
|
public override int InitMaxHits{ get{ return 40; } }
|
|
|
|
public override int AosStrReq{ get{ return 20; } }
|
|
public override int OldStrReq{ get{ return 15; } }
|
|
|
|
public override int ArmorBase{ get{ return 13; } }
|
|
|
|
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
|
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }
|
|
|
|
|
|
[Constructable]
|
|
public AcolyteArms() : base( 0x13CD )
|
|
{
|
|
Weight = 5.0;
|
|
Attributes.BonusMana = 2;
|
|
Attributes.SpellDamage = 2;
|
|
}
|
|
|
|
public override void AddNameProperties( ObjectPropertyList list )
|
|
{
|
|
base.AddNameProperties( list );
|
|
|
|
list.Add( 1072376, "4" );
|
|
|
|
if ( this.Parent is Mobile )
|
|
{
|
|
if ( this.Hue == 0x2 )
|
|
{
|
|
list.Add( 1072377 );
|
|
list.Add( 1073489, "100" );
|
|
list.Add( 1060441 );
|
|
list.Add( 1060450, "3" );
|
|
}
|
|
}
|
|
}
|
|
|
|
public override void GetProperties( ObjectPropertyList list )
|
|
{
|
|
base.GetProperties( list );
|
|
|
|
if ( this.Hue == 0x0 )
|
|
{
|
|
list.Add( 1072378 );
|
|
list.Add( 1072382, "3" );
|
|
list.Add( 1072383, "3" );
|
|
list.Add( 1072384, "3" );
|
|
list.Add( 1072385, "3" );
|
|
list.Add( 1072386, "3" );
|
|
list.Add( 1060450, "3" );
|
|
list.Add( 1073489, "100" );
|
|
list.Add( 1060441 );
|
|
}
|
|
}
|
|
|
|
public override bool OnEquip( Mobile from )
|
|
{
|
|
|
|
Item shirt = from.FindItemOnLayer( Layer.InnerTorso );
|
|
Item glove = from.FindItemOnLayer( Layer.Gloves );
|
|
Item pants = from.FindItemOnLayer( Layer.Pants );
|
|
|
|
if ( shirt != null && shirt.GetType() == typeof( AcolyteChest ) && glove != null && glove.GetType() == typeof( AcolyteGloves ) && pants != null && pants.GetType() == typeof( AcolyteLegs ) )
|
|
{
|
|
Effects.PlaySound( from.Location, from.Map, 503 );
|
|
from.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
|
|
|
|
Hue = 0x2;
|
|
ArmorAttributes.SelfRepair = 3;
|
|
PhysicalBonus = 3;
|
|
FireBonus = 3;
|
|
ColdBonus = 3;
|
|
PoisonBonus = 3;
|
|
EnergyBonus = 3;
|
|
|
|
|
|
AcolyteChest chest = from.FindItemOnLayer( Layer.InnerTorso ) as AcolyteChest;
|
|
AcolyteGloves gloves = from.FindItemOnLayer( Layer.Gloves ) as AcolyteGloves;
|
|
AcolyteLegs legs = from.FindItemOnLayer( Layer.Pants ) as AcolyteLegs;
|
|
|
|
chest.Hue = 0x2;
|
|
chest.Attributes.NightSight = 1;
|
|
chest.Attributes.Luck = 100;
|
|
chest.ArmorAttributes.SelfRepair = 3;
|
|
chest.PhysicalBonus = 3;
|
|
chest.FireBonus = 3;
|
|
chest.ColdBonus = 3;
|
|
chest.PoisonBonus = 3;
|
|
chest.EnergyBonus = 3;
|
|
|
|
gloves.Hue = 0x2;
|
|
gloves.ArmorAttributes.SelfRepair = 3;
|
|
gloves.PhysicalBonus = 3;
|
|
gloves.FireBonus = 3;
|
|
gloves.ColdBonus = 3;
|
|
gloves.PoisonBonus = 3;
|
|
gloves.EnergyBonus = 3;
|
|
|
|
legs.Hue = 0x2;
|
|
legs.ArmorAttributes.SelfRepair = 3;
|
|
legs.PhysicalBonus = 3;
|
|
legs.FireBonus = 3;
|
|
legs.ColdBonus = 3;
|
|
legs.PoisonBonus = 3;
|
|
legs.EnergyBonus = 3;
|
|
|
|
from.SendLocalizedMessage( 1072391 );
|
|
}
|
|
this.InvalidateProperties();
|
|
return base.OnEquip( from );
|
|
}
|
|
|
|
public override void OnRemoved( object parent )
|
|
{
|
|
if ( parent is Mobile )
|
|
{
|
|
Mobile m = ( Mobile )parent;
|
|
Hue = 0x0;
|
|
ArmorAttributes.SelfRepair = 0;
|
|
PhysicalBonus = 0;
|
|
FireBonus = 0;
|
|
ColdBonus = 0;
|
|
PoisonBonus = 0;
|
|
EnergyBonus = 0;
|
|
if ( m.FindItemOnLayer( Layer.InnerTorso ) is AcolyteChest && m.FindItemOnLayer( Layer.Gloves ) is AcolyteGloves && m.FindItemOnLayer( Layer.Pants ) is AcolyteLegs )
|
|
{
|
|
AcolyteChest chest = m.FindItemOnLayer( Layer.InnerTorso ) as AcolyteChest;
|
|
chest.Hue = 0x0;
|
|
chest.Attributes.NightSight = 0;
|
|
chest.Attributes.Luck = 0;
|
|
chest.ArmorAttributes.SelfRepair = 0;
|
|
chest.PhysicalBonus = 0;
|
|
chest.FireBonus = 0;
|
|
chest.ColdBonus = 0;
|
|
chest.PoisonBonus = 0;
|
|
chest.EnergyBonus = 0;
|
|
|
|
AcolyteGloves gloves = m.FindItemOnLayer( Layer.Gloves ) as AcolyteGloves;
|
|
gloves.Hue = 0x0;
|
|
gloves.ArmorAttributes.SelfRepair = 0;
|
|
gloves.PhysicalBonus = 0;
|
|
gloves.FireBonus = 0;
|
|
gloves.ColdBonus = 0;
|
|
gloves.PoisonBonus = 0;
|
|
gloves.EnergyBonus = 0;
|
|
|
|
AcolyteLegs legs = m.FindItemOnLayer( Layer.Pants ) as AcolyteLegs;
|
|
legs.Hue = 0x0;
|
|
legs.ArmorAttributes.SelfRepair = 0;
|
|
legs.PhysicalBonus = 0;
|
|
legs.FireBonus = 0;
|
|
legs.ColdBonus = 0;
|
|
legs.PoisonBonus = 0;
|
|
legs.EnergyBonus = 0;
|
|
|
|
}
|
|
this.InvalidateProperties();
|
|
}
|
|
base.OnRemoved( parent );
|
|
}
|
|
|
|
|
|
public AcolyteArms( Serial serial ) : base( serial )
|
|
{
|
|
}
|
|
|
|
public override void Serialize( GenericWriter writer )
|
|
{
|
|
base.Serialize( writer );
|
|
writer.Write( (int) 0 );
|
|
}
|
|
|
|
public override void Deserialize(GenericReader reader)
|
|
{
|
|
base.Deserialize( reader );
|
|
int version = reader.ReadInt();
|
|
|
|
if ( Weight == 1.0 )
|
|
Weight = 5.0;
|
|
}
|
|
}
|
|
} |