Esempio n. 1
0
        public SnowElemental() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Body        = 163;
            BaseSoundID = 263;

            SetStr(326, 355);
            SetDex(166, 185);
            SetInt(71, 95);

            SetHits(196, 213);

            SetDamage(11, 17);

            Alignment = Alignment.Elemental;


            SetSkill(SkillName.MagicResist, 50.1, 65.0);
            SetSkill(SkillName.Tactics, 80.1, 100.0);
            SetSkill(SkillName.Wrestling, 80.1, 100.0);

            Fame  = 5000;
            Karma = -5000;

            VirtualArmor = 50;

            PackItem(new BlackPearl(3));
            Item ore = new IronOre(3);

            ore.ItemID = 0x19B8;
            PackItem(ore);
        }
Esempio n. 2
0
        public EarthElemental() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name        = "an earth elemental";
            Body        = 14;
            BaseSoundID = 268;

            SetStr(126, 155);
            SetDex(66, 85);
            SetInt(71, 92);

            SetHits(76, 93);

            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 = 34;
            ControlSlots = 2;

            PackItem(new MandrakeRoot());

            Item ore = new IronOre(5);

            ore.ItemID = 0x19B7;
            PackItem(ore);
        }
Esempio n. 3
0
        private Item SpawnOre(IEntity e)
        {
            var ore = new IronOre(5);

            ore.ItemID = 0x19B7;

            return(ore);
        }
Esempio n. 4
0
        private Item SpawnOre(IEntity e)
        {
            Item ore = new IronOre
            {
                ItemID = 0x19B7
            };

            return(ore);
        }
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Item ore = new IronOre(Utility.RandomMinMax(5, 10));

            ore.ItemID = 0x19B7;
            c.DropItem(ore);
        }
Esempio n. 6
0
        public static void HarvestTest_OnCommand(CommandEventArgs e)
        {
            Mobile       from = e.Mobile;
            PlayerMobile pm   = from as PlayerMobile;

            if (pm != null)
            {
                Item i = new IronOre(24);
                pm.TempStashedHarvest = i;
            }
        }
Esempio n. 7
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            if (this.RealName == "a golden sculpture")
            {
                Item ore = new GoldOre(Utility.RandomMinMax(5, 10));
                ore.ItemID = 0x19B7;
                c.DropItem(ore);
            }
            else if (this.RealName == "an iron sculpture")
            {
                Item ore = new IronOre(Utility.RandomMinMax(5, 10));
                ore.ItemID = 0x19B7;
                c.DropItem(ore);
            }
            else if (this.RealName == "a jade sculpture")
            {
                RareMetals stones = new RareMetals(Utility.RandomMinMax(5, 10), "jade stones");
                c.DropItem(stones);
            }
            else if (this.RealName == "a marble sculpture")
            {
                RareMetals stones = new RareMetals(Utility.RandomMinMax(5, 10), "gargish marble stones");
                c.DropItem(stones);
            }
            else if (this.RealName == "a shadow iron sculpture")
            {
                Item ore = new ShadowIronOre(Utility.RandomMinMax(5, 10));
                ore.ItemID = 0x19B7;
                c.DropItem(ore);
            }
            else if (this.RealName == "a silver sculpture")
            {
                RareMetals stones = new RareMetals(Utility.RandomMinMax(5, 10), "silver stones");
                c.DropItem(stones);
            }
            else if (this.RealName == "a stone sculpture")
            {
                Granite granite = new Granite();
                granite.Amount = 1;
                c.DropItem(granite);
            }
            else if (this.RealName == "a bronze sculpture")
            {
                Item ore = new BronzeOre(Utility.RandomMinMax(5, 10));
                ore.ItemID = 0x19B7;
                c.DropItem(ore);
            }
        }
Esempio n. 8
0
        public SnowElemental() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            AuraMessage   = "The intense cold is damaging you!";           // TODO Cliloc support: 1008111
            AuraType      = ResistanceType.Cold;
            MinAuraDelay  = 5;
            MaxAuraDelay  = 15;
            MinAuraDamage = 15;
            MaxAuraDamage = 25;
            AuraRange     = 2;

            Name        = "a snow elemental";
            Body        = 163;
            BaseSoundID = 263;

            SetStr(326, 355);
            SetDex(166, 185);
            SetInt(71, 95);

            SetHits(196, 213);

            SetDamage(11, 17);

            SetDamageType(ResistanceType.Physical, 20);
            SetDamageType(ResistanceType.Cold, 80);

            SetResistance(ResistanceType.Physical, 45, 55);
            SetResistance(ResistanceType.Fire, 10, 15);
            SetResistance(ResistanceType.Cold, 60, 70);
            SetResistance(ResistanceType.Poison, 25, 35);
            SetResistance(ResistanceType.Energy, 25, 35);

            SetSkill(SkillName.MagicResist, 50.1, 65.0);
            SetSkill(SkillName.Tactics, 80.1, 100.0);
            SetSkill(SkillName.Wrestling, 80.1, 100.0);

            Fame  = 5000;
            Karma = -5000;

            VirtualArmor = 50;

            PackItem(new BlackPearl(3));
            Item ore = new IronOre(3);

            ore.ItemID = 0x19B8;
            PackItem(ore);
        }
        public SnowElemental() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name        = "a snow elemental";
            Body        = 163;
            BaseSoundID = 263;

            SetStr(326, 355);
            SetDex(166, 185);
            SetInt(71, 95);

            SetHits(392, 426);

            SetDamage(11, 17);

            SetDamageType(ResistanceType.Physical, 20);
            SetDamageType(ResistanceType.Cold, 80);

            SetResistance(ResistanceType.Physical, 50);
            SetResistance(ResistanceType.Fire, 10);
            SetResistance(ResistanceType.Cold, 60);
            SetResistance(ResistanceType.Poison, 25);
            SetResistance(ResistanceType.Energy, 25);

            SetSkill(SkillName.MagicResist, 50.1, 65.0);
            SetSkill(SkillName.Tactics, 80.1, 100.0);
            SetSkill(SkillName.Wrestling, 80.1, 100.0);

            Fame  = 15000;
            Karma = -15000;

            PackGold(15, 28);

            PackItem(new BlackPearl(3));
            Item ore = new IronOre(3);

            ore.ItemID = 0x19B8;
            PackItem(ore);

            PackItem(new ElementalDust(Utility.RandomMinMax(6, 9)));
            PackItem(new DiamondDust(Utility.RandomMinMax(6, 12)));

            if (Utility.RandomDouble() < 0.10)
            {
                PackItem(new HarmScroll());
            }
        }
