using System; using Server; using Server.Network; using Server.Items; using Server.Mobiles; namespace Server.Items { [FlipableAttribute( 0x26BE, 0x26C8 )] public class PikeOfTheLandsknechts : BaseSpear { public override int ArtifactRarity{ get{ return 69; } } public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.ParalyzingBlow; } } public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.InfectiousStrike; } } public override int InitMinHits{ get{ return 255; } } public override int InitMaxHits{ get{ return 255; } } public override int AosStrengthReq{ get{ return 50; } } public override int AosMinDamage{ get{ return 40; } } public override int AosMaxDamage{ get{ return 45; } } public override int AosSpeed{ get{ return 45; } } public override int OldStrengthReq{ get{ return 50; } } public override int OldMinDamage{ get{ return 14; } } public override int OldMaxDamage{ get{ return 16; } } public override int OldSpeed{ get{ return 37; } } public override int DefMaxRange{ get{return 5; } } private int fModDiv = 75; [Constructable] public PikeOfTheLandsknechts() : base( 0x26BE ) { Name = "Pike Of The Landsknechts"; Weight = 8.0; Hue = 1153; DurabilityLevel = WeaponDurabilityLevel.Indestructible; Attributes.ReflectPhysical = 45; Attributes.DefendChance = 45; Attributes.CastRecovery = 5; Attributes.CastSpeed = 5; Attributes.SpellChanneling = 1; Attributes.SpellDamage = 55; Attributes.WeaponDamage = 55; Attributes.LowerManaCost = 55; WeaponAttributes.HitLowerAttack = 75; WeaponAttributes.HitLowerDefend = 45; Attributes.AttackChance = 45; WeaponAttributes.HitLeechMana = 50; WeaponAttributes.HitLeechHits = 50; WeaponAttributes.HitLeechStam = 50; Attributes.RegenMana = 5; Attributes.RegenHits = 5; Attributes.RegenStam = 5; LootType = LootType.Blessed; } // public override void GetDamageTypes( out int phys, out int fire, out int cold, out int pois, out int nrgy ) //{ // phys = 20; // nrgy = 20; // pois = 20; // fire = 20; // cold = 20; //} public override void OnDoubleClick( Mobile from ) { if ( Parent != from ) { from.SendMessage( "You must equip this item to use it." ); return; } if( from.Skills[SkillName.Necromancy].Value < 10 ) { from.SendMessage( "Your necromancy skill is not high enough to summon." ); return; } IPooledEnumerable eable = from.Map.GetItemsInRange(from.Location, 10 ) ; foreach( Item c in eable ) { if( c is Corpse) { Corpse corpse = (Corpse)c; if( !corpse.Owner.Player ) { if( from.Skills[SkillName.Necromancy].Value >= 90 ) { BaseCreature.Summon(new PoisonElemental(),from,c.Location, 0x48D, TimeSpan.FromSeconds(from.Skills[SkillName.SpiritSpeak].Value * 3) ); from.Mana -=15; c.Delete(); eable.Free(); return; } if( from.Skills[SkillName.Necromancy].Value >= 50 ) { BaseCreature.Summon(new Impaler(),from,c.Location, 0x48D, TimeSpan.FromSeconds(from.Skills[SkillName.SpiritSpeak].Value * 3) ); from.Mana -= 12; c.Delete(); eable.Free(); return; } BaseCreature.Summon(new RottingCorpse(),from,c.Location, 0x48D, TimeSpan.FromSeconds(from.Skills[SkillName.SpiritSpeak].Value * 3) ); from.Mana -= 10; c.Delete(); eable.Free(); return; } } } from.SendMessage("You must be near a corpse to raise it"); eable.Free(); } public override bool OnEquip( Mobile from ) { if( from.Skills[SkillName.Necromancy].Value >= 10 ) { double fMod = (from.Skills[SkillName.Necromancy].Value + from.Skills[SkillName.SpiritSpeak].Value) / fModDiv ; from.FollowersMax += (int)fMod; } base.OnEquip(from); return true; } public override void OnRemoved( object o ) { if( o is Mobile) { if( ((Mobile)o).Skills[SkillName.Necromancy].Value >= 10 ) { double fMod = (((Mobile)o).Skills[SkillName.Necromancy].Value + ((Mobile)o).Skills[SkillName.SpiritSpeak].Value) / fModDiv ; ((Mobile)o).FollowersMax -= (int)fMod; } } base.OnRemoved( o ); } public PikeOfTheLandsknechts( 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(); } } }