Inheritance: BaseCreature
        public override bool OnBeforeDeath()
        {
            BoneMagi rm = new BoneMagi();

            rm.Team         = this.Team;
            rm.Combatant    = this.Combatant;
            rm.NoKillAwards = true;

            if (rm.Backpack == null)
            {
                Backpack pack = new Backpack();
                pack.Movable = false;
                rm.AddItem(pack);
            }

            ArrayList list = GetLootingRights(this.DamageEntries, this.HitsMax);

            for (int i = 0; i < 2; i++)
            {
                LootPack.FilthyRich.Generate(this, rm.Backpack, true, LootPack.GetLuckChanceForKiller(this), list);
                LootPack.FilthyRich.Generate(this, rm.Backpack, false, LootPack.GetLuckChanceForKiller(this), list);
            }

            Effects.PlaySound(this, Map, GetDeathSound());
            Effects.SendLocationEffect(Location, Map, 0x3709, 30, 10, 0x835, 0);
            rm.MoveToWorld(Location, Map);

            Delete();
            return(false);
        }
示例#2
0
        public override bool OnBeforeDeath()
        {
            var rm = new BoneMagi();

            rm.Team         = Team;
            rm.Combatant    = Combatant;
            rm.NoKillAwards = true;

            if (rm.Backpack == null)
            {
                var pack = new Backpack();
                pack.Movable = false;
                rm.AddItem(pack);
            }

            for (var i = 0; i < 2; i++)
            {
                LootPack.FilthyRich.Generate(this, rm.Backpack, true, LootPack.GetLuckChanceForKiller(this));
                LootPack.FilthyRich.Generate(this, rm.Backpack, false, LootPack.GetLuckChanceForKiller(this));
            }

            Effects.PlaySound(this, Map, GetDeathSound());
            Effects.SendLocationEffect(Location, Map, 0x3709, 30, 10, 0x835, 0);
            rm.MoveToWorld(Location, Map);

            Delete();
            return(false);
        }
示例#3
0
        public override bool OnBeforeDeath()
        {
            BoneMagi rm = new BoneMagi();

            rm.Team     = this.Team;
            rm.Map      = this.Map;
            rm.Location = this.Location;
            Effects.SendLocationEffect(Location, Map, 0x3709, 13, 0x3B2, 0);

            Container bag = new Bag();

            switch (Utility.Random(9))
            {
            case 0: bag.DropItem(new Amber()); break;

            case 1: bag.DropItem(new Amethyst()); break;

            case 2: bag.DropItem(new Citrine()); break;

            case 3: bag.DropItem(new Diamond()); break;

            case 4: bag.DropItem(new Emerald()); break;

            case 5: bag.DropItem(new Ruby()); break;

            case 6: bag.DropItem(new Sapphire()); break;

            case 7: bag.DropItem(new StarSapphire()); break;

            case 8: bag.DropItem(new Tourmaline()); break;
            }

            switch (Utility.Random(8))
            {
            case 0: bag.DropItem(new SpidersSilk(3)); break;

            case 1: bag.DropItem(new BlackPearl(3)); break;

            case 2: bag.DropItem(new Bloodmoss(3)); break;

            case 3: bag.DropItem(new Garlic(3)); break;

            case 4: bag.DropItem(new MandrakeRoot(3)); break;

            case 5: bag.DropItem(new Nightshade(3)); break;

            case 6: bag.DropItem(new SulfurousAsh(3)); break;

            case 7: bag.DropItem(new Ginseng(3)); break;
            }

            bag.DropItem(new Gold(2000, 3500));
            rm.AddItem(bag);

            this.Delete();

            return(false);
        }
示例#4
0
		public override bool OnBeforeDeath()
		{
			BoneMagi rm = new BoneMagi();
			rm.Team = this.Team;
			rm.Map = this.Map;
			rm.Location = this.Location;
			Effects.SendLocationEffect( Location,Map, 0x3709, 13, 0x3B2, 0 );

			Container bag = new Bag();

			switch ( Utility.Random( 9 ))
			{
				case 0: bag.DropItem( new Amber() ); break;
				case 1: bag.DropItem( new Amethyst() ); break;
				case 2: bag.DropItem( new Citrine() ); break;
				case 3: bag.DropItem( new Diamond() ); break;
				case 4: bag.DropItem( new Emerald() ); break;
				case 5: bag.DropItem( new Ruby() ); break;
				case 6: bag.DropItem( new Sapphire() ); break;
				case 7: bag.DropItem( new StarSapphire() ); break;
				case 8: bag.DropItem( new Tourmaline() ); break;
			}

			switch ( Utility.Random( 8 ))
			{
				case 0: bag.DropItem( new SpidersSilk( 3 ) ); break;
				case 1: bag.DropItem( new BlackPearl( 3 ) ); break;
				case 2: bag.DropItem( new Bloodmoss( 3 ) ); break;
				case 3: bag.DropItem( new Garlic( 3 ) ); break;
				case 4: bag.DropItem( new MandrakeRoot( 3 ) ); break;
				case 5: bag.DropItem( new Nightshade( 3 ) ); break;
				case 6: bag.DropItem( new SulfurousAsh( 3 ) ); break;
				case 7: bag.DropItem( new Ginseng( 3 ) ); break;
			}

			bag.DropItem( new Gold( 2000, 3500 ));
			rm.AddItem( bag );

			this.Delete();

			return false;
		}
        public override bool OnBeforeDeath()
        {
            BoneMagi rm = new BoneMagi();

            rm.Team = this.Team;
            rm.MoveToWorld(this.Location, this.Map);

            Effects.SendLocationEffect(Location, Map, 0x3709, 13, 0x3B2, 0);

            Container bag = new Bag();

            switch (Utility.Random(9))
            {
            case 0: bag.DropItem(new Amber()); break;

            case 1: bag.DropItem(new Amethyst()); break;

            case 2: bag.DropItem(new Citrine()); break;

            case 3: bag.DropItem(new Diamond()); break;

            case 4: bag.DropItem(new Emerald()); break;

            case 5: bag.DropItem(new Ruby()); break;

            case 6: bag.DropItem(new Sapphire()); break;

            case 7: bag.DropItem(new StarSapphire()); break;

            case 8: bag.DropItem(new Tourmaline()); break;
            }

            switch (Utility.Random(8))
            {
            case 0: bag.DropItem(new SpidersSilk(3)); break;

            case 1: bag.DropItem(new BlackPearl(3)); break;

            case 2: bag.DropItem(new Bloodmoss(3)); break;

            case 3: bag.DropItem(new Garlic(3)); break;

            case 4: bag.DropItem(new MandrakeRoot(3)); break;

            case 5: bag.DropItem(new Nightshade(3)); break;

            case 6: bag.DropItem(new SulfurousAsh(3)); break;

            case 7: bag.DropItem(new Ginseng(3)); break;
            }

            if (0.12 > Utility.RandomDouble())
            {
                Item iob = Loot.RandomIOB();
                bag.DropItem(iob);
            }

            bag.DropItem(new Gold(1000, 1500));

            if (IOBRegions.GetIOBStronghold(this) == IOBAlignment)
            {
                // 30% boost to gold
                PackGold(base.GetGold() / 3);
            }

            // Category 4 MID
            rm.PackMagicItem(2, 3, 0.10);
            rm.PackMagicItem(2, 3, 0.05);
            rm.PackMagicItem(2, 3, 0.02);

            rm.PackMagicEquipment(2, 3, 0.60, 0.60);
            rm.PackMagicEquipment(2, 3, 0.25, 0.25);

            rm.AddItem(bag);

            this.Delete();

            return(false);
        }