Esempio n. 10
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);
        }
Esempio n. 11
0
        public ResourcePool(ResourceTypes resourceType, int numUnits, float depletedRate)
        {
            switch (resourceType)
            {
            case ResourceTypes.Bauxite:
                Resource = new Bauxite();
                break;

            case ResourceTypes.Hydrocarbons:
                Resource = new Hydrocarbons();
                break;

            case ResourceTypes.Hydrogen:
                Resource = new Hydrogen();
                break;

            case ResourceTypes.IronOre:
                Resource = new IronOre();
                break;

            case ResourceTypes.Medicine:
                Resource = new Medicine();
                break;

            case ResourceTypes.Organics:
                Resource = new Organics();
                break;

            case ResourceTypes.Silica:
                Resource = new Silica();
                break;

            case ResourceTypes.ThoriumOre:
                Resource = new ThoriumOre();
                break;

            default:
                throw new Exception("Error: " + resourceType.ToString() + " not defined in ResourcePool constructor.");
            }


            Resource.AddResource(numUnits);
            DepletedRate = depletedRate;
        }
Esempio n. 12
0
        public override void OnDeath(Container c)
        {
            c.DropItem(new FertileDirt(Utility.RandomMinMax(1, 4)));
            c.DropItem(new MandrakeRoot());

            Item ore = new IronOre(5)
            {
                ItemID = 0x19B7
            };

            c.DropItem(ore);

            if (Utility.RandomDouble() < 0.03)
            {
                c.DropItem(new LuckyCoin());
            }

            base.OnDeath(c);
        }
Esempio n. 13
0
        public BlueEarthElemental() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name        = "an earth elemental";
            Body        = 14;
            BaseSoundID = 268;

            SetStr(126, 155);
            SetDex(66, 85);
            SetInt(71, 92);

            // +100
            SetHits(176, 193);

            SetDamage(9, 16);

            SetDamageType(ResistanceType.Physical, 100);

            // +20%
            SetResistance(ResistanceType.Physical, 50, 55);
            SetResistance(ResistanceType.Fire, 30, 40);
            SetResistance(ResistanceType.Cold, 30, 40);
            SetResistance(ResistanceType.Poison, 35, 45);
            SetResistance(ResistanceType.Energy, 35, 45);

            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 = 34;
            ControlSlots = 3;

            PackItem(new FertileDirt(Utility.RandomMinMax(4, 8)));
            PackItem(new MandrakeRoot());

            // +5
            Item ore = new IronOre(10);

            ore.ItemID = 0x19B7;
            PackItem(ore);
        }
Esempio n. 14
0
        public EnragedEarthElemental()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            this.Name        = "Enraged Earth Elemental";
            this.Body        = 14;
            this.BaseSoundID = 268;

            this.SetStr(147, 155);
            this.SetDex(78, 89);
            this.SetInt(94, 110);

            this.SetHits(500, 505);
            this.SetMana(94, 110);
            this.SetStam(78, 89);

            this.SetDamage(9, 16);

            this.SetDamageType(ResistanceType.Physical, 100);

            this.SetResistance(ResistanceType.Physical, 59, 65);
            this.SetResistance(ResistanceType.Fire, 20, 30);
            this.SetResistance(ResistanceType.Cold, 21, 28);
            this.SetResistance(ResistanceType.Poison, 47, 51);
            this.SetResistance(ResistanceType.Energy, 30, 33);

            this.SetSkill(SkillName.MagicResist, 100.0);
            this.SetSkill(SkillName.Tactics, 100.0);
            this.SetSkill(SkillName.Wrestling, 120.0);

            this.Fame  = 3500;
            this.Karma = -3500;

            this.VirtualArmor = 34;
            this.ControlSlots = 2;

            this.PackItem(new FertileDirt(Utility.RandomMinMax(1, 4)));
            this.PackItem(new MandrakeRoot());

            Item ore = new IronOre(5);

            ore.ItemID = 0x19B7;
            this.PackItem(ore);
        }
Esempio n. 15
0
        public EnragedEarthElemental()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name        = "Enraged Earth Elemental";
            Body        = 14;
            BaseSoundID = 268;
            Hue         = 442;

            SetStr(147, 155);
            SetDex(78, 90);
            SetInt(94, 115);

            SetHits(500, 550);

            SetDamage(9, 16);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 55, 65);
            SetResistance(ResistanceType.Fire, 20, 30);
            SetResistance(ResistanceType.Cold, 20, 30);
            SetResistance(ResistanceType.Poison, 45, 55);
            SetResistance(ResistanceType.Energy, 25, 35);

            SetSkill(SkillName.MagicResist, 100.0);
            SetSkill(SkillName.Tactics, 100.0);
            SetSkill(SkillName.Wrestling, 120.0);
            SetSkill(SkillName.Parry, 120.0);

            Fame  = 3500;
            Karma = -3500;

            ControlSlots = 2;

            PackItem(new FertileDirt(Utility.RandomMinMax(1, 4)));
            PackItem(new MandrakeRoot());

            Item ore = new IronOre(5);

            ore.ItemID = 0x19B7;
            PackItem(ore);
        }
