상속: BaseOre
예제 #1
0
        public GoldenElemental(int oreAmount) : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Body = 166;
            BaseSoundID = 268;
            Hue = m_DefaultHue;

            Alignment = Alignment.Elemental;

            SetStr(226, 255);
            SetDex(126, 145);
            SetInt(71, 92);

            SetHits(136, 153);

            SetDamage(9, 16);


            SetSkill(SkillName.MagicResist, 50.1, 95.0);
            SetSkill(SkillName.Tactics, 60.1, 100.0);
            SetSkill(SkillName.Wrestling, 60.1, 100.0);

            Fame = 3500;
            Karma = -3500;

            VirtualArmor = 60;

            Item ore = new GoldOre(oreAmount);
            ore.ItemID = 0x19B9;
            PackItem(ore);
        }
예제 #2
0
		public GoldenElemental( int oreAmount ) : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			Name = "a golden elemental";
			Body = 166;
			BaseSoundID = 268;

			SetStr( 226, 255 );
			SetDex( 126, 145 );
			SetInt( 71, 92 );

			SetHits( 136, 153 );

			SetDamage( 9, 16 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 60, 75 );
			SetResistance( ResistanceType.Fire, 10, 20 );
			SetResistance( ResistanceType.Cold, 30, 40 );
			SetResistance( ResistanceType.Poison, 30, 40 );
			SetResistance( ResistanceType.Energy, 30, 40 );

			SetSkill( SkillName.MagicResist, 50.1, 95.0 );
			SetSkill( SkillName.Tactics, 60.1, 100.0 );
			SetSkill( SkillName.Wrestling, 60.1, 100.0 );

			Fame = 3500;
			Karma = -3500;

			VirtualArmor = 60;

			Item ore = new GoldOre( oreAmount );
			ore.ItemID = 0x19B9;
			PackItem( ore );
		}