示例#6
0
        public override bool OnBeforeDeath()
        {
            BoneMagi rm = new BoneMagi();
            rm.Team = this.Team;
            rm.Combatant = this.Combatant;
            rm.NoKillAwards = true;

            if ( rm.Backpack == null )
            {
                Backpack pack = new Backpack();
                pack.Movable = false;
                rm.AddItem( pack );
            }

            for ( int i = 0; i < 2; i++ )
            {
                LootPack.FilthyRich.Generate( this, rm.Backpack, true, LootPack.GetLuckChanceForKiller( this ) );
                LootPack.FilthyRich.Generate( this, rm.Backpack, false, LootPack.GetLuckChanceForKiller( this ) );
            }

            Effects.PlaySound(this, Map, GetDeathSound());
            Effects.SendLocationEffect( Location, Map, 0x3709, 30, 10, 0x835, 0 );
            rm.MoveToWorld( Location, Map );

            Delete();
            return false;
        }
示例#7
0
        public void SpawnMobiles(Mobile target)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            int red = 0;

            foreach (Mobile m in this.GetMobilesInRange(10))
            {
                if (m is BoneMagi || m is BoneKnight || m is BoneMagi)
                {
                    ++red;
                }
            }

            if (red < 5)
            {
                int newblue = Utility.RandomMinMax(1, 2);

                for (int i = 0; i < newblue; ++i)
                {
                    BaseCreature yellow;

                    switch (Utility.Random(2))
                    {
                    default:
                    case 0: yellow = new BoneMagi(); break;

                    case 1: yellow = new BoneKnight(); break;
                    }

                    yellow.Team = this.Team;

                    bool    validLocation = false;
                    Point3D loc           = this.Location;

                    for (int j = 0; !validLocation && j < 10; ++j)
                    {
                        int x = X + Utility.Random(3) - 1;
                        int y = Y + Utility.Random(3) - 1;
                        int z = map.GetAverageZ(x, y);

                        if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                        {
                            loc = new Point3D(x, y, Z);
                        }
                        else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                        {
                            loc = new Point3D(x, y, z);
                        }
                    }

                    yellow.MoveToWorld(loc, map);
                    yellow.Combatant = target;
                    yellow.PlaySound(yellow.GetIdleSound());
                    yellow.FixedParticles(0x3728, 1, 10, 9910, EffectLayer.Head);
                }
            }
        }
示例#8
0
		public override bool OnBeforeDeath()
		{
			BoneMagi rm = new BoneMagi();

			rm.Team = this.Team;
			rm.MoveToWorld( this.Location, this.Map );

			Effects.SendLocationEffect( Location,Map, 0x3709, 13, 0x3B2, 0 );

			Container bag = new Bag();

			switch ( Utility.Random( 9 ))
			{
				case 0: bag.DropItem( new Amber() ); break;
				case 1: bag.DropItem( new Amethyst() ); break;
				case 2: bag.DropItem( new Citrine() ); break;
				case 3: bag.DropItem( new Diamond() ); break;
				case 4: bag.DropItem( new Emerald() ); break;
				case 5: bag.DropItem( new Ruby() ); break;
				case 6: bag.DropItem( new Sapphire() ); break;
				case 7: bag.DropItem( new StarSapphire() ); break;
				case 8: bag.DropItem( new Tourmaline() ); break;
			}

			switch ( Utility.Random( 8 ))
			{
				case 0: bag.DropItem( new SpidersSilk( 3 ) ); break;
				case 1: bag.DropItem( new BlackPearl( 3 ) ); break;
				case 2: bag.DropItem( new Bloodmoss( 3 ) ); break;
				case 3: bag.DropItem( new Garlic( 3 ) ); break;
				case 4: bag.DropItem( new MandrakeRoot( 3 ) ); break;
				case 5: bag.DropItem( new Nightshade( 3 ) ); break;
				case 6: bag.DropItem( new SulfurousAsh( 3 ) ); break;
				case 7: bag.DropItem( new Ginseng( 3 ) ); break;
			}

			bag.DropItem( new Gold( 1000, 1500 ));
			rm.AddItem( bag );

			LeatherGloves gloves = new LeatherGloves();
			gloves.Hue = 32;
			AddItem( gloves );

			BoneHelm helm = new BoneHelm();
			helm.Hue = 0x3A8;
			helm.LootType = LootType.Blessed;
			AddItem( helm );

			Cloak cloak = new Cloak();
			cloak.Hue = 32;
			AddItem( cloak );

			Kilt kilt = new Kilt();
			kilt.Hue = 32;
			AddItem( kilt );

			Sandals sandals = new Sandals();
			sandals.Hue = 32;
			AddItem( sandals );

			this.Delete();

			return false;
		}