Esempio n. 16
0
        public BondedEarth() : base(AIType.AI_Healer, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name        = "a bonded earth spirit";
            Body        = 14;
            BaseSoundID = 268;
            Hue         = 2412;

            SetStr(126, 155);
            SetDex(66, 85);
            SetInt(71, 92);

            SetHits(250, 300);

            SetDamage(9, 16);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 30, 35);
            SetResistance(ResistanceType.Fire, 10, 20);
            SetResistance(ResistanceType.Cold, 10, 20);
            SetResistance(ResistanceType.Poison, 15, 25);
            SetResistance(ResistanceType.Energy, 15, 25);

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

            Fame  = 0;
            Karma = 0;

            VirtualArmor = 34;
            ControlSlots = 2;

            PackItem(new FertileDirt(Utility.RandomMinMax(1, 4)));
            PackItem(new MandrakeRoot());

            Item ore = new IronOre(5);

            ore.ItemID = 0x19B7;
            PackItem(ore);
        }
Esempio n. 17
0
        public EarthElemental()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            this.Name        = "elemental da terra";
            this.Body        = 14;
            this.BaseSoundID = 268;

            this.SetStr(126, 155);
            this.SetDex(66, 85);
            this.SetInt(71, 92);

            this.SetHits(76, 93);

            this.SetDamage(9, 16);

            this.SetDamageType(ResistanceType.Physical, 100);

            this.SetResistance(ResistanceType.Physical, 30, 35);
            this.SetResistance(ResistanceType.Fire, 10, 20);
            this.SetResistance(ResistanceType.Cold, 10, 20);
            this.SetResistance(ResistanceType.Poison, 15, 25);
            this.SetResistance(ResistanceType.Energy, 15, 25);

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

            this.Fame  = 3500;
            this.Karma = -3500;

            this.VirtualArmor = 34;
            this.ControlSlots = 2;

            this.PackItem(new FertileDirt(Utility.RandomMinMax(1, 4)));
            this.PackItem(new MandrakeRoot());

            Item ore = new IronOre(5);

            ore.ItemID = 0x19B7;
            this.PackItem(ore);
        }
Esempio n. 18
0
        public SnowElemental()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name        = "a snow elemental";
            Body        = 163;
            BaseSoundID = 263;

            SetStr(326, 355);
            SetDex(166, 185);
            SetInt(71, 95);

            SetHits(196, 213);

            SetDamage(11, 17);

            SetDamageType(ResistanceType.Physical, 20);
            SetDamageType(ResistanceType.Cold, 80);

            SetResistance(ResistanceType.Physical, 45, 55);
            SetResistance(ResistanceType.Fire, 10, 15);
            SetResistance(ResistanceType.Cold, 60, 70);
            SetResistance(ResistanceType.Poison, 25, 35);
            SetResistance(ResistanceType.Energy, 25, 35);

            SetSkill(SkillName.MagicResist, 50.1, 65.0);
            SetSkill(SkillName.Tactics, 80.1, 100.0);
            SetSkill(SkillName.Wrestling, 80.1, 100.0);

            Fame  = 5000;
            Karma = -5000;

            VirtualArmor = 50;

            PackItem(new BlackPearl(3));
            Item ore = new IronOre(3);

            ore.ItemID = 0x19B8;
            PackItem(ore);

            SetAreaEffect(AreaEffect.AuraDamage);
        }
        public EnragedEarthElemental() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name        = "an enraged earth elemental";
            Body        = 14;
            Hue         = 2117;
            BaseSoundID = 268;

            SetStr(125, 129);
            SetDex(66, 86);
            SetInt(71, 92);

            SetHits(500, 505);

            SetDamage(9, 16);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 60, 62);
            SetResistance(ResistanceType.Fire, 20, 24);
            SetResistance(ResistanceType.Cold, 20, 29);
            SetResistance(ResistanceType.Poison, 45, 50);
            SetResistance(ResistanceType.Energy, 15, 25);

            SetSkill(SkillName.MagicResist, 90.1, 100.0);
            SetSkill(SkillName.Tactics, 60.1, 100.0);
            SetSkill(SkillName.Wrestling, 100.1, 120.0);

            Fame  = 3500;
            Karma = -3500;

            VirtualArmor = 34;
            ControlSlots = 2;

            PackItem(new FertileDirt(Utility.RandomMinMax(1, 4)));
            PackItem(new MandrakeRoot());

            Item ore = new IronOre(5);

            ore.ItemID = 0x19B7;
            PackItem(ore);
        }
Esempio n. 20
0
        public EarthElemental() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Body        = 14;
            BaseSoundID = 268;

            SetStr(134, 152);
            SetDex(66, 84);
            SetInt(71, 92);

            SetDamage(9, 16);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 30, 35);
            SetResistance(ResistanceType.Fire, 10, 20);
            SetResistance(ResistanceType.Cold, 10, 20);
            SetResistance(ResistanceType.Poison, 15, 25);
            SetResistance(ResistanceType.Energy, 15, 25);

            SetSkill(SkillName.MagicResist, 52.1, 87.0);
            SetSkill(SkillName.Tactics, 65.1, 91.6);
            SetSkill(SkillName.Wrestling, 65.1, 92.9);

            Fame  = 3500;
            Karma = -3500;

            VirtualArmor = 34;
            ControlSlots = 2;

            PackItem(new FertileDirt(Utility.RandomMinMax(1, 4)));
            PackItem(new MandrakeRoot());

            Item ore = new IronOre(5);

            ore.ItemID = 0x19B7;
            PackItem(ore);
        }
