diff --git a/Scripts/Engines/BulkOrders/Books/BOBGump.cs b/Scripts/Engines/BulkOrders/Books/BOBGump.cs index 25339b23c..efa64b025 100644 --- a/Scripts/Engines/BulkOrders/Books/BOBGump.cs +++ b/Scripts/Engines/BulkOrders/Books/BOBGump.cs @@ -139,6 +139,66 @@ namespace Server.Engines.BulkOrders return count; } + public int GetPageForIndex(int index, int sizeDropped) + { + if (index <= 0) + return 0; + + int count = 0; + int add = 0; + int page = 0; + ArrayList list = m_List; + int i; + object obj; + + for (i=0; (i < index) && (i < list.Count); i++) + { + obj = list[i]; + if (CheckFilter(obj)) + { + if (obj is BOBLargeEntry) + add = ((BOBLargeEntry)obj).Entries.Length; + else + add = 1; + count += add; + if (count > 10) + { + page++; + count = add; + } + } + } + /* now we are on the page of the bod preceeding the dropped one. + * next step: checking whether we have to remain where we are. + * The counter i needs to be incremented as the bod to this very moment + * has not yet been removed from m_List */ + i++; + + /* if, for instance, a big bod of size 6 has been removed, smaller bods + * might fall back into this page. Depending on their sizes, the page eeds + * to be adjusted accordingly. This is done now. + */ + if (count + sizeDropped > 10) + { + while ((i < list.Count) && (count <= 10)) + { + obj = list[i]; + if (CheckFilter(obj)) + { + if (obj is BOBLargeEntry) + count += ((BOBLargeEntry)obj).Entries.Length; + else + count += 1; + } + i++; + } + if (count > 10) + page++; + } + return page; + } + + public object GetMaterialName( BulkMaterialType mat, BODType type, Type itemType ) { switch ( type ) @@ -256,16 +316,35 @@ namespace Server.Engines.BulkOrders if ( item != null ) { - m_From.AddToBackpack( item ); - m_From.SendLocalizedMessage( 1045152 ); // The bulk order deed has been placed in your backpack. - - m_Book.Entries.Remove( obj ); - m_Book.InvalidateProperties(); - - if ( m_Book.Entries.Count > 0 ) - m_From.SendGump( new BOBGump( m_From, m_Book, 0, null ) ); + Container pack = m_From.Backpack; + if ((pack == null) || ((pack != null) && (!pack.CheckHold(m_From, item, true, true, 0, item.PileWeight + item.TotalWeight)))) + { + m_From.SendLocalizedMessage(503204); // You do not have room in your backpack for this + m_From.SendGump(new BOBGump(m_From, m_Book, m_Page, null)); + } else - m_From.SendLocalizedMessage( 1062381 ); // The book is empty. + { + if (m_Book.IsChildOf(m_From.Backpack)) + { + int sizeOfDroppedBod; + if (obj is BOBLargeEntry) + sizeOfDroppedBod = ((BOBLargeEntry)obj).Entries.Length; + else + sizeOfDroppedBod = 1; + + m_From.AddToBackpack(item); + m_From.SendLocalizedMessage(1045152); // The bulk order deed has been placed in your backpack. + m_Book.Entries.Remove(obj); + m_Book.InvalidateProperties(); + if (m_Book.Entries.Count > 0) + { + m_Page = GetPageForIndex(index, sizeOfDroppedBod); + m_From.SendGump(new BOBGump(m_From, m_Book, m_Page, null)); + } + else + m_From.SendLocalizedMessage(1062381); // The book is empty. + } + } } else { @@ -283,26 +362,37 @@ namespace Server.Engines.BulkOrders else if ( m_Book.RootParent is PlayerVendor ) { PlayerVendor pv = (PlayerVendor)m_Book.RootParent; - VendorItem vi = pv.GetVendorItem( m_Book ); - int price = 0; - - if ( vi != null && !vi.IsForSale ) + if (vi != null && !vi.IsForSale) { - if ( obj is BOBLargeEntry ) + int sizeOfDroppedBod; + int price = 0; + if (obj is BOBLargeEntry) + { price = ((BOBLargeEntry)obj).Price; - else if ( obj is BOBSmallEntry ) + sizeOfDroppedBod = ((BOBLargeEntry)obj).Entries.Length; + } + else + { price = ((BOBSmallEntry)obj).Price; + sizeOfDroppedBod = 1; + } + if (price == 0) + m_From.SendLocalizedMessage(1062382); // The deed selected is not available. + else + { + if (m_Book.Entries.Count > 0) + { + m_Page = GetPageForIndex(index, sizeOfDroppedBod); + m_From.SendGump(new BODBuyGump(m_From, m_Book, obj, m_Page, price)); + } + else + m_From.SendLocalizedMessage(1062381); // The book is emptz + } } - - if ( price == 0 ) - m_From.SendLocalizedMessage( 1062382 ); // The deed selected is not available. - else - m_From.SendGump( new BODBuyGump( m_From, m_Book, obj, price ) ); } } - break; } } diff --git a/Scripts/Engines/BulkOrders/Books/BODBuyGump.cs b/Scripts/Engines/BulkOrders/Books/BODBuyGump.cs index 459a98ebd..1cfab5896 100644 --- a/Scripts/Engines/BulkOrders/Books/BODBuyGump.cs +++ b/Scripts/Engines/BulkOrders/Books/BODBuyGump.cs @@ -12,6 +12,7 @@ namespace Server.Engines.BulkOrders private BulkOrderBook m_Book; private object m_Object; private int m_Price; + private int m_Page; public override void OnResponse( Server.Network.NetState sender, RelayInfo info ) { @@ -60,27 +61,31 @@ namespace Server.Engines.BulkOrders Container pack = m_From.Backpack; - if ( (pack != null && pack.ConsumeTotal( typeof( Gold ), price )) || Banker.Withdraw( m_From, price ) ) + if ( (pack == null) || ((pack != null) && (!pack.CheckHold(m_From, item, true, true, 0, item.PileWeight + item.TotalWeight)) ) ) { - m_Book.Entries.Remove( m_Object ); - m_Book.InvalidateProperties(); - - pv.HoldGold += price; - - if ( m_From.AddToBackpack( item ) ) - m_From.SendLocalizedMessage( 1045152 ); // The bulk order deed has been placed in your backpack. - else - pv.SayTo( m_From, 503204 ); // You do not have room in your backpack for this. - - if ( m_Book.Entries.Count > 0 ) - m_From.SendGump( new BOBGump( m_From, m_Book ) ); - else - m_From.SendLocalizedMessage( 1062381 ); // The book is empty. + pv.SayTo(m_From, 503204); // You do not have room in your backpack for this + m_From.SendGump(new BOBGump(m_From, m_Book, m_Page, null)); } else { - pv.SayTo( m_From, 503205 ); // You cannot afford this item. - item.Delete(); + if ((pack != null && pack.ConsumeTotal( typeof( Gold ), price )) || Banker.Withdraw( m_From, price ) ) + { + m_Book.Entries.Remove( m_Object ); + m_Book.InvalidateProperties(); + pv.HoldGold += price; + m_From.AddToBackpack( item ); + m_From.SendLocalizedMessage( 1045152 ); // The bulk order deed has been placed in your backpack. + + if ( m_Book.Entries.Count > 0 ) + m_From.SendGump( new BOBGump( m_From, m_Book, m_Page, null ) ); + else + m_From.SendLocalizedMessage( 1062381 ); // The book is empty. + } + else + { + pv.SayTo( m_From, 503205 ); // You cannot afford this item. + item.Delete(); + } } } } @@ -99,12 +104,13 @@ namespace Server.Engines.BulkOrders } } - public BODBuyGump( PlayerMobile from, BulkOrderBook book, object obj, int price ) : base( 100, 200 ) + public BODBuyGump( PlayerMobile from, BulkOrderBook book, object obj, int page, int price ) : base( 100, 200 ) { m_From = from; m_Book = book; m_Object = obj; m_Price = price; + m_Page = page; AddPage( 0 ); diff --git a/Scripts/Engines/BulkOrders/Books/BulkOrderBook.cs b/Scripts/Engines/BulkOrders/Books/BulkOrderBook.cs index cf0b742b2..930063c5f 100644 --- a/Scripts/Engines/BulkOrders/Books/BulkOrderBook.cs +++ b/Scripts/Engines/BulkOrders/Books/BulkOrderBook.cs @@ -106,6 +106,7 @@ namespace Server.Engines.BulkOrders m_Entries.Add( new BOBLargeEntry( (LargeBOD)dropped ) ); InvalidateProperties(); + from.PlaySound(0x42); from.SendLocalizedMessage( 1062386 ); // Deed added to book. if ( from is PlayerMobile ) @@ -132,6 +133,7 @@ namespace Server.Engines.BulkOrders m_Entries.Add( new BOBSmallEntry( (SmallBOD)dropped ) ); InvalidateProperties(); + from.PlaySound(0x42); from.SendLocalizedMessage( 1062386 ); // Deed added to book. if ( from is PlayerMobile ) diff --git a/Scripts/Engines/CannedEvil/ChampionSpawnType.cs b/Scripts/Engines/CannedEvil/ChampionSpawnType.cs index 77fb09879..ac3b5f46a 100644 --- a/Scripts/Engines/CannedEvil/ChampionSpawnType.cs +++ b/Scripts/Engines/CannedEvil/ChampionSpawnType.cs @@ -41,7 +41,7 @@ namespace Server.Engines.CannedEvil { new ChampionSpawnInfo( "Abyss", typeof( Semidar ), new string[]{ "Foe", "Assassin", "Conqueror" }, new Type[][] // Abyss { // Abyss - new Type[]{ typeof( StrongMongbat ), typeof( Imp ) }, // Level 1 + new Type[]{ typeof( GreaterMongbat ), typeof( Imp ) }, // Level 1 new Type[]{ typeof( Gargoyle ), typeof( Harpy ) }, // Level 2 new Type[]{ typeof( FireGargoyle ), typeof( StoneGargoyle ) }, // Level 3 new Type[]{ typeof( Daemon ), typeof( Succubus ) } // Level 4 diff --git a/Scripts/Items/Addons/SolenAntHole.cs b/Scripts/Items/Addons/SolenAntHole.cs new file mode 100644 index 000000000..9d4ca69dc --- /dev/null +++ b/Scripts/Items/Addons/SolenAntHole.cs @@ -0,0 +1,170 @@ +using System; +using System.Collections.Generic; +using Server; +using Server.Network; +using Server.Mobiles; +using Server.Spells; + +namespace Server.Items +{ + public class SolenAntHoleComponent : AddonComponent + { + public SolenAntHoleComponent( int itemID ) : base( itemID ) + { + } + + public override void OnDoubleClick( Mobile from ) + { + if ( from.InRange( this, 2 ) ) + { + Map map = Map; + + if ( map == Map.Trammel || map == Map.Felucca ) + { + from.MoveToWorld( new Point3D( 5922, 2024, 0 ), map ); + PublicOverheadMessage( MessageType.Regular, 0x3B2, true, String.Format( "* {0} dives into the hole and disappears!*", from.Name ) ); + } + } + else + from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. + } + + public SolenAntHoleComponent( 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(); + } + } + + + public class SolenAntHole : BaseAddon + { + public override bool ShareHue { get { return false; } } + public override bool HandlesOnMovement { get { return true; } } + + private List m_Spawned; + + [Constructable] + public SolenAntHole() : base() + { + m_Spawned = new List(); + + AddComponent( new AddonComponent( 0x914 ), "dirt", 0, 0, 0, 0 ); + AddComponent( new SolenAntHoleComponent( 0x122A ), "a hole", 0x1, 0, 0, 0 ); + AddComponent( new AddonComponent( 0x1B23 ), "dirt", 0x970, 1, 1, 0 ); + AddComponent( new AddonComponent( 0xEE0 ), "dirt", 0, 1, 0, 0 ); + AddComponent( new AddonComponent( 0x1B24 ), "dirt", 0x970, 1, -1, 0 ); + AddComponent( new AddonComponent( 0xEE1 ), "dirt", 0, 0, -1, 0 ); + AddComponent( new AddonComponent( 0x1B25 ), "dirt", 0x970, -1, -1, 0 ); + AddComponent( new AddonComponent( 0xEE2 ), "dirt", 0, -1, 0, 0 ); + AddComponent( new AddonComponent( 0x1B26 ), "dirt", 0x970, -1, 1, 0 ); + AddComponent( new AddonComponent( 0xED3 ), "dirt", 0, 0, 1, 0 ); + } + + public override void OnMovement( Mobile m, Point3D oldLocation ) + { + if ( !m.Player || !m.Alive || m.Hidden || !SpawnKilled() ) + return; + + if ( Utility.InRange( Location, m.Location, 3 ) && !Utility.InRange( Location, oldLocation, 3 ) ) + { + int count = 1 + Utility.Random( 4 ); + + for ( int i = 0; i < count; i++ ) + SpawnAnt(); + + if ( 0.05 > Utility.RandomDouble() ) + SpawnAnt( new Beetle() ); + } + } + + public void AddComponent( AddonComponent c, string name, int hue, int x, int y, int z ) + { + c.Hue = hue; + c.Name = name; + AddComponent( c, x, y, z ); + } + + public void SpawnAnt() + { + int random = Utility.Random( 3 ); + Map map = Map; + + if ( map == Map.Trammel ) + { + if ( random < 2 ) + SpawnAnt( new RedSolenWorker() ); + else + SpawnAnt( new RedSolenWarrior() ); + } + else if ( map == Map.Felucca ) + { + if ( random < 2 ) + SpawnAnt( new BlackSolenWorker() ); + else + SpawnAnt( new BlackSolenWarrior() ); + } + } + + public void SpawnAnt( BaseCreature ant ) + { + m_Spawned.Add( ant ); + + Map map = Map; + Point3D p = Location; + + for ( int i = 0; i < 5; i++ ) + if ( SpellHelper.FindValidSpawnLocation( map, ref p, false ) ) + break; + + ant.MoveToWorld( p, map ); + ant.Home = Location; + ant.RangeHome = 10; + } + + public bool SpawnKilled() + { + for ( int i = m_Spawned.Count - 1; i >= 0; i-- ) + { + if ( !m_Spawned[ i ].Alive || m_Spawned[ i ].Deleted ) + m_Spawned.RemoveAt( i ); + } + + return m_Spawned.Count < 2; + } + + public SolenAntHole( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.WriteEncodedInt( 0 ); // version + + writer.WriteMobileList( m_Spawned ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadEncodedInt(); + + m_Spawned = reader.ReadStrongMobileList(); + } + } +} diff --git a/Scripts/Items/Clothing/OuterTorso.cs b/Scripts/Items/Clothing/OuterTorso.cs index bfd452f43..b4b830e69 100644 --- a/Scripts/Items/Clothing/OuterTorso.cs +++ b/Scripts/Items/Clothing/OuterTorso.cs @@ -100,6 +100,11 @@ namespace Server.Items public class DeathRobe : Robe { + private Timer m_DecayTimer; + private DateTime m_DecayTime; + + private static TimeSpan m_DefaultDecayTime = TimeSpan.FromMinutes(1.0); + public override bool DisplayLootType { get{ return false; } @@ -110,6 +115,7 @@ namespace Server.Items { LootType = LootType.Newbied; Hue = 2301; + BeginDecay( m_DefaultDecayTime ); } public new bool Scissor( Mobile from, Scissors scissors ) @@ -117,6 +123,62 @@ namespace Server.Items from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything. return false; } + + public void BeginDecay( TimeSpan delay ) + { + if ( m_DecayTimer != null ) + m_DecayTimer.Stop(); + + m_DecayTime = DateTime.Now + delay; + + m_DecayTimer = new InternalTimer( this, delay ); + m_DecayTimer.Start(); + } + + public override bool OnDroppedToWorld( Mobile from, Point3D p ) + { + BeginDecay( m_DefaultDecayTime ); + + return true; + } + + public override bool OnDroppedToMobile( Mobile from, Mobile target ) + { + if (m_DecayTimer != null ) + { + m_DecayTimer.Stop(); + m_DecayTimer = null; + } + + return true; + } + + public override void OnAfterDelete() + { + if ( m_DecayTimer != null ) + m_DecayTimer.Stop(); + + m_DecayTimer = null; + } + + private class InternalTimer : Timer + { + private DeathRobe m_Robe; + + public InternalTimer( DeathRobe c, TimeSpan delay ) : base( delay ) + { + m_Robe = c; + Priority = TimerPriority.FiveSeconds; + } + + protected override void OnTick() + { + if ( m_Robe.Parent != null || m_Robe.IsLockedDown ) + Stop(); + else + m_Robe.Delete(); + } + } public DeathRobe( Serial serial ) : base( serial ) { @@ -126,7 +188,12 @@ namespace Server.Items { base.Serialize( writer ); - writer.Write( (int) 1 ); // version + writer.Write( (int) 2 ); // version + + writer.Write( m_DecayTimer != null ); + + if( m_DecayTimer != null ) + writer.WriteDeltaTime( m_DecayTime ); } public override void Deserialize( GenericReader reader ) @@ -134,6 +201,26 @@ namespace Server.Items base.Deserialize( reader ); int version = reader.ReadInt(); + + switch ( version ) + { + case 2: + { + if( reader.ReadBool() ) + { + m_DecayTime = reader.ReadDeltaTime(); + BeginDecay( m_DecayTime - DateTime.Now ); + } + break; + } + case 1: + case 0: + { + if ( Parent == null ) + BeginDecay( m_DefaultDecayTime ); + break; + } + } if ( version < 1 && Hue == 0 ) Hue = 2301; diff --git a/Scripts/Items/Skill Items/Misc/Bandage.cs b/Scripts/Items/Skill Items/Misc/Bandage.cs index 7272aa8b0..96d60c16a 100644 --- a/Scripts/Items/Skill Items/Misc/Bandage.cs +++ b/Scripts/Items/Skill Items/Misc/Bandage.cs @@ -102,11 +102,27 @@ namespace Server.Items from.SendLocalizedMessage( 500295 ); // You are too far away to do that. } } + else if ( targeted is PlagueBeastInnard ) + { + if ( ((PlagueBeastInnard) targeted).OnBandage( from ) ) + m_Bandage.Consume(); + } else { from.SendLocalizedMessage( 500970 ); // Bandages can not be used on that. } } + + protected override void OnNonlocalTarget( Mobile from, object targeted ) + { + if ( targeted is PlagueBeastInnard ) + { + if ( ((PlagueBeastInnard) targeted).OnBandage( from ) ) + m_Bandage.Consume(); + } + else + base.OnNonlocalTarget( from, targeted ); + } } } diff --git a/Scripts/Items/Skill Items/Tailor Items/Misc/Scissors.cs b/Scripts/Items/Skill Items/Tailor Items/Misc/Scissors.cs index 1b1ceb7e6..ab77d82f0 100644 --- a/Scripts/Items/Skill Items/Tailor Items/Misc/Scissors.cs +++ b/Scripts/Items/Skill Items/Tailor Items/Misc/Scissors.cs @@ -48,7 +48,7 @@ namespace Server.Items { private Scissors m_Item; - public InternalTarget( Scissors item ) : base( 1, false, TargetFlags.None ) + public InternalTarget( Scissors item ) : base( 2, false, TargetFlags.None ) { m_Item = item; } @@ -71,8 +71,15 @@ namespace Server.Items { from.SendLocalizedMessage( 1063305 ); // Didn't your parents ever tell you not to run with scissors in your hand?! } - else if ( targeted is Item && !((Item)targeted).Movable ) { - return; + else if( targeted is Item && !((Item)targeted).Movable ) + { + if( targeted is IScissorable && ( targeted is PlagueBeastInnard || targeted is PlagueBeastMutationCore ) ) + { + IScissorable obj = (IScissorable) targeted; + + if( obj.Scissor( from, m_Item ) ) + from.PlaySound( 0x248 ); + } } else if( targeted is IScissorable ) { @@ -86,6 +93,19 @@ namespace Server.Items from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything. } } + + protected override void OnNonlocalTarget( Mobile from, object targeted ) + { + if ( targeted is IScissorable && ( targeted is PlagueBeastInnard || targeted is PlagueBeastMutationCore ) ) + { + IScissorable obj = (IScissorable) targeted; + + if ( obj.Scissor( from, m_Item ) ) + from.PlaySound( 0x248 ); + } + else + base.OnNonlocalTarget( from, targeted ); + } } } } \ No newline at end of file diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastBackpack.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastBackpack.cs new file mode 100644 index 000000000..04e3446b1 --- /dev/null +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastBackpack.cs @@ -0,0 +1,186 @@ +using System; +using System.Collections.Generic; +using Server; + +namespace Server.Items +{ + public class PlagueBeastBackpack : BaseContainer + { + public override int DefaultMaxWeight { get { return 0; } } + public override int DefaultMaxItems { get { return 0; } } + public override int DefaultGumpID { get { return 0x2A63; } } + public override int DefaultDropSound { get { return 0x23F; } } + + private static int[,,] m_Positions = new int[,,] + { + { { 275, 85 }, { 360, 111 }, { 375, 184 }, { 332, 228 }, { 141, 105 }, { 189, 75 } }, + { { 274, 34 }, { 327, 89 }, { 354, 168 }, { 304, 225 }, { 113, 86 }, { 189, 75 } }, + { { 276, 79 }, { 369, 117 }, { 372, 192 }, { 336, 230 }, { 141, 116 }, { 189, 75 } }, + }; + + private static int[] m_BrainHues = new int[] + { + 0x2B, 0x42, 0x54, 0x60 + }; + + public PlagueBeastBackpack() : base( 0x261B ) + { + Layer = Layer.Backpack; + } + + public void Initialize() + { + AddInnard( 0x1CF6, 0x0, 227, 128 ); + AddInnard( 0x1D10, 0x0, 251, 128 ); + AddInnard( 0x1FBE, 0x21, 240, 83 ); + + AddInnard( new PlagueBeastHeart(), 229, 104 ); + + AddInnard( 0x1D06, 0x0, 283, 91 ); + AddInnard( 0x1FAF, 0x21, 315, 107 ); + AddInnard( 0x1FB9, 0x21, 289, 87 ); + AddInnard( 0x9E7, 0x21, 304, 96 ); + AddInnard( 0x1B1A, 0x66D, 335, 102 ); + AddInnard( 0x1D10, 0x0, 338, 146 ); + AddInnard( 0x1FB3, 0x21, 358, 167 ); + AddInnard( 0x1D0B, 0x0, 357, 155 ); + AddInnard( 0x9E7, 0x21, 339, 184 ); + AddInnard( 0x1B1A, 0x66D, 157, 172 ); + AddInnard( 0x1D11, 0x0, 147, 157 ); + AddInnard( 0x1FB9, 0x21, 121, 131 ); + AddInnard( 0x9E7, 0x21, 166, 176 ); + AddInnard( 0x1D0B, 0x0, 122, 138 ); + AddInnard( 0x1D0D, 0x0, 118, 150 ); + AddInnard( 0x1FB3, 0x21, 97, 123 ); + AddInnard( 0x1D08, 0x0, 115, 113 ); + AddInnard( 0x9E7, 0x21, 109, 109 ); + AddInnard( 0x9E7, 0x21, 91, 122 ); + AddInnard( 0x9E7, 0x21, 94, 160 ); + AddInnard( 0x1B19, 0x66D, 170, 121 ); + AddInnard( 0x1FAF, 0x21, 161, 111 ); + AddInnard( 0x1D0B, 0x0, 158, 112 ); + AddInnard( 0x9E7, 0x21, 159, 101 ); + AddInnard( 0x1D10, 0x0, 132, 177 ); + AddInnard( 0x1D0E, 0x0, 110, 178 ); + AddInnard( 0x1FB3, 0x21, 95, 194 ); + AddInnard( 0x1FAF, 0x21, 154, 203 ); + AddInnard( 0x1B1A, 0x66D, 110, 237 ); + AddInnard( 0x9E7, 0x21, 111, 171 ); + AddInnard( 0x9E7, 0x21, 90, 197 ); + AddInnard( 0x9E7, 0x21, 166, 205 ); + AddInnard( 0x9E7, 0x21, 96, 242 ); + AddInnard( 0x1D10, 0x0, 334, 196 ); + AddInnard( 0x1D0B, 0x0, 322, 270 ); + + List organs = new List(); + PlagueBeastOrgan organ; + + for ( int i = 0; i < 6; i++ ) + { + int random = Utility.Random( 3 ); + + if ( i == 5 ) + random = 0; + + switch ( random ) + { + default: + case 0: organ = new PlagueBeastRockOrgan(); break; + case 1: organ = new PlagueBeastMaidenOrgan(); break; + case 2: organ = new PlagueBeastRubbleOrgan(); break; + } + + organs.Add( organ ); + AddInnard( organ, m_Positions[ random, i, 0 ], m_Positions[ random, i, 1 ] ); + } + + organ = new PlagueBeastBackupOrgan(); + organs.Add( organ ); + AddInnard( organ, 129, 214 ); + + for ( int i = 0; i < m_BrainHues.Length; i++ ) + { + int random = Utility.Random( organs.Count ); + organ = organs[ random ]; + organ.BrainHue = m_BrainHues[ i ]; + organs.RemoveAt( random ); + } + + organs.Clear(); + + AddInnard( new PlagueBeastMainOrgan(), 240, 161 ); + } + + public override bool TryDropItem( Mobile from, Item dropped, bool sendFullMessage ) + { + if ( dropped is PlagueBeastInnard || dropped is PlagueBeastGland ) + return base.TryDropItem( from, dropped, sendFullMessage ); + + return false; + } + + public override bool OnDragDropInto( Mobile from, Item item, Point3D p ) + { + if ( IsAccessibleTo( from ) && ( item is PlagueBeastInnard || item is PlagueBeastGland ) ) + { + Rectangle2D ir = ItemBounds.Table[ item.ItemID ]; + int x, y; + int cx = p.X + ir.X + ir.Width / 2; + int cy = p.Y + ir.Y + ir.Height / 2; + + for ( int i = Items.Count - 1; i >= 0; i-- ) + { + PlagueBeastComponent innard = Items[ i ] as PlagueBeastComponent; + + if ( innard != null ) + { + Rectangle2D r = ItemBounds.Table[ innard.ItemID ]; + + x = innard.X + r.X; + y = innard.Y + r.Y; + + if ( cx >= x && cx <= x + r.Width && cy >= y && cy <= y + r.Height ) + { + innard.OnDragDrop( from, item ); + break; + } + } + } + + return base.OnDragDropInto( from, item, p ); + } + + return false; + } + + public void AddInnard( int itemID, int hue, int x, int y ) + { + AddInnard( new PlagueBeastInnard( itemID, hue ), x, y ); + } + + public void AddInnard( PlagueBeastInnard innard, int x, int y ) + { + AddItem( innard ); + innard.Location = new Point3D( x, y, 0 ); + innard.Map = Map; + } + + public PlagueBeastBackpack( 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(); + } + } +} diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastBlood.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastBlood.cs new file mode 100644 index 000000000..be78eacc5 --- /dev/null +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastBlood.cs @@ -0,0 +1,127 @@ +using System; +using Server; +using Server.Network; + +namespace Server.Items +{ + public class PlagueBeastBlood : PlagueBeastComponent + { + public bool Patched + { + get { return ItemID == 0x1765; } + } + + public bool Starting + { + get { return ItemID == 0x122C; } + } + + private Timer m_Timer; + + public PlagueBeastBlood() : base( 0x122C, 0 ) + { + m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 1.5 ), TimeSpan.FromSeconds( 1.5 ), 3, new TimerCallback( Hemorrhage ) ); + } + + public override void OnAfterDelete() + { + if ( m_Timer != null && m_Timer.Running ) + m_Timer.Stop(); + } + + public override bool OnBandage( Mobile from ) + { + if ( IsAccessibleTo( from ) && !Patched ) + { + if ( m_Timer != null && m_Timer.Running ) + m_Timer.Stop(); + + if ( Starting ) + { + X += 2; + Y -= 9; + + if ( Organ is PlagueBeastRubbleOrgan ) + Y -= 5; + else if ( Organ is PlagueBeastBackupOrgan ) + X += 7; + } + else + { + X -= 4; + Y -= 2; + } + + ItemID = 0x1765; + + if ( Owner != null ) + { + Container pack = Owner.Backpack; + + if ( pack != null ) + { + for ( int i = 0; i < pack.Items.Count; i++ ) + { + PlagueBeastMainOrgan main = pack.Items[ i ] as PlagueBeastMainOrgan; + + if ( main != null && main.Complete ) + main.FinishOpening( from ); + } + } + } + + PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071916 ); // * You patch up the wound with a bandage * + + return true; + } + + return false; + } + + private void Hemorrhage() + { + if ( Patched ) + return; + + if ( Owner != null ) + Owner.PlaySound( 0x25 ); + + if ( ItemID == 0x122A ) + { + if ( Owner != null ) + { + Owner.Unfreeze(); + Owner.Kill(); + } + } + else + { + if ( Starting ) + { + X += 8; + Y -= 10; + } + + ItemID--; + } + } + + public PlagueBeastBlood( 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(); + } + } +} diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastGland.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastGland.cs new file mode 100644 index 000000000..46193ff33 --- /dev/null +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastGland.cs @@ -0,0 +1,34 @@ +using System; +using Server; + +namespace Server.Items +{ + public class PlagueBeastGland : Item + { + [Constructable] + public PlagueBeastGland() : base( 0x1CEF ) + { + Name = "A Healthy Gland"; + Weight = 1.0; + Hue = 0x6; + } + + public PlagueBeastGland( 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(); + } + } +} diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastHeart.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastHeart.cs new file mode 100644 index 000000000..51a3715e9 --- /dev/null +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastHeart.cs @@ -0,0 +1,80 @@ +using System; +using Server; + +namespace Server.Items +{ + public class PlagueBeastHeart : PlagueBeastInnard + { + private Timer m_Timer; + + public PlagueBeastHeart() : base( 0x1363, 0x21 ) + { + m_Timer = new InternalTimer( this ); + m_Timer.Start(); + } + + public override void OnAfterDelete() + { + if ( m_Timer != null && m_Timer.Running ) + m_Timer.Stop(); + } + + public PlagueBeastHeart( 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(); + + m_Timer = new InternalTimer( this ); + m_Timer.Start(); + } + + private class InternalTimer : Timer + { + private PlagueBeastHeart m_Heart; + private bool m_Delay; + + public InternalTimer( PlagueBeastHeart heart ) : base( TimeSpan.FromSeconds( 0.5 ), TimeSpan.FromSeconds( 0.5 ) ) + { + m_Heart = heart; + } + + protected override void OnTick() + { + if ( m_Heart == null || m_Heart.Deleted || m_Heart.Owner == null || !m_Heart.Owner.Alive ) + { + Stop(); + return; + } + + if ( m_Heart.ItemID == 0x1363 ) + { + if ( m_Delay ) + { + m_Heart.ItemID = 0x1367; + m_Heart.Owner.PlaySound( 0x11F ); + } + + m_Delay = !m_Delay; + } + else + { + m_Heart.ItemID = 0x1363; + m_Heart.Owner.PlaySound( 0x120 ); + m_Delay = false; + } + } + } + } +} diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastInnard.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastInnard.cs new file mode 100644 index 000000000..3c524b7da --- /dev/null +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastInnard.cs @@ -0,0 +1,192 @@ +using System; +using Server; +using Server.Mobiles; +using Server.Network; + +namespace Server.Items +{ + public class PlagueBeastInnard : Item, IScissorable, ICarvable + { + public PlagueBeastLord Owner + { + get { return RootParent as PlagueBeastLord; } + } + + public PlagueBeastInnard( int itemID, int hue ) : base( itemID ) + { + Name = "plague beast innards"; + Hue = hue; + Movable = false; + Weight = 1.0; + } + + public virtual bool Scissor( Mobile from, Scissors scissors ) + { + return false; + } + + public virtual void Carve( Mobile from, Item with ) + { + } + + public virtual bool OnBandage( Mobile from ) + { + return false; + } + + public override bool IsAccessibleTo( Mobile check ) + { + if ( (int) check.AccessLevel >= (int) AccessLevel.GameMaster ) + return true; + + PlagueBeastLord owner = Owner; + + if ( owner == null ) + return false; + + if ( !owner.InRange( check, 2 ) ) + owner.PrivateOverheadMessage( MessageType.Label, 0x3B2, 500446, check.NetState ); // That is too far away. + else if ( owner.OpenedBy != null && owner.OpenedBy != check ) // TODO check + owner.PrivateOverheadMessage( MessageType.Label, 0x3B2, 500365, check.NetState ); // That is being used by someone else + else if ( owner.Frozen ) + return true; + + return false; + } + + public PlagueBeastInnard( 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(); + + PlagueBeastLord owner = Owner; + + if ( owner == null || !owner.Alive ) + Delete(); + } + } + + public class PlagueBeastComponent : PlagueBeastInnard + { + private PlagueBeastOrgan m_Organ; + + public PlagueBeastOrgan Organ + { + get { return m_Organ; } + set { m_Organ = value; } + } + + public bool IsBrain + { + get { return ItemID == 0x1CF0; } + } + + public bool IsGland + { + get { return ItemID == 0x1CEF; } + } + + public bool IsReceptacle + { + get { return ItemID == 0x9DF; } + } + + public PlagueBeastComponent( int itemID, int hue ) : this( itemID, hue, false ) + { + } + + public PlagueBeastComponent( int itemID, int hue, bool movable ) : base( itemID, hue ) + { + Movable = movable; + } + + public override bool DropToItem( Mobile from, Item target, Point3D p ) + { + if ( target is PlagueBeastBackpack ) + return base.DropToItem( from, target, p ); + + return false; + } + + public override bool AllowSecureTrade( Mobile from, Mobile to, Mobile newOwner, bool accepted ) + { + return false; + } + + public override bool DropToMobile( Mobile from, Mobile target, Point3D p ) + { + return false; + } + + public override bool DropToWorld( Mobile from, Point3D p ) + { + return false; + } + + public override bool OnDragDrop( Mobile from, Item dropped ) + { + if ( m_Organ != null && m_Organ.OnDropped( from, dropped, this ) ) + { + if ( dropped is PlagueBeastComponent ) + m_Organ.Components.Add( (PlagueBeastComponent) dropped ); + } + + return true; + } + + public override bool OnDragLift( Mobile from ) + { + if ( IsAccessibleTo( from ) ) + { + if ( m_Organ != null && m_Organ.OnLifted( from, this ) ) + { + from.SendLocalizedMessage( IsGland ? 1071895 : 1071914, null, 0x3B2 ); // * You rip the organ out of the plague beast's flesh * + + if ( m_Organ.Components.Contains( this ) ) + m_Organ.Components.Remove( this ); + + m_Organ = null; + from.PlaySound( 0x1CA ); + } + + return true; + } + + return false; + } + + public PlagueBeastComponent( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.WriteEncodedInt( 0 ); // version + + writer.WriteItem( m_Organ ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadEncodedInt(); + + m_Organ = reader.ReadItem(); + } + } +} diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastMutationCore.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastMutationCore.cs new file mode 100644 index 000000000..62a68f99f --- /dev/null +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastMutationCore.cs @@ -0,0 +1,78 @@ +using System; +using Server; +using Server.Mobiles; +using Server.Network; + +namespace Server.Items +{ + public class PlagueBeastMutationCore : Item, IScissorable + { + private bool m_Cut; + + [CommandProperty( AccessLevel.GameMaster )] + public bool Cut + { + get { return m_Cut; } + set { m_Cut = value; } + } + + [Constructable] + public PlagueBeastMutationCore() : base( 0x1CF0 ) + { + m_Cut = true; + + Name = "a plague beast mutation core"; + Weight = 1.0; + Hue = 0x480; + } + + public virtual bool Scissor( Mobile from, Scissors scissors ) + { + if ( !m_Cut ) + { + PlagueBeastLord owner = RootParent as PlagueBeastLord; + + m_Cut = true; + Movable = true; + + from.AddToBackpack( this ); + from.LocalOverheadMessage( MessageType.Regular, 0x34, 1071906 ); // * You remove the plague mutation core from the plague beast, causing it to dissolve into a pile of goo * + + if ( owner != null ) + Timer.DelayCall( TimeSpan.FromSeconds( 1 ), new TimerStateCallback( KillParent ), owner ); + + return true; + } + + return false; + } + + private void KillParent( PlagueBeastLord parent ) + { + parent.Unfreeze(); + parent.Kill(); + } + + public PlagueBeastMutationCore( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.WriteEncodedInt( 0 ); // version + + writer.Write( (bool) m_Cut ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadEncodedInt(); + + m_Cut = reader.ReadBool(); + } + } +} diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastOrgans.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastOrgans.cs new file mode 100644 index 000000000..bc498afde --- /dev/null +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastOrgans.cs @@ -0,0 +1,586 @@ +using System; +using System.Collections.Generic; +using Server; +using Server.Network; + +namespace Server.Items +{ + public class PlagueBeastOrgan : PlagueBeastInnard + { + public virtual bool IsCuttable { get { return false; } } + + private List m_Components; + + public List Components + { + get { return m_Components; } + } + + private int m_BrainHue; + + public int BrainHue + { + get { return m_BrainHue; } + set { m_BrainHue = value; } + } + + private bool m_Opened; + + public bool Opened + { + get { return m_Opened; } + set { m_Opened = value; } + } + + private Timer m_Timer; + + public PlagueBeastOrgan() : this( 1, 0 ) + { + Visible = false; + } + + public PlagueBeastOrgan( int itemID, int hue ) : base( itemID, hue ) + { + m_Components = new List(); + m_Opened = false; + + Movable = false; + + Timer.DelayCall( TimeSpan.Zero, new TimerCallback( Initialize ) ); + } + + public virtual void Initialize() + { + } + + public void AddComponent( PlagueBeastComponent c, int x, int y ) + { + Container pack = Parent as Container; + + if ( pack != null ) + pack.DropItem( c ); + + c.Organ = this; + c.Location = new Point3D( X + x, Y + y, Z ); + c.Map = Map; + + m_Components.Add( c ); + } + + public override bool Scissor( Mobile from, Scissors scissors ) + { + if ( IsCuttable && IsAccessibleTo( from ) ) + { + if ( !m_Opened && m_Timer == null ) + { + m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 3 ), new TimerStateCallback( FinishOpening ), from ); + scissors.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071897 ); // You carefully cut into the organ. + return true; + } + else + scissors.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071898 ); // You have already cut this organ open. + } + + return false; + } + + public override void OnAfterDelete() + { + if ( m_Timer != null && m_Timer.Running ) + m_Timer.Stop(); + } + + public virtual bool OnLifted( Mobile from, PlagueBeastComponent c ) + { + return c.IsGland || c.IsBrain; + } + + public virtual bool OnDropped( Mobile from, Item item, PlagueBeastComponent to ) + { + return false; + } + + public virtual void FinishOpening( Mobile from ) + { + m_Opened = true; + + if ( Owner != null ) + Owner.PlaySound( 0x50 ); + } + + public PlagueBeastOrgan( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.WriteEncodedInt( 0 ); // version + + writer.WriteItemList( m_Components ); + writer.Write( (int) m_BrainHue ); + writer.Write( (bool) m_Opened ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadEncodedInt(); + + m_Components = reader.ReadStrongItemList(); + m_BrainHue = reader.ReadInt(); + m_Opened = reader.ReadBool(); + } + } + + public class PlagueBeastMaidenOrgan : PlagueBeastOrgan + { + public PlagueBeastMaidenOrgan() : base( 0x124D, 0x0 ) + { + } + + public override void OnDoubleClick( Mobile from ) + { + if ( !Opened ) + FinishOpening( from ); + } + + public override void FinishOpening( Mobile from ) + { + ItemID = 0x1249; + + if ( Owner != null ) + Owner.PlaySound( 0x187 ); + + AddComponent( new PlagueBeastComponent( 0x1D0D, 0x0 ), 22, 3 ); + AddComponent( new PlagueBeastComponent( 0x1D12, 0x0 ), 15, 18 ); + AddComponent( new PlagueBeastComponent( 0x1DA3, 0x21 ), 26, 46 ); + + if ( BrainHue > 0 ) + AddComponent( new PlagueBeastComponent( 0x1CF0, BrainHue, true ), 22, 29 ); + + Opened = true; + } + + public PlagueBeastMaidenOrgan( 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(); + } + } + + public class PlagueBeastRockOrgan : PlagueBeastOrgan + { + public override bool IsCuttable { get { return true; } } + + public PlagueBeastRockOrgan() : base( 0x177A, 0x60 ) + { + } + + public override void Carve( Mobile from, Item with ) + { + if ( IsAccessibleTo( from ) ) + with.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071896 ); // This is too crude an implement for such a procedure. + } + + public override bool OnLifted( Mobile from, PlagueBeastComponent c ) + { + base.OnLifted( from, c ); + + if ( c.IsBrain ) + { + AddComponent( new PlagueBeastBlood(), -7, 24 ); + return true; + } + + return false; + } + + public override void FinishOpening( Mobile from ) + { + base.FinishOpening( from ); + + AddComponent( new PlagueBeastComponent( 0x1775, 0x60 ), 3, 5 ); + AddComponent( new PlagueBeastComponent( 0x1777, 0x1 ), 10, 14 ); + + if ( BrainHue > 0 ) + AddComponent( new PlagueBeastComponent( 0x1CF0, BrainHue, true ), 1, 24 ); // 22, 29 + else + AddComponent( new PlagueBeastBlood(), -7, 24 ); + } + + public PlagueBeastRockOrgan( 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(); + } + } + + public class PlagueBeastRubbleOrgan : PlagueBeastOrgan + { + private int m_Veins; + + public PlagueBeastRubbleOrgan() : base() + { + m_Veins = 3; + } + + public override void Initialize() + { + Hue = Utility.RandomList( m_Hues ); + + AddComponent( new PlagueBeastComponent( 0x3BB, Hue ), 0, 0 ); + AddComponent( new PlagueBeastComponent( 0x3BA, Hue ), 4, 6 ); + AddComponent( new PlagueBeastComponent( 0x3BA, Hue ), -6, 17 ); + + int v = Utility.Random( 4 ); + + AddComponent( new PlagueBeastVein( 0x1B1B, v == 0 ? Hue : RandomHue( Hue ) ), -23, -3 ); + AddComponent( new PlagueBeastVein( 0x1B1C, v == 1 ? Hue : RandomHue( Hue ) ), 19, 4 ); + AddComponent( new PlagueBeastVein( 0x1B1B, v == 2 ? Hue : RandomHue( Hue ) ), 21, 27 ); + AddComponent( new PlagueBeastVein( 0x1B1B, v == 3 ? Hue : RandomHue( Hue ) ), 10, 40 ); + } + + public override bool OnLifted( Mobile from, PlagueBeastComponent c ) + { + if ( c.IsBrain ) + { + AddComponent( new PlagueBeastBlood(), -13, 25 ); + return true; + } + + return false; + } + + public override void FinishOpening( Mobile from ) + { + AddComponent( new PlagueBeastComponent( 0x1777, 0x1 ), 5, 14 ); + + if ( BrainHue > 0 ) + AddComponent( new PlagueBeastComponent( 0x1CF0, BrainHue, true ), -5, 22 ); + else + AddComponent( new PlagueBeastBlood(), -13, 25 ); + + Opened = true; + } + + private static int[] m_Hues = new int[] + { + 0xD, 0x17, 0x2B, 0x42, 0x54, 0x5D + }; + + private static int RandomHue( int exculde ) + { + for ( int i = 0; i < 20; i++ ) + { + int hue = Utility.RandomList( m_Hues ); + + if ( hue != exculde ) + return hue; + } + + return 0xD; + } + + public virtual void OnVeinCut( Mobile from, PlagueBeastVein vein ) + { + if ( vein.Hue != Hue ) + { + if ( !Opened && m_Veins > 0 && --m_Veins == 0 ) + FinishOpening( from ); + } + else + { + from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1071901 ); // * As you cut the vein, a cloud of poison is expelled from the plague beast's organ, and the plague beast dissolves into a puddle of goo * + from.ApplyPoison( from, Poison.Greater ); + from.PlaySound( 0x22F ); + + if ( Owner != null ) + { + Owner.Unfreeze(); + Owner.Kill(); + } + } + } + + public PlagueBeastRubbleOrgan( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.WriteEncodedInt( 0 ); // version + + writer.Write( (int) m_Veins ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadEncodedInt(); + + m_Veins = reader.ReadInt(); + } + } + + public class PlagueBeastBackupOrgan : PlagueBeastOrgan + { + public override bool IsCuttable { get { return true; } } + + private Timer m_Timer; + private Item m_Gland; + + public PlagueBeastBackupOrgan() : base( 0x1362, 0x6 ) + { + } + + public override void Initialize() + { + AddComponent( new PlagueBeastComponent( 0x1B1B, 0x42 ), 16, 39 ); + AddComponent( new PlagueBeastComponent( 0x1B1B, 0x42 ), 39, 49 ); + AddComponent( new PlagueBeastComponent( 0x1B1B, 0x42 ), 39, 48 ); + AddComponent( new PlagueBeastComponent( 0x1B1B, 0x42 ), 44, 42 ); + AddComponent( new PlagueBeastComponent( 0x1CF2, 0x42 ), 20, 34 ); + AddComponent( new PlagueBeastComponent( 0x135F, 0x42 ), 47, 58 ); + AddComponent( new PlagueBeastComponent( 0x1360, 0x42 ), 70, 68 ); + } + + public override void Carve( Mobile from, Item with ) + { + if ( IsAccessibleTo( from ) ) + with.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071896 ); // This is too crude an implement for such a procedure. + } + + public override bool OnLifted( Mobile from, PlagueBeastComponent c ) + { + if ( c.IsBrain ) + { + AddComponent( new PlagueBeastBlood(), 47, 72 ); + return true; + } + else if ( c.IsGland ) + { + m_Gland = null; + return true; + } + + return c.IsGland; + } + + public override bool OnDropped( Mobile from, Item item, PlagueBeastComponent to ) + { + if ( to.Hue == 0x1 && m_Gland == null && item is PlagueBeastGland ) + { + m_Gland = item; + m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 3 ), new TimerCallback( FinishHealing ) ); + from.SendAsciiMessage( 0x3B2, "* You place the healthy gland inside the organ sac *" ); + item.Movable = false; + + if ( Owner != null ) + Owner.PlaySound( 0x20 ); + + return true; + } + + return false; + } + + public override void FinishOpening( Mobile from ) + { + base.FinishOpening( from ); + + AddComponent( new PlagueBeastComponent( 0x1363, 0xF ), -3, 3 ); + AddComponent( new PlagueBeastComponent( 0x1365, 0x1 ), -3, 10 ); + + m_Gland = new PlagueBeastComponent( 0x1CEF, 0x3F, true ); + AddComponent( (PlagueBeastComponent) m_Gland, -4, 16 ); + } + + public void FinishHealing() + { + for ( int i = 0; i < 7 && i < Components.Count; i++ ) + Components[ i ].Hue = 0x6; + + m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 2 ), new TimerCallback( OpenOrgan ) ); + } + + public void OpenOrgan() + { + AddComponent( new PlagueBeastComponent( 0x1367, 0xF ), 55, 61 ); + AddComponent( new PlagueBeastComponent( 0x1366, 0x1 ), 57, 66 ); + + if ( BrainHue > 0 ) + AddComponent( new PlagueBeastComponent( 0x1CF0, BrainHue, true ), 55, 69 ); + } + + public PlagueBeastBackupOrgan( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.WriteEncodedInt( 0 ); // version + + writer.Write( (Item) m_Gland ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadEncodedInt(); + + m_Gland = reader.ReadItem(); + } + } + + public class PlagueBeastMainOrgan : PlagueBeastOrgan + { + private int m_Brains; + + public bool Complete + { + get { return m_Brains >= 4; } + } + + public PlagueBeastMainOrgan() : base() + { + m_Brains = 0; + } + + public override void Initialize() + { + // receptacles + AddComponent( new PlagueBeastComponent( 0x1B1B, 0x42 ), -36, -2 ); + AddComponent( new PlagueBeastComponent( 0x1FB3, 0x42 ), -42, 0 ); + AddComponent( new PlagueBeastComponent( 0x9DF, 0x42 ), -53, -7 ); + + AddComponent( new PlagueBeastComponent( 0x1B1C, 0x54 ), 29, 9 ); + AddComponent( new PlagueBeastComponent( 0x1D06, 0x54 ), 18, -2 ); + AddComponent( new PlagueBeastComponent( 0x9DF, 0x54 ), 36, -1 ); + + AddComponent( new PlagueBeastComponent( 0x1D10, 0x2B ), -36, 47 ); + AddComponent( new PlagueBeastComponent( 0x1B1C, 0x2B ), -24, 62 ); + AddComponent( new PlagueBeastComponent( 0x9DF, 0x2B ), -41, 74 ); + + AddComponent( new PlagueBeastComponent( 0x1B1B, 0x60 ), 39, 56 ); + AddComponent( new PlagueBeastComponent( 0x1FB4, 0x60 ), 34, 52 ); + AddComponent( new PlagueBeastComponent( 0x9DF, 0x60 ), 45, 71 ); + + // main part + AddComponent( new PlagueBeastComponent( 0x1351, 0x15 ), 23, 0 ); + AddComponent( new PlagueBeastComponent( 0x134F, 0x15 ), -22, 0 ); + AddComponent( new PlagueBeastComponent( 0x1350, 0x15 ), 0, 0 ); + } + + public override bool OnLifted( Mobile from, PlagueBeastComponent c ) + { + if ( c.IsBrain ) + m_Brains--; + + return true; + } + + public override bool OnDropped( Mobile from, Item item, PlagueBeastComponent to ) + { + if ( !Opened && to.IsReceptacle && item.Hue == to.Hue ) + { + to.Organ = this; + m_Brains++; + from.LocalOverheadMessage( MessageType.Regular, 0x34, 1071913 ); // You place the organ in the fleshy receptacle near the core. + + if ( Owner != null ) + { + Owner.PlaySound( 0x1BA ); + + if ( Owner.IsBleeding ) + { + from.LocalOverheadMessage( MessageType.Regular, 0x34, 1071922 ); // The plague beast is still bleeding from open wounds. You must seal any bleeding wounds before the core will open! + return true; + } + } + + if ( m_Brains == 4 ) + FinishOpening( from ); + + return true; + } + + return false; + } + + public override void FinishOpening( Mobile from ) + { + AddComponent( new PlagueBeastComponent( 0x1363, 0x1 ), 0, 22 ); + AddComponent( new PlagueBeastComponent( 0x1D04, 0xD ), 0, 22 ); + + if ( Owner != null && Owner.Backpack != null ) + { + PlagueBeastMutationCore core = new PlagueBeastMutationCore(); + Owner.Backpack.AddItem( core ); + core.Movable = false; + core.Cut = false; + core.X = X; + core.Y = Y + 34; + + Owner.PlaySound( 0x21 ); + Owner.PlaySound( 0x166 ); + } + + Opened = true; + } + + public PlagueBeastMainOrgan( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.WriteEncodedInt( 0 ); // version + + writer.Write( (int) m_Brains ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadEncodedInt(); + + m_Brains = reader.ReadInt(); + } + } +} diff --git a/Scripts/Items/Special/Mutation Core/PlagueBeastVein.cs b/Scripts/Items/Special/Mutation Core/PlagueBeastVein.cs new file mode 100644 index 000000000..ed24bd293 --- /dev/null +++ b/Scripts/Items/Special/Mutation Core/PlagueBeastVein.cs @@ -0,0 +1,87 @@ +using System; +using Server; +using Server.Mobiles; +using Server.Network; + +namespace Server.Items +{ + public class PlagueBeastVein : PlagueBeastComponent + { + private bool m_Cut; + + public bool Cut + { + get { return m_Cut; } + } + + private Timer m_Timer; + + public PlagueBeastVein( int itemID, int hue ) : base( itemID, hue ) + { + m_Cut = false; + } + + public override bool Scissor( Mobile from, Scissors scissors ) + { + if ( IsAccessibleTo( from ) ) + { + if ( !m_Cut && m_Timer == null ) + { + m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 3 ), new TimerStateCallback( CuttingDone ), from ); + scissors.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071899 ); // You begin cutting through the vein. + return true; + } + else + scissors.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071900 ); // // This vein has already been cut. + } + + return false; + } + + public override void OnAfterDelete() + { + if ( m_Timer != null && m_Timer.Running ) + m_Timer.Stop(); + } + + private void CuttingDone( Mobile from ) + { + m_Cut = true; + + if ( ItemID == 0x1B1C ) + ItemID = 0x1B1B; + else + ItemID = 0x1B1C; + + if ( Owner != null ) + Owner.PlaySound( 0x199 ); + + PlagueBeastRubbleOrgan organ = Organ as PlagueBeastRubbleOrgan; + + if ( organ != null ) + organ.OnVeinCut( from, this ); + } + + public PlagueBeastVein( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.WriteEncodedInt( 0 ); // version + + writer.Write( (bool) m_Cut ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadEncodedInt(); + + m_Cut = reader.ReadBool(); + } + } +} diff --git a/Scripts/Items/Weapons/Axes/Axe.cs b/Scripts/Items/Weapons/Axes/Axe.cs index 9a136d951..cf13b18a5 100644 --- a/Scripts/Items/Weapons/Axes/Axe.cs +++ b/Scripts/Items/Weapons/Axes/Axe.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 14; } } public override int AosMaxDamage{ get{ return 16; } } public override int AosSpeed{ get{ return 37; } } + public override float MlSpeed{ get{ return 3.00f; } } public override int OldStrengthReq{ get{ return 35; } } public override int OldMinDamage{ get{ return 6; } } diff --git a/Scripts/Items/Weapons/Axes/BattleAxe.cs b/Scripts/Items/Weapons/Axes/BattleAxe.cs index b079e4546..5b2091380 100644 --- a/Scripts/Items/Weapons/Axes/BattleAxe.cs +++ b/Scripts/Items/Weapons/Axes/BattleAxe.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 15; } } public override int AosMaxDamage{ get{ return 17; } } public override int AosSpeed{ get{ return 31; } } + public override float MlSpeed{ get{ return 3.50f; } } public override int OldStrengthReq{ get{ return 40; } } public override int OldMinDamage{ get{ return 6; } } diff --git a/Scripts/Items/Weapons/Axes/DoubleAxe.cs b/Scripts/Items/Weapons/Axes/DoubleAxe.cs index 6b8d466ff..9cbac9444 100644 --- a/Scripts/Items/Weapons/Axes/DoubleAxe.cs +++ b/Scripts/Items/Weapons/Axes/DoubleAxe.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 15; } } public override int AosMaxDamage{ get{ return 17; } } public override int AosSpeed{ get{ return 33; } } + public override float MlSpeed{ get{ return 3.25f; } } public override int OldStrengthReq{ get{ return 45; } } public override int OldMinDamage{ get{ return 5; } } diff --git a/Scripts/Items/Weapons/Axes/ExecutionersAxe.cs b/Scripts/Items/Weapons/Axes/ExecutionersAxe.cs index a66511119..f8786e6b2 100644 --- a/Scripts/Items/Weapons/Axes/ExecutionersAxe.cs +++ b/Scripts/Items/Weapons/Axes/ExecutionersAxe.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 15; } } public override int AosMaxDamage{ get{ return 17; } } public override int AosSpeed{ get{ return 33; } } + public override float MlSpeed{ get{ return 3.25f; } } public override int OldStrengthReq{ get{ return 35; } } public override int OldMinDamage{ get{ return 6; } } diff --git a/Scripts/Items/Weapons/Axes/Hatchet.cs b/Scripts/Items/Weapons/Axes/Hatchet.cs index 4d08f849f..9fc1047b2 100644 --- a/Scripts/Items/Weapons/Axes/Hatchet.cs +++ b/Scripts/Items/Weapons/Axes/Hatchet.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 13; } } public override int AosMaxDamage{ get{ return 15; } } public override int AosSpeed{ get{ return 41; } } + public override float MlSpeed{ get{ return 2.75f; } } public override int OldStrengthReq{ get{ return 15; } } public override int OldMinDamage{ get{ return 2; } } diff --git a/Scripts/Items/Weapons/Axes/LargeBattleAxe.cs b/Scripts/Items/Weapons/Axes/LargeBattleAxe.cs index 32a47e355..be15e8cff 100644 --- a/Scripts/Items/Weapons/Axes/LargeBattleAxe.cs +++ b/Scripts/Items/Weapons/Axes/LargeBattleAxe.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 16; } } public override int AosMaxDamage{ get{ return 17; } } public override int AosSpeed{ get{ return 29; } } + public override float MlSpeed{ get{ return 3.75f; } } public override int OldStrengthReq{ get{ return 40; } } public override int OldMinDamage{ get{ return 6; } } diff --git a/Scripts/Items/Weapons/Axes/Pickaxe.cs b/Scripts/Items/Weapons/Axes/Pickaxe.cs index 4517428ad..eafc43a77 100644 --- a/Scripts/Items/Weapons/Axes/Pickaxe.cs +++ b/Scripts/Items/Weapons/Axes/Pickaxe.cs @@ -17,6 +17,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 13; } } public override int AosMaxDamage{ get{ return 15; } } public override int AosSpeed{ get{ return 35; } } + public override float MlSpeed{ get{ return 3.00f; } } public override int OldStrengthReq{ get{ return 25; } } public override int OldMinDamage{ get{ return 1; } } diff --git a/Scripts/Items/Weapons/Axes/TwoHandedAxe.cs b/Scripts/Items/Weapons/Axes/TwoHandedAxe.cs index a6ae7fc91..1cee4b69f 100644 --- a/Scripts/Items/Weapons/Axes/TwoHandedAxe.cs +++ b/Scripts/Items/Weapons/Axes/TwoHandedAxe.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 16; } } public override int AosMaxDamage{ get{ return 17; } } public override int AosSpeed{ get{ return 31; } } + public override float MlSpeed{ get{ return 3.50f; } } public override int OldStrengthReq{ get{ return 35; } } public override int OldMinDamage{ get{ return 5; } } diff --git a/Scripts/Items/Weapons/Axes/WarAxe.cs b/Scripts/Items/Weapons/Axes/WarAxe.cs index 1c3f3334a..ddfb40488 100644 --- a/Scripts/Items/Weapons/Axes/WarAxe.cs +++ b/Scripts/Items/Weapons/Axes/WarAxe.cs @@ -15,6 +15,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 14; } } public override int AosMaxDamage{ get{ return 15; } } public override int AosSpeed{ get{ return 33; } } + public override float MlSpeed{ get{ return 3.25f; } } public override int OldStrengthReq{ get{ return 35; } } public override int OldMinDamage{ get{ return 9; } } diff --git a/Scripts/Items/Weapons/BaseWeapon.cs b/Scripts/Items/Weapons/BaseWeapon.cs index e20bc474f..9ffb4e361 100644 --- a/Scripts/Items/Weapons/BaseWeapon.cs +++ b/Scripts/Items/Weapons/BaseWeapon.cs @@ -97,7 +97,7 @@ namespace Server.Items private int m_StrReq, m_DexReq, m_IntReq; private int m_MinDamage, m_MaxDamage; private int m_HitSound, m_MissSound; - private int m_Speed; + private float m_Speed; private int m_MaxRange; private SkillName m_Skill; private WeaponType m_Type; @@ -121,6 +121,7 @@ namespace Server.Items public virtual int AosMinDamage{ get{ return 0; } } public virtual int AosMaxDamage{ get{ return 0; } } public virtual int AosSpeed{ get{ return 0; } } + public virtual float MlSpeed{ get{ return 0.0f; } } public virtual int AosMaxRange{ get{ return DefMaxRange; } } public virtual int AosHitSound{ get{ return DefHitSound; } } public virtual int AosMissSound{ get{ return DefMissSound; } } @@ -357,9 +358,20 @@ namespace Server.Items } [CommandProperty( AccessLevel.GameMaster )] - public int Speed + public float Speed { - get{ return ( m_Speed == -1 ? Core.AOS ? AosSpeed : OldSpeed : m_Speed ); } + get + { + if ( m_Speed != -1 ) + return m_Speed; + + if ( Core.ML ) + return MlSpeed; + else if ( Core.AOS ) + return AosSpeed; + + return m_Speed; + } set{ m_Speed = value; InvalidateProperties(); } } @@ -856,7 +868,7 @@ namespace Server.Items public virtual TimeSpan GetDelay( Mobile m ) { - int speed = this.Speed; + double speed = this.Speed; if ( speed == 0 ) return TimeSpan.FromHours( 1.0 ); @@ -901,14 +913,26 @@ namespace Server.Items if ( bonus > 60 ) bonus = 60; + + double ticks; - speed = (int)Math.Floor( speed * (bonus + 100.0) / 100.0 ); + if ( Core.ML ) + { + int stamTicks = m.Stam / 30; - if ( speed <= 0 ) - speed = 1; + ticks = speed * 4; + ticks = Math.Floor( ( ticks - stamTicks ) * ( 100.0 / ( 100 + bonus ) ) ); + } + else + { + speed = Math.Floor( speed * ( bonus + 100.0 ) / 100.0 ); - int ticks = (int)Math.Floor( (80000.0 / ((m.Stam + 100) * speed)) - 2 ); + if ( speed <= 0 ) + speed = 1; + ticks = Math.Floor( ( 80000.0 / ( ( m.Stam + 100 ) * speed ) ) - 2 ); + } + // Swing speed currently capped at one swing every 1.25 seconds (5 ticks). if ( ticks < 5 ) ticks = 5; @@ -917,7 +941,7 @@ namespace Server.Items } else if ( Core.AOS ) { - int v = (m.Stam + 100) * speed; + int v = (m.Stam + 100) * (int) speed; int bonus = AosAttributes.GetValue( m, AosAttribute.WeaponSpeed ); @@ -944,7 +968,7 @@ namespace Server.Items } else { - int v = (m.Stam + 100) * speed; + int v = (m.Stam + 100) * (int) speed; if ( v <= 0 ) v = 1; @@ -2412,7 +2436,7 @@ namespace Server.Items { base.Serialize( writer ); - writer.Write( (int) 8 ); // version + writer.Write( (int) 9 ); // version SaveFlag flags = SaveFlag.None; @@ -2502,7 +2526,7 @@ namespace Server.Items writer.Write( (int) m_MissSound ); if ( GetSaveFlag( flags, SaveFlag.Speed ) ) - writer.Write( (int) m_Speed ); + writer.Write( (float) m_Speed ); if ( GetSaveFlag( flags, SaveFlag.MaxRange ) ) writer.Write( (int) m_MaxRange ); @@ -2583,6 +2607,7 @@ namespace Server.Items switch ( version ) { + case 9: case 8: case 7: case 6: @@ -2676,7 +2701,12 @@ namespace Server.Items m_MissSound = -1; if ( GetSaveFlag( flags, SaveFlag.Speed ) ) - m_Speed = reader.ReadInt(); + { + if ( version < 9 ) + m_Speed = reader.ReadInt(); + else + m_Speed = reader.ReadFloat(); + } else m_Speed = -1; @@ -3239,7 +3269,11 @@ namespace Server.Items list.Add( 1060407, nrgy.ToString() ); // energy damage ~1_val~% list.Add( 1061168, "{0}\t{1}", MinDamage.ToString(), MaxDamage.ToString() ); // weapon damage ~1_val~ - ~2_val~ - list.Add( 1061167, Speed.ToString() ); // weapon speed ~1_val~ + + if ( Core.ML ) + list.Add( 1061167, String.Format( "{0}s", Speed ) ); // weapon speed ~1_val~ + else + list.Add( 1061167, Speed.ToString() ); if ( MaxRange > 1 ) list.Add( 1061169, MaxRange.ToString() ); // range ~1_val~ diff --git a/Scripts/Items/Weapons/Fists.cs b/Scripts/Items/Weapons/Fists.cs index 0517784a0..ddab2f6ff 100644 --- a/Scripts/Items/Weapons/Fists.cs +++ b/Scripts/Items/Weapons/Fists.cs @@ -21,6 +21,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 1; } } public override int AosMaxDamage{ get{ return 4; } } public override int AosSpeed{ get{ return 50; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 0; } } public override int OldMinDamage{ get{ return 1; } } diff --git a/Scripts/Items/Weapons/Knives/ButcherKnife.cs b/Scripts/Items/Weapons/Knives/ButcherKnife.cs index 7916bfadf..c4bf3f936 100644 --- a/Scripts/Items/Weapons/Knives/ButcherKnife.cs +++ b/Scripts/Items/Weapons/Knives/ButcherKnife.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 9; } } public override int AosMaxDamage{ get{ return 11; } } public override int AosSpeed{ get{ return 49; } } + public override float MlSpeed{ get{ return 2.25f; } } public override int OldStrengthReq{ get{ return 5; } } public override int OldMinDamage{ get{ return 2; } } diff --git a/Scripts/Items/Weapons/Knives/Cleaver.cs b/Scripts/Items/Weapons/Knives/Cleaver.cs index 4fafa1e0a..cdf4dc694 100644 --- a/Scripts/Items/Weapons/Knives/Cleaver.cs +++ b/Scripts/Items/Weapons/Knives/Cleaver.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 11; } } public override int AosMaxDamage{ get{ return 13; } } public override int AosSpeed{ get{ return 46; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 10; } } public override int OldMinDamage{ get{ return 2; } } diff --git a/Scripts/Items/Weapons/Knives/Dagger.cs b/Scripts/Items/Weapons/Knives/Dagger.cs index 7e8f02f72..4bba249cb 100644 --- a/Scripts/Items/Weapons/Knives/Dagger.cs +++ b/Scripts/Items/Weapons/Knives/Dagger.cs @@ -15,6 +15,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 10; } } public override int AosMaxDamage{ get{ return 11; } } public override int AosSpeed{ get{ return 56; } } + public override float MlSpeed{ get{ return 2.00f; } } public override int OldStrengthReq{ get{ return 1; } } public override int OldMinDamage{ get{ return 3; } } diff --git a/Scripts/Items/Weapons/Knives/SkinningKnife.cs b/Scripts/Items/Weapons/Knives/SkinningKnife.cs index 2e2d9c84f..948da42c6 100644 --- a/Scripts/Items/Weapons/Knives/SkinningKnife.cs +++ b/Scripts/Items/Weapons/Knives/SkinningKnife.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 9; } } public override int AosMaxDamage{ get{ return 11; } } public override int AosSpeed{ get{ return 49; } } + public override float MlSpeed{ get{ return 2.25f; } } public override int OldStrengthReq{ get{ return 5; } } public override int OldMinDamage{ get{ return 1; } } diff --git a/Scripts/Items/Weapons/ML Weapons/AssassinSpike.cs b/Scripts/Items/Weapons/ML Weapons/AssassinSpike.cs index cc5f3a799..25991cc55 100644 --- a/Scripts/Items/Weapons/ML Weapons/AssassinSpike.cs +++ b/Scripts/Items/Weapons/ML Weapons/AssassinSpike.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 10; } } public override int AosMaxDamage{ get{ return 12; } } public override int AosSpeed{ get{ return 50; } } + public override float MlSpeed{ get{ return 2.00f; } } public override int OldStrengthReq{ get{ return 15; } } public override int OldMinDamage{ get{ return 10; } } diff --git a/Scripts/Items/Weapons/ML Weapons/DiamondMace.cs b/Scripts/Items/Weapons/ML Weapons/DiamondMace.cs index d7595ab87..5f5cbfab1 100644 --- a/Scripts/Items/Weapons/ML Weapons/DiamondMace.cs +++ b/Scripts/Items/Weapons/ML Weapons/DiamondMace.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 14; } } public override int AosMaxDamage{ get{ return 17; } } public override int AosSpeed{ get{ return 37; } } + public override float MlSpeed{ get{ return 3.00f; } } public override int OldStrengthReq{ get{ return 35; } } public override int OldMinDamage{ get{ return 14; } } diff --git a/Scripts/Items/Weapons/ML Weapons/ElvenCompositeLongbow.cs b/Scripts/Items/Weapons/ML Weapons/ElvenCompositeLongbow.cs index ccce0b431..2697ec028 100644 --- a/Scripts/Items/Weapons/ML Weapons/ElvenCompositeLongbow.cs +++ b/Scripts/Items/Weapons/ML Weapons/ElvenCompositeLongbow.cs @@ -18,6 +18,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 12; } } public override int AosMaxDamage{ get{ return 16; } } public override int AosSpeed{ get{ return 27; } } + public override float MlSpeed{ get{ return 4.00f; } } public override int OldStrengthReq{ get{ return 45; } } public override int OldMinDamage{ get{ return 12; } } diff --git a/Scripts/Items/Weapons/ML Weapons/ElvenMachete.cs b/Scripts/Items/Weapons/ML Weapons/ElvenMachete.cs index ef67007f1..5503208f8 100644 --- a/Scripts/Items/Weapons/ML Weapons/ElvenMachete.cs +++ b/Scripts/Items/Weapons/ML Weapons/ElvenMachete.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 13; } } public override int AosMaxDamage{ get{ return 15; } } public override int AosSpeed{ get{ return 41; } } + public override float MlSpeed{ get{ return 2.75f; } } public override int OldStrengthReq{ get{ return 20; } } public override int OldMinDamage{ get{ return 13; } } diff --git a/Scripts/Items/Weapons/ML Weapons/ElvenSpellblade.cs b/Scripts/Items/Weapons/ML Weapons/ElvenSpellblade.cs index 5c8b932c9..6eda93ae2 100644 --- a/Scripts/Items/Weapons/ML Weapons/ElvenSpellblade.cs +++ b/Scripts/Items/Weapons/ML Weapons/ElvenSpellblade.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 12; } } public override int AosMaxDamage{ get{ return 14; } } public override int AosSpeed{ get{ return 44; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 35; } } public override int OldMinDamage{ get{ return 12; } } diff --git a/Scripts/Items/Weapons/ML Weapons/Leafblade.cs b/Scripts/Items/Weapons/ML Weapons/Leafblade.cs index 0db6c0be9..428a39512 100644 --- a/Scripts/Items/Weapons/ML Weapons/Leafblade.cs +++ b/Scripts/Items/Weapons/ML Weapons/Leafblade.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 13; } } public override int AosMaxDamage{ get{ return 15; } } public override int AosSpeed{ get{ return 42; } } + public override float MlSpeed{ get{ return 2.75f; } } public override int OldStrengthReq{ get{ return 20; } } public override int OldMinDamage{ get{ return 13; } } diff --git a/Scripts/Items/Weapons/ML Weapons/MagicalShortbow.cs b/Scripts/Items/Weapons/ML Weapons/MagicalShortbow.cs index a3401116a..a38882636 100644 --- a/Scripts/Items/Weapons/ML Weapons/MagicalShortbow.cs +++ b/Scripts/Items/Weapons/ML Weapons/MagicalShortbow.cs @@ -18,6 +18,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 9; } } public override int AosMaxDamage{ get{ return 13; } } public override int AosSpeed{ get{ return 38; } } + public override float MlSpeed{ get{ return 3.00f; } } public override int OldStrengthReq{ get{ return 45; } } public override int OldMinDamage{ get{ return 9; } } diff --git a/Scripts/Items/Weapons/ML Weapons/OrnateAxe.cs b/Scripts/Items/Weapons/ML Weapons/OrnateAxe.cs index fb3782e40..f3be9ac1e 100644 --- a/Scripts/Items/Weapons/ML Weapons/OrnateAxe.cs +++ b/Scripts/Items/Weapons/ML Weapons/OrnateAxe.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 18; } } public override int AosMaxDamage{ get{ return 20; } } public override int AosSpeed{ get{ return 26; } } + public override float MlSpeed{ get{ return 3.50f; } } public override int OldStrengthReq{ get{ return 45; } } public override int OldMinDamage{ get{ return 18; } } diff --git a/Scripts/Items/Weapons/ML Weapons/RadiantScimitar.cs b/Scripts/Items/Weapons/ML Weapons/RadiantScimitar.cs index 02a43da3a..33f44d3a1 100644 --- a/Scripts/Items/Weapons/ML Weapons/RadiantScimitar.cs +++ b/Scripts/Items/Weapons/ML Weapons/RadiantScimitar.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 12; } } public override int AosMaxDamage{ get{ return 14; } } public override int AosSpeed{ get{ return 43; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 20; } } public override int OldMinDamage{ get{ return 12; } } diff --git a/Scripts/Items/Weapons/ML Weapons/RuneBlade.cs b/Scripts/Items/Weapons/ML Weapons/RuneBlade.cs index 1b0d5ce8d..e9b6de1a1 100644 --- a/Scripts/Items/Weapons/ML Weapons/RuneBlade.cs +++ b/Scripts/Items/Weapons/ML Weapons/RuneBlade.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 15; } } public override int AosMaxDamage{ get{ return 17; } } public override int AosSpeed{ get{ return 35; } } + public override float MlSpeed{ get{ return 3.00f; } } public override int OldStrengthReq{ get{ return 30; } } public override int OldMinDamage{ get{ return 15; } } diff --git a/Scripts/Items/Weapons/ML Weapons/WarCleaver.cs b/Scripts/Items/Weapons/ML Weapons/WarCleaver.cs index 1d0faacfc..888a00d0c 100644 --- a/Scripts/Items/Weapons/ML Weapons/WarCleaver.cs +++ b/Scripts/Items/Weapons/ML Weapons/WarCleaver.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 9; } } public override int AosMaxDamage{ get{ return 11; } } public override int AosSpeed{ get{ return 48; } } + public override float MlSpeed{ get{ return 2.25f; } } public override int OldStrengthReq{ get{ return 15; } } public override int OldMinDamage{ get{ return 9; } } diff --git a/Scripts/Items/Weapons/ML Weapons/WildStaff.cs b/Scripts/Items/Weapons/ML Weapons/WildStaff.cs index 6f7fbccee..a2d09e7bb 100644 --- a/Scripts/Items/Weapons/ML Weapons/WildStaff.cs +++ b/Scripts/Items/Weapons/ML Weapons/WildStaff.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 10; } } public override int AosMaxDamage{ get{ return 12; } } public override int AosSpeed{ get{ return 48; } } + public override float MlSpeed{ get{ return 2.25f; } } public override int OldStrengthReq{ get{ return 15; } } public override int OldMinDamage{ get{ return 10; } } diff --git a/Scripts/Items/Weapons/Maces/Club.cs b/Scripts/Items/Weapons/Maces/Club.cs index 5d935f761..88676202a 100644 --- a/Scripts/Items/Weapons/Maces/Club.cs +++ b/Scripts/Items/Weapons/Maces/Club.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 11; } } public override int AosMaxDamage{ get{ return 13; } } public override int AosSpeed{ get{ return 44; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 10; } } public override int OldMinDamage{ get{ return 8; } } diff --git a/Scripts/Items/Weapons/Maces/HammerPick.cs b/Scripts/Items/Weapons/Maces/HammerPick.cs index 6d121f888..4d83e744c 100644 --- a/Scripts/Items/Weapons/Maces/HammerPick.cs +++ b/Scripts/Items/Weapons/Maces/HammerPick.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 15; } } public override int AosMaxDamage{ get{ return 17; } } public override int AosSpeed{ get{ return 28; } } + public override float MlSpeed{ get{ return 3.75f; } } public override int OldStrengthReq{ get{ return 35; } } public override int OldMinDamage{ get{ return 6; } } diff --git a/Scripts/Items/Weapons/Maces/Mace.cs b/Scripts/Items/Weapons/Maces/Mace.cs index 254d3037d..01769d4b3 100644 --- a/Scripts/Items/Weapons/Maces/Mace.cs +++ b/Scripts/Items/Weapons/Maces/Mace.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 12; } } public override int AosMaxDamage{ get{ return 14; } } public override int AosSpeed{ get{ return 40; } } + public override float MlSpeed{ get{ return 2.75f; } } public override int OldStrengthReq{ get{ return 20; } } public override int OldMinDamage{ get{ return 8; } } diff --git a/Scripts/Items/Weapons/Maces/MagicWand.cs b/Scripts/Items/Weapons/Maces/MagicWand.cs index 42d75b980..d85671bd0 100644 --- a/Scripts/Items/Weapons/Maces/MagicWand.cs +++ b/Scripts/Items/Weapons/Maces/MagicWand.cs @@ -13,6 +13,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 9; } } public override int AosMaxDamage{ get{ return 11; } } public override int AosSpeed{ get{ return 40; } } + public override float MlSpeed{ get{ return 2.75f; } } public override int OldStrengthReq{ get{ return 0; } } public override int OldMinDamage{ get{ return 2; } } diff --git a/Scripts/Items/Weapons/Maces/Maul.cs b/Scripts/Items/Weapons/Maces/Maul.cs index 0152098b2..32cb625b1 100644 --- a/Scripts/Items/Weapons/Maces/Maul.cs +++ b/Scripts/Items/Weapons/Maces/Maul.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 14; } } public override int AosMaxDamage{ get{ return 16; } } public override int AosSpeed{ get{ return 32; } } + public override float MlSpeed{ get{ return 3.50f; } } public override int OldStrengthReq{ get{ return 20; } } public override int OldMinDamage{ get{ return 10; } } diff --git a/Scripts/Items/Weapons/Maces/Scepter.cs b/Scripts/Items/Weapons/Maces/Scepter.cs index 4998442fc..00c9fc6b1 100644 --- a/Scripts/Items/Weapons/Maces/Scepter.cs +++ b/Scripts/Items/Weapons/Maces/Scepter.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 14; } } public override int AosMaxDamage{ get{ return 17; } } public override int AosSpeed{ get{ return 30; } } + public override float MlSpeed{ get{ return 3.50f; } } public override int OldStrengthReq{ get{ return 40; } } public override int OldMinDamage{ get{ return 14; } } diff --git a/Scripts/Items/Weapons/Maces/WarHammer.cs b/Scripts/Items/Weapons/Maces/WarHammer.cs index 44a67af61..4f93d4c93 100644 --- a/Scripts/Items/Weapons/Maces/WarHammer.cs +++ b/Scripts/Items/Weapons/Maces/WarHammer.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 17; } } public override int AosMaxDamage{ get{ return 18; } } public override int AosSpeed{ get{ return 28; } } + public override float MlSpeed{ get{ return 3.75f; } } public override int OldStrengthReq{ get{ return 40; } } public override int OldMinDamage{ get{ return 8; } } diff --git a/Scripts/Items/Weapons/Maces/WarMace.cs b/Scripts/Items/Weapons/Maces/WarMace.cs index feafd2944..27ba4605e 100644 --- a/Scripts/Items/Weapons/Maces/WarMace.cs +++ b/Scripts/Items/Weapons/Maces/WarMace.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 16; } } public override int AosMaxDamage{ get{ return 17; } } public override int AosSpeed{ get{ return 26; } } + public override float MlSpeed{ get{ return 4.00f; } } public override int OldStrengthReq{ get{ return 30; } } public override int OldMinDamage{ get{ return 10; } } diff --git a/Scripts/Items/Weapons/PoleArms/Bardiche.cs b/Scripts/Items/Weapons/PoleArms/Bardiche.cs index 131c8dd81..01ffd370d 100644 --- a/Scripts/Items/Weapons/PoleArms/Bardiche.cs +++ b/Scripts/Items/Weapons/PoleArms/Bardiche.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 17; } } public override int AosMaxDamage{ get{ return 18; } } public override int AosSpeed{ get{ return 28; } } + public override float MlSpeed{ get{ return 3.75f; } } public override int OldStrengthReq{ get{ return 40; } } public override int OldMinDamage{ get{ return 5; } } diff --git a/Scripts/Items/Weapons/PoleArms/Halberd.cs b/Scripts/Items/Weapons/PoleArms/Halberd.cs index 7a62380c4..a86e8bedf 100644 --- a/Scripts/Items/Weapons/PoleArms/Halberd.cs +++ b/Scripts/Items/Weapons/PoleArms/Halberd.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 18; } } public override int AosMaxDamage{ get{ return 19; } } public override int AosSpeed{ get{ return 25; } } + public override float MlSpeed{ get{ return 4.25f; } } public override int OldStrengthReq{ get{ return 45; } } public override int OldMinDamage{ get{ return 5; } } diff --git a/Scripts/Items/Weapons/PoleArms/Scythe.cs b/Scripts/Items/Weapons/PoleArms/Scythe.cs index a0229aff9..b673f161a 100644 --- a/Scripts/Items/Weapons/PoleArms/Scythe.cs +++ b/Scripts/Items/Weapons/PoleArms/Scythe.cs @@ -15,6 +15,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 15; } } public override int AosMaxDamage{ get{ return 18; } } public override int AosSpeed{ get{ return 32; } } + public override float MlSpeed{ get{ return 3.50f; } } public override int OldStrengthReq{ get{ return 45; } } public override int OldMinDamage{ get{ return 15; } } diff --git a/Scripts/Items/Weapons/Ranged/Bow.cs b/Scripts/Items/Weapons/Ranged/Bow.cs index 5199b1cb7..2f46358f3 100644 --- a/Scripts/Items/Weapons/Ranged/Bow.cs +++ b/Scripts/Items/Weapons/Ranged/Bow.cs @@ -18,6 +18,7 @@ namespace Server.Items 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; } } diff --git a/Scripts/Items/Weapons/Ranged/CompositeBow.cs b/Scripts/Items/Weapons/Ranged/CompositeBow.cs index bb68a485a..506ee33ae 100644 --- a/Scripts/Items/Weapons/Ranged/CompositeBow.cs +++ b/Scripts/Items/Weapons/Ranged/CompositeBow.cs @@ -18,6 +18,7 @@ namespace Server.Items 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; } } diff --git a/Scripts/Items/Weapons/Ranged/Crossbow.cs b/Scripts/Items/Weapons/Ranged/Crossbow.cs index 7d1298396..1dc9c33a8 100644 --- a/Scripts/Items/Weapons/Ranged/Crossbow.cs +++ b/Scripts/Items/Weapons/Ranged/Crossbow.cs @@ -18,6 +18,7 @@ namespace Server.Items 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; } } diff --git a/Scripts/Items/Weapons/Ranged/HeavyCrossbow.cs b/Scripts/Items/Weapons/Ranged/HeavyCrossbow.cs index 5093eea0e..be8c1b7b2 100644 --- a/Scripts/Items/Weapons/Ranged/HeavyCrossbow.cs +++ b/Scripts/Items/Weapons/Ranged/HeavyCrossbow.cs @@ -18,6 +18,7 @@ namespace Server.Items 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; } } diff --git a/Scripts/Items/Weapons/Ranged/RepeatingCrossbow.cs b/Scripts/Items/Weapons/Ranged/RepeatingCrossbow.cs index c89c7c2d5..122ad8629 100644 --- a/Scripts/Items/Weapons/Ranged/RepeatingCrossbow.cs +++ b/Scripts/Items/Weapons/Ranged/RepeatingCrossbow.cs @@ -18,6 +18,7 @@ namespace Server.Items 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; } } diff --git a/Scripts/Items/Weapons/SE Weapons/Bokuto.cs b/Scripts/Items/Weapons/SE Weapons/Bokuto.cs index 939f9d0fc..1854bf83d 100644 --- a/Scripts/Items/Weapons/SE Weapons/Bokuto.cs +++ b/Scripts/Items/Weapons/SE Weapons/Bokuto.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 9; } } public override int AosMaxDamage{ get{ return 11; } } public override int AosSpeed{ get{ return 53; } } + public override float MlSpeed{ get{ return 2.00f; } } public override int OldStrengthReq{ get{ return 20; } } public override int OldMinDamage{ get{ return 9; } } diff --git a/Scripts/Items/Weapons/SE Weapons/Daisho.cs b/Scripts/Items/Weapons/SE Weapons/Daisho.cs index 736c8a8af..da5a97da9 100644 --- a/Scripts/Items/Weapons/SE Weapons/Daisho.cs +++ b/Scripts/Items/Weapons/SE Weapons/Daisho.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 13; } } public override int AosMaxDamage{ get{ return 15; } } public override int AosSpeed{ get{ return 40; } } + public override float MlSpeed{ get{ return 2.75f; } } public override int OldStrengthReq{ get{ return 40; } } public override int OldMinDamage{ get{ return 13; } } diff --git a/Scripts/Items/Weapons/SE Weapons/Kama.cs b/Scripts/Items/Weapons/SE Weapons/Kama.cs index ecd7adb27..beb1435a6 100644 --- a/Scripts/Items/Weapons/SE Weapons/Kama.cs +++ b/Scripts/Items/Weapons/SE Weapons/Kama.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 9; } } public override int AosMaxDamage{ get{ return 11; } } public override int AosSpeed{ get{ return 55; } } + public override float MlSpeed{ get{ return 2.00f; } } public override int OldStrengthReq{ get{ return 15; } } public override int OldMinDamage{ get{ return 9; } } diff --git a/Scripts/Items/Weapons/SE Weapons/Lajatang.cs b/Scripts/Items/Weapons/SE Weapons/Lajatang.cs index 07afb40fe..1fd74e308 100644 --- a/Scripts/Items/Weapons/SE Weapons/Lajatang.cs +++ b/Scripts/Items/Weapons/SE Weapons/Lajatang.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 16; } } public override int AosMaxDamage{ get{ return 18; } } public override int AosSpeed{ get{ return 32; } } + public override float MlSpeed{ get{ return 3.50f; } } public override int OldStrengthReq{ get{ return 65; } } public override int OldMinDamage{ get{ return 16; } } diff --git a/Scripts/Items/Weapons/SE Weapons/NoDachi.cs b/Scripts/Items/Weapons/SE Weapons/NoDachi.cs index 572a6e767..e6475e23c 100644 --- a/Scripts/Items/Weapons/SE Weapons/NoDachi.cs +++ b/Scripts/Items/Weapons/SE Weapons/NoDachi.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 16; } } public override int AosMaxDamage{ get{ return 18; } } public override int AosSpeed{ get{ return 35; } } + public override float MlSpeed{ get{ return 3.50f; } } public override int OldStrengthReq{ get{ return 40; } } public override int OldMinDamage{ get{ return 16; } } diff --git a/Scripts/Items/Weapons/SE Weapons/Nunchaku.cs b/Scripts/Items/Weapons/SE Weapons/Nunchaku.cs index 93796f359..2ca82a0cd 100644 --- a/Scripts/Items/Weapons/SE Weapons/Nunchaku.cs +++ b/Scripts/Items/Weapons/SE Weapons/Nunchaku.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 11; } } public override int AosMaxDamage{ get{ return 13; } } public override int AosSpeed{ get{ return 47; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 15; } } public override int OldMinDamage{ get{ return 11; } } diff --git a/Scripts/Items/Weapons/SE Weapons/Sai.cs b/Scripts/Items/Weapons/SE Weapons/Sai.cs index ccfb15fc3..4c4a3c9d3 100644 --- a/Scripts/Items/Weapons/SE Weapons/Sai.cs +++ b/Scripts/Items/Weapons/SE Weapons/Sai.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 9; } } public override int AosMaxDamage{ get{ return 11; } } public override int AosSpeed{ get{ return 55; } } + public override float MlSpeed{ get{ return 2.00f; } } public override int OldStrengthReq{ get{ return 15; } } public override int OldMinDamage{ get{ return 9; } } diff --git a/Scripts/Items/Weapons/SE Weapons/Tekagi.cs b/Scripts/Items/Weapons/SE Weapons/Tekagi.cs index 57d53c478..3af7e5506 100644 --- a/Scripts/Items/Weapons/SE Weapons/Tekagi.cs +++ b/Scripts/Items/Weapons/SE Weapons/Tekagi.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 10; } } public override int AosMaxDamage{ get{ return 12; } } public override int AosSpeed{ get{ return 53; } } + public override float MlSpeed{ get{ return 2.00f; } } public override int OldStrengthReq{ get{ return 10; } } public override int OldMinDamage{ get{ return 10; } } diff --git a/Scripts/Items/Weapons/SE Weapons/Tessen.cs b/Scripts/Items/Weapons/SE Weapons/Tessen.cs index 58cd26b2e..fda3e7aae 100644 --- a/Scripts/Items/Weapons/SE Weapons/Tessen.cs +++ b/Scripts/Items/Weapons/SE Weapons/Tessen.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 10; } } public override int AosMaxDamage{ get{ return 12; } } public override int AosSpeed{ get{ return 50; } } + public override float MlSpeed{ get{ return 2.00f; } } public override int OldStrengthReq{ get{ return 10; } } public override int OldMinDamage{ get{ return 10; } } diff --git a/Scripts/Items/Weapons/SE Weapons/Tetsubo.cs b/Scripts/Items/Weapons/SE Weapons/Tetsubo.cs index d2ed71ceb..cc28fd081 100644 --- a/Scripts/Items/Weapons/SE Weapons/Tetsubo.cs +++ b/Scripts/Items/Weapons/SE Weapons/Tetsubo.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 12; } } public override int AosMaxDamage{ get{ return 14; } } public override int AosSpeed{ get{ return 45; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 35; } } public override int OldMinDamage{ get{ return 12; } } diff --git a/Scripts/Items/Weapons/SE Weapons/Wakizashi.cs b/Scripts/Items/Weapons/SE Weapons/Wakizashi.cs index dc7bd6119..6538b64c4 100644 --- a/Scripts/Items/Weapons/SE Weapons/Wakizashi.cs +++ b/Scripts/Items/Weapons/SE Weapons/Wakizashi.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 11; } } public override int AosMaxDamage{ get{ return 13; } } public override int AosSpeed{ get{ return 44; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 20; } } public override int OldMinDamage{ get{ return 11; } } diff --git a/Scripts/Items/Weapons/SE Weapons/Yumi.cs b/Scripts/Items/Weapons/SE Weapons/Yumi.cs index 9818425f8..f338512c3 100644 --- a/Scripts/Items/Weapons/SE Weapons/Yumi.cs +++ b/Scripts/Items/Weapons/SE Weapons/Yumi.cs @@ -18,6 +18,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return Core.ML ? 16 : 18; } } public override int AosMaxDamage{ get{ return 20; } } public override int AosSpeed{ get{ return 25; } } + public override float MlSpeed{ get{ return 4.5f; } } public override int OldStrengthReq{ get{ return 35; } } public override int OldMinDamage{ get{ return 18; } } diff --git a/Scripts/Items/Weapons/SpearsAndForks/BladedStaff.cs b/Scripts/Items/Weapons/SpearsAndForks/BladedStaff.cs index 3791c3b27..a91f3899a 100644 --- a/Scripts/Items/Weapons/SpearsAndForks/BladedStaff.cs +++ b/Scripts/Items/Weapons/SpearsAndForks/BladedStaff.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 14; } } public override int AosMaxDamage{ get{ return 16; } } public override int AosSpeed{ get{ return 37; } } + public override float MlSpeed{ get{ return 3.00f; } } public override int OldStrengthReq{ get{ return 40; } } public override int OldMinDamage{ get{ return 14; } } diff --git a/Scripts/Items/Weapons/SpearsAndForks/DoubleBladedStaff.cs b/Scripts/Items/Weapons/SpearsAndForks/DoubleBladedStaff.cs index 29a95bafb..d73f3c384 100644 --- a/Scripts/Items/Weapons/SpearsAndForks/DoubleBladedStaff.cs +++ b/Scripts/Items/Weapons/SpearsAndForks/DoubleBladedStaff.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 12; } } public override int AosMaxDamage{ get{ return 13; } } public override int AosSpeed{ get{ return 49; } } + public override float MlSpeed{ get{ return 2.25f; } } public override int OldStrengthReq{ get{ return 50; } } public override int OldMinDamage{ get{ return 12; } } diff --git a/Scripts/Items/Weapons/SpearsAndForks/Pike.cs b/Scripts/Items/Weapons/SpearsAndForks/Pike.cs index 326ec3609..5fc0799c6 100644 --- a/Scripts/Items/Weapons/SpearsAndForks/Pike.cs +++ b/Scripts/Items/Weapons/SpearsAndForks/Pike.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 14; } } public override int AosMaxDamage{ get{ return 16; } } public override int AosSpeed{ get{ return 37; } } + public override float MlSpeed{ get{ return 3.00f; } } public override int OldStrengthReq{ get{ return 50; } } public override int OldMinDamage{ get{ return 14; } } diff --git a/Scripts/Items/Weapons/SpearsAndForks/Pitchfork.cs b/Scripts/Items/Weapons/SpearsAndForks/Pitchfork.cs index 505c27c70..f82249035 100644 --- a/Scripts/Items/Weapons/SpearsAndForks/Pitchfork.cs +++ b/Scripts/Items/Weapons/SpearsAndForks/Pitchfork.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 13; } } public override int AosMaxDamage{ get{ return 14; } } public override int AosSpeed{ get{ return 43; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 15; } } public override int OldMinDamage{ get{ return 4; } } diff --git a/Scripts/Items/Weapons/SpearsAndForks/ShortSpear.cs b/Scripts/Items/Weapons/SpearsAndForks/ShortSpear.cs index 5679e2149..6c3f15cba 100644 --- a/Scripts/Items/Weapons/SpearsAndForks/ShortSpear.cs +++ b/Scripts/Items/Weapons/SpearsAndForks/ShortSpear.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 10; } } public override int AosMaxDamage{ get{ return 13; } } public override int AosSpeed{ get{ return 55; } } + public override float MlSpeed{ get{ return 2.00f; } } public override int OldStrengthReq{ get{ return 15; } } public override int OldMinDamage{ get{ return 4; } } diff --git a/Scripts/Items/Weapons/SpearsAndForks/Spear.cs b/Scripts/Items/Weapons/SpearsAndForks/Spear.cs index 79df7f4a9..e52934814 100644 --- a/Scripts/Items/Weapons/SpearsAndForks/Spear.cs +++ b/Scripts/Items/Weapons/SpearsAndForks/Spear.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 13; } } public override int AosMaxDamage{ get{ return 15; } } public override int AosSpeed{ get{ return 42; } } + public override float MlSpeed{ get{ return 2.75f; } } public override int OldStrengthReq{ get{ return 30; } } public override int OldMinDamage{ get{ return 2; } } diff --git a/Scripts/Items/Weapons/SpearsAndForks/TribalSpear.cs b/Scripts/Items/Weapons/SpearsAndForks/TribalSpear.cs index 9a99d06a4..89c577df1 100644 --- a/Scripts/Items/Weapons/SpearsAndForks/TribalSpear.cs +++ b/Scripts/Items/Weapons/SpearsAndForks/TribalSpear.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 13; } } public override int AosMaxDamage{ get{ return 15; } } public override int AosSpeed{ get{ return 42; } } + public override float MlSpeed{ get{ return 2.75f; } } public override int OldStrengthReq{ get{ return 30; } } public override int OldMinDamage{ get{ return 2; } } diff --git a/Scripts/Items/Weapons/SpearsAndForks/WarFork.cs b/Scripts/Items/Weapons/SpearsAndForks/WarFork.cs index 3b9845bff..6c9c4ba12 100644 --- a/Scripts/Items/Weapons/SpearsAndForks/WarFork.cs +++ b/Scripts/Items/Weapons/SpearsAndForks/WarFork.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 12; } } public override int AosMaxDamage{ get{ return 13; } } public override int AosSpeed{ get{ return 43; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 35; } } public override int OldMinDamage{ get{ return 4; } } diff --git a/Scripts/Items/Weapons/Staves/BlackStaff.cs b/Scripts/Items/Weapons/Staves/BlackStaff.cs index 878c4cfc9..23c208f13 100644 --- a/Scripts/Items/Weapons/Staves/BlackStaff.cs +++ b/Scripts/Items/Weapons/Staves/BlackStaff.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 13; } } public override int AosMaxDamage{ get{ return 16; } } public override int AosSpeed{ get{ return 39; } } + public override float MlSpeed{ get{ return 2.75f; } } public override int OldStrengthReq{ get{ return 35; } } public override int OldMinDamage{ get{ return 8; } } diff --git a/Scripts/Items/Weapons/Staves/GnarledStaff.cs b/Scripts/Items/Weapons/Staves/GnarledStaff.cs index 26a158615..5195a509f 100644 --- a/Scripts/Items/Weapons/Staves/GnarledStaff.cs +++ b/Scripts/Items/Weapons/Staves/GnarledStaff.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 15; } } public override int AosMaxDamage{ get{ return 17; } } public override int AosSpeed{ get{ return 33; } } + public override float MlSpeed{ get{ return 3.25f; } } public override int OldStrengthReq{ get{ return 20; } } public override int OldMinDamage{ get{ return 10; } } diff --git a/Scripts/Items/Weapons/Staves/QuarterStaff.cs b/Scripts/Items/Weapons/Staves/QuarterStaff.cs index 32bb9f48e..23a3195db 100644 --- a/Scripts/Items/Weapons/Staves/QuarterStaff.cs +++ b/Scripts/Items/Weapons/Staves/QuarterStaff.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 11; } } public override int AosMaxDamage{ get{ return 14; } } public override int AosSpeed{ get{ return 48; } } + public override float MlSpeed{ get{ return 2.25f; } } public override int OldStrengthReq{ get{ return 30; } } public override int OldMinDamage{ get{ return 8; } } diff --git a/Scripts/Items/Weapons/Staves/ShepherdsCrook.cs b/Scripts/Items/Weapons/Staves/ShepherdsCrook.cs index c3e312425..a781f2b3d 100644 --- a/Scripts/Items/Weapons/Staves/ShepherdsCrook.cs +++ b/Scripts/Items/Weapons/Staves/ShepherdsCrook.cs @@ -16,6 +16,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 13; } } public override int AosMaxDamage{ get{ return 15; } } public override int AosSpeed{ get{ return 40; } } + public override float MlSpeed{ get{ return 2.75f; } } public override int OldStrengthReq{ get{ return 10; } } public override int OldMinDamage{ get{ return 3; } } diff --git a/Scripts/Items/Weapons/Swords/BoneHarvester.cs b/Scripts/Items/Weapons/Swords/BoneHarvester.cs index c77288df2..20d992921 100644 --- a/Scripts/Items/Weapons/Swords/BoneHarvester.cs +++ b/Scripts/Items/Weapons/Swords/BoneHarvester.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 13; } } public override int AosMaxDamage{ get{ return 15; } } public override int AosSpeed{ get{ return 36; } } + public override float MlSpeed{ get{ return 3.00f; } } public override int OldStrengthReq{ get{ return 25; } } public override int OldMinDamage{ get{ return 13; } } diff --git a/Scripts/Items/Weapons/Swords/Broadsword.cs b/Scripts/Items/Weapons/Swords/Broadsword.cs index 27cca7404..5a38a1942 100644 --- a/Scripts/Items/Weapons/Swords/Broadsword.cs +++ b/Scripts/Items/Weapons/Swords/Broadsword.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 14; } } public override int AosMaxDamage{ get{ return 15; } } public override int AosSpeed{ get{ return 33; } } + public override float MlSpeed{ get{ return 3.25f; } } public override int OldStrengthReq{ get{ return 25; } } public override int OldMinDamage{ get{ return 5; } } diff --git a/Scripts/Items/Weapons/Swords/CrescentBlade.cs b/Scripts/Items/Weapons/Swords/CrescentBlade.cs index 28f03d122..f9da08f39 100644 --- a/Scripts/Items/Weapons/Swords/CrescentBlade.cs +++ b/Scripts/Items/Weapons/Swords/CrescentBlade.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 11; } } public override int AosMaxDamage{ get{ return 14; } } public override int AosSpeed{ get{ return 47; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 55; } } public override int OldMinDamage{ get{ return 11; } } diff --git a/Scripts/Items/Weapons/Swords/Cutlass.cs b/Scripts/Items/Weapons/Swords/Cutlass.cs index 48d54d0e4..205e31bf4 100644 --- a/Scripts/Items/Weapons/Swords/Cutlass.cs +++ b/Scripts/Items/Weapons/Swords/Cutlass.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 11; } } public override int AosMaxDamage{ get{ return 13; } } public override int AosSpeed{ get{ return 44; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 10; } } public override int OldMinDamage{ get{ return 6; } } diff --git a/Scripts/Items/Weapons/Swords/Katana.cs b/Scripts/Items/Weapons/Swords/Katana.cs index f58f42e3a..600812572 100644 --- a/Scripts/Items/Weapons/Swords/Katana.cs +++ b/Scripts/Items/Weapons/Swords/Katana.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 11; } } public override int AosMaxDamage{ get{ return 13; } } public override int AosSpeed{ get{ return 46; } } + public override float MlSpeed{ get{ return 2.50f; } } public override int OldStrengthReq{ get{ return 10; } } public override int OldMinDamage{ get{ return 5; } } diff --git a/Scripts/Items/Weapons/Swords/Kryss.cs b/Scripts/Items/Weapons/Swords/Kryss.cs index fc5544607..0e8d85ece 100644 --- a/Scripts/Items/Weapons/Swords/Kryss.cs +++ b/Scripts/Items/Weapons/Swords/Kryss.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 10; } } public override int AosMaxDamage{ get{ return 12; } } public override int AosSpeed{ get{ return 53; } } + public override float MlSpeed{ get{ return 2.00f; } } public override int OldStrengthReq{ get{ return 10; } } public override int OldMinDamage{ get{ return 3; } } diff --git a/Scripts/Items/Weapons/Swords/Lance.cs b/Scripts/Items/Weapons/Swords/Lance.cs index 6942c30df..cf92f1577 100644 --- a/Scripts/Items/Weapons/Swords/Lance.cs +++ b/Scripts/Items/Weapons/Swords/Lance.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 17; } } public override int AosMaxDamage{ get{ return 18; } } public override int AosSpeed{ get{ return 24; } } + public override float MlSpeed{ get{ return 4.50f; } } public override int OldStrengthReq{ get{ return 95; } } public override int OldMinDamage{ get{ return 17; } } diff --git a/Scripts/Items/Weapons/Swords/Longsword.cs b/Scripts/Items/Weapons/Swords/Longsword.cs index 6978ea153..f925ad6f7 100644 --- a/Scripts/Items/Weapons/Swords/Longsword.cs +++ b/Scripts/Items/Weapons/Swords/Longsword.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 15; } } public override int AosMaxDamage{ get{ return 16; } } public override int AosSpeed{ get{ return 30; } } + public override float MlSpeed{ get{ return 3.50f; } } public override int OldStrengthReq{ get{ return 25; } } public override int OldMinDamage{ get{ return 5; } } diff --git a/Scripts/Items/Weapons/Swords/Scimitar.cs b/Scripts/Items/Weapons/Swords/Scimitar.cs index 72ce06ee0..00933f1aa 100644 --- a/Scripts/Items/Weapons/Swords/Scimitar.cs +++ b/Scripts/Items/Weapons/Swords/Scimitar.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 13; } } public override int AosMaxDamage{ get{ return 15; } } public override int AosSpeed{ get{ return 37; } } + public override float MlSpeed{ get{ return 3.00f; } } public override int OldStrengthReq{ get{ return 10; } } public override int OldMinDamage{ get{ return 4; } } diff --git a/Scripts/Items/Weapons/Swords/ThinLongsword.cs b/Scripts/Items/Weapons/Swords/ThinLongsword.cs index 8f47351b5..436ae45ed 100644 --- a/Scripts/Items/Weapons/Swords/ThinLongsword.cs +++ b/Scripts/Items/Weapons/Swords/ThinLongsword.cs @@ -11,6 +11,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 15; } } public override int AosMaxDamage{ get{ return 16; } } public override int AosSpeed{ get{ return 30; } } + public override float MlSpeed{ get{ return 3.50f; } } public override int OldStrengthReq{ get{ return 25; } } public override int OldMinDamage{ get{ return 5; } } diff --git a/Scripts/Items/Weapons/Swords/VikingSword.cs b/Scripts/Items/Weapons/Swords/VikingSword.cs index 588516a0a..0bc7a8d9b 100644 --- a/Scripts/Items/Weapons/Swords/VikingSword.cs +++ b/Scripts/Items/Weapons/Swords/VikingSword.cs @@ -14,6 +14,7 @@ namespace Server.Items public override int AosMinDamage{ get{ return 15; } } public override int AosMaxDamage{ get{ return 17; } } public override int AosSpeed{ get{ return 28; } } + public override float MlSpeed{ get{ return 3.75f; } } public override int OldStrengthReq{ get{ return 40; } } public override int OldMinDamage{ get{ return 6; } } diff --git a/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs b/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs index 452a8aaa3..18ee2b94f 100644 --- a/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs +++ b/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs @@ -40,9 +40,12 @@ namespace Server.Mobiles VirtualArmor = 30; PackArmor( 1, 5 ); + if ( Utility.RandomDouble() < 0.80 ) + PackItem( new PlagueBeastGland() ); if ( Core.ML && Utility.RandomDouble() < .33 ) PackItem( Engines.Plants.Seed.RandomPeculiarSeed(4) ); + } public override void GenerateLoot() diff --git a/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs b/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs new file mode 100644 index 000000000..b7a5d2ca6 --- /dev/null +++ b/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs @@ -0,0 +1,365 @@ +using System; +using Server.Items; +using Server.Network; + +namespace Server.Mobiles +{ + [CorpseName( "a plague beast lord corpse" )] + public class PlagueBeastLord : BaseCreature, ICarvable, IScissorable + { + public override Poison PoisonImmune { get { return Poison.Lethal; } } + + private Mobile m_OpenedBy; + + [CommandProperty( AccessLevel.GameMaster )] + public Mobile OpenedBy + { + get { return m_OpenedBy; } + set { m_OpenedBy = value; } + } + + [CommandProperty( AccessLevel.GameMaster )] + public bool IsBleeding + { + get + { + Container pack = Backpack; + + if ( pack != null ) + { + for ( int i = 0; i < pack.Items.Count; i++ ) + { + PlagueBeastBlood blood = pack.Items[ i ] as PlagueBeastBlood; + + if ( blood != null && !blood.Patched ) + return true; + } + } + + return false; + } + } + + private DecayTimer m_Timer; + + [Constructable] + public PlagueBeastLord() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 ) + { + Name = "a plague beast lord"; + Body = 775; + BaseSoundID = 679; + SpeechHue = 0x3B2; + + SetStr( 500 ); + SetDex( 100 ); + SetInt( 30 ); + + SetHits( 1800 ); + + SetDamage( 20, 25 ); + + SetDamageType( ResistanceType.Physical, 50 ); + SetDamageType( ResistanceType.Fire, 25 ); + SetDamageType( ResistanceType.Poison, 25 ); + + SetResistance( ResistanceType.Physical, 45, 55 ); + SetResistance( ResistanceType.Fire, 40, 50 ); + SetResistance( ResistanceType.Cold, 25, 35 ); + SetResistance( ResistanceType.Poison, 75, 85 ); + SetResistance( ResistanceType.Energy, 25, 35 ); + + SetSkill( SkillName.Tactics, 100 ); + SetSkill( SkillName.Wrestling, 100 ); + + Fame = 2000; + Karma = -2000; + + VirtualArmor = 50; + } + + public override void OnDoubleClick( Mobile from ) + { + if ( IsAccessibleTo( from ) ) + { + if ( m_OpenedBy != null && Backpack != null ) + Backpack.DisplayTo( from ); + else + PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1071917, from.NetState ); // * You attempt to tear open the amorphous flesh, but it resists * + } + } + + public override bool OnDragDrop( Mobile from, Item dropped ) + { + if ( IsAccessibleTo( from ) && ( dropped is PlagueBeastInnard || dropped is PlagueBeastGland ) ) + return base.OnDragDrop( from, dropped ); + + return false; + } + + public override void OnDeath( Container c ) + { + base.OnDeath( c ); + + for ( int i = c.Items.Count - 1; i >= 0; i-- ) + c.Items[ i ].Delete(); + } + + public override void OnDelete() + { + if ( m_OpenedBy != null && m_OpenedBy.Holding is PlagueBeastInnard ) + m_OpenedBy.Holding.Delete(); + + if ( Backpack != null ) + { + for ( int i = Backpack.Items.Count - 1; i >= 0; i-- ) + Backpack.Items[ i ].Delete(); + + Backpack.Delete(); + } + + base.OnDelete(); + } + + public override void OnMovement( Mobile m, Point3D oldLocation ) + { + base.OnMovement( m, oldLocation ); + + if ( Backpack != null && IsAccessibleTo( m ) && m.InRange( oldLocation, 3 ) && !m.InRange( this, 3 ) ) + Backpack.SendRemovePacket(); + } + + public override bool CheckNonlocalLift( Mobile from, Item item ) + { + return true; + } + + public override bool CheckNonlocalDrop( Mobile from, Item item, Item target ) + { + return true; + } + + public override bool IsSnoop( Mobile from ) + { + return false; + } + + public override int GetIdleSound() + { + return 0x1BF; + } + + public override int GetAttackSound() + { + return 0x1C0; + } + + public override int GetHurtSound() + { + return 0x1C1; + } + + public override int GetDeathSound() + { + return 0x1C2; + } + + public virtual void OnParalyzed( Mobile from ) + { + FightMode = FightMode.None; + Frozen = true; + Blessed = true; + Combatant = null; + Hue = 0x480; + from.Combatant = null; + from.Warmode = false; + + m_Timer = new DecayTimer( this ); + m_Timer.Start(); + + Timer.DelayCall( TimeSpan.Zero, new TimerCallback( BroadcastMessage ) ); + } + + private void BroadcastMessage() + { + PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071920 ); // * The plague beast's amorphous flesh hardens and becomes immobilized * + } + + public virtual bool IsAccessibleTo( Mobile check ) + { + if ( check.AccessLevel >= AccessLevel.GameMaster ) + return true; + + if ( !InRange( check, 2 ) ) + PrivateOverheadMessage( MessageType.Label, 0x3B2, 500446, check.NetState ); // That is too far away. + else if ( m_OpenedBy != null && m_OpenedBy != check ) + PrivateOverheadMessage( MessageType.Label, 0x3B2, 500365, check.NetState ); // That is being used by someone else + else if ( Frozen ) + return true; + + return false; + } + + public virtual void Carve( Mobile from, Item item ) + { + if ( m_OpenedBy == null && IsAccessibleTo( from ) ) + { + m_OpenedBy = from; + + if ( m_Timer == null ) + m_Timer = new DecayTimer( this ); + + if ( !m_Timer.Running ) + m_Timer.Start(); + + m_Timer.StartDissolving(); + + PlagueBeastBackpack pack = new PlagueBeastBackpack(); + AddItem( pack ); + pack.Initialize(); + + foreach ( NetState state in GetClientsInRange( 12 ) ) + { + Mobile m = state.Mobile; + + if ( m != null && m.Player && m != from ) + PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1071919, from.Name, m.NetState ); // * ~1_VAL~ slices through the plague beast's amorphous tissue * + } + + from.LocalOverheadMessage( MessageType.Regular, 0x21, 1071904 ); // * You slice through the plague beast's amorphous tissue * + Timer.DelayCall( TimeSpan.Zero, new TimerStateCallback( pack.Open ), from ); + } + } + + public virtual bool Scissor( Mobile from, Scissors scissors ) + { + if ( IsAccessibleTo( from ) ) + scissors.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071918 ); // You can't cut through the plague beast's amorphous skin with scissors! + + return false; + } + + public void Unfreeze() + { + FightMode = FightMode.Closest; + Frozen = false; + Blessed = false; + + if ( m_OpenedBy == null ) + Hue = 0; + } + + public PlagueBeastLord( Serial serial ) : base( serial ) + { + } + + public override void Serialize( GenericWriter writer ) + { + base.Serialize( writer ); + + writer.WriteEncodedInt( 0 ); // version + + writer.Write( m_OpenedBy ); + + if ( m_Timer != null ) + { + writer.Write( (bool) true ); + writer.Write( (int) m_Timer.Count ); + writer.Write( (int) m_Timer.Deadline ); + } + else + writer.Write( (bool) false ); + } + + public override void Deserialize( GenericReader reader ) + { + base.Deserialize( reader ); + + int version = reader.ReadEncodedInt(); + + m_OpenedBy = reader.ReadMobile(); + + if ( reader.ReadBool() ) + { + int count = reader.ReadInt(); + int deadline = reader.ReadInt(); + + m_Timer = new DecayTimer( this, count, deadline ); + m_Timer.Start(); + } + + if ( FightMode == FightMode.None ) + Frozen = true; + } + + private class DecayTimer : Timer + { + private PlagueBeastLord m_Lord; + private int m_Count; + private int m_Deadline; + + public int Count + { + get { return m_Count; } + } + + public int Deadline + { + get { return m_Deadline; } + } + + public DecayTimer( PlagueBeastLord lord ) : this( lord, 0, 120 ) + { + } + + public DecayTimer( PlagueBeastLord lord, int count, int deadline ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 1 ) ) + { + m_Lord = lord; + m_Count = count; + m_Deadline = deadline; + } + + protected override void OnTick() + { + if ( m_Lord == null || m_Lord.Deleted ) + { + Stop(); + return; + } + + if ( m_Count + 15 == m_Deadline ) + { + if ( m_Lord.OpenedBy != null ) + m_Lord.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071921 ); // * The plague beast begins to bubble and dissolve! * + + m_Lord.PlaySound( 0x103 ); + } + else if ( m_Count + 10 == m_Deadline ) + { + m_Lord.PlaySound( 0x21 ); + } + else if ( m_Count + 5 == m_Deadline ) + { + m_Lord.PlaySound( 0x1C2 ); + } + else if ( m_Count == m_Deadline ) + { + m_Lord.Unfreeze(); + + if ( m_Lord.OpenedBy != null ) + m_Lord.Kill(); + + Stop(); + } + else if ( m_Count % 15 == 0 ) + m_Lord.PlaySound( 0x1BF ); + + m_Count++; + } + + public void StartDissolving() + { + m_Deadline = Math.Min( m_Count + 60, m_Deadline ); + } + } + } +} diff --git a/Scripts/Spells/Fifth/Incognito.cs b/Scripts/Spells/Fifth/Incognito.cs index 0905f3888..8fe01df56 100644 --- a/Scripts/Spells/Fifth/Incognito.cs +++ b/Scripts/Spells/Fifth/Incognito.cs @@ -72,21 +72,16 @@ namespace Server.Spells.Fifth { DisguiseGump.StopTimer( Caster ); - Caster.BodyMod = Utility.RandomList( 400, 401 ); - Caster.HueMod = Utility.RandomSkinHue(); - Caster.NameMod = Caster.Body.IsFemale ? NameList.RandomName( "female" ) : NameList.RandomName( "male" ); + Caster.HueMod = Caster.Race.RandomSkinHue(); + Caster.NameMod = Caster.Female ? NameList.RandomName( "female" ) : NameList.RandomName( "male" ); PlayerMobile pm = Caster as PlayerMobile; - if ( pm != null ) + if ( pm != null && pm.Race != null ) { - if ( pm.Body.IsFemale ) - pm.SetHairMods( Utility.RandomList( m_HairIDs ), 0 ); - else - pm.SetHairMods( Utility.RandomList( m_HairIDs ), Utility.RandomList( m_BeardIDs ) ); - - pm.HairHue = Utility.RandomHairHue(); - pm.FacialHairHue = Utility.RandomHairHue(); + pm.SetHairMods( pm.Race.RandomHair( pm.Female ), pm.Race.RandomFacialHair( pm.Female ) ); + pm.HairHue = pm.Race.RandomHairHue(); + pm.FacialHairHue = pm.Race.RandomHairHue(); } Caster.FixedParticles( 0x373A, 10, 15, 5036, EffectLayer.Head ); @@ -117,7 +112,7 @@ namespace Server.Spells.Fifth } else { - Caster.SendLocalizedMessage( 1005559 ); // This spell is already in effect. + Caster.SendLocalizedMessage( 1079022 ); // You're already incognitoed! } } diff --git a/Scripts/Spells/Fifth/Paralyze.cs b/Scripts/Spells/Fifth/Paralyze.cs index 1349a8482..aff741887 100644 --- a/Scripts/Spells/Fifth/Paralyze.cs +++ b/Scripts/Spells/Fifth/Paralyze.cs @@ -1,4 +1,5 @@ using System; +using Server.Mobiles; using Server.Targeting; using Server.Network; @@ -69,10 +70,16 @@ namespace Server.Spells.Fifth duration *= 0.75; } - m.Paralyze( TimeSpan.FromSeconds( duration ) ); + if ( m is PlagueBeastLord ) + { + ( (PlagueBeastLord) m ).OnParalyzed( Caster ); + duration = 120; + } + + m.Paralyze( TimeSpan.FromSeconds( duration ) ); - m.PlaySound( 0x204 ); - m.FixedEffect( 0x376A, 6, 1 ); + m.PlaySound( 0x204 ); + m.FixedEffect( 0x376A, 6, 1 ); } FinishSequence(); diff --git a/Scripts/Spells/Fourth/ArchCure.cs b/Scripts/Spells/Fourth/ArchCure.cs index ada762125..b45d90331 100644 --- a/Scripts/Spells/Fourth/ArchCure.cs +++ b/Scripts/Spells/Fourth/ArchCure.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Server.Network; using Server.Items; using Server.Targeting; +using Server.Mobiles; namespace Server.Spells.Fourth { @@ -46,15 +47,28 @@ namespace Server.Spells.Fourth List targets = new List(); Map map = Caster.Map; + Mobile m_directtarget = p as Mobile; if ( map != null ) { + //you can target directly someone/something and become criminal if it's a criminal action + if ( m_directtarget != null ) + targets.Add ( m_directtarget ); + IPooledEnumerable eable = map.GetMobilesInRange( new Point3D( p ), 2 ); foreach ( Mobile m in eable ) { - // Archcure doesn't cure aggressors or victims - if ( Caster.CanBeBeneficial( m, false ) && (!Core.AOS || !IsAggressor( m ) && !IsAggressed( m )) ) + // Archcure area effect won't cure aggressors or victims, nor murderers, criminals or monsters + // plus Arch Cure Area will NEVER work on summons/pets if you are in Felucca facet + // red players can cure only themselves and guildies with arch cure area. + + if ( map.Rules == MapRules.FeluccaRules ) + { + if ( Caster.CanBeBeneficial( m, false ) && ( !Core.AOS || !IsAggressor( m ) && !IsAggressed( m ) && (( IsInnocentTo ( Caster, m ) && IsInnocentTo ( m, Caster ) ) || ( IsAllyTo ( Caster, m ) )) && m != m_directtarget && m is PlayerMobile || m == Caster && m != m_directtarget )) + targets.Add( m ); + } + else if ( Caster.CanBeBeneficial( m, false ) && ( !Core.AOS || !IsAggressor( m ) && !IsAggressed( m ) && (( IsInnocentTo ( Caster, m ) && IsInnocentTo ( m, Caster ) ) || ( IsAllyTo ( Caster, m ) )) && m != m_directtarget || m == Caster && m != m_directtarget )) targets.Add( m ); } @@ -119,6 +133,16 @@ namespace Server.Spells.Fourth return false; } + private static bool IsInnocentTo( Mobile from, Mobile to ) + { + return ( Notoriety.Compute( from, (Mobile)to ) == Notoriety.Innocent ); + } + + private static bool IsAllyTo( Mobile from, Mobile to ) + { + return ( Notoriety.Compute( from, (Mobile)to ) == Notoriety.Ally ); + } + private class InternalTarget : Target { private ArchCureSpell m_Owner;