示例#9
0
        public override void OnThink()
        {
            if (!boatspawn)
            {
                if (this is SailorOrkGuards || this is SailorElfGuards || this is SailorGuards)
                {
                    TitleGuards(this);
                }

                Map map = Map;

                if (map == null)
                {
                    return;
                }

                Server.Multis.BaseBoat.BuildShip(ship, this);
                boatspawn = true;
                if (Server.Multis.BaseBoat.IsNearOtherShip(this))
                {
                    this.Delete();
                }
                else if (Worlds.TestShore(Map, X, Y, 15))
                {
                    this.Delete();
                }
            }

            base.OnThink();

            if (ship == null)
            {
                this.Delete();
            }

            base.OnThink();

            if (!crewspawn)
            {
                crewspawn = true;
                int          crew   = Utility.RandomMinMax(9, 12);
                BaseCreature pirate = new Brigand(); pirate.Delete();
                bool         evil   = true;
                string       toss   = "stones";

                while (crew > 0)
                {
                    if (this is PirateCyclops || this is PirateDragonogre || this is PirateEttinMage || this is PirateTroll || this is PirateOgreLord || this is PirateMinotaur)
                    {
                        switch (Utility.RandomMinMax(1, 13))
                        {
                        case 1: pirate = new Orc();                             toss = "stones";        break;

                        case 2: pirate = new Bugbear();                 toss = "axes";          break;

                        case 3: pirate = new Gnoll();                   toss = "daggers";       break;

                        case 4: pirate = new Goblin();                  toss = "darts";         break;

                        case 5: pirate = new Morlock();                 toss = "stones";        break;

                        case 6: pirate = new Neanderthal();             toss = "stones";        break;

                        case 7: pirate = new Ratman();                  toss = "daggers";       pirate.Body = 42;               break;

                        case 8: pirate = new Minotaur();                toss = "axes";          pirate.Body = 241;              break;

                        case 9: pirate = new Orc();                             toss = "axes";          pirate.Body = 20;               break;

                        case 10: pirate = new Orc();                    toss = "daggers";       pirate.Body = 182;              break;

                        case 11: pirate = new Orc();                    toss = "arrows";        pirate.Body = 252;              break;

                        case 12: pirate = new Kobold();                 toss = "daggers";       pirate.Body = 245;              break;

                        case 13: pirate = new Minotaur();               toss = "axes";          pirate.Body = 78;               break;
                        }
                    }
                    else if (this is PirateDaemon || this is PirateDemon || this is PirateDemoness || this is PirateDevil || this is PirateSuccubus)
                    {
                        switch (Utility.RandomMinMax(1, 5))
                        {
                        case 1: pirate = new Demon();                   toss = "fire";          pirate.Hue = 0;         pirate.Body = 112;              break;

                        case 2: pirate = new Gargoyle();                toss = "fire";          pirate.Hue = 0;         pirate.Body = 112;              break;

                        case 3: pirate = new Succubus();                toss = "energy";        pirate.Hue = 0;         pirate.Body = 149;              break;

                        case 4: pirate = new Demon();                   toss = "daggers";       pirate.Hue = 0;         pirate.Body = 128;              break;

                        case 5: pirate = new Demon();                   toss = "poison";        pirate.Hue = 0;         pirate.Body = 136;              break;
                        }
                    }
                    else if (this is PirateGargoyle)
                    {
                        switch (Utility.RandomMinMax(1, 5))
                        {
                        case 1: pirate = new Gargoyle();                pirate.Body = 112;              break;

                        case 2: pirate = new Gargoyle();                pirate.Body = 126;              break;

                        case 3: pirate = new Gargoyle();                pirate.Body = 113;              break;

                        case 4: pirate = new Gargoyle();                pirate.Body = 158;              break;

                        case 5: pirate = new Gargoyle();                                                                break;
                        }
                        switch (Utility.RandomMinMax(1, 5))
                        {
                        case 1: toss = "fire";          break;

                        case 2: toss = "cold";          break;

                        case 3: toss = "energy";        break;

                        case 4: toss = "poison";        break;

                        case 5: toss = "bolt";          break;
                        }
                    }
                    else if (this is PirateGrathek || this is PirateSakleth)
                    {
                        switch (Utility.RandomMinMax(1, 4))
                        {
                        case 1: pirate = new LizardmanArcher();         toss = "spear";         break;

                        case 2: pirate = new Lizardman();                       toss = "daggers";       pirate.Body = 33;               break;

                        case 3: pirate = new Lizardman();                       toss = "rocks";         pirate.Body = 326;              break;

                        case 4: pirate = new Lizardman();                       toss = "darts";         pirate.Body = 375;              break;
                        }
                    }
                    else if (this is PirateTitan)
                    {
                        switch (Utility.RandomMinMax(1, 4))
                        {
                        case 1: pirate = new Tritun();          toss = "daggers";               break;

                        case 2: pirate = new Tritun();          toss = "spear";                 pirate.Body = 678;              break;

                        case 3: pirate = new Tritun();          toss = "poison";                pirate.Body = 676;              break;

                        case 4: pirate = new Tritun();          toss = "bolt";                  pirate.Body = 677;              break;
                        }
                    }
                    else if (this is PirateOphidian)
                    {
                        pirate = new OphidianWarrior();         toss = "dagger";        pirate.Body = 87;
                    }
                    else if (this is PirateSnakeMan)
                    {
                        evil = false;
                        switch (Utility.RandomMinMax(1, 2))
                        {
                        case 1: pirate = new OphidianWarrior();         toss = "poison";                pirate.Body = 704;              break;

                        case 2: pirate = new OphidianWarrior();         toss = "daggers";               pirate.Body = 143;              break;
                        }
                    }
                    else if (this is PirateUndead)
                    {
                        switch (Utility.RandomMinMax(1, 5))
                        {
                        case 1: pirate = new Zombie();                  toss = "bones";                                                                 break;

                        case 2: pirate = new Zombie();                  toss = "bones";                 pirate.Body = 304;              break;

                        case 3: pirate = new Ghoul();                   toss = "bones";                                                                 break;

                        case 4: pirate = new AquaticGhoul();    toss = "bones";                                                                 break;

                        case 5: pirate = new Wight();                   toss = "bones";                                                                 break;
                        }
                    }
                    else if (this is PirateGhost)
                    {
                        switch (Utility.RandomMinMax(1, 5))
                        {
                        case 1: pirate = new Spectre();                         toss = "fire";                  break;

                        case 2: pirate = new Spectre();                         toss = "cold";                  break;

                        case 3: pirate = new Spectre();                         toss = "energy";                break;

                        case 4: pirate = new Spectre();                         toss = "bolt";                  break;

                        case 5: pirate = new Spectre();                         toss = "poison";                break;
                        }
                    }
                    else if (this is PirateDarkLord || this is PirateLich || this is PirateLichLord || this is PirateSkeleton)
                    {
                        switch (Utility.RandomMinMax(1, 14))
                        {
                        case 1: pirate = new Zombie();                  toss = "bones";                                                                 break;

                        case 2: pirate = new Zombie();                  toss = "bones";                 pirate.Body = 304;              break;

                        case 3: pirate = new Spectre();                 toss = "fire";                                                                  break;

                        case 4: pirate = new Ghoul();                   toss = "bones";                                                                 break;

                        case 5: pirate = new AquaticGhoul();    toss = "bones";                                                                 break;

                        case 6: pirate = new Skeleton();                toss = "bones";                 pirate.Body = 50;               break;

                        case 7: pirate = new SkeletonArcher();  toss = "arrows";                                                                break;

                        case 8: pirate = new Wight();                   toss = "bones";                                                                 break;

                        case 9: pirate = new Skeleton();                toss = "bandages";              pirate.Body = 154;              BaseSoundID = 471;      break;

                        case 10: pirate = new BoneMagi();               toss = "fire";                                                                  break;

                        case 11: pirate = new BoneMagi();               toss = "cold";                                                                  break;

                        case 12: pirate = new BoneMagi();               toss = "energy";                                                                break;

                        case 13: pirate = new BoneMagi();               toss = "poison";                                                                break;

                        case 14: pirate = new BoneMagi();               toss = "bolt";                                                                  break;
                        }
                    }

                    else if (this is PirateDrow)
                    {
                        pirate = new ElfBerserker();            toss = "crossbow";
                    }
                    else if (this is PirateMen)
                    {
                        pirate = new Berserker();                       toss = "crossbow";
                    }
                    else if (this is PirateNatives)
                    {
                        pirate = new Berserker();                       toss = "harpoon";
                    }
                    else if (this is PirateCult)
                    {
                        switch (Utility.RandomMinMax(1, 12))
                        {
                        case 1: pirate = new Brigand();         toss = "daggers";       break;

                        case 2: pirate = new Brigand();         toss = "stones";        break;

                        case 3: pirate = new Brigand();         toss = "stars";         break;

                        case 4: pirate = new Brigand();         toss = "darts";         break;

                        case 5: pirate = new Brigand();         toss = "axes";          break;

                        case 6: pirate = new Brigand();         toss = "bones";         break;

                        case 7: pirate = new Brigand();         toss = "arrows";        break;

                        case 8: pirate = new Brigand();         toss = "fire";          break;

                        case 9: pirate = new Brigand();         toss = "cold";          break;

                        case 10: pirate = new Brigand();        toss = "energy";        break;

                        case 11: pirate = new Brigand();        toss = "poison";        break;

                        case 12: pirate = new Brigand();        toss = "bolt";          break;
                        }
                    }
                    else if (this is SailorElfGuards)
                    {
                        pirate = new ElfBerserker();
                        evil   = false;
                        switch (Utility.RandomMinMax(1, 3))
                        {
                        case 1: toss = "crossbow";              break;

                        case 2: toss = "bow";                   break;

                        case 3: toss = "harpoon";               break;
                        }
                    }
                    else if (this is SailorGuards)
                    {
                        pirate = new Berserker();
                        evil   = false;
                        switch (Utility.RandomMinMax(1, 3))
                        {
                        case 1: toss = "crossbow";              break;

                        case 2: toss = "bow";                   break;

                        case 3: toss = "harpoon";               break;
                        }
                    }
                    else if (this is SailorOrkGuards)
                    {
                        pirate = new OrkWarrior();
                        evil   = false;
                        switch (Utility.RandomMinMax(1, 3))
                        {
                        case 1: toss = "crossbow";              break;

                        case 2: toss = "bow";                   break;

                        case 3: toss = "harpoon";               break;
                        }
                    }
                    else if (this is SailorElf)
                    {
                        pirate = new ElfBerserker();
                        evil   = false;
                        switch (Utility.RandomMinMax(1, 7))
                        {
                        case 1: toss = "daggers";       break;

                        case 2: toss = "harpoon";       break;

                        case 3: toss = "stars";         break;

                        case 4: toss = "darts";         break;

                        case 5: toss = "axes";          break;

                        case 6: toss = "arrows";        break;

                        case 7: toss = "crossbow";      break;
                        }
                    }
                    else if (this is SailorMerchant)
                    {
                        pirate = new Berserker();
                        evil   = false;
                        switch (Utility.RandomMinMax(1, 7))
                        {
                        case 1: toss = "daggers";       break;

                        case 2: toss = "harpoon";       break;

                        case 3: toss = "stars";         break;

                        case 4: toss = "darts";         break;

                        case 5: toss = "axes";          break;

                        case 6: toss = "arrows";        break;

                        case 7: toss = "crossbow";              break;
                        }
                    }
                    else if (this is SailorAngel || this is SailorAngelLord)
                    {
                        evil = false;
                        switch (Utility.RandomMinMax(1, 5))
                        {
                        case 1: pirate = new Pixie();           toss = "fire";                  pirate.Body = Utility.RandomList(356, 128); break;

                        case 2: pirate = new Fairy();           toss = "cold";                  pirate.Body = 363; break;

                        case 3: pirate = new Centaur();         toss = "arrows";                break;

                        case 4: pirate = new Satyr();           toss = "daggers";               break;

                        case 5: pirate = new Wisp();            toss = "energy";                break;
                        }
                    }

                    SizeUpCrewMember(pirate, evil, EmoteHue, this, toss);
                    crew--;
                }
            }
        }