Esempio n. 21
0
        public bool DoDisposeOre(int x, int y, int z, Map map, Mobile from)
        {
            HarvestBank bank = Mining.System.OreAndStone.GetBank(map, x, y);

            if (bank == null)
            {
                this.Say("I can not mine here");
                return(false);
            }
            if (bank.Current <= 0)
            {
                return(false);
            }
            HarvestVein vein = bank.DefaultVein;

            if (vein == null)
            {
                this.Say("I can not mine here");
                return(false);
            }
            HarvestDefinition def = Mining.System.OreAndStone;
            HarvestResource   res = vein.PrimaryResource;
            BaseOre           ore = Mining.System.Construct(res.Types[0], null) as BaseOre;

            if (ore == null)
            {
                return(false);
            }
            if (ore.Resource > CraftResource.Iron)
            {
                double minskill  = 0.0;
                double minskill2 = 0.0;
                double maxskill  = 0.0;
                double skillbase = this.Skills.Mining.Base;
                if (this.Skills.Mining.Base < 120.0)
                {
                    this.Say("skill = {0}", Convert.ToString(skillbase));
                }
                switch (ore.Resource)
                {
                case CraftResource.Iron: { minskill = 00.0; minskill2 = 00.0; maxskill = 100.0; } break;

                case CraftResource.DullCopper: { minskill = 60.0; minskill2 = 25.0; maxskill = 105.0; } break;

                case CraftResource.ShadowIron: { minskill = 65.0; minskill2 = 30.0; maxskill = 110.0; } break;

                case CraftResource.Copper: { minskill = 70.0; minskill2 = 35.0; maxskill = 115.0; } break;

                case CraftResource.Gold: { minskill = 75.0; minskill2 = 40.0; maxskill = 120.0; } break;

                case CraftResource.Agapite: { minskill = 80.0; minskill2 = 45.0; maxskill = 120.0; } break;

                case CraftResource.Verite: { minskill = 85.0; minskill2 = 50.0; maxskill = 120.0; } break;

                case CraftResource.Valorite: { minskill = 90.0; minskill2 = 55.0; maxskill = 120.0; } break;

                case CraftResource.Nepturite: { minskill = 114.0; minskill2 = 64.0; maxskill = 120.0; } break;

                case CraftResource.Obsidian: { minskill = 119.0; minskill2 = 69.0; maxskill = 120.0; } break;

                case CraftResource.Mithril: { minskill = 123.0; minskill2 = 74.0; maxskill = 120.0; } break;

                case CraftResource.Xormite: { minskill = 128.0; minskill2 = 78.0; maxskill = 120.0; } break;

                case CraftResource.Dwarven: { minskill = 133.0; minskill2 = 83.0; maxskill = 120.0; } break;
                }
                if (Utility.RandomDouble() <= 0.30 || skillbase < minskill)
                {
                    ore = new IronOre(); minskill = 00.0; minskill2 = 00.0; maxskill = 100.0;
                }
                if (!(from.CheckSkill(SkillName.Mining, minskill2, maxskill)))
                {
                    ore.Delete();
                    return(false);
                }
            }
            ore.Amount = (map == Map.Felucca ? 2 : 1);
            if (from != null)
            {
                from.AddToBackpack(ore);
            }
            else
            {
                ore.Delete();
            }
            bank.Consume(ore.Amount, this);
            this.Hue = ore.Hue;

            return(true);
        }
Esempio n. 22
0
        public bool DoDisposeOre(int x, int y, int z, Map map, Mobile from)
        {
            if (!IsMiningTile(x, y, map))

            {
                Say("I can not mine here");
                return(false);
            }
            var bank = Mining.System.OreAndStone.GetBank(map, x, y);

            if (bank == null)
            {
                Say("I can not mine here");
                return(false);
            }
            if (bank.Current <= 0)
            {
                return(false);
            }
            var vein = bank.DefaultVein;

            if (vein == null)
            {
                Say("I can not mine here");
                return(false);
            }
            var def = Mining.System.OreAndStone;
            var res = vein.PrimaryResource;
            var ore = Mining.System.Construct(res.Types[0], null) as BaseOre;

            if (ore == null)
            {
                return(false);
            }
            if (ore.Resource > CraftResource.Iron)
            {
                var minskill  = 0.0;
                var minskill2 = 0.0;
                var maxskill  = 0.0;
                var skillbase = Skills.Mining.Base;
                if (Skills.Mining.Base < 120.0)
                {
                    Say("skill = {0}", Convert.ToString(skillbase));
                }
                switch (ore.Resource)
                {
                case CraftResource.Iron:
                {
                    minskill  = 00.0;
                    minskill2 = 00.0;
                    maxskill  = 100.0;
                }
                break;

                case CraftResource.DullCopper:
                {
                    minskill  = 60.0;
                    minskill2 = 25.0;
                    maxskill  = 105.0;
                }
                break;

                case CraftResource.ShadowIron:
                {
                    minskill  = 65.0;
                    minskill2 = 30.0;
                    maxskill  = 110.0;
                }
                break;

                case CraftResource.Copper:
                {
                    minskill  = 70.0;
                    minskill2 = 35.0;
                    maxskill  = 115.0;
                }
                break;

                case CraftResource.Gold:
                {
                    minskill  = 75.0;
                    minskill2 = 40.0;
                    maxskill  = 120.0;
                }
                break;

                case CraftResource.Agapite:
                {
                    minskill  = 80.0;
                    minskill2 = 45.0;
                    maxskill  = 120.0;
                }
                break;

                case CraftResource.Verite:
                {
                    minskill  = 85.0;
                    minskill2 = 50.0;
                    maxskill  = 120.0;
                }
                break;

                case CraftResource.Valorite:
                {
                    minskill  = 90.0;
                    minskill2 = 55.0;
                    maxskill  = 120.0;
                }
                break;
                }
                if (Utility.RandomDouble() <= 0.30 || skillbase < minskill)
                {
                    ore       = new IronOre();
                    minskill  = 00.0;
                    minskill2 = 00.0;
                    maxskill  = 100.0;
                }
                if (!(from.CheckSkill(SkillName.Mining, minskill2, maxskill)))
                {
                    ore.Delete();
                    return(false);
                }
            }
            ore.Amount = (map == Map.Felucca ? 2 : 1);
            if (from != null)
            {
                from.AddToBackpack(ore);
            }
            else
            {
                ore.Delete();
            }
            bank.Consume(ore.Amount, this);
            Hue = ore.Hue;

            return(true);
        }
