psz
Administrator
[SVN] Plague Beast Lords Don't Exist
Type: Missing Mobile/Feature
Description: RunUO/Demise is missing the Plague Beast Lord mobile, and associated puzzle
Links: http://www.uoguide.com/Mutation_Core , http://uo.stratics.com/content/misc/mutationcore.shtml, http://www.uoguide.com/Plague_Beast_Lord , http://uo.stratics.com/database/view.php?db_content=hunters&id=277
This is a patch for the latest SVN. It adds the Plague Beast Lords, their internals, and the associated puzzle. It also modifies a few distro files (scissors, bandages, etc) for use with the puzzle.
This is *NOT*, I repeat *NOT* a finished product.
This is a modified version of a *VERY* old RunUO script (beta-era) that I cleaned up a tad and modified to work with the latest SVN.
This still needs extensive testing and coding to get just right.
Type: Missing Mobile/Feature
Description: RunUO/Demise is missing the Plague Beast Lord mobile, and associated puzzle
Links: http://www.uoguide.com/Mutation_Core , http://uo.stratics.com/content/misc/mutationcore.shtml, http://www.uoguide.com/Plague_Beast_Lord , http://uo.stratics.com/database/view.php?db_content=hunters&id=277
Code:
Index: Items/Containers/Organs/BaseOrgano.cs
===================================================================
--- Items/Containers/Organs/BaseOrgano.cs (revision 0)
+++ Items/Containers/Organs/BaseOrgano.cs (revision 0)
@@ -0,0 +1,96 @@
+using System;
+using Server;
+using Server.Mobiles;
+
+namespace Server.Items
+{
+ public abstract class BaseOrgano : Item
+ {
+ private bool m_Opened = false;
+ private Item m_Brain;
+ private BrainTypes m_BrainType;
+
+ [CommandProperty( AccessLevel.GameMaster )]
+ public bool IsOpened
+ {
+ get {return m_Opened;}
+ set {m_Opened = value;}
+ }
+
+ public Item MyBrain
+ {
+ get {return m_Brain;}
+ set {m_Brain = value;}
+ }
+
+ [CommandProperty( AccessLevel.GameMaster )]
+ public BrainTypes HeldBrainType
+ {
+ get {return m_BrainType;}
+ set {m_BrainType = value;}
+ }
+
+ public BaseOrgano( int itemID, string name, int color, BrainTypes brainType ) : base( itemID )
+ {
+ Name = name;
+
+ m_BrainType = brainType;
+ Hue = color;
+ Stackable = false;
+ Movable = false;
+ Weight = 1;
+ }
+
+ public virtual void CreateTissue()
+ {
+ }
+
+ public BaseOrgano( Serial serial ) : base( serial )
+ {
+ }
+
+ public void PutGuts( Item guts, int offSetX, int offSetY )
+ {
+ Container c = ( Parent as Container );
+ c.AddItem( guts );
+ guts.Location = new Point3D( X + offSetX, Y + offSetY, 0 );
+ }
+
+ public override bool IsAccessibleTo(Mobile check)
+ {
+ return true;
+ }
+
+ public virtual void OpenOrganTo( Mobile from )
+ {
+ IsOpened = true;
+ if ( m_BrainType != BrainTypes.Brain_None )
+ {
+ MyBrain.Visible = true;
+ }
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+
+ writer.Write( (int) 0 ); // version
+ writer.Write( (bool)m_Opened );
+ writer.Write( (int)m_BrainType );
+ writer.Write( (Item)m_Brain );
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+
+ int version = reader.ReadInt();
+ m_Opened = reader.ReadBool();
+ m_BrainType = (BrainTypes)reader.ReadInt();
+ m_Brain = reader.ReadItem();
+
+ if ( m_Brain == null )
+ Delete();
+ }
+ }
+}
Index: Items/Containers/Organs/Organo_Calamar.cs
===================================================================
--- Items/Containers/Organs/Organo_Calamar.cs (revision 0)
+++ Items/Containers/Organs/Organo_Calamar.cs (revision 0)
@@ -0,0 +1,135 @@
+using System;
+using Server;
+using Server.Network;
+using Server.Mobiles;
+
+namespace Server.Items
+{
+ public class Organo_Calamar : BaseOrgano
+ {
+ private Item m_Suborgan;
+ private Item m_Wound;
+ private Item m_GreenGland;
+ private Item m_Tissue;
+
+ private Item m_VeinI;
+ private Item m_VeinII;
+ private Item m_VeinIII;
+
+ private bool m_GlandIsReplaced = false;
+
+ public Organo_Calamar( BrainTypes cerebro ) : base( 4962 , PlagueHelper.Line[15], 0x26B, cerebro )
+ {
+ }
+
+ public Organo_Calamar( Serial serial ) : base( serial )
+ {
+ }
+
+ public override void CreateTissue()
+ {
+ m_Tissue = new Plague_deco( 4650, PlagueHelper.Line[24], 602, false, false );
+ PutGuts( m_Tissue, -2, 8 );
+ m_GreenGland = new Plague_deco( 7407, PlagueHelper.Line[16], 1271, true, false );
+ PutGuts( m_GreenGland, -3, 15 );
+
+ m_Suborgan = new Plague_deco( 4960, PlagueHelper.Line[17], 1271, false, true );
+ PutGuts( m_Suborgan, 45, 15 );
+
+ m_VeinI = new Plague_deco( 6939, PlagueHelper.Line[26], 1271, false, true );
+ PutGuts( m_VeinI, 24, 12 );
+ m_VeinII = new Plague_deco( 6939, PlagueHelper.Line[26], 1271, false, true );
+ PutGuts( m_VeinII, 27, 8 );
+ m_VeinIII = new Plague_deco( 6939, PlagueHelper.Line[26], 1271, false, true );
+ PutGuts( m_VeinIII, 30, 4 );
+
+ m_Wound = new Plague_deco( 7027, PlagueHelper.Line[8], 1, false, false );
+ PutGuts( m_Wound, 39, 20 );
+ MyBrain = new PlagueBrain( HeldBrainType );
+ PutGuts( MyBrain, 37, 22 );
+ PlagueBrain Cere = MyBrain as PlagueBrain;
+ Cere.CreateTissue( -4, -5 );
+ }
+
+ public void OnGlandDrop( Mobile from, Item gland )
+ {
+ if ( m_GreenGland.Parent == Parent )
+ from.LocalOverheadMessage( MessageType.Emote,0x66B, false, PlagueHelper.Line[18] );
+ if ( m_GlandIsReplaced )
+ from.LocalOverheadMessage( MessageType.Emote,0x66B, false, PlagueHelper.Line[19] );
+
+ if ( !m_GlandIsReplaced && !m_GreenGland.IsChildOf(RootParent) )
+ {
+ m_Suborgan.Hue = Hue;
+ m_VeinI.Hue = Hue;
+ m_VeinII.Hue = Hue;
+ m_VeinIII.Hue = Hue;
+ m_GlandIsReplaced = true;
+ gland.Movable = false;
+ m_Wound.Visible = true;
+ base.OpenOrganTo( from );
+ from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, PlagueHelper.Line[20] );
+ //If there is no brain, the wound begins to bleed directly
+ if ( HeldBrainType == BrainTypes.Brain_None )
+ {
+ PlagueBrain brain = MyBrain as PlagueBrain;
+ brain.MakeBleed( from );
+ }
+ }
+ }
+
+ public override void OpenOrganTo( Mobile from )
+ {
+ PlagueBeastLord plaguebl = RootParent as PlagueBeastLord;
+ if ( plaguebl == null )
+ return;
+
+ from.Direction = from.GetDirectionTo( plaguebl );
+ if ( IsOpened )
+ from.LocalOverheadMessage( MessageType.Emote,0x66B, false, PlagueHelper.Line[21] );
+ else
+ {
+ from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, PlagueHelper.Line[22]) ;
+ from.PlaySound( 0x248 );
+ from.PlaySound( 0x2AC );
+ m_Tissue.Visible = true;
+ m_GreenGland.Visible = true;
+ }
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+
+ writer.Write( (int) 0 ); // version
+
+ writer.Write( (Item)m_Wound );
+ writer.Write( (Item)m_GreenGland );
+ writer.Write( (Item)m_Tissue );
+ writer.Write( (Item)m_Suborgan );
+ writer.Write( (Item)m_VeinI );
+ writer.Write( (Item)m_VeinII );
+ writer.Write( (Item)m_VeinIII );
+ writer.Write( (bool)m_GlandIsReplaced);
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+
+ int version = reader.ReadInt();
+
+ m_Wound = reader.ReadItem();
+ m_GreenGland = reader.ReadItem();
+ m_Tissue = reader.ReadItem();
+ m_Suborgan = reader.ReadItem();
+ m_VeinI = reader.ReadItem();
+ m_VeinII = reader.ReadItem();
+ m_VeinIII = reader.ReadItem();
+ m_GlandIsReplaced = reader.ReadBool();
+
+ if ( m_Wound == null || m_GreenGland == null || m_Tissue == null || m_Suborgan == null || m_VeinI == null || m_VeinII == null || m_VeinIII == null )
+ Delete();
+ }
+ }
+}
Index: Items/Containers/Organs/Organo_Maiden.cs
===================================================================
--- Items/Containers/Organs/Organo_Maiden.cs (revision 0)
+++ Items/Containers/Organs/Organo_Maiden.cs (revision 0)
@@ -0,0 +1,70 @@
+using System;
+using Server;
+using Server.Network;
+using Server.Mobiles;
+
+namespace Server.Items
+{
+ public class Organo_Maiden : BaseOrgano
+ {
+ public Organo_Maiden( BrainTypes cerebro ) : base( 4685, PlagueHelper.Line[15], 0x487, cerebro )
+ {
+ }
+
+ public Organo_Maiden( Serial serial ) : base( serial )
+ {
+ }
+
+ public override void CreateTissue()
+ {
+ MyBrain = new PlagueBrain( HeldBrainType );
+ PutGuts( MyBrain , 20,30);
+ PlagueBrain Cere = MyBrain as PlagueBrain;
+ Cere.CreateTissue( -4, -5 );
+ }
+
+ public override void OpenOrganTo(Mobile from)
+ {
+ }
+
+ public override void OnDoubleClick( Mobile from )
+ {
+ PlagueBeastLord plaguebl = RootParent as PlagueBeastLord;
+ if ( plaguebl == null )
+ return;
+
+ from.RevealingAction();
+ from.Direction = from.GetDirectionTo( plaguebl );
+ if ( IsOpened )
+ {
+ from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, PlagueHelper.Line[21] );
+ }
+ else
+ {
+ ItemID = 4682;
+ base.OpenOrganTo( from );
+ from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, PlagueHelper.Line[22] );
+ from.PlaySound( 0x2AC );
+ }
+ }
+
+ public override void OnSnoop( Mobile from )
+ {
+ OnDoubleClick( from );
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+
+ writer.Write( (int) 0 ); // version
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+
+ int version = reader.ReadInt();
+ }
+ }
+}
Index: Items/Containers/Organs/Organo_Pulpo.cs
===================================================================
--- Items/Containers/Organs/Organo_Pulpo.cs (revision 0)
+++ Items/Containers/Organs/Organo_Pulpo.cs (revision 0)
@@ -0,0 +1,81 @@
+using System;
+using Server;
+using Server.Network;
+using Server.Mobiles;
+
+namespace Server.Items
+{
+ public class Organo_Pulpo : BaseOrgano
+ {
+ private Item m_Wound;
+
+ public Organo_Pulpo( BrainTypes cerebro ) : base( 6002, PlagueHelper.Line[15], 0x66B, cerebro )
+ {
+ }
+
+ public Organo_Pulpo( Serial serial ) : base( serial )
+ {
+ }
+
+ public override void CreateTissue()
+ {
+ PutGuts( new Plague_deco( 7857, PlagueHelper.Line[23], Hue, false, true) , -25, 32 );
+ PutGuts( new Plague_deco( 7858, PlagueHelper.Line[23], Hue, false, true) , 20, 32 );
+
+ m_Wound = new Plague_deco( 4650, PlagueHelper.Line[8], 1, false, false );
+ PutGuts( m_Wound, 1, 13 );
+
+ MyBrain = new PlagueBrain( HeldBrainType );
+ PutGuts( MyBrain, 0, 20 );
+ PlagueBrain brain = MyBrain as PlagueBrain;
+
+ brain.CreateTissue( -4, -5 );
+ }
+
+ public override void OpenOrganTo( Mobile from )
+ {
+ PlagueBeastLord plaguebl = RootParent as PlagueBeastLord;
+ if ( plaguebl == null )
+ return;
+
+ from.Direction = from.GetDirectionTo( plaguebl );
+ if ( IsOpened )
+ {
+ from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, PlagueHelper.Line[21] );
+ }
+ else
+ {
+ from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, PlagueHelper.Line[22] );
+ from.PlaySound( 0x248 );
+ from.PlaySound( 0x2AC );
+ m_Wound.Visible = true;
+
+ base.OpenOrganTo(from);
+ if (HeldBrainType == BrainTypes.Brain_None)
+ {
+ PlagueBrain brain = MyBrain as PlagueBrain;
+ brain.MakeBleed( from );
+ }
+ }
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+
+ writer.Write( (int) 0 ); // version
+ writer.Write( (Item)m_Wound );
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+
+ int version = reader.ReadInt();
+ m_Wound = reader.ReadItem();
+
+ if ( m_Wound == null )
+ Delete();
+ }
+ }
+}
Index: Items/Containers/Organs/Organo_Venas.cs
===================================================================
--- Items/Containers/Organs/Organo_Venas.cs (revision 0)
+++ Items/Containers/Organs/Organo_Venas.cs (revision 0)
@@ -0,0 +1,125 @@
+using System;
+using Server;
+using Server.Network;
+using Server.Mobiles;
+
+namespace Server.Items
+{
+ public class Organo_Venas : BaseOrgano
+ {
+ public static int[] VenasColors = new int[]
+ {
+ 0x0492,
+ 0x00E9,
+ 0x0107,
+ 0x0392,
+ 0x0487,
+ 0x048A,
+ 0x0494
+ };
+
+ public static Point3D[] Pos_Venas = new Point3D[]
+ {
+ new Point3D( 30, 20, 0 ),
+ new Point3D( 30, 30, 0 ),
+ new Point3D( 5, 40, 0 ),
+ new Point3D( -10, 40, 0 )
+ };
+
+ private Item m_Wound;
+ private int m_CutVeinsCount = 0;
+
+ public Organo_Venas( BrainTypes cerebro ) : base( 13357, PlagueHelper.Line[15], VenasColors[Utility.Random(7)], cerebro )
+ {
+ }
+
+ public Organo_Venas( Serial serial ) : base( serial )
+ {
+ }
+
+ public override void CreateTissue()
+ {
+ int veins = Utility.Random(7);
+ for ( int i = 0; i < 4; i++ )
+ PutGuts( new Plague_Venas(this,VenasColors[(veins+i)%4], i / 2) , Pos_Venas[i].X,Pos_Venas[i].Y);
+
+ m_Wound = new Plague_deco( 4650 ,PlagueHelper.Line[8],1,false,false);
+ PutGuts( m_Wound, 1, 13 );
+
+ MyBrain = new PlagueBrain( HeldBrainType );
+ PutGuts( MyBrain, 0, 20 );
+ PlagueBrain Cere = MyBrain as PlagueBrain;
+
+ Cere.CreateTissue( -4, -5 );
+ }
+
+ public void OnVeinCut( Mobile from, int color )
+ {
+ from.PlaySound( 0x248 );
+ if ( color != Hue )
+ {
+ ++m_CutVeinsCount;
+ if (m_CutVeinsCount == 3)
+ {
+ PlagueBeastLord plaguebl = RootParent as PlagueBeastLord;
+ if ( plaguebl == null )
+ return;
+
+ from.Direction = from.GetDirectionTo( plaguebl );
+ if ( IsOpened )
+ {
+ from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, PlagueHelper.Line[21] );
+ }
+ else
+ {
+ from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, PlagueHelper.Line[22] );
+ from.PlaySound( 0x2AC );
+
+ m_Wound.Visible = true;
+ IsOpened = true;
+ if ( MyBrain.Deleted )
+ return;
+ if ( HeldBrainType == BrainTypes.Brain_None )
+ {
+ PlagueBrain pb = MyBrain as PlagueBrain;
+ pb.MakeBleed( from );
+ }
+ else
+ MyBrain.Visible = true;
+ }
+ }
+ }
+ else
+ {
+ PlagueBeastLord plaguebl = RootParent as PlagueBeastLord;
+ if ( plaguebl != null )
+ plaguebl.Kill();
+ }
+ }
+
+ public override void OpenOrganTo( Mobile from )
+ {
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+
+ writer.Write( (int) 0 ); // version
+ writer.Write( m_CutVeinsCount );
+ writer.Write( (Item)m_Wound );
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+
+ int version = reader.ReadInt();
+ m_CutVeinsCount = reader.ReadInt();
+ m_Wound = reader.ReadItem();
+
+ if ( m_Wound == null )
+ Delete();
+ }
+ }
+}
Index: Items/Containers/Organs/OrganoCentral.cs
===================================================================
--- Items/Containers/Organs/OrganoCentral.cs (revision 0)
+++ Items/Containers/Organs/OrganoCentral.cs (revision 0)
@@ -0,0 +1,58 @@
+using System;
+using Server;
+using Server.Network;
+using Server.Mobiles;
+
+namespace Server.Items
+{
+ public class OrganoCentral : BaseOrgano
+ {
+ private Item m_Wound; //It simulates the hole when we cut the organ
+
+ public OrganoCentral() : base( 4538, PlagueHelper.Line[12], 0x26, BrainTypes.Brain_None )
+ {
+ }
+
+ public OrganoCentral( Serial serial ) : base( serial )
+ {
+ }
+
+ public override void CreateTissue()
+ {
+ m_Wound = new Plague_deco( 4650, PlagueHelper.Line[8], 1, false, false );
+ PutGuts( m_Wound , 42, 21 );
+
+ MyBrain = new Plague_Core();
+ PutGuts( MyBrain , 42, 28 );
+ }
+
+ public override void OpenOrganTo( Mobile from )
+ {
+ if ( RootParent == from )
+ {
+ m_Wound.Visible = true;
+ MyBrain.Visible = true;
+ from.Say( false, PlagueHelper.Line[14] );
+ }
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+
+ writer.Write( (int) 0 ); // version
+ writer.Write( (Item)m_Wound );
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+
+ int version = reader.ReadInt();
+ m_Wound = reader.ReadItem();
+
+ if ( m_Wound == null )
+ Delete();
+ }
+ }
+}
Index: Items/Containers/Organs/Plague_Blood.cs
===================================================================
--- Items/Containers/Organs/Plague_Blood.cs (revision 0)
+++ Items/Containers/Organs/Plague_Blood.cs (revision 0)
@@ -0,0 +1,111 @@
+using System;
+using Server;
+using Server.Network;
+using Server.Mobiles;
+
+namespace Server.Items
+{
+ public class Plague_Blood : Item
+ {
+ private Item m_Bandage;
+
+ private bool m_Aided = false;
+
+ private Timer m_BleedingTimer;
+
+ [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
+ public bool Aided
+ {
+ get {return m_Aided;}
+ set {m_Aided = value;}
+ }
+
+ public Plague_Blood() : base( 0x122C )
+ {
+ Name = PlagueHelper.Line[8];
+ Movable = false;
+ Visible = false;
+ }
+
+ public Plague_Blood( Serial serial ) : base( serial )
+ {
+ }
+
+ public virtual void CreateTissue()
+ {
+ Container c = Parent as Container;
+
+ m_Bandage = new Plague_deco( 6420, PlagueHelper.Line[9], 0, false, false );
+ c.AddItem( m_Bandage );
+ m_Bandage.Location = new Point3D( X + 9, Y, 0 );
+ }
+
+ public virtual void DoBleed( Mobile from )
+ {
+ if ( !Visible && m_BleedingTimer == null )
+ {
+ Visible = true;
+ m_BleedingTimer = Timer.DelayCall( TimeSpan.FromSeconds( 1 ), TimeSpan.FromSeconds( 1 ), new TimerCallback( OnBleedTimerTick ) );
+ from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, PlagueHelper.Line[10]) ;
+ }
+ }
+
+ public virtual void BandAid(Mobile from)
+ {
+ if ( !m_Aided )
+ {
+ m_Bandage.Visible = true;
+ m_Aided = true;
+ LabelTo( from, PlagueHelper.Line[11] );
+ }
+ }
+
+ public void OnBleedTimerTick()
+ {
+ PlagueBeastLord plaguebl = RootParent as PlagueBeastLord;
+ if ( Deleted || !Visible || Aided || plaguebl == null || !plaguebl.Alive )
+ {
+ m_BleedingTimer.Stop();
+ return;
+ }
+ switch ( ItemID )
+ {
+ case 0x122C:
+ {
+ ItemID = 4654;
+ X += 5;
+ break;
+ }
+ case 4654: ItemID = 4653; break;
+ case 4653: ItemID = 4650; break;
+ default:
+ {
+ m_BleedingTimer.Stop();
+ plaguebl.Kill();
+ break;
+ }
+ }
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+
+ writer.Write( (int) 0 ); // version
+ writer.Write( (bool)m_Aided );
+ writer.Write( (Item)m_Bandage );
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+
+ int version = reader.ReadInt();
+ m_Aided = reader.ReadBool();
+ m_Bandage = reader.ReadItem();
+
+ if ( m_Bandage == null )
+ Delete();
+ }
+ }
+}
Index: Items/Containers/Organs/Plague_Core.cs
===================================================================
--- Items/Containers/Organs/Plague_Core.cs (revision 0)
+++ Items/Containers/Organs/Plague_Core.cs (revision 0)
@@ -0,0 +1,54 @@
+using System;
+using Server;
+using Server.Mobiles;
+
+namespace Server.Items
+{
+ public class Plague_Core : Item
+ {
+ [Constructable]
+ public Plague_Core() : base( 7408 )
+ {
+ Name = PlagueHelper.Line[13];
+ Movable = false;
+ Visible = false;
+ Hue = 0x480;
+ }
+
+ public Plague_Core( Serial serial ) : base( serial )
+ {
+ }
+
+ public void OnCutFrom( Mobile from )
+ {
+ if ( !Movable )
+ {
+ PlagueBeastLord plaguebl = RootParent as PlagueBeastLord;
+ if ( plaguebl != null )
+ {
+
+ {
+ Movable = true;
+ from.AddToBackpack( this );
+ from.PlaySound( 0x248 );
+ from.SendMessage( PlagueHelper.Line[32] );
+ }
+
+ plaguebl.Kill();
+ }
+ }
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+ writer.Write( (int) 0 ); // version
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+ int version = reader.ReadInt();
+ }
+ }
+}
Index: Items/Containers/Organs/Plague_deco.cs
===================================================================
--- Items/Containers/Organs/Plague_deco.cs (revision 0)
+++ Items/Containers/Organs/Plague_deco.cs (revision 0)
@@ -0,0 +1,39 @@
+using System;
+using Server;
+
+namespace Server.Items
+{
+ public class Plague_deco : Item
+ {
+ public Plague_deco( int itemID, string name, int color, bool movable, bool visible ) : base( itemID )
+ {
+ Name = name;
+ Movable = movable;
+ Visible = visible;
+ Hue = color;
+ Weight = 1;
+ }
+
+ [Constructable]
+ public Plague_deco() : this( 7407, PlagueHelper.Line[16], 1271, true, true )
+ {
+ }
+
+ public Plague_deco( Serial serial ) : base( serial )
+ {
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+ writer.Write( (int) 0 ); // version
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+ int version = reader.ReadInt();
+ Weight = 1;
+ }
+ }
+}
Index: Items/Containers/Organs/Plague_gland.cs
===================================================================
--- Items/Containers/Organs/Plague_gland.cs (revision 0)
+++ Items/Containers/Organs/Plague_gland.cs (revision 0)
@@ -0,0 +1,48 @@
+using System;
+using Server;
+using Server.Mobiles;
+
+namespace Server.Items
+{
+ public class Plague_gland : Item
+ {
+ [Constructable]
+ public Plague_gland() : base( 7407 )
+ {
+ Name = PlagueHelper.Line[29];
+ Hue = 1174;
+ Weight = 1;
+ }
+
+ public Plague_gland( Serial serial ) : base( serial )
+ {
+ }
+
+ public override bool DropToItem( Mobile from, Item target, Point3D p )
+ {
+ if ( target is PlagueBackpack )
+ {
+ PlagueBeastLord plaguebl = target.RootParent as PlagueBeastLord;
+ if (plaguebl!=null)
+ plaguebl.PlaceGlandCheck( p, this, from );
+ }
+ return base.DropToItem( from, target, p );
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+
+ writer.Write( (int) 0 ); // version
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+
+ int version = reader.ReadInt();
+ }
+
+ }
+
+}
Index: Items/Containers/Organs/Plague_Venas.cs
===================================================================
--- Items/Containers/Organs/Plague_Venas.cs (revision 0)
+++ Items/Containers/Organs/Plague_Venas.cs (revision 0)
@@ -0,0 +1,57 @@
+using System;
+using Server;
+using Server.Network;
+
+namespace Server.Items
+{
+ public class Plague_Venas : Item
+ {
+ private Item m_Organ;
+ private bool m_IsCut = false;
+
+ public Plague_Venas( Item item, int color, int flip ) : base( 6939 + flip )
+ {
+ Name = PlagueHelper.Line[26];
+ Movable = false;
+ Hue = color;
+ m_Organ = item;
+ }
+
+ public Plague_Venas( Serial serial ) : base( serial )
+ {
+ }
+
+ public void CutVein( Mobile from)
+ {
+ if ( !m_IsCut )
+ {
+ m_IsCut = true;
+ ItemID = 7946;
+ Organo_Venas peer = m_Organ as Organo_Venas;
+ from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, PlagueHelper.Line[27] );
+ ((Organo_Venas)m_Organ).OnVeinCut( from, Hue );
+ }
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+
+ writer.Write( (int) 0 ); // version
+ writer.Write( (Item)m_Organ );
+ writer.Write( (bool)m_IsCut );
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+
+ int version = reader.ReadInt();
+ m_Organ = reader.ReadItem();
+ m_IsCut = reader.ReadBool();
+
+ if ( m_Organ == null )
+ Delete();
+ }
+ }
+}
Index: Items/Containers/Organs/PlagueBackpack.cs
===================================================================
--- Items/Containers/Organs/PlagueBackpack.cs (revision 0)
+++ Items/Containers/Organs/PlagueBackpack.cs (revision 0)
@@ -0,0 +1,57 @@
+using System;
+using Server.Multis;
+using Server.Mobiles;
+using Server.Network;
+
+namespace Server.Items
+{
+ public class PlagueBackpack : Container
+ {
+ public override int DefaultMaxWeight
+ {
+ get
+ {
+ return 0;
+ }
+ }
+
+ public override int DefaultGumpID{ get{ return 0x2a63; } }
+ public override int DefaultDropSound{ get{ return 927; } }
+
+ public override Rectangle2D Bounds
+ {
+ get{ return new Rectangle2D( 10, 10, 300, 300 ); }
+ }
+
+ public PlagueBackpack() : base( 0x261b )
+ {
+ Layer = Layer.Backpack;
+ Movable = false;
+ }
+
+ public PlagueBackpack( Serial serial ) : base( serial )
+ {
+ }
+
+ public override bool IsAccessibleTo( Mobile m )
+ {
+ if ( RootParent is PlagueBeastLord )
+ return true;
+ else
+ return base.IsAccessibleTo( m );
+ }
+
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+ writer.Write( (int) 0 ); // version
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+ int version = reader.ReadInt();
+ }
+ }
+}
Index: Items/Containers/Organs/PlagueBrain.cs
===================================================================
--- Items/Containers/Organs/PlagueBrain.cs (revision 0)
+++ Items/Containers/Organs/PlagueBrain.cs (revision 0)
@@ -0,0 +1,145 @@
+using System;
+using Server;
+using Server.Network;
+using Server.Mobiles;
+
+namespace Server.Items
+{
+ public class PlagueBrain : Item
+ {
+ private Item m_BleedingWound;
+ private Item m_PlaguePack;
+
+ private bool m_Opened = false;
+
+ private BrainTypes m_BrainType;
+
+ [CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
+ public BrainTypes HeldBrainType
+ {
+ get {return m_BrainType;}
+ set {m_BrainType = value;}
+ }
+
+ [CommandProperty( AccessLevel.GameMaster )]
+ public bool IsOpened
+ {
+ get {return m_Opened;}
+ set
+ {
+ if ( value ) //Only Open
+ m_Opened = value;
+ }
+ }
+
+ public Item MyWound
+ {
+ get {return m_BleedingWound;}
+ set {m_BleedingWound = value;}
+ }
+
+ public Item MyPlaguePack
+ {
+ get {return m_PlaguePack;}
+ set {m_PlaguePack = value;}
+ }
+
+ [Constructable]
+ public PlagueBrain ( BrainTypes t ) : base( 7408 )
+ {
+ Name = PlagueHelper.Line[6];
+ HeldBrainType = t;
+ Hue = PlagueHelper.BrainColors[(int)t];
+ Stackable = false;
+ Movable = true;
+ Weight = 40;
+ Visible=false;
+ }
+
+ public PlagueBrain( Serial serial ) : base( serial )
+ {
+ }
+
+ public virtual void CreateTissue( int offSetX,int offSetY )
+ {
+ Container c = Parent as Container;
+ MyPlaguePack = c;
+ MyWound = new Plague_Blood();
+ c.AddItem( MyWound );
+ MyWound.Location = new Point3D( X + offSetX - 5, Y + offSetY, 0 );
+ Plague_Blood pb = MyWound as Plague_Blood;
+ pb.CreateTissue();
+ }
+
+ public void MakeBleed( Mobile from )
+ {
+ Plague_Blood blood = MyWound as Plague_Blood;
+ if ( blood != null )
+ blood.DoBleed( from );
+ }
+
+ public override bool DropToMobile( Mobile from, Mobile target, Point3D p )
+ {
+ return false;
+ }
+
+ public override void OnItemLifted( Mobile from, Item item )
+ {
+ MakeBleed( from );
+ base.OnItemLifted( from,item );
+ }
+
+ public override bool DropToItem( Mobile from, Item target, Point3D p )
+ {
+ if ( HeldBrainType != BrainTypes.Brain_None && target == MyPlaguePack )
+ {
+ PlagueBeastLord plaguebl = MyPlaguePack.Parent as PlagueBeastLord;
+ Point3D p2 = PlagueHelper.BrainSlotPositions[(int)HeldBrainType];
+ if ( p2.X <= p.X && p.X <= p2.X + 5 && p2.Y <= p.Y && p.Y <= p2.Y + 5 )
+ {
+ plaguebl.CoreCheck( (int)HeldBrainType - 1, true );
+ Movable = false;
+ from.LocalOverheadMessage( MessageType.Regular,0x66B,false,PlagueHelper.Line[7] );
+ }
+ else
+ plaguebl.CoreCheck( (int)HeldBrainType - 1, false );
+ }
+ return ( target == MyPlaguePack && p.X != -1 && p.Y != -1 && base.DropToItem( from, target, p ) );
+ }
+
+ public override bool DropToWorld( Mobile from, Point3D p )
+ {
+ return false;
+ }
+
+ public override int GetLiftSound( Mobile from )
+ {
+ return 682;
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+
+ writer.Write( (int) 0 ); // version
+ writer.Write( (bool)m_Opened );
+ writer.Write( (int)m_BrainType );
+ writer.Write( (Item)m_BleedingWound );
+ writer.Write( (Item)m_PlaguePack );
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+
+ int version = reader.ReadInt();
+ m_Opened = reader.ReadBool();
+ m_BrainType = (BrainTypes)reader.ReadInt();
+ m_BleedingWound = reader.ReadItem();
+ m_PlaguePack = reader.ReadItem();
+
+ if ( m_BleedingWound == null || m_PlaguePack == null )
+ Delete();
+ }
+ }
+}
Index: Items/Skill Items/Misc/Bandage.cs
===================================================================
--- Items/Skill Items/Misc/Bandage.cs (revision 321)
+++ Items/Skill Items/Misc/Bandage.cs (working copy)
@@ -87,7 +87,15 @@
{
if ( m_Bandage.Deleted )
return;
-
+//Start addition 1 of 2 for PlagueBeastLord
+ if ( targeted is Plague_Blood )
+ {
+ Plague_Blood blood = targeted as Plague_Blood;
+ blood.BandAid( from );
+ m_Bandage.Consume();
+ }
+ else
+//End addition 1 of 2 for PlagueBeastLord
if ( targeted is Mobile )
{
if ( from.InRange( m_Bandage.GetWorldLocation(), Bandage.Range ) )
@@ -107,6 +115,22 @@
from.SendLocalizedMessage( 500970 ); // Bandages can not be used on that.
}
}
+//Start addition 2 of 2 for PlagueBeastLord
+ protected override void OnNonlocalTarget( Mobile from, object targeted ) // TODO: Check if parent is frozen or PBL?
+ {
+ if ( m_Bandage.Deleted )
+ return;
+ if ( !(targeted is Item && ((Item)targeted).Parent is PlagueBackpack) )
+ from.SendLocalizedMessage( 500447 ); // That is not accessible.
+ else if ( targeted is Plague_Blood )
+ {
+ from.RevealingAction();
+ Plague_Blood blood = targeted as Plague_Blood;
+ blood.BandAid( from );
+ m_Bandage.Consume();
+ }
+ }
+//End addition 2 of 2 for PlagueBeastLord
}
}
@@ -482,4 +506,4 @@
return null;
}
}
-}
\ No newline at end of file
+}
Index: Items/Skill Items/Tailor Items/Misc/Scissors.cs
===================================================================
--- Items/Skill Items/Tailor Items/Misc/Scissors.cs (revision 321)
+++ Items/Skill Items/Tailor Items/Misc/Scissors.cs (working copy)
@@ -57,7 +57,27 @@
{
if ( m_Item.Deleted )
return;
-
+//Start addition 1 of 2 for PlagueBeastLord
+ if ( targeted is BaseOrgano )
+ {
+ from.RevealingAction();
+ BaseOrgano organ = (BaseOrgano)targeted;
+ organ.OpenOrganTo( from );
+ }
+ else if (targeted is Plague_Venas )
+ {
+ from.RevealingAction();
+ Plague_Venas veins = (Plague_Venas)targeted;
+ veins.CutVein( from );
+ }
+ else if (targeted is Plague_Core )
+ {
+ from.RevealingAction();
+ Plague_Core core = (Plague_Core)targeted;
+ core.OnCutFrom( from );
+ }
+ else
+//End addition 1 of 2 for PlagueBeastLord
/*if ( targeted is Item && !((Item)targeted).IsStandardLoot() )
{
from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
@@ -86,6 +106,33 @@
from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
}
}
+//Start addition 2 of 2 for PlagueBeastLord
+ protected override void OnNonlocalTarget( Mobile from, object targeted )
+ {
+ if ( m_Item.Deleted )
+ return;
+ if ( !(targeted is Item && ((Item)targeted).Parent is PlagueBackpack) )
+ {
+ from.SendLocalizedMessage( 500447 ); // That is not accessible.
+ }
+ else if ( targeted is BaseOrgano )
+ {
+ BaseOrgano organ = (BaseOrgano)targeted;
+ organ.OpenOrganTo( from );
+ }
+ else if ( targeted is Plague_Venas )
+ {
+ Plague_Venas veins = (Plague_Venas)targeted;
+ veins.CutVein( from );
+ }
+ else if ( targeted is Plague_Core )
+ {
+ Plague_Core core = (Plague_Core)targeted;
+ core.OnCutFrom( from );
+ }
+ from.RevealingAction();
+ }
+//End addition 2 of 2 for PlagueBeastLord
}
}
-}
\ No newline at end of file
+}
Index: Mobiles/Monsters/Misc/Melee/PlagueBeast.cs
===================================================================
--- Mobiles/Monsters/Misc/Melee/PlagueBeast.cs (revision 321)
+++ Mobiles/Monsters/Misc/Melee/PlagueBeast.cs (working copy)
@@ -46,14 +46,43 @@
{
AddLoot( LootPack.FilthyRich );
AddLoot( LootPack.Gems, Utility.Random( 1, 3 ) );
- // TODO: dungeon chest, healthy gland
+ // TODO: dungeon chest
}
- // TODO: Poison attack
+//Start addition 1 of 1 for PlagueBeastLord
+ public override bool HasBreath{ get{ return true; } }
+ public override int BreathFireDamage{ get{ return 0; } }
+ public override int BreathPoisonDamage{ get{ return 100; } }
+ public override int BreathEffectHue{ get{ return 1367; } }
+ public override int BreathEffectSound{ get{ return 456; } }
+ public override double BreathDamageScalar{ get{ return (Core.AOS ? 0.10 : 0.03); } }
+
+ public override void BreathDamage_Callback( object state )
+ {
+ Mobile target = (Mobile)state;
+
+ if ( CanBeHarmful( target ) )
+ {
+ DoHarmful( target );
+ BreathDealDamage( target );
+ if ( Utility.RandomDouble() < 0.33 )
+ target.ApplyPoison( this, Poison.Greater );
+ }
+ }
+
+ public override void OnDeath( Container c )
+ {
+ if ( Utility.RandomDouble() < 0.2 )
+ c.DropItem( new Plague_gland() );
+
+ base.OnDeath( c );
+ }
+//End addition 1 of 1 for PlagueBeastLord
+
public override void OnDamagedBySpell( Mobile caster )
{
- if ( this.Map != null && caster != this && 0.25 > Utility.RandomDouble() )
+ if ( caster != this && 0.25 > Utility.RandomDouble() )
{
BaseCreature spawn = new PlagueSpawn( this );
@@ -71,7 +100,7 @@
public override void OnGotMeleeAttack( Mobile attacker )
{
- if ( this.Map != null && attacker != this && 0.25 > Utility.RandomDouble() )
+ if ( attacker != this && 0.25 > Utility.RandomDouble() )
{
BaseCreature spawn = new PlagueSpawn( this );
@@ -121,4 +150,4 @@
int version = reader.ReadInt();
}
}
-}
\ No newline at end of file
+}
Index: Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs
===================================================================
--- Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs (revision 0)
+++ Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs (revision 0)
@@ -0,0 +1,424 @@
+/*
+ Many variable names are in Spanish, that can confuse a bit.
+ But comments are in English.
+*/
+
+// I tried to translate all occurrances of Spanish shown to the players to English, but may have missed some.
+
+using System;
+using System.Collections;
+using Server.Items;
+using Server.Targeting;
+using Server.Network;
+
+namespace Server.Mobiles
+{
+ [CorpseName( "a plague beast lord corpse" )]
+ public class PlagueBeastLord : BaseCreature
+ {
+//Monster life time, once it is opened.
+ public virtual double MortalitySeconds
+ {
+ get{ return 60; }
+ }
+
+//These are the positions of the 8 organs of the beast
+ public static Point3D[] Pos_Organos = new Point3D[]
+ {
+ new Point3D( 96, 265, 0 ),
+ new Point3D( 70, 180, 0 ),
+ new Point3D( 293, 265, 0 ),
+ new Point3D( 96, 95, 0 ),
+ new Point3D( 293, 100, 0 ),
+ new Point3D( 188, 98, 0 ),
+ new Point3D( 315, 180, 0 ),
+ new Point3D( 188, 263, 0 )
+ };
+
+// There will be 8 organs "randomly" placed
+ public static OrganTypes[] Tipo_Organos = new OrganTypes[]
+ {
+ OrganTypes.Organo_Maiden,
+ OrganTypes.Organo_Pulpo,
+ OrganTypes.Organo_Calamar,
+ OrganTypes.Organo_Venas,
+ OrganTypes.Organo_Maiden,
+ OrganTypes.Organo_Pulpo,
+ OrganTypes.Organo_Venas,
+ OrganTypes.Organo_Maiden
+ };
+
+// Brain type inside each organ
+ public static BrainTypes[] Color_Cere = new BrainTypes[]
+ {
+ BrainTypes.Brain_Blue,
+ BrainTypes.Brain_Green,
+ BrainTypes.Brain_Purple,
+ BrainTypes.Brain_Yellow,
+ BrainTypes.Brain_None, //That means the organ doesn't have brain inside
+ BrainTypes.Brain_None,
+ BrainTypes.Brain_None,
+ BrainTypes.Brain_None
+ };
+
+ public static Point3D[] Recpt_Connectors = new Point3D[]
+ {
+ new Point3D(10,10,0), //Brain_None
+ new Point3D(170,179,0),
+ new Point3D(229,179,0),
+ new Point3D(170,229,0),
+ new Point3D(229,229,0)
+ };
+
+ public override bool DeleteCorpseOnDeath
+ {
+ get
+ {
+ return m_Frosted;
+ }
+ }
+
+ private Item m_Central;
+ private Item m_Squid; //To notify it when a healthy gland is placed.
+ private bool m_Frosted = false;
+ private bool m_CutOpen = false;
+ private Timer m_FrozenTimer;
+ private Mobile m_CutOpenBy;
+
+ private bool[] m_Receptacles = new bool[4] //Correctly placed brains
+ {
+ false,
+ false,
+ false,
+ false
+ };
+
+ [CommandProperty( AccessLevel.GameMaster )]
+ public bool Frosted
+ {
+ get {return m_Frosted;}
+ set
+ {
+ if ( value )
+ {
+ if ( !m_Frosted )
+ m_FrozenTimer = Timer.DelayCall( TimeSpan.FromSeconds( MortalitySeconds / 2 ), TimeSpan.FromSeconds( MortalitySeconds / 2 ), new TimerCallback( OnFrozenTimerTick ) );
+ m_Frosted = true;
+ Frostplaguebl();
+ }
+ else if ( m_Frosted )
+ {
+ m_Frosted = false;
+ CutOpen = false; //Reset puzzle if set by a GM
+ m_FrozenTimer.Stop(); //Since Frosted BPLs are deleted on Load the frozentimer will always be != null
+ DeFrostplaguebl();
+ }
+ }
+ }
+
+ [CommandProperty( AccessLevel.GameMaster )]
+ public bool CutOpen
+ {
+ get {return m_CutOpen;}
+ set
+ {
+ if ( value != m_CutOpen )
+ {
+ if ( !m_CutOpen )
+ {
+ if ( !Frosted )
+ Frosted = true;
+ InitializePuzzle();
+ }
+ else if ( m_CutOpen )
+ {
+ Backpack.Delete();
+ AddItem( new PlagueBackpack() );
+ }
+
+ m_CutOpen = value;
+ }
+ }
+ }
+
+ [CommandProperty( AccessLevel.GameMaster )]
+ public Mobile CutOpenBy
+ {
+ get {return m_CutOpenBy;}
+ set {m_CutOpenBy = value;}
+ }
+
+ public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
+
+ [Constructable]
+ public PlagueBeastLord() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 1, 1 )
+ {
+ //All strings of plague beast stuff are placed on PlagueHelper class.
+ //This way translate it to your own language is easy.
+ Name = PlagueHelper.Line[0];
+
+ Body = 775;
+ BaseSoundID = 679;
+ SpeechHue=38;
+ EmoteHue=38;
+
+ 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.Energy, 25, 35 );
+ SetResistance( ResistanceType.Poison, 75, 85 );
+
+ SetSkill( SkillName.Tactics, 100 );
+ SetSkill( SkillName.Wrestling, 100 );
+
+ Fame = 2000;
+ Karma = -2000;
+
+ VirtualArmor = 50;
+
+ AddItem( new PlagueBackpack() );
+ }
+
+ public PlagueBeastLord( Serial serial ) : base( serial )
+ {
+ }
+
+///////////////////////////////////////////////////////////////////
+// CreateGuts:
+// Adds an item to the creature, and place it on a give position p
+///////////////////////////////////////////////////////////////////
+ public void CreateGuts( Item t, Point3D p )
+ {
+ Backpack.AddItem( t );
+ t.Location = p;
+ }
+
+ public void CreateOrgan( BaseOrgano t, Point3D p )
+ {
+ CreateGuts( t, p );
+ t.CreateTissue();
+ }
+
+///////////////////////////////////////////////////////////////////
+// OpenOrganTo:
+// Open the creature. Creates the puzzle.
+///////////////////////////////////////////////////////////////////
+ public void InitializePuzzle()
+ {
+ m_CutOpen = true; //Cannot be opened twice
+
+ //Place decorative stuff. Blood, red receptacles...
+ for (int i=0;i<8;i++)
+ {
+ CreateGuts( new Plague_deco( 2527, PlagueHelper.Line[1], 32, false, true), new Point3D(Utility.RandomMinMax(80,360), Utility.RandomMinMax(100,270), 0) );
+ CreateGuts( new Plague_deco( 7570+(i%5), PlagueHelper.Line[25], 0, false, true), new Point3D(Utility.RandomMinMax(60,350),Utility. RandomMinMax(90,250), 0) );
+ CreateGuts( new Plague_deco( 7570+(i%5), PlagueHelper.Line[25], 0, false, true), new Point3D(Utility.RandomMinMax(80,360),Utility. RandomMinMax(110,270), 0) );
+ CreateGuts( new Plague_deco( 7434+i, PlagueHelper.Line[25], 0, false, true), new Point3D(Utility.RandomMinMax(80,360), Utility.RandomMinMax(100,270), 0) );
+ }
+
+ //We place the organs and brains "randomly"
+ int position = Utility.RandomMinMax(0,7);
+ int color = Utility.RandomMinMax(0,7);
+ int type = Utility.RandomMinMax(0,7);
+ //Place organs and other useful things
+ for ( int i = 0; i < Tipo_Organos.Length; i++ )
+ {
+ //Depending on what kind of organ we create one of the four possibles:
+ switch (Tipo_Organos[(type + i)%Tipo_Organos.Length])
+ {
+ case OrganTypes.Organo_Calamar:
+ {
+ m_Squid = new Organo_Calamar(Color_Cere[(color + i)%Color_Cere.Length]);
+ CreateOrgan( (BaseOrgano)m_Squid, Pos_Organos[(position +i)%Color_Cere.Length] );
+ break;
+ }
+ case OrganTypes.Organo_Maiden: CreateOrgan( new Organo_Maiden(Color_Cere[(color + i)%Color_Cere.Length]), Pos_Organos[(position +i)%Pos_Organos.Length] );break;
+ case OrganTypes.Organo_Pulpo: CreateOrgan( new Organo_Pulpo(Color_Cere[(color + i)%Color_Cere.Length]), Pos_Organos[(position +i)%Pos_Organos.Length] );break;
+ case OrganTypes.Organo_Venas: CreateOrgan( new Organo_Venas(Color_Cere[(color + i)%Color_Cere.Length]), Pos_Organos[(position +i)%Pos_Organos.Length] );break;
+ }
+ }
+ //Now we create the receptacles near the core
+ //First, the veins connecting them to the central organ
+ CreateGuts(new Plague_deco( 6939, PlagueHelper.Line[28], PlagueHelper.BrainColors[(int)BrainTypes.Brain_Green], false ,true), Recpt_Connectors[1]);
+ CreateGuts(new Plague_deco( 6940, PlagueHelper.Line[28], PlagueHelper.BrainColors[(int)BrainTypes.Brain_Blue], false, true), Recpt_Connectors[2]);
+ CreateGuts(new Plague_deco( 6940, PlagueHelper.Line[28], PlagueHelper.BrainColors[(int)BrainTypes.Brain_Yellow], false, true), Recpt_Connectors[3]);
+ CreateGuts(new Plague_deco( 6939, PlagueHelper.Line[28], PlagueHelper.BrainColors[(int)BrainTypes.Brain_Purple], false, true), Recpt_Connectors[4]);
+ //Then, the 4 receptacles.
+ CreateGuts(new Plague_deco( 2527, PlagueHelper.Line[1], PlagueHelper.BrainColors[(int)BrainTypes.Brain_Green], false, true), PlagueHelper.BrainSlotPositions[1]);
+ CreateGuts(new Plague_deco( 2527, PlagueHelper.Line[1], PlagueHelper.BrainColors[(int)BrainTypes.Brain_Blue], false, true), PlagueHelper.BrainSlotPositions[2]);
+ CreateGuts(new Plague_deco( 2527, PlagueHelper.Line[1], PlagueHelper.BrainColors[(int)BrainTypes.Brain_Yellow], false, true), PlagueHelper.BrainSlotPositions[3]);
+ CreateGuts(new Plague_deco( 2527, PlagueHelper.Line[1], PlagueHelper.BrainColors[(int)BrainTypes.Brain_Purple], false, true), PlagueHelper.BrainSlotPositions[4]);
+ //Create the Central organ.
+ m_Central = new OrganoCentral();
+ CreateOrgan( (BaseOrgano)m_Central, new Point3D( 153,176,0 ));
+ }
+
+///////////////////////////////////////////////////////////////////
+// PlaceGlandCheck:
+// Check it the healthy gland is correctly placed on the squid organ
+// If yes, call the method OnGlandDrop on Organo_Calamar
+////////////////////////////////////////////////////////////////////
+ public void PlaceGlandCheck( Point3D p, Item gland, Mobile from )
+ {
+ if ( m_Squid.X - 10 <= p.X && p.X <= m_Squid.X + 30 && m_Squid.Y - 10 <= p.Y && p.Y <= m_Squid.Y + 30 )
+ {
+ Organo_Calamar squid = m_Squid as Organo_Calamar;
+ squid.OnGlandDrop( from, gland );
+ }
+ }
+
+///////////////////////////////////////////////////////////////////
+// Congelar:
+// Freeze the creature
+///////////////////////////////////////////////////////////////////
+ public void Frostplaguebl()
+ {
+ //Forget the combatant (avoid that the frozen beast attacks somebody or its changes Direction)
+ FightMode=FightMode.None;
+ FocusMob = null;
+ Combatant = null;
+ //We freeze the creature
+ Frozen = true;
+ CantWalk = true; //Set for the Timer
+ Hue = 0x480; //Ice hue
+ Emote( PlagueHelper.Line[3] );
+ }
+
+///////////////////////////////////////////////////////////////////
+// Descongelar:
+// Unfreeze the creature.
+///////////////////////////////////////////////////////////////////
+ public void DeFrostplaguebl()
+ {
+ FightMode = FightMode.Closest;
+ Hue = 0;
+ Frozen = false;
+ CantWalk = false;
+ Emote( PlagueHelper.Line[4] );
+ }
+
+///////////////////////////////////////////////////////////////////
+// CoreCheck:
+// Used when a brain is moved.
+// If all brains are correctly placed. The central organ is opened
+///////////////////////////////////////////////////////////////////
+ public void CoreCheck( int spot, bool correct )
+ {
+ m_Receptacles[spot] = correct;
+ for ( int i = 0; i < 4; i++ )
+ {
+ if ( !m_Receptacles[i] )
+ return; //If any brain isn't correctly placed we exit
+ }
+ OrganoCentral central = m_Central as OrganoCentral;
+ central.OpenOrganTo( this );
+ }
+
+ public override void OnDoubleClick( Mobile from )
+ {
+ if ( (CutOpen && m_CutOpenBy == from) || from.AccessLevel > AccessLevel.Player )
+ Backpack.DisplayTo( from );
+ }
+
+ public override bool CheckNonlocalDrop( Mobile from, Item item, Item target )
+ {
+ //Only brains and healthy glands can be drop inside it.
+ return ( item is PlagueBrain || item is Plague_gland );
+ }
+
+ public override bool CheckNonlocalLift( Mobile from, Item item )
+ {
+ //We always can move things from its backpack
+ return true;
+ }
+
+ //If he is damaged, it unfreezes
+ public override void OnDamage( int amount, Mobile from, bool willKill )
+ {
+ if ( Frosted && !CutOpen )
+ Frosted = false;
+ base.OnDamage( amount, from, willKill );
+ }
+
+ private void OnFrozenTimerTick()
+ {
+ if ( !Deleted && Alive )
+ {
+ if ( !Frosted ) //!Frosted
+ m_FrozenTimer.Stop();
+
+ if ( CantWalk )
+ {
+ if (CutOpen)
+ Say(1053036);//The plague beast begins to dissolve
+ else
+ Say(1053035);//The plague beast burbles incoherently
+ CantWalk = false;
+ }
+ else
+ {
+ m_FrozenTimer.Stop();
+ if (CutOpen)
+ {
+ Say( PlagueHelper.Line[5] );
+ Kill();
+ }
+ else
+ Frosted = false;
+ }
+ }
+ else
+ m_FrozenTimer.Stop();
+ }
+
+ public override void Serialize( GenericWriter writer )
+ {
+ base.Serialize( writer );
+ writer.Write( (int) 1 );
+
+ writer.Write( (bool) m_Frosted );
+ writer.Write( (Item) m_Central );
+ writer.Write( (Item) m_Squid );
+ }
+
+ public override void Deserialize( GenericReader reader )
+ {
+ base.Deserialize( reader );
+ int version = reader.ReadInt();
+
+ if ( version == 0 )
+ {
+ m_Frosted = reader.ReadBool();
+ m_CutOpen = reader.ReadBool();
+ reader.ReadInt();
+ for ( int i = 0; i < 4; i++ )
+ m_Receptacles[i] = reader.ReadBool();
+ m_Central = reader.ReadItem();
+ m_Squid = reader.ReadItem();
+ }
+ else
+ {
+ m_Frosted = reader.ReadBool();
+ m_Central = reader.ReadItem();
+ m_Squid = reader.ReadItem();
+ }
+
+ if ( m_Frosted ) //Delete 'frozen' Plague Beast Lords.
+ {
+ Delete();
+ }
+ }
+ }
+}
Index: Mobiles/Monsters/Misc/Melee/PlagueHelper.cs
===================================================================
--- Mobiles/Monsters/Misc/Melee/PlagueHelper.cs (revision 0)
+++ Mobiles/Monsters/Misc/Melee/PlagueHelper.cs (revision 0)
@@ -0,0 +1,130 @@
+//Text strings used on Plague Creatures except corpse name
+using System;
+
+namespace Server.Items
+{
+ public static class PlagueHelper
+ {
+ public static readonly string[] Line = new string[]
+ {
+// English messages - modified by Alari for grammar/spelling/case.
+/* 0 */ "a plague beast lord",
+/* 1 */ "Receptacle",
+/* 2 */ "You slice through the plague beast's amorphous tissue.",
+/* 3 */ "* The plague beast's amorphous flesh hardens and becomes immobilized *",
+/* 4 */ "The Plague Beast Lord starts to move again!",
+/* 5 */ "The Plague Beast dies.",
+/* 6 */ "Gland",
+/* 7 */ "You place the organ in the fleshy receptacle near the core.",
+/* 8 */ "Cut",
+/* 9 */ "Bandage",
+/* 10 */ "The organ starts to bleed.",
+/* 11 */ "You bandage the blood.",
+/* 12 */ "core nerve center",
+/* 13 */ "a plague beast mutation core",
+/* 14 */ "The core nerve center opens.",
+/* 15 */ "an organ",
+/* 16 */ "a diseased gland",
+/* 17 */ "gland casing",
+/* 18 */ "Remove the diseased gland before you place the healthy one.",
+/* 19 */ "There already is a healthy gland.",
+/* 20 */ "You place the healthy gland on the gland casing.",
+/* 21 */ "This organ was already opened.",
+/* 22 */ "You open the plague beast's organ.",
+/* 23 */ "Sustenance Cannulas",
+/* 24 */ "Periglandular Tissue",
+/* 25 */ "Blood",
+/* 26 */ "Vein",
+/* 27 */ "You cut the vein.",
+/* 28 */ "Axon",
+/* 29 */ "a healthy gland",
+/* 30 */ "You carve a healthy gland from the beast.",
+/* 31 */ "* The Plague Beast dispels the summoned creature *",
+/* 32 */ "You place a plague beast mutation core in your backpack.",
+/* 33 */ "Plague Spawn",
+/* 34 */ "* The plague spawn dissolves *",
+/* 35 */ "The plague spawn refuses to attack that creature.",
+/* 36 */ "The creature has been opened already.",
+/* 37 */ "The beast must be solidified to open it!",
+/* 38 */ "Congratulations! You solved the plague beast lord test puzzle!"
+
+/* //These are Spanish messages
+ "Un Plague Beast Lord",
+ "Receptáculo",
+ "Abres el cuerpo de la bestia",
+ "La masa viscosa del plague beast se endurece y queda inmovilizado",
+ "¡El Plague Beast Lord empieza a moverse de nuevo!",
+ "La bestia muere.",
+ "Glándula",
+ "Colocas la glándula en el receptáculo cercano al centro nervioso",
+ "Herida",
+ "Vendas",
+ "La herida empieza a sangrar",
+ "Taponas la herida",
+ "Centro nervioso",
+ "Núcleo de mutación de plague beast",
+ "El centro nervioso se abre",
+ "Un órgano",
+ "VesÃ*cula infectada",
+ "Órgano tentacular",
+ "Retira la vesÃ*cula infectada antes de introducir ésta",
+ "Ya habÃ*as colocado una vesÃ*cula sana",
+ "Colocas la vesÃ*cula sana en el receptáculo.",
+ "Este organo ya estaba cortado",
+ "Abres el organo de la criatura",
+ "Cánulas de sustento",
+ "Tejido periglandular",
+ "Sangre",
+ "Vena",
+ "Cortas la vena",
+ "Axón",
+ "VesÃ*cula sana",
+ "Extraes una vesÃ*cula sana de la bestia",
+ "* El Plague Beast desencanta la magia de la invocación *",
+ "Dejas caer el núcleo de mutación en tu mochila",
+ "Engendro de plaga",
+ "* El engendro se disuelve *",
+ "El engendro reniega atacar a esa criatura",
+ "La criatura ya fue abierta",
+ "La bestia debe estar solidificada para abrirla!",
+ "Congratulations! You solved the plague beast lord test puzzle!"
+*/
+ };
+
+ public static Point3D[] BrainSlotPositions = new Point3D[5]
+ {
+ new Point3D(10,10,0), //Brain_None
+ new Point3D(150,170,0),
+ new Point3D(240,170,0),
+ new Point3D(150,240,0),
+ new Point3D(240,240,0)
+ };
+
+ public static int[] BrainColors = new int[5]
+ {
+ 0x0001,
+ 0x0047,
+ 0x0060,
+ 0x0035,
+ 0x0010
+ };
+ }
+
+ public enum BrainTypes
+ {
+ Brain_None = 0,
+ Brain_Green = 1,
+ Brain_Blue = 2,
+ Brain_Yellow = 3,
+ Brain_Purple = 4
+ }
+
+ public enum OrganTypes
+ {
+ Organo_Maiden = 0,
+ Organo_Venas = 1,
+ Organo_Pulpo = 2,
+ Organo_Calamar = 3,
+ Organo_Central = 4
+ }
+}
Index: Spells/Fifth/Paralyze.cs
===================================================================
--- Spells/Fifth/Paralyze.cs (revision 321)
+++ Spells/Fifth/Paralyze.cs (working copy)
@@ -68,7 +68,16 @@
if ( CheckResisted( m ) )
duration *= 0.75;
}
-
+//Start addition 1 of 1 for PlagueBeastLord
+ if ( m is Mobiles.PlagueBeastLord )
+ {
+ Mobiles.PlagueBeastLord plaguebl = m as Mobiles.PlagueBeastLord;
+ Caster.Combatant = null; // Don't attack the (as good as) frosted PBL
+ if ( !plaguebl.Frosted )
+ plaguebl.Frosted = true;
+ }
+ else
+//End addition 1 of 1 for PlagueBeastLord
m.Paralyze( TimeSpan.FromSeconds( duration ) );
m.PlaySound( 0x204 );
@@ -99,4 +108,4 @@
}
}
}
-}
\ No newline at end of file
+}
Index: Targets/BladedItemTarget.cs
===================================================================
--- Targets/BladedItemTarget.cs (revision 321)
+++ Targets/BladedItemTarget.cs (working copy)
@@ -44,6 +44,31 @@
else
pet.HasBarding = false;
}
+//Start addition 1 of 1 for PlagueBeastLord
+ else if ( targeted is PlagueBeastLord )
+ {
+ from.RevealingAction();
+
+ PlagueBeastLord plaguebl = targeted as PlagueBeastLord;
+
+ if ( plaguebl.Frosted )
+ {
+ if ( plaguebl.CutOpen )
+ from.LocalOverheadMessage( Server.Network.MessageType.Emote, 0x6CB, false, PlagueHelper.Line[36] );
+ else
+ {
+ plaguebl.InitializePuzzle();
+ //Turn to beast and say something
+ from.Direction = from.GetDirectionTo( plaguebl );
+ from.LocalOverheadMessage( Server.Network.MessageType.Emote, 0x66B, false, PlagueHelper.Line[2] );
+ plaguebl.CutOpenBy = from;
+ plaguebl.Backpack.DisplayTo( from );
+ }
+ }
+ else
+ from.SendMessage( PlagueHelper.Line[37] );
+ }
+//End addition 1 of 1 for PlagueBeastLord
else
{
if ( targeted is StaticTarget )
@@ -121,4 +146,4 @@
}
}
}
-}
\ No newline at end of file
+}
This is a patch for the latest SVN. It adds the Plague Beast Lords, their internals, and the associated puzzle. It also modifies a few distro files (scissors, bandages, etc) for use with the puzzle.
This is *NOT*, I repeat *NOT* a finished product.
This is a modified version of a *VERY* old RunUO script (beta-era) that I cleaned up a tad and modified to work with the latest SVN.
This still needs extensive testing and coding to get just right.