示例#10
0
        public void SpawnCreature(Mobile target)
        {
            Map map = this.Map;

            if (map == null)
            {
                return;
            }

            int monsters = 0;

            foreach (Mobile m in this.GetMobilesInRange(4))
            {
                if (m is BoneKnight || m is BoneMagi || m is Ghoul || m is Mummy || m is Shade || m is SkeletalKnight || m is SkeletalMage || m is Skeleton || m is Spectre || m is Wraith || m is Phantom || m is Zombie)
                {
                    ++monsters;
                }
            }

            if (monsters < 6)
            {
                PlaySound(0x216);

                int newmonsters = Utility.RandomMinMax(1, 3);

                for (int i = 0; i < newmonsters; ++i)
                {
                    BaseCreature monster;

                    switch (Utility.Random(13))
                    {
                    default:
                    case 0: monster = new BoneKnight(); break;

                    case 1: monster = new BoneMagi(); break;

                    case 2: monster = new Ghoul(); break;

                    case 3: monster = new Ghostly(); break;

                    case 4: monster = new Mummy(); break;

                    case 5: monster = new Shade(); break;

                    case 6: monster = new SkeletalKnight(); break;

                    case 7: monster = new SkeletalMage(); break;

                    case 8: monster = new Skeleton(); break;

                    case 9: monster = new Spectre(); break;

                    case 10: monster = new Wraith(); break;

                    case 11: monster = new Phantom(); break;

                    case 12: monster = new Zombie(); break;
                    }

                    monster.Team = this.Team;

                    bool    validLocation = false;
                    Point3D loc           = this.Location;

                    for (int j = 0; !validLocation && j < 10; ++j)
                    {
                        int x = X + Utility.Random(3) - 1;
                        int y = Y + Utility.Random(3) - 1;
                        int z = map.GetAverageZ(x, y);

                        if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
                        {
                            loc = new Point3D(x, y, Z);
                        }
                        else if (validLocation = map.CanFit(x, y, z, 16, false, false))
                        {
                            loc = new Point3D(x, y, z);
                        }
                    }

                    monster.ControlSlots = 666;                     // DJERYV ADDED FOR MONSTER CLEANUP
                    monster.MoveToWorld(loc, map);
                    monster.Combatant = target;
                }
            }
        }