Esempio n. 23
0
        public void ConvertOretoIngot(Mobile from)
        {
            this.Skills.Mining.Cap = 120;
            Container backpack = this.Backpack;
            BankBox   bank     = from.BankBox;
            IronOre   item     = (IronOre)backpack.FindItemByType(typeof(IronOre));

            if (item is BaseOre)
            {
                BaseOre m_Ore = item as BaseOre;

                int toConsume = m_Ore.Amount;

                if (toConsume > 30000)
                {
                    toConsume = 30000;
                }
                else if (m_Ore.Amount < 2)
                {
                    m_Ore.Delete();
                }

                BaseIngot ingot = m_Ore.GetIngot();
                ingot.Amount = toConsume * 2;

                m_Ore.Consume(toConsume);

                this.PlaySound(0x57);

                this.AddToBackpack(item);
                this.AddToBackpack(ingot);
            }

            ShadowOre item1 = (ShadowOre)backpack.FindItemByType(typeof(ShadowOre));

            if (item1 is BaseOre)
            {
                BaseOre m_Ore = item1 as BaseOre;

                int toConsume = m_Ore.Amount;

                if (toConsume > 30000)
                {
                    toConsume = 30000;
                }
                else if (m_Ore.Amount < 2)
                {
                    m_Ore.Delete();
                }

                BaseIngot ingot = m_Ore.GetIngot();
                ingot.Amount = toConsume * 2;

                m_Ore.Consume(toConsume);

                this.PlaySound(0x57);

                this.AddToBackpack(item);
                this.AddToBackpack(ingot);
            }

            BronzeOre item2 = (BronzeOre)backpack.FindItemByType(typeof(BronzeOre));

            if (item2 is BaseOre)
            {
                BaseOre m_Ore = item2 as BaseOre;

                int toConsume = m_Ore.Amount;

                if (toConsume > 30000)
                {
                    toConsume = 30000;
                }
                else if (m_Ore.Amount < 2)
                {
                    m_Ore.Delete();
                }

                BaseIngot ingot = m_Ore.GetIngot();
                ingot.Amount = toConsume * 2;

                m_Ore.Consume(toConsume);

                this.PlaySound(0x57);

                this.AddToBackpack(item);
                this.AddToBackpack(ingot);
            }

            CopperOre item3 = (CopperOre)backpack.FindItemByType(typeof(CopperOre));

            if (item3 is BaseOre)
            {
                BaseOre m_Ore = item3 as BaseOre;

                int toConsume = m_Ore.Amount;

                if (toConsume > 30000)
                {
                    toConsume = 30000;
                }
                else if (m_Ore.Amount < 2)
                {
                    m_Ore.Delete();
                }

                BaseIngot ingot = m_Ore.GetIngot();
                ingot.Amount = toConsume * 2;

                m_Ore.Consume(toConsume);

                this.PlaySound(0x57);

                this.AddToBackpack(item);
                this.AddToBackpack(ingot);
            }

            GoldOre item4 = (GoldOre)backpack.FindItemByType(typeof(GoldOre));

            if (item4 is BaseOre)
            {
                BaseOre m_Ore = item4 as BaseOre;

                int toConsume = m_Ore.Amount;

                if (toConsume > 30000)
                {
                    toConsume = 30000;
                }
                else if (m_Ore.Amount < 2)
                {
                    m_Ore.Delete();
                }

                BaseIngot ingot = m_Ore.GetIngot();
                ingot.Amount = toConsume * 2;

                m_Ore.Consume(toConsume);

                this.PlaySound(0x57);

                this.AddToBackpack(item);
                this.AddToBackpack(ingot);
            }

            DullcopperOre item5 = (DullcopperOre)backpack.FindItemByType(typeof(DullcopperOre));

            if (item5 is BaseOre)
            {
                BaseOre m_Ore = item5 as BaseOre;

                int toConsume = m_Ore.Amount;

                if (toConsume > 30000)
                {
                    toConsume = 30000;
                }
                else if (m_Ore.Amount < 2)
                {
                    m_Ore.Delete();
                }

                BaseIngot ingot = m_Ore.GetIngot();
                ingot.Amount = toConsume * 2;

                m_Ore.Consume(toConsume);

                this.PlaySound(0x57);

                this.AddToBackpack(item);
                this.AddToBackpack(ingot);
            }

            AgapiteOre item6 = (AgapiteOre)backpack.FindItemByType(typeof(AgapiteOre));

            if (item6 is BaseOre)
            {
                BaseOre m_Ore = item6 as BaseOre;

                int toConsume = m_Ore.Amount;

                if (toConsume > 30000)
                {
                    toConsume = 30000;
                }
                else if (m_Ore.Amount < 2)
                {
                    m_Ore.Delete();
                }

                BaseIngot ingot = m_Ore.GetIngot();
                ingot.Amount = toConsume * 2;

                m_Ore.Consume(toConsume);

                this.PlaySound(0x57);

                this.AddToBackpack(item);
                this.AddToBackpack(ingot);
            }

            VeriteOre item7 = (VeriteOre)backpack.FindItemByType(typeof(VeriteOre));

            if (item7 is BaseOre)
            {
                BaseOre m_Ore = item7 as BaseOre;

                int toConsume = m_Ore.Amount;

                if (toConsume > 30000)
                {
                    toConsume = 30000;
                }
                else if (m_Ore.Amount < 2)
                {
                    m_Ore.Delete();
                }

                BaseIngot ingot = m_Ore.GetIngot();
                ingot.Amount = toConsume * 2;

                m_Ore.Consume(toConsume);

                this.PlaySound(0x57);

                this.AddToBackpack(item);
                this.AddToBackpack(ingot);
            }

            ValoriteOre item8 = (ValoriteOre)backpack.FindItemByType(typeof(ValoriteOre));

            if (item8 is BaseOre)
            {
                BaseOre m_Ore = item8 as BaseOre;

                int toConsume = m_Ore.Amount;

                if (toConsume > 30000)
                {
                    toConsume = 30000;
                }
                else if (m_Ore.Amount < 2)
                {
                    m_Ore.Delete();
                }

                BaseIngot ingot = m_Ore.GetIngot();
                ingot.Amount = toConsume * 2;

                m_Ore.Consume(toConsume);

                this.PlaySound(0x57);

                this.AddToBackpack(item);
                this.AddToBackpack(ingot);
            }
        }
