示例#1
0
        private void SpawnReagents()
        {
            Item reagents;
            int  amount = Utility.RandomMinMax(10, 25);

            switch (Utility.Random(9))
            {
            case 0: reagents = new BlackPearl(amount); break;

            case 1: reagents = new Bloodmoss(amount); break;

            case 2: reagents = new Garlic(amount); break;

            case 3: reagents = new Ginseng(amount); break;

            case 4: reagents = new MandrakeRoot(amount); break;

            case 5: reagents = new Nightshade(amount); break;

            case 6: reagents = new SulfurousAsh(amount); break;

            case 7: reagents = new SpidersSilk(amount); break;

            default: reagents = new FertileDirt(amount); break;
            }

            if (!SpawnItem(reagents))
            {
                reagents.Delete();
            }
        }
示例#2
0
        public override void GenerateLoot()
        {
            int count = Utility.Random(1, 3);

            IronOre ore = new IronOre();
            ore.Amount = count;
            PackItem(ore);

            count = Utility.Random(1, 2);

            FertileDirt dirt = new FertileDirt();
            dirt.Amount = count;
            PackItem(dirt);

            PackGold(150, 200);
        }
示例#3
0
		private void SpawnReagents()
		{
			Item reagents;
			int amount = Utility.RandomMinMax( 10, 25 );

			switch ( Utility.Random( 9 ) )
			{
				case 0: reagents = new BlackPearl( amount ); break;
				case 1: reagents = new Bloodmoss( amount ); break;
				case 2: reagents = new Garlic( amount ); break;
				case 3: reagents = new Ginseng( amount ); break;
				case 4: reagents = new MandrakeRoot( amount ); break;
				case 5: reagents = new Nightshade( amount ); break;
				case 6: reagents = new SulfurousAsh( amount ); break;
				case 7: reagents = new SpidersSilk( amount ); break;
				default: reagents = new FertileDirt( amount ); break;
			}

			if ( !SpawnItem( reagents ) )
				reagents.Delete();
		}
示例#4
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            IPoint3D p   = targeted as IPoint3D;
            Map      map = from.Map;
            IEntity  to;

            if (p is Mobile)
            {
                to = (Mobile)p;
            }
            else
            {
                to = new Entity(Serial.Zero, new Point3D(p), map);
            }
            Effects.SendMovingEffect(from, to, 0xF0B & 0x3FFF, 7, 0, false, false, 0x8F, 0);
            if (targeted is BaseCreature || targeted is PlayerMobile)
            {
                from.SendMessage("Nothing happens!");
                return;
            }
            TimeSpan duration = TimeSpan.FromMinutes(10);

            if (targeted is FertileDirt)
            {
                FertileDirt dirt = (FertileDirt)targeted;

                if (dirt.IsChildOf(from.Backpack))
                {
                    from.SendMessage("You can't pour that potion in your bag!");
                }
                else if (dirt.Amount < 20)
                {
                    from.SendMessage("That probably wouldn't be enough dirt!");
                }
                else
                {
                    SpellHelper.Summon(new SummonedEarthElemental(), from, 0x217, duration, false, false);
                    dirt.Delete();
                    return;
                }

                // {
                //from.SendMessage( "Nothing happens!" );
                //return;
                //}
            }

            /*if (targeted is StaticTarget)
             * {
             * StaticTarget obj = (StaticTarget)targeted;
             *
             *      if ((obj.ItemID > 6025 && obj.ItemID < 6077) || (obj.ItemID > 13420 && obj.ItemID < 13529) || (obj.ItemID >= 0x5796 && obj.ItemID <= 0x57B2) )
             *      {
             *      SpellHelper.Summon( new SummonedWaterElemental(), from, 0x217, duration, false, false );
             *           return;
             *      }
             *       else
             *      {
             *      //from.Target = new WThrowTarget();
             *      from.SendMessage( "Nothing happens!" );
             *      return;
             *      }
             * }*/

            if (IsDirtPatch(targeted))
            {
                SpellHelper.Summon(new SummonedEarthElemental(), from, 0x217, duration, false, false);
            }
            else
            {
                from.SendMessage("Nothing happens!");
                return;
            }
        }