예제 #3
0
        public override bool Give( Mobile m, Item item, bool placeAtFeet )
        {
            PlayerMobile pm = m as PlayerMobile;

            if( m is PlayerMobile )
            {
                pm.Crafting = true;
                LevelSystem.AwardMinimumXP( pm, 1 );
                pm.Crafting = false;
                Item controller = null;
                CopperOre ore = new CopperOre();

                if( pm.UniqueSpot != null )
                {
                    if( World.FindItem( pm.UniqueSpot.Serial ) != null )
                    {
                        controller = World.FindItem( pm.UniqueSpot.Serial );

                        if( controller is ResourceController && pm.InRange( controller, ( (ResourceController)controller ).Range ) )
                        {
                            ResourceController rescontroller = controller as ResourceController;
                            double chance = 0;

                            switch( rescontroller.Intensity )
                            {
                                case VeinIntensity.Low: chance = 4; break;
                                case VeinIntensity.Average: chance = 6; break;
                                case VeinIntensity.Full: chance = 8; break;
                            }

                            if( chance >= Utility.RandomMinMax( 1, 100 ) )
                            {
                                if( m.AccessLevel > AccessLevel.Player )
                                    m.SendMessage( "Debug message: resource controller activated." );

                                switch( rescontroller.ControlledResource )
                                {
                                    case ControlledResource.Copper: item = ore; break;

                                    case ControlledResource.Tin:
                                    {
                                        TinOre newore = new TinOre();
                                        item = newore;
                                        break;
                                    }

                                    case ControlledResource.Iron:
                                    {
                                        if( pm.Skills[SkillName.Mining].Base >= 80 )
                                        {
                                            IronOre newore = new IronOre();
                                            item = newore;
                                        }
                                        break;
                                    }

                                    case ControlledResource.Obsidian:
                                    {
                                        ObsidianIngot newore = new ObsidianIngot();
                                        item = newore;
                                        item.Amount = 5;
                                        break;
                                    }

                                    case ControlledResource.Silver:
                                    {
                                        if( pm.Skills[SkillName.Mining].Base >= 85 )
                                        {
                                            SilverOre newore = new SilverOre();
                                            item = newore;
                                        }
                                        break;
                                    }

                                    case ControlledResource.Gold:
                                    {
                                        if( pm.Skills[SkillName.Mining].Base >= 95 )
                                        {
                                            GoldOre newore = new GoldOre();
                                            item = newore;
                                        }
                                        break;
                                    }

                                    case ControlledResource.Citrine:
                                    {
                                        if( pm.Skills[SkillName.Mining].Base >= 80 )
                                        {
                                            Citrine gem = new Citrine();
                                            item = gem;
                                        }
                                        break;
                                    }

                                    case ControlledResource.Tourmaline:
                                    {
                                        if( pm.Skills[SkillName.Mining].Base >= 80 )
                                        {
                                            Tourmaline gem = new Tourmaline();
                                            item = gem;
                                        }
                                        break;
                                    }

                                    case ControlledResource.Amethyst:
                                    {
                                        if( pm.Skills[SkillName.Mining].Base >= 90 )
                                        {
                                            Amethyst gem = new Amethyst();
                                            item = gem;
                                        }
                                        break;
                                    }

                                    case ControlledResource.Emerald:
                                    {
                                        if( pm.Skills[SkillName.Mining].Base >= 90 )
                                        {
                                            Emerald gem = new Emerald();
                                            item = gem;
                                        }
                                        break;
                                    }

                                    case ControlledResource.Ruby:
                                    {
                                        if( pm.Skills[SkillName.Mining].Base >= 90 )
                                        {
                                            Ruby gem = new Ruby();
                                            item = gem;
                                        }
                                        break;
                                    }

                                    case ControlledResource.Sapphire:
                                    {
                                        if( pm.Skills[SkillName.Mining].Base >= 85 )
                                        {
                                            Sapphire gem = new Sapphire();
                                            item = gem;
                                        }
                                        break;
                                    }

                                    case ControlledResource.StarSapphire:
                                    {
                                        if( pm.Skills[SkillName.Mining].Base >= 95 )
                                        {
                                            StarSapphire gem = new StarSapphire();
                                            item = gem;
                                        }
                                        break;
                                    }

                                    case ControlledResource.Diamond:
                                    {
                                        if( pm.Skills[SkillName.Mining].Base >= 95 )
                                        {
                                            Diamond gem = new Diamond();
                                            item = gem;
                                        }
                                        break;
                                    }

                                    case ControlledResource.Coal:
                                    {
                                        if( pm.Feats.GetFeatLevel( FeatList.Sculptor ) > 0 )
                                        {
                                            Coal coal = new Coal();
                                            item = coal;
                                        }
                                        break;
                                    }

                                    case ControlledResource.Cinnabar:
                                    {
                                        if (pm.Feats.GetFeatLevel(FeatList.GemHarvesting) > 2)
                                        {
                                            Cinnabar cinnabar = new Cinnabar();
                                            item = cinnabar;
                                        }
                                        break;
                                    }
                                }
                            }
                        }
                    }
                }

                if( item is Citrine || item is Tourmaline || item is Amethyst )
                {
                    if( pm.Feats.GetFeatLevel(FeatList.GemHarvesting) < 1 || !pm.GemHarvesting)
                        item = ore;
                }

                else if( item is Emerald || item is Ruby || item is Sapphire )
                {
                    if( pm.Feats.GetFeatLevel(FeatList.GemHarvesting) < 2 )
                        item = ore;

                    if( !pm.GemHarvesting )
                    {
                        TinOre tin = new TinOre();
                        item = tin;
                    }
                }

                else if( item is StarSapphire || item is Diamond || item is Cinnabar)
                {
                    if( pm.Feats.GetFeatLevel(FeatList.GemHarvesting) < 3 )
                        item = ore;

                    if( !pm.GemHarvesting )
                    {
                        IronOre iron = new IronOre();
                        item = iron;
                    }
                }

                else if( item is ObsidianIngot && pm.Feats.GetFeatLevel(FeatList.Obsidian) < 1 )
                    item = ore;
            }

            if( m is PlayerMobile && pm.Feats.GetFeatLevel(FeatList.GemHarvesting) > 0 && pm.GemHarvesting && item is CopperOre && Utility.RandomMinMax( 1, 100 ) > 95 )
            {
                int roll = Utility.RandomMinMax( 1, 100 );
                if (roll > 95 && pm.Feats.GetFeatLevel(FeatList.GemHarvesting) > 2)
                    item = new Cinnabar();
                if( roll > 90 && pm.Feats.GetFeatLevel(FeatList.GemHarvesting) > 2)
                    item = new Diamond();
                else if( roll > 80 && pm.Feats.GetFeatLevel(FeatList.GemHarvesting) > 2 )
                    item = new StarSapphire();
                else if( roll > 70 && pm.Feats.GetFeatLevel(FeatList.GemHarvesting) > 1 )
                    item = new Ruby();
                else if( roll > 59 && pm.Feats.GetFeatLevel(FeatList.GemHarvesting) > 1 )
                    item = new Emerald();
                else if( roll > 48 && pm.Feats.GetFeatLevel(FeatList.GemHarvesting) > 1 )
                    item = new Sapphire();
                else if( roll > 37 )
                    item = new Amethyst();
                else if( roll > 20 )
                    item = new Tourmaline();
                else
                    item = new Citrine();
            }

            string orename = "some copper ore";

            if( item is TinOre )
                orename = "some tin ore";

            else if( item is IronOre )
                orename = "some iron ore";

            else if( item is ObsidianIngot )
                orename = "some obsidian";

            else if( item is SilverOre )
                orename = "some silver ore";

            else if( item is GoldOre )
                orename = "some gold ore";

            else if( item is Citrine )
                orename = "a citrine";

            else if( item is Tourmaline )
                orename = "a tourmaline";

            else if( item is Emerald )
                orename = "an emerald";

            else if( item is Amethyst )
                orename = "an amethyst";

            else if( item is Ruby )
                orename = "a ruby";

            else if( item is Sapphire )
                orename = "a sapphire";

            else if( item is StarSapphire )
                orename = "a star sapphire";

            else if( item is Diamond )
                orename = "a diamond";

            else if( item is Sand )
                orename = "some sand";

            else if( item is Coal )
                orename = "some coal";

            m.SendMessage( "You dig " + orename + " and put it in your backpack." );

            if ( m.PlaceInBackpack( item ) )
                return true;

            if ( !placeAtFeet )
                return false;

            Map map = m.Map;

            if ( map == null )
                return false;

            ArrayList atFeet = new ArrayList();

            foreach ( Item obj in m.GetItemsInRange( 0 ) )
                atFeet.Add( obj );

            for ( int i = 0; i < atFeet.Count; ++i )
            {
                Item check = (Item)atFeet[i];

                if ( check.StackWith( m, item, false ) )
                    return true;
            }

            item.MoveToWorld( m.Location, map );
            return true;
        }