Esempio n. 24
0
    /// <summary>
    /// moves all selected units (if clicked on enemy tree etc, they attack,work etc.)
    /// </summary>
    public void move()
    {
        Vector2 mousePos = CalcUtil.getMousePos();
        Grid    grid     = mapGrid.getGridOn(mousePos);

        workGrid = null;
        Tree    to       = null;
        IronOre io       = null;
        string  gridType = "";

        try
        {
            to = grid.getBlockingObject().GetComponent <Tree>();
            io = grid.getBlockingObject().GetComponent <IronOre>();
        }
        catch { }

        if (to != null)
        {
            workGrid = grid;
            gridType = "wood";
        }
        else if (io != null)
        {
            workGrid = grid;
            gridType = "ironOre";
        }
        GameObject enemy = enemyClicked(mousePos);

        if (workGrid != null)
        {
            List <GameObject> workers = getSelectedWorkers();

            findNearestStorage();

            foreach (GameObject worker in workers)
            {
                if (gridType.Equals("wood"))
                {
                    if (worker.GetComponent <Worker>().isLumberjack())
                    {
                        to.addUnit(worker.GetComponent <Unit>());
                        worker.GetComponent <Worker>().setWorkGrid(grid, "wood");
                        worker.GetComponent <Worker>().startWorking(true);
                    }
                }
                else if (gridType.Equals("ironOre"))
                {
                    if (worker.GetComponent <Worker>().isIronOreMiner())
                    {
                        io.addUnit(worker.GetComponent <Unit>());
                        worker.GetComponent <Worker>().setWorkGrid(grid, "ironOre");
                        worker.GetComponent <Worker>().startWorking(true);
                    }
                }
            }
        }
        else if (enemy != null)
        {
            foreach (GameObject unit in getSelectedCombatUnits())
            {
                unit.GetComponent <Unit>().attack(enemy);
            }
        }
        else
        {
            moveRectForation(mousePos);
            foreach (GameObject worker in getSelectedWorkers())
            {
                worker.GetComponent <Worker>().startWorking(false);
            }
        }
    }
Esempio n. 25
0
        public bool DoDisposeOre(int x, int y, int z, Map map, Mobile from)
        {
            if (!IsMiningTile(x, y, map))
            {
                this.Say("I can not mine here !");
                m_Mine       = false;
                this.Hue     = 0;
                ControlOrder = OrderType.Follow;
                return(false);
            }

            HarvestBank bank = Mining.System.OreAndStone.GetBank(map, x, y);

            if (bank == null)
            {
                this.Say("I can not mine here !");
                m_Mine       = false;
                this.Hue     = 0;
                ControlOrder = OrderType.Follow;
                return(false);
            }

            if (bank.Current <= 0)
            {
                this.Say("No Ore remains !");
                m_Mine       = false;
                this.Hue     = 0;
                ControlOrder = OrderType.Follow;
                return(false);
            }

            HarvestVein vein = bank.DefaultVein;

            if (vein == null)
            {
                this.Say("I can not mine here !");
                m_Mine       = false;
                this.Hue     = 0;
                ControlOrder = OrderType.Follow;
                return(false);
            }

            HarvestDefinition def = Mining.System.OreAndStone;
            HarvestResource   res = vein.PrimaryResource;
            BaseOre           ore = Mining.System.Construct(res.Types[0], null) as BaseOre;

            if (ore == null)
            {
                this.Say("I can not mine here !");
                m_Mine       = false;
                this.Hue     = 0;
                ControlOrder = OrderType.Follow;
                return(false);
            }

            if (ore.Resource > CraftResource.MIron)
            {
                double minskill  = 0.0;
                double minskill2 = 0.0;
                double maxskill  = 0.0;
                double skillbase = this.Skills.Mining.Base;

                switch (ore.Resource)
                {
                case CraftResource.MIron: { minskill = 00.0; minskill2 = 00.0; maxskill = 100.0; } break;

                case CraftResource.MDullcopper: { minskill = 60.0; minskill2 = 25.0; maxskill = 105.0; } break;

                case CraftResource.MShadow: { minskill = 65.0; minskill2 = 30.0; maxskill = 110.0; } break;

                case CraftResource.MCopper: { minskill = 70.0; minskill2 = 35.0; maxskill = 115.0; } break;

                case CraftResource.MGold: { minskill = 75.0; minskill2 = 40.0; maxskill = 120.0; } break;

                case CraftResource.MAgapite: { minskill = 80.0; minskill2 = 45.0; maxskill = 120.0; } break;

                case CraftResource.MVerite: { minskill = 85.0; minskill2 = 50.0; maxskill = 120.0; } break;

                case CraftResource.MValorite: { minskill = 90.0; minskill2 = 55.0; maxskill = 120.0; } break;
                }

                if (Utility.RandomDouble() <= 0.30 || skillbase < minskill)
                {
                    ore = new IronOre(); minskill = 00.0; minskill2 = 00.0; maxskill = 100.0;
                }
                if (!(from.CheckSkill(SkillName.Mining, minskill2, maxskill)))
                {
                    ore.Delete();
                    return(false);
                }
            }

            ore.Amount = (map == Map.Felucca ? 2 : 1);
            if (from != null)
            {
                from.AddToBackpack(ore);
            }
            else
            {
                ore.Delete();
            }
            bank.Consume(ore.Amount, this);
            this.Hue = ore.Hue;
            return(true);
        }