示例#11
0
		public override bool OnBeforeDeath()
		{
			BoneMagi rm = new BoneMagi();

			rm.Team = this.Team;
			rm.MoveToWorld( this.Location, this.Map );

			Effects.SendLocationEffect( Location,Map, 0x3709, 13, 0x3B2, 0 );

			Container bag = new Bag();

			switch ( Utility.Random( 9 ))
			{
				case 0: bag.DropItem( new Amber() ); break;
				case 1: bag.DropItem( new Amethyst() ); break;
				case 2: bag.DropItem( new Citrine() ); break;
				case 3: bag.DropItem( new Diamond() ); break;
				case 4: bag.DropItem( new Emerald() ); break;
				case 5: bag.DropItem( new Ruby() ); break;
				case 6: bag.DropItem( new Sapphire() ); break;
				case 7: bag.DropItem( new StarSapphire() ); break;
				case 8: bag.DropItem( new Tourmaline() ); break;
			}

			switch ( Utility.Random( 8 ))
			{
				case 0: bag.DropItem( new SpidersSilk( 3 ) ); break;
				case 1: bag.DropItem( new BlackPearl( 3 ) ); break;
				case 2: bag.DropItem( new Bloodmoss( 3 ) ); break;
				case 3: bag.DropItem( new Garlic( 3 ) ); break;
				case 4: bag.DropItem( new MandrakeRoot( 3 ) ); break;
				case 5: bag.DropItem( new Nightshade( 3 ) ); break;
				case 6: bag.DropItem( new SulfurousAsh( 3 ) ); break;
				case 7: bag.DropItem( new Ginseng( 3 ) ); break;
			}

			if (0.12 > Utility.RandomDouble())
			{
				Item iob = Loot.RandomIOB();
				bag.DropItem( iob );
			}

			bag.DropItem( new Gold( 1000, 1500 ));
			
			if (IOBRegions.GetIOBStronghold(this) == IOBAlignment)
			{
				// 30% boost to gold
				PackGold( base.GetGold()/3 );
			}

			// Category 4 MID
			rm.PackMagicItem(2, 3, 0.10);
			rm.PackMagicItem(2, 3, 0.05);
			rm.PackMagicItem(2, 3, 0.02);

			rm.PackMagicEquipment(2, 3, 0.60, 0.60);
			rm.PackMagicEquipment(2, 3, 0.25, 0.25);

			rm.AddItem( bag );

			this.Delete();

			return false;
		}
