private void DoAtomicBomb(Mobile combatant, string message)
        {
            this.Say(true, message);

            Mobile from = (Mobile)combatant;
            Map    map  = from.Map;

            if (map == null)
            {
                return;
            }

            int count = 1;

            for (int i = 0; i < count; ++i)
            {
                int x = from.X + Utility.RandomMinMax(-1, 1);
                int y = from.Y + Utility.RandomMinMax(-1, 1);
                int z = from.Z;

                if (!map.CanFit(x, y, z, 16, false, true))
                {
                    z = map.GetAverageZ(x, y);

                    if (z == from.Z || !map.CanFit(x, y, z, 16, false, true))
                    {
                        continue;
                    }
                }

                Atomic bomb = new Atomic();

                bomb.MoveToWorld(new Point3D(x, y, z), map);
            }
        }
Beispiel #2
0
        public void Bomb(object state)
        {
            Mobile caster = (Mobile)state;

            Atomic bomb = new Atomic();

            bomb.MoveToWorld(caster.Location, caster.Map);
        }
Beispiel #3
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            bool IsQuestItem = false;

            if (dropped is BloodKey && m_Type == BellType.DarkIron && Tallon.Active == false)
            {
                IsQuestItem = true;
            }
            if (dropped is WoodenKey && m_Type == BellType.Wooden && Zirux.Active == false)
            {
                IsQuestItem = true;
            }
            if (dropped is ShimmeringKey && m_Type == BellType.Blood && Krog.Active == false)
            {
                IsQuestItem = true;
            }
            if (dropped is ClawKey && m_Type == BellType.Beast && Alfirix.Active == false)
            {
                IsQuestItem = true;
            }
            if (dropped is VenomKey && m_Type == BellType.Noxious && Ignis.Active == false)
            {
                IsQuestItem = true;
            }
            if (
                dropped is BloodKey && m_Type != BellType.DarkIron ||
                dropped is WoodenKey && m_Type != BellType.Wooden ||
                dropped is ShimmeringKey && m_Type != BellType.Blood ||
                dropped is ClawKey && m_Type != BellType.Beast ||
                dropped is VenomKey && m_Type != BellType.Noxious
                )
            {
                SayTo(from, "This is not the key I desire you pathetic mortal!");
                from.Poison = Poison.Lethal;
                from.Freeze(TimeSpan.FromSeconds(15.0));
                return(base.OnDragDrop(from, dropped));
            }

            if (IsQuestItem)
            {
                dropped.Delete();

                BeginRemove(TimeSpan.FromSeconds(4.0));

                if (m_AngryAt == from)
                {
                    m_AngryAt = null;
                }

                switch (m_Type)
                {
                case BellType.DarkIron: m_Boss = new Tallon(); break;

                case BellType.Wooden: m_Boss = new Zirux(); break;

                case BellType.Blood: m_Boss = new Krog(); break;

                case BellType.Beast: m_Boss = new Alfirix(); break;

                case BellType.Noxious: m_Boss = new Ignis(); break;
                }

                m_Boss.MoveToWorld(this.Location, this.Map);
                SayTo(from, "So mortal you bring me the correct item, now go slay the creature!");
                from.AddToBackpack(new ItemClaimer());
                from.SendMessage("You have recieved an item that is used to collect your reward, if there is one...");
                return(false);
            }
            else
            {
                Atomic bomb = new Atomic();
                bomb.MoveToWorld(from.Location, from.Map);
                return(base.OnDragDrop(from, dropped));
            }
        }