Esempio n. 26
0
        public static InventoryItem CreateInventoryItem(string key, TeamType team, string region, Vector2 location, ContentManager content, GraphicsDevice graphics)
        {
            InventoryItem item          = null;
            int           amountStacked = 1;

            switch (key)
            {
            case ("tribalTokens"):
                item = new TribalTokens(team, region, location, content, graphics);
                break;

            case ("basePlank"):
                item = new BasePlank(team, region, location, content, graphics);
                break;

            case ("shortSword"):
                item = new ShortSword(team, region, location, content, graphics);
                break;

            case ("softWood"):
                item = new SoftWood(team, region, location, content, graphics);
                break;

            case ("islandGrass"):
                item = new IslandGrass(team, region, location, content, graphics);
                break;

            case ("coal"):
                item = new Coal(team, region, location, content, graphics);
                break;

            case ("ironOre"):
                item = new IronOre(team, region, location, content, graphics);
                break;

            case ("baseSword"):
                item = new BaseSword(team, region, location, content, graphics);
                break;

            case ("anvilItem"):
                item = new AnvilItem(team, region, location, content, graphics);
                item.placeableVersion = new CraftingAnvil(team, region, location, content, graphics);
                break;

            case ("baseChestItem"):
                item = new BaseChestItem(team, region, location, content, graphics);
                item.placeableVersion = new BaseChest(team, region, location, content, graphics);
                break;

            case ("nails"):
                item          = new Nails(team, region, location, content, graphics);
                amountStacked = 5;
                break;

            case ("cannonBallItem"):
                item          = new CannonBallItem(team, region, location, content, graphics);
                amountStacked = 3;
                break;

            case ("pistolShotItem"):
                item          = new PistolShotItem(team, region, location, content, graphics);
                amountStacked = 5;
                break;

            case ("ironBar"):
                item = new IronBar(team, region, location, content, graphics);
                break;

            case ("treasureMapItem"):
                item = new TreasureMapItem(null, team, region, location, content, graphics);
                break;

            case ("chiliFish"):
                item = new ChiliFish(team, region, location, content, graphics);
                break;

            case ("chiliPepper"):
                item = new ChiliPepper(team, region, location, content, graphics);
                break;

            case ("cookedFish"):
                item = new CookedFish(team, region, location, content, graphics);
                break;

            case ("cookedMeat"):
                item = new CookedMeat(team, region, location, content, graphics);
                break;

            case ("rawFish"):
                item = new RawFish(team, region, location, content, graphics);
                break;

            case ("rawMeat"):
                item = new RawMeat(team, region, location, content, graphics);
                break;

            case ("spoiledFish"):
                item = new SpoiledFish(team, region, location, content, graphics);
                break;

            case ("spoiledMeat"):
                item = new SpoiledMeat(team, region, location, content, graphics);
                break;

            case ("feather"):
                item = new Feather(team, region, location, content, graphics);
                break;

            case ("scales"):
                item = new Scales(team, region, location, content, graphics);
                break;

            case ("fishOil"):
                item = new FishOil(team, region, location, content, graphics);
                break;

            case ("goldCoins"):
                item = new GoldCoins(team, region, location, content, graphics);
                break;
            }
            item.itemKey       = key;
            item.amountStacked = amountStacked;
            return(item);
        }
Esempio n. 27
0
    new private void Update()
    {
        //work phases, moving to workgrid, working, moving to storage etc.
        switch (workPhase)
        {
        case 0:
            if (!didAlready)
            {
                //Debug.Log("working");
                moveTo(workGrid);
                didAlready = true;
            }
            else
            {
                if (!moving)
                {
                    workPhase  = 1;
                    didAlready = false;
                }
            }
            break;

        case 1:
            if (!didAlready)
            {
                if (workType.Equals("wood"))
                {
                    animator.SetBool("WoodChopping", true);
                }
                else if (workType.Equals("ironOre"))
                {
                    animator.SetBool("IronOreMining", true);
                }
                didAlready = true;
            }
            else
            {
                if (workType.Equals("wood"))
                {
                    if (woodStorage[3] >= woodStorage[4])
                    {
                        try
                        {
                            woodStorage[0] += workGrid.getBlockingObject().GetComponent <Tree>().damageTree(woodStorage[2]);

                            workGrid.getBlockingObject().GetComponent <Tree>().checkAlive();
                        }
                        catch { }
                        woodStorage[3] = 0;
                    }
                    else
                    {
                        woodStorage[3]++;
                    }
                    tr = null;
                    try
                    {
                        tr = workGrid.getBlockingObject().GetComponent <Tree>();
                    }
                    catch { }


                    if (woodStorage[0] >= woodStorage[1] || tr == null)
                    {
                        if (woodStorage[0] >= woodStorage[1])
                        {
                            woodStorage[0] = woodStorage[1];
                        }
                        didAlready = false;
                        animator.SetBool("WoodChopping", false);
                        workPhase = 2;
                    }
                }
                else if (workType.Equals("ironOre"))
                {
                    if (ironOreStorage[3] >= ironOreStorage[4])
                    {
                        try
                        {
                            ironOreStorage[0] += workGrid.getBlockingObject().GetComponent <IronOre>().damageIronOre(ironOreStorage[2]);

                            workGrid.getBlockingObject().GetComponent <IronOre>().checkAlive();
                        }
                        catch { }
                        ironOreStorage[3] = 0;
                    }
                    else
                    {
                        ironOreStorage[3]++;
                    }
                    io = null;
                    try
                    {
                        io = workGrid.getBlockingObject().GetComponent <IronOre>();
                    }
                    catch { }

                    if (ironOreStorage[0] >= ironOreStorage[1] || io == null)
                    {
                        if (ironOreStorage[0] >= ironOreStorage[1])
                        {
                            ironOreStorage[0] = ironOreStorage[1];
                        }
                        didAlready = false;
                        animator.SetBool("IronOreMining", false);
                        workPhase = 2;
                    }
                }
            }
            break;

        case 2:
            if (!didAlready)
            {
                moveTo(closestStorage);
                didAlready = true;
            }
            else
            {
                if (!moving)
                {
                    workPhase  = 3;
                    didAlready = false;
                }
            }
            break;

        case 3:
            if (!didAlready)
            {
                player.GetRessourceManager().addWood((int)woodStorage[0]);
                woodStorage[0] = 0;
                player.GetRessourceManager().addIronOre((int)ironOreStorage[0]);
                ironOreStorage[0] = 0;
                if (workType.Equals("wood"))
                {
                    tr = null;
                    try
                    {
                        tr = workGrid.getBlockingObject().GetComponent <Tree>();
                    }
                    catch { }

                    if (tr == null)
                    {
                        workPhase = -1;
                    }
                    else
                    {
                        workPhase = 0;
                    }
                }
                else if (workType.Equals("ironOre"))
                {
                    io = null;
                    try
                    {
                        io = workGrid.getBlockingObject().GetComponent <IronOre>();
                    }
                    catch { }

                    if (io == null)
                    {
                        workPhase = -1;
                    }
                    else
                    {
                        workPhase = 0;
                    }
                }
            }

            break;
        }

        base.Update();
    }