示例#12
0
			protected override void OnTick()
			{
				if ( m_Item.Deleted )
					return;

				Mobile spawn;

				switch ( Utility.Random( 12 ) )
				{
					default:
					case 0: spawn = new Skeleton(); break;
					case 1: spawn = new Zombie(); break;
					case 2: spawn = new Wraith(); break;
					case 3: spawn = new Spectre(); break;
					case 4: spawn = new Ghoul(); break;
					case 5: spawn = new Mummy(); break;
					case 6: spawn = new Bogle(); break;
					case 7: spawn = new RottingCorpse(); break;
					case 8: spawn = new BoneKnight(); break;
					case 9: spawn = new SkeletalKnight(); break;
					case 10: spawn = new BoneMagi(); break;
					case 11: spawn = new BoneMagiLord(); break;
				}

				spawn.MoveToWorld( m_Item.Location, m_Item.Map );

				m_Item.Delete();
			}
		public void SpawnUndeads( Mobile target )
		{
			Map map = this.Map;

			if ( map == null )
				return;

			int undeads = 0;

			foreach ( Mobile m in this.GetMobilesInRange( 10 ) )
			{
				if ( m is Skeleton || m is SkeletalMage || m is Zombie || m is BoneMagi || m is Ghoul || m is Wraith || m is Shade || m is Spectre )
					++undeads;
			}

			if ( undeads < 7 )
			{
				PlaySound( 586 );

				int newUndeads = Utility.RandomMinMax( 2, 5 );

				for ( int i = 0; i < newUndeads; ++i )
				{
					BaseCreature undead;

					switch ( Utility.Random( 16 ) )
					{
						default:
						case 0: case 1:	undead = new Skeleton(); break;
						case 2: case 3:	undead = new SkeletalMage(); break;
						case 4:	case 5:	undead = new BoneMagi(); break;
						case 6:	case 7:	undead = new Zombie(); break;
						case 8:	case 9:	undead = new Ghoul(); break;
						case 10: case 11: undead = new Wraith(); break;
						case 12: case 13: undead = new Shade(); break;
						case 14: case 15: undead = new Spectre(); break;
					}

					undead.Team = this.Team;

					bool validLocation = false;
					Point3D loc = this.Location;

					for ( int j = 0; !validLocation && j < 10; ++j )
					{
						int x = X + Utility.Random( 3 ) - 1;
						int y = Y + Utility.Random( 3 ) - 1;
						int z = map.GetAverageZ( x, y );

						if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) )
							loc = new Point3D( x, y, Z );
						else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
							loc = new Point3D( x, y, z );
					}

					undead.MoveToWorld( loc, map );
					undead.Combatant = target;
				}
			}
		}
            protected override void OnTick()
            {
                Item gem = Loot.RandomGem();
                Item reg = Loot.RandomPossibleReagent();

                Item equip;
                equip = Loot.RandomArmorOrShieldOrWeaponOrJewelry();

                if ( m_Item != null )
                    m_Item.IsDigging = false;

                if ( equip is BaseWeapon )
                {
                    BaseWeapon weapon = (BaseWeapon)equip;

                    int attributeCount;
                    int min, max;

                    GetRandomAOSStats( out attributeCount, out min, out max );

                    BaseRunicTool.ApplyAttributesTo( weapon, attributeCount, min, max );
                }
                else if ( equip is BaseArmor )
                {
                    BaseArmor armor = (BaseArmor)equip;

                    int attributeCount;
                    int min, max;

                    GetRandomAOSStats( out attributeCount, out min, out max );

                    BaseRunicTool.ApplyAttributesTo( armor, attributeCount, min, max );
                }
                else if ( equip is BaseJewel )
                {
                    int attributeCount;
                    int min, max;

                    GetRandomAOSStats( out attributeCount, out min, out max );

                    BaseRunicTool.ApplyAttributesTo( (BaseJewel)equip, attributeCount, min, max );
                }

                if ( Utility.Random( 100 ) < 85 )
                {
                    switch ( Utility.Random ( 15 ) )
                    {
                        case 0:
                        Skeleton skel = new Skeleton();
                        skel.Location = m_From.Location;
                        skel.Map = m_From.Map;
                        skel.Combatant = m_From;

                            World.AddMobile( skel );
                        break;

                        case 1:
                        Ghoul ghoul = new Ghoul();
                        ghoul.Location = m_From.Location;
                        ghoul.Map = m_From.Map;
                        ghoul.Combatant = m_From;

                            World.AddMobile( ghoul );
                        break;

                        case 2:
                        Wraith wraith = new Wraith();
                        wraith.Location = m_From.Location;
                        wraith.Map = m_From.Map;
                        wraith.Combatant = m_From;

                            World.AddMobile( wraith );
                        break;

                        case 3:
                        Lich lich = new Lich();
                        lich.Location = m_From.Location;
                        lich.Map = m_From.Map;
                        lich.Combatant = m_From;

                            World.AddMobile( lich );
                        break;

                        case 4:
                        LichLord lichl = new LichLord();
                        lichl.Location = m_From.Location;
                        lichl.Map = m_From.Map;
                        lichl.Combatant = m_From;

                            World.AddMobile( lichl );
                        break;

                        case 5:
                        AncientLich alich = new AncientLich();
                        alich.Location = m_From.Location;
                        alich.Map = m_From.Map;
                        alich.Combatant = m_From;

                            World.AddMobile( alich );
                        break;

                        case 6:
                        Mummy mum = new Mummy();
                        mum.Location = m_From.Location;
                        mum.Map = m_From.Map;
                        mum.Combatant = m_From;

                            World.AddMobile( mum );
                        break;

                        case 7:
                        Zombie zom = new Zombie();
                        zom.Location = m_From.Location;
                        zom.Map = m_From.Map;
                        zom.Combatant = m_From;

                            World.AddMobile( zom );
                        break;

                        case 8:
                        SkeletalKnight sk = new SkeletalKnight();
                        sk.Location = m_From.Location;
                        sk.Map = m_From.Map;
                        sk.Combatant = m_From;

                            World.AddMobile( sk );
                        break;

                        case 9:
                        SkeletalMage sm = new SkeletalMage();
                        sm.Location = m_From.Location;
                        sm.Map = m_From.Map;
                        sm.Combatant = m_From;

                            World.AddMobile( sm );
                        break;

                        case 10:
                        BoneKnight bk = new BoneKnight();
                        bk.Location = m_From.Location;
                        bk.Map = m_From.Map;
                        bk.Combatant = m_From;

                            World.AddMobile( bk );
                        break;

                        case 11:
                        BoneMagi bm = new BoneMagi();
                        bm.Location = m_From.Location;
                        bm.Map = m_From.Map;
                        bm.Combatant = m_From;

                            World.AddMobile( bm );
                        break;

                        case 12:
                        Spectre spec = new Spectre();
                        spec.Location = m_From.Location;
                        spec.Map = m_From.Map;
                        spec.Combatant = m_From;

                            World.AddMobile( spec );
                        break;

                        case 13:
                        Shade shade = new Shade();
                        shade.Location = m_From.Location;
                        shade.Map = m_From.Map;
                        shade.Combatant = m_From;

                            World.AddMobile( shade );
                        break;
                    }
                    m_From.SendMessage( "The spirits have rose from the dead.." );
                }
                else if ( m_From.Skills[SkillName.Mining].Base < 15.0 )
                {
                    if ( Utility.Random( 100 ) < 85 )
                    {
                        m_From.SendMessage( "You fail to dig anything up." );
                    }
                    else
                    {
                        switch ( Utility.Random ( 3 ) )
                        {
                            case 0:
                            m_From.AddToBackpack( gem );
                            m_From.SendMessage( "You dig up a gem." );
                            break;

                            case 1:
                            m_From.AddToBackpack( reg );
                            m_From.SendMessage( "You dig up a reagent." );
                            break;

                            case 2:
                            m_From.AddToBackpack( equip );
                            m_From.SendMessage( "You dig up some equipment." );
                            break;
                        }
                    }
                }
                else if ( m_From.Skills[SkillName.Mining].Base < 35.0 )
                {
                    if ( Utility.Random( 100 ) < 85 )
                    {
                        m_From.SendMessage( "You fail to dig anything up." );
                    }
                    else
                    {
                        gem.Amount = Utility.RandomMinMax( 2, 4 );
                        reg.Amount = Utility.RandomMinMax( 2, 4 );

                        switch ( Utility.Random ( 5 ) )
                        {
                            case 0:
                            m_From.AddToBackpack( gem );
                            m_From.SendMessage( "You dig up some gems." );
                            break;

                            case 1:
                            m_From.AddToBackpack( reg );
                            m_From.SendMessage( "You dig up some reagents." );
                            break;

                            case 2:
                            m_From.AddToBackpack( equip );
                            m_From.SendMessage( "You dig up some equipment." );
                            break;

                            case 3:
                            m_From.AddToBackpack( Loot.RandomScroll( 0, 20, SpellbookType.Regular ) );
                            m_From.SendMessage( "You dig up a scroll." );
                            break;

                            case 4:
                            m_From.AddToBackpack( Loot.RandomScroll( 0, 5, SpellbookType.Necromancer ) );
                            m_From.SendMessage( "You dig up a scroll." );
                            break;
                        }
                    }
                }
                else if ( m_From.Skills[SkillName.Mining].Base < 50.0 )
                {
                    if ( Utility.Random( 100 ) < 85 )
                    {
                        m_From.SendMessage( "You fail to dig anything up." );
                    }
                    else
                    {
                        gem.Amount = Utility.RandomMinMax( 2, 10 );
                        reg.Amount = Utility.RandomMinMax( 2, 10 );

                        switch ( Utility.Random ( 6 ) )
                        {
                            case 0:
                            m_From.AddToBackpack( gem );
                            m_From.SendMessage( "You dig up some gems." );
                            break;

                            case 1:
                            m_From.AddToBackpack( reg );
                            m_From.SendMessage( "You dig up some reagents." );
                            break;

                            case 2:
                            m_From.AddToBackpack( equip );
                            m_From.SendMessage( "You dig up some equipment." );
                            break;

                            case 3:
                            m_From.AddToBackpack( Loot.RandomScroll( 0, 40, SpellbookType.Regular ) );
                            m_From.SendMessage( "You dig up a scroll." );
                            break;

                            case 4:
                            m_From.AddToBackpack( Loot.RandomScroll( 0, 10, SpellbookType.Regular ) );
                            m_From.SendMessage( "You dig up a scroll." );
                            break;

                            case 5:
                            m_From.AddToBackpack( new Bones() );
                            m_From.SendMessage( "You dig up a bones." );
                            break;
                        }
                    }
                }
                else if ( m_From.Skills[SkillName.Mining].Base < 75.0 )
                {
                    if ( Utility.Random( 100 ) < 85 )
                    {
                        m_From.SendMessage( "You fail to dig anything up." );
                    }
                    else
                    {
                        gem.Amount = Utility.RandomMinMax( 2, 20 );
                        reg.Amount = Utility.RandomMinMax( 2, 20 );

                        switch ( Utility.Random ( 7 ) )
                        {
                            case 0:
                            m_From.AddToBackpack( gem );
                            m_From.SendMessage( "You dig up some gems." );
                            break;

                            case 1:
                            m_From.AddToBackpack( reg );
                            m_From.SendMessage( "You dig up some reagents." );
                            break;

                            case 2:
                            m_From.AddToBackpack( equip );
                            m_From.SendMessage( "You dig up some equipment." );
                            break;

                            case 3:
                            m_From.AddToBackpack( Loot.RandomScroll( 0, 50, SpellbookType.Regular ) );
                            m_From.SendMessage( "You dig up a scroll." );
                            break;

                            case 4:
                            m_From.AddToBackpack( Loot.RandomScroll( 0, 13, SpellbookType.Necromancer ) );
                            m_From.SendMessage( "You dig up a scroll." );
                            break;

                            case 5:
                            m_From.AddToBackpack( new Bones() );
                            m_From.SendMessage( "You dig up a bones." );
                            break;

                        }
                    }
                }
                else if ( m_From.Skills[SkillName.Mining].Base < 90.0 )
                {
                    if ( Utility.Random( 100 ) < 85 )
                    {
                        m_From.SendMessage( "You fail to dig anything up." );
                    }
                    else
                    {
                        gem.Amount = Utility.RandomMinMax( 10, 30 );
                        reg.Amount = Utility.RandomMinMax( 10, 30 );

                        switch ( Utility.Random ( 8 ) )
                        {
                            case 0:
                            m_From.AddToBackpack( gem );
                            m_From.SendMessage( "You dig up some gems." );
                            break;

                            case 1:
                            m_From.AddToBackpack( reg );
                            m_From.SendMessage( "You dig up some reagents." );
                            break;

                            case 2:
                            m_From.AddToBackpack( equip );
                            m_From.SendMessage( "You dig up some equipment." );
                            break;

                            case 3:
                            m_From.AddToBackpack( Loot.RandomScroll( 0, 63, SpellbookType.Regular ) );
                            m_From.SendMessage( "You dig up a scroll." );
                            break;

                            case 4:
                            m_From.AddToBackpack( Loot.RandomScroll( 0, 15, SpellbookType.Necromancer ) );
                            m_From.SendMessage( "You dig up a scroll." );
                            break;

                            case 5:
                            m_From.AddToBackpack( new Bones() );
                            m_From.SendMessage( "You dig up a bones." );
                            break;
                        }
                    }
                }
                else if ( m_From.Skills[SkillName.Mining].Base < 150.0)
                {
                    if ( Utility.Random( 500 ) < 5 )
                    {
                        m_From.SendMessage( "You dig up and item of great value." );
                        switch ( Utility.Random ( 5 ) )
                        {
                            case 0:
                            m_From.AddToBackpack( new ArmoredRobe() );
                            break;

                            case 1:
                            m_From.AddToBackpack( new ButchersResolve() );
                            break;

                            case 2:
                            m_From.AddToBackpack( new FollowerOfTheOldLord() );
                            break;

                            case 3:
                            m_From.AddToBackpack( new SkirtOfTheAmazon() );
                            break;

                            case 4:
                            m_From.AddToBackpack( new HolyHammerOfExorcism() );
                            break;
                        }
                    }
                    else
                    {
                        gem.Amount = Utility.RandomMinMax( 2, 40 );
                        reg.Amount = Utility.RandomMinMax( 2, 40 );

                        switch ( Utility.Random ( 8 ) )
                        {
                            case 0:
                            m_From.AddToBackpack( gem );
                            m_From.SendMessage( "You dig up some gems." );
                            break;

                            case 1:
                            m_From.AddToBackpack( reg );
                            m_From.SendMessage( "You dig up some reagents." );
                            break;

                            case 2:
                            m_From.AddToBackpack( equip );
                            m_From.SendMessage( "You dig up some equipment." );
                            break;

                            case 3:
                            m_From.AddToBackpack( Loot.RandomScroll( 0, 63, SpellbookType.Regular ) );
                            m_From.SendMessage( "You dig up a scroll." );
                            break;

                            case 4:
                            m_From.AddToBackpack( Loot.RandomScroll( 0, 15, SpellbookType.Necromancer ) );
                            m_From.SendMessage( "You dig up a scroll." );
                            break;

                            case 5:
                            m_From.AddToBackpack( new Bones() );
                            m_From.SendMessage( "You dig up a bones." );
                            break;
                        }
                    }
                }
                else
                {
                    m_From.SendMessage( "You fail to dig anything up." );
                }

                Stop();
            }
