Exemplo n.º 1
0
 public InternalTimer(Plague_Blood item_)
     : base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
 {
     myblood    = item_;
     timepassed = 0;
     PBL        = myblood.RootParent as PlagueBeastLord;
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public override void Abrir(Mobile from)
        {
            PlagueBeastLord m = RootParent as PlagueBeastLord;

            if (m == null)
            {
                return;
            }

            from.Direction = from.GetDirectionTo(m);
            if (Abierto)
            {
                from.LocalOverheadMessage(MessageType.Emote, 0x66B, false, Plague_Texts.Line[21]);
            }
            else
            {
                from.LocalOverheadMessage(MessageType.Emote, 0x66B, false, Plague_Texts.Line[22]);
                from.PlaySound(0x248);
                from.PlaySound(0x2AC);
                Agujero.Visible = true;

                base.Abrir(from);
                //Si no hay cerebro, la herida empieza a sangrar directamente
                if (HoldBrain == BrainTypes.Brain_None)
                {
                    PlagueBrain pb = Mybrain as PlagueBrain;
                    pb.Sangrar(from);
                }
            }
        }
Exemplo n.º 4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            reader.ReadEncodedInt();

            PlagueBeastLord owner = Owner;

            if (owner == null || !owner.Alive)
            {
                Delete();
            }
        }
Exemplo n.º 5
0
 public override bool DropToItem(Mobile from, Item target, Point3D p, byte gridloc)
 {
     if (target is PlagueBackpack)
     {
         PlagueBeastLord PBL = target.RootParent as PlagueBeastLord;
         if (PBL != null)
         {
             PBL.Place_Gland(p, this, from);
         }
     }
     return(base.DropToItem(from, target, p, gridloc));
 }
Exemplo n.º 6
0
 public void Cortar(Mobile from)
 {
     if (!Movable)
     {
         Movable = true;
         PlagueBeastLord PBL = RootParent as PlagueBeastLord;
         ((Container)Parent).RemoveItem(this);
         (from.Backpack).DropItem(this);
         from.PlaySound(0x248);
         from.SendMessage(Plague_Texts.Line[32]);
         PBL.Kill();
     }
 }
Exemplo n.º 7
0
        public override void Deserialize(IGenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();

            PlagueBeastLord owner = Owner;

            if (owner?.Alive != true)
            {
                Delete();
            }
        }
Exemplo n.º 8
0
        public void VenaCortada(Mobile from, int color)
        {
            from.PlaySound(0x248);
            if (color != Hue)
            {
                m_venascortadas++;
                if (m_venascortadas == 3)
                {
                    PlagueBeastLord m = RootParent as PlagueBeastLord;
                    if (m == null)
                    {
                        return;
                    }

                    from.Direction = from.GetDirectionTo(m);
                    if (Abierto)
                    {
                        from.LocalOverheadMessage(MessageType.Emote, 0x66B, false, Plague_Texts.Line[21]);
                    }
                    else
                    {
                        from.LocalOverheadMessage(MessageType.Emote, 0x66B, false, Plague_Texts.Line[22]);
                        from.PlaySound(0x2AC);

                        Agujero.Visible = true;
                        Abierto         = true;
                        if (HoldBrain != BrainTypes.Brain_None)
                        {
                            Mybrain.Visible = true;
                        }
                        //Si no hay cerebro o no se cortaron las venas,
                        //la herida empieza a sangrar directamente
                        if (HoldBrain == BrainTypes.Brain_None)
                        {
                            PlagueBrain pb = Mybrain as PlagueBrain;
                            pb.Sangrar(from);
                        }
                    }
                }
            }
            else
            {
                m_venascortadas = 0;
                PlagueBeastLord PBL = RootParent as PlagueBeastLord;
                PBL.Kill();
            }
        }
        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<PlagueBeastLord>(TimeSpan.FromSeconds(1), new TimerStateCallback<PlagueBeastLord>(KillParent), owner);

                return true;
            }

            return false;
        }
Exemplo n.º 10
0
 public override bool DropToItem(Mobile from, Item target, Point3D p, byte gridloc)
 {
     //Comprobamos si el cachivache está colocado
     if ((m_brain != BrainTypes.Brain_None) && (target.Equals(Bolsa)))
     {
         PlagueBeastLord PBL = Bolsa.Parent as PlagueBeastLord;
         Point3D         p2  = BrainSlot[(int)m_brain];
         if (((p2.X) <= p.X) && (p.X <= (p2.X + 5)) &&
             ((p2.Y) <= p.Y) && (p.Y <= (p2.Y + 5)))
         {
             PBL.ColocarCerebro((int)m_brain - 1, true);
             Movable = false;
             from.LocalOverheadMessage(MessageType.Regular, 0x66B, false, Plague_Texts.Line[7]);
         }
         else
         {
             PBL.ColocarCerebro((int)m_brain - 1, false);
         }
     }
     return((target.Equals(Bolsa)) && p.X != -1 && p.Y != -1 && base.DropToItem(from, target, p, gridloc));
 }
Exemplo n.º 11
0
        public override void Abrir(Mobile from)
        {
            PlagueBeastLord m = RootParent as PlagueBeastLord;

            if (m == null)
            {
                return;
            }

            from.Direction = from.GetDirectionTo(m);
            if (Abierto)
            {
                from.LocalOverheadMessage(MessageType.Emote, 0x66B, false, Plague_Texts.Line[21]);
            }
            else
            {
                from.LocalOverheadMessage(MessageType.Emote, 0x66B, false, Plague_Texts.Line[22]);
                from.PlaySound(0x248);
                from.PlaySound(0x2AC);
                Gland_Recpt.Visible = true;
                Glandula.Visible    = true;
            }
        }
Exemplo n.º 12
0
        public override bool CheckItemUse(Mobile from, Item item)
        {
            PlagueBeastLord m = RootParent as PlagueBeastLord;

            if (m == null)
            {
                return(false);
            }

            from.RevealingAction();
            from.Direction = from.GetDirectionTo(m);
            if (Abierto)
            {
                from.LocalOverheadMessage(MessageType.Emote, 0x66B, false, Plague_Texts.Line[21]);
            }
            else
            {
                ItemID = 4682;
                base.Abrir(from);
                from.LocalOverheadMessage(MessageType.Emote, 0x66B, false, Plague_Texts.Line[22]);
                from.PlaySound(0x2AC);
            }
            return(true);
        }
Exemplo n.º 13
0
 private void KillParent(PlagueBeastLord parent)
 {
     parent.Unfreeze();
     parent.Kill();
 }