Esempio n. 28
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            if (this.RealName == "an iron grue")
            {
                Item ore = new IronOre(Utility.RandomMinMax(3, 8));
                ore.ItemID = 0x19B7;
                c.DropItem(ore);
            }
            else if (this.RealName == "a golden grue")
            {
                Item ore = new GoldOre(Utility.RandomMinMax(3, 8));
                ore.ItemID = 0x19B9;
                c.DropItem(ore);
            }
            else if (this.RealName == "a shadow iron grue")
            {
                Item ore = new ShadowIronOre(Utility.RandomMinMax(3, 8));
                ore.ItemID = 0x19B9;
                c.DropItem(ore);
            }
            else if (this.RealName == "a valorite grue")
            {
                Item ore = new ValoriteOre(Utility.RandomMinMax(3, 8));
                ore.ItemID = 0x19B9;
                c.DropItem(ore);
            }
            else if (this.RealName == "a verite grue")
            {
                Item ore = new VeriteOre(Utility.RandomMinMax(3, 8));
                ore.ItemID = 0x19B9;
                c.DropItem(ore);
            }
            else if (this.RealName == "an agapite grue")
            {
                Item ore = new AgapiteOre(Utility.RandomMinMax(3, 8));
                ore.ItemID = 0x19B9;
                c.DropItem(ore);
            }
            else if (this.RealName == "a bronze grue")
            {
                Item ore = new BronzeOre(Utility.RandomMinMax(3, 8));
                ore.ItemID = 0x19B9;
                c.DropItem(ore);
            }
            else if (this.RealName == "a copper grue")
            {
                Item ore = new CopperOre(Utility.RandomMinMax(3, 8));
                ore.ItemID = 0x19B9;
                c.DropItem(ore);
            }
            else if (this.RealName == "a dull copper grue")
            {
                Item ore = new DullCopperOre(Utility.RandomMinMax(3, 8));
                ore.ItemID = 0x19B9;
                c.DropItem(ore);
            }
            else if (this.RealName == "a stone grue")
            {
                Granite granite = new Granite();
                granite.Amount = Utility.RandomMinMax(1, 3);
                c.DropItem(granite);
            }
        }
        public EarthElemental() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name        = "an earth elemental";
            Body        = 14;
            BaseSoundID = 268;

            SetStr(131, 152);
            SetDex(66, 84);
            SetInt(73, 92);

            SetHits(352, 486);

            SetDamage(5, 8);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 34);
            SetResistance(ResistanceType.Fire, 10);
            SetResistance(ResistanceType.Cold, 10);
            SetResistance(ResistanceType.Poison, 15);
            SetResistance(ResistanceType.Energy, 15);

            SetSkill(SkillName.MagicResist, 52.9, 87.0);
            SetSkill(SkillName.Tactics, 65.5, 91.6);
            SetSkill(SkillName.Wrestling, 65.7, 92.9);

            Fame  = 13500;
            Karma = -13500;

            PackGold(319, 425);

            PackItem(new Onyx());

            Item ore = new IronOre(5);

            ore.ItemID = 0x19B7;
            PackItem(ore);

            PackItem(new FertileDirt(Utility.RandomMinMax(1, 4)));
            PackItem(new MandrakeRoot());

            PackItem(new ElementalDust(Utility.RandomMinMax(4, 7)));

            PackItem(new SummonEarthElementalScroll());

            switch (Utility.Random(9))
            {
            case 0: PackItem(new Agate()); break;

            case 1: PackItem(new Beryl()); break;

            case 2: PackItem(new ChromeDiopside()); break;

            case 3: PackItem(new FireOpal()); break;

            case 4: PackItem(new MoonstoneCustom()); break;

            case 5: PackItem(new Onyx()); break;

            case 6: PackItem(new Opal()); break;

            case 7: PackItem(new Pearl()); break;

            case 8: PackItem(new TurquoiseCustom()); break;
            }
        }