示例#15
0
        public override bool OnBeforeDeath()
        {
            BoneMagi rm = new BoneMagi();

            rm.Team = this.Team;
            rm.MoveToWorld(this.Location, this.Map);

            Effects.SendLocationEffect(Location, Map, 0x3709, 13, 0x3B2, 0);

            Container bag = new Bag();

            switch (Utility.Random(9))
            {
            case 0: bag.DropItem(new Amber()); break;

            case 1: bag.DropItem(new Amethyst()); break;

            case 2: bag.DropItem(new Citrine()); break;

            case 3: bag.DropItem(new Diamond()); break;

            case 4: bag.DropItem(new Emerald()); break;

            case 5: bag.DropItem(new Ruby()); break;

            case 6: bag.DropItem(new Sapphire()); break;

            case 7: bag.DropItem(new StarSapphire()); break;

            case 8: bag.DropItem(new Tourmaline()); break;
            }

            switch (Utility.Random(8))
            {
            case 0: bag.DropItem(new SpidersSilk(3)); break;

            case 1: bag.DropItem(new BlackPearl(3)); break;

            case 2: bag.DropItem(new Bloodmoss(3)); break;

            case 3: bag.DropItem(new Garlic(3)); break;

            case 4: bag.DropItem(new MandrakeRoot(3)); break;

            case 5: bag.DropItem(new Nightshade(3)); break;

            case 6: bag.DropItem(new SulfurousAsh(3)); break;

            case 7: bag.DropItem(new Ginseng(3)); break;
            }

            bag.DropItem(new Gold(1000, 1500));
            rm.AddItem(bag);

            LeatherGloves gloves = new LeatherGloves();

            gloves.Hue = 32;
            AddItem(gloves);

            BoneHelm helm = new BoneHelm();

            helm.Hue      = 0x3A8;
            helm.LootType = LootType.Blessed;
            AddItem(helm);

            Cloak cloak = new Cloak();

            cloak.Hue = 32;
            AddItem(cloak);

            Kilt kilt = new Kilt();

            kilt.Hue = 32;
            AddItem(kilt);

            Sandals sandals = new Sandals();

            sandals.Hue = 32;
            AddItem(sandals);

            this.Delete();

            return(false);
        }