Exemplo n.º 1
0
        public DupresKnight()
            : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
        {
            Name   = NameList.RandomName("male");
            Title  = "the Knight";
            Body   = 0x190;
            Hue    = Utility.RandomSkinHue();
            Female = false;

            SetStr(190, 200);
            SetDex(50, 75);
            SetInt(150, 250);
            SetHits(3900, 4100);
            SetDamage(22, 28);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 50, 70);
            SetResistance(ResistanceType.Fire, 50, 70);
            SetResistance(ResistanceType.Cold, 50, 70);
            SetResistance(ResistanceType.Poison, 50, 70);
            SetResistance(ResistanceType.Energy, 50, 70);

            SetSkill(SkillName.EvalInt, 195.0, 220.0);
            SetSkill(SkillName.Magery, 195.0, 220.0);
            SetSkill(SkillName.Meditation, 195.0, 200.0);
            SetSkill(SkillName.MagicResist, 100.0, 120.0);
            SetSkill(SkillName.Tactics, 195.0, 220.0);
            SetSkill(SkillName.Wrestling, 195.0, 220.0);

            Item longsword = new Longsword
            {
                LootType = LootType.Blessed
            };

            SetWearable(longsword);

            Item ph = new PlateHelm
            {
                LootType = LootType.Blessed
            };

            SetWearable(ph);

            Item pa = new PlateArms
            {
                LootType = LootType.Blessed
            };

            SetWearable(pa);

            Item pg = new PlateGorget
            {
                LootType = LootType.Blessed
            };

            SetWearable(pg);

            Item pgl = new PlateGloves
            {
                LootType = LootType.Blessed
            };

            SetWearable(pgl);

            Item pl = new PlateLegs
            {
                LootType = LootType.Blessed
            };

            SetWearable(pl);

            Item pc = new PlateChest
            {
                LootType = LootType.Blessed
            };

            SetWearable(pc);

            Item mks = new MetalKiteShield
            {
                LootType = LootType.Blessed,
                Hue      = 0x794
            };

            SetWearable(mks);

            Item bs = new BodySash(0x794)
            {
                LootType = LootType.Blessed
            }; // dark purple

            SetWearable(bs);
        }
Exemplo n.º 2
0
        public DrowWeaponMaster() : base(AIType.AI_Melee, FightMode.Agressor, 10, 1, 0.2, 0.4)
        {
            Name      = NameList.RandomName("drowmale");
            Title     = "the Weapon Master";
            SpeechHue = Utility.RandomDyedHue();
            Hue       = 1109;
            Body      = 0x190;
            Level     = 10;
            NameHue   = 2545;

            new Tizzin().Rider = this;

            LongHair hair = new LongHair();

            hair.Movable = false;
            AddItem(hair);
            ChainChest chest = new ChainChest();

            chest.Hue     = 0xA3B;
            chest.Movable = false;
            AddItem(chest);
            RingmailArms arms = new RingmailArms();

            arms.Hue     = 0xA3B;
            arms.Movable = false;
            AddItem(arms);
            RingmailGloves gloves = new RingmailGloves();

            gloves.Hue     = 0xA3B;
            gloves.Movable = false;
            AddItem(gloves);
            ChainLegs legs = new ChainLegs();

            legs.Hue     = 0xA3B;
            legs.Movable = false;
            AddItem(legs);
            Cloak cloak = new Cloak();

            cloak.Hue     = 0xA39;
            cloak.Movable = false;
            AddItem(cloak);
            ChaosShield shield = new ChaosShield();

            shield.Hue     = 0xA3B;
            shield.Movable = false;
            AddItem(shield);
            Boots boots = new Boots();

            boots.Hue     = 0xA39;
            boots.Movable = false;
            AddItem(boots);
            BodySash sash = new BodySash();

            sash.Hue     = 0xA16;
            sash.Movable = false;
            AddItem(sash);

            PackGold(10, 17);

            SetSkill(SkillName.MagicResist, 80.0, 99.5);
            SetSkill(SkillName.Swords, 90.0, 102.5);
            SetSkill(SkillName.Tactics, 85.0, 97.5);
            SetSkill(SkillName.Wrestling, 65.0, 77.5);

            SetStr(316, 370);
            SetDex(351, 415);
            SetInt(141, 165);
            SetHits(420, 483);
            SetDamage(11, 17);

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

            Karma = -5000;
            Fame  = 5000;

            switch (Utility.Random(4))
            {
            case 0: Scimitar scim = new Scimitar();
                scim.Movable = false;
                AddItem(scim);
                break;

            case 1: Longsword lsword = new Longsword();
                lsword.Movable = false;
                AddItem(lsword);
                break;

            case 2: Broadsword bsword = new Broadsword();
                bsword.Movable = false;
                AddItem(bsword);
                break;

            case 3: Cutlass cl = new Cutlass();
                cl.Movable = false;
                AddItem(cl);
                break;
            }
        }
Exemplo n.º 3
0
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public static Item CreateMetalWeapon()
        {
            Item item = null;

            int nType = Utility.RandomMinMax(0, 41);

            switch (nType)
            {
            case 1:         item = new Cutlass();                   item.Name = "cutlass";                  break;

            case 2:         item = new Katana();                    item.Name = "katana";                   break;

            case 3:         item = new Kryss();                             item.Name = "kryss";                    break;

            case 4:         item = new Broadsword();                item.Name = "broadsword";               break;

            case 5:         item = new Longsword();                 item.Name = "longsword";                break;

            case 6:         item = new ThinLongsword();             item.Name = "longsword";                break;

            case 7:         item = new VikingSword();               item.Name = "barbarian sword";  break;

            case 8:         item = new Scimitar();                  item.Name = "scimitar";                 break;

            case 9:         item = new BoneHarvester();             item.Name = "sickle";                   break;

            case 10:        item = new CrescentBlade();             item.Name = "crescent blade";   break;

            case 11:        item = new DoubleBladedStaff(); item.Name = "bladed staff";             break;

            case 12:        item = new Lance();                             item.Name = "lance";                    break;

            case 13:        item = new Pike();                              item.Name = "pike";                             break;

            case 14:        item = new Scythe();                    item.Name = "scythe";                   break;

            case 15:        item = new Dagger();                    item.Name = "dagger";                   break;

            case 16:        item = new HammerPick();                item.Name = "hammer pick";              break;

            case 17:        item = new Mace();                              item.Name = "mace";                             break;

            case 18:        item = new Maul();                              item.Name = "maul";                             break;

            case 19:        item = new WarHammer();                 item.Name = "war hammer";               break;

            case 20:        item = new WarMace();                   item.Name = "war mace";                 break;

            case 21:        item = new ExecutionersAxe();   item.Name = "great axe";                break;

            case 22:        item = new BattleAxe();                 item.Name = "battle axe";               break;

            case 23:        item = new TwoHandedAxe();              item.Name = "two-handed axe";   break;

            case 24:        item = new Axe();                               item.Name = "axe";                              break;

            case 25:        item = new DoubleAxe();                 item.Name = "double axe";               break;

            case 26:        item = new RoyalSword();                item.Name = "royal sword";              break;

            case 27:        item = new LargeBattleAxe();    item.Name = "large battle axe"; break;

            case 28:        item = new WarAxe();                    item.Name = "war axe";                  break;

            case 29:        item = new Bardiche();                  item.Name = "bardiche";                 break;

            case 30:        item = new Halberd();                   item.Name = "halberd";                  break;

            case 31:        item = new Pitchfork();                 item.Name = "trident";                  break;

            case 32:        item = new ShortSpear();                item.Name = "short spear";              break;

            case 33:        item = new Spear();                             item.Name = "spear";                    break;

            case 34:        item = new NoDachi();                   item.Name = "no dachi";                 break;

            case 35:        item = new Wakizashi();                 item.Name = "wakizashi";                break;

            case 36:        item = new Tetsubo();                   item.Name = "tetsubo";                  break;

            case 37:        item = new Lajatang();                  item.Name = "lajatang";                 break;

            case 38:        item = new Daisho();                    item.Name = "daisho";                   break;

            case 39:        item = new Tekagi();                    item.Name = "tekagi";                   break;

            case 40:        item = new Kama();                              item.Name = "kama";                             break;

            case 41:        item = new Sai();                               item.Name = "sai";                              break;
            }

            return(item);
        }
Exemplo n.º 4
0
        public override void GenerateLoot()
        {
            AddLoot(LootPack.FilthyRich, 5);
            AddLoot(LootPack.HighScrolls, 3);
            AddLoot(LootPack.MedScrolls, 4);
            AddLoot(LootPack.LowScrolls, 6);
            AddLoot(LootPack.Gems, 5);

            if (Utility.RandomDouble() < 0.20)
            {
                BaseWeapon weapon = Loot.RandomWeapon(true);
                switch (Utility.Random(33))
                {
                case 0: weapon = new BattleAxe(); break;

                case 1: weapon = new ExecutionersAxe(); break;

                case 2: weapon = new LargeBattleAxe(); break;

                case 3: weapon = new WarAxe(); break;

                case 4: weapon = new Bow(); break;

                case 5: weapon = new Crossbow(); break;

                case 6: weapon = new HeavyCrossbow(); break;

                case 7: weapon = new WarHammer(); break;

                case 8: weapon = new WarMace(); break;

                case 9: weapon = new Bardiche(); break;

                case 10: weapon = new Halberd(); break;

                case 11: weapon = new Spear(); break;

                case 12: weapon = new QuarterStaff(); break;

                case 13: weapon = new Katana(); break;

                case 14: weapon = new Longsword(); break;

                case 15: weapon = new VikingSword(); break;

                case 16: weapon = new CompositeBow(); break;

                case 17: weapon = new CrescentBlade(); break;

                case 18: weapon = new DoubleBladedStaff(); break;

                case 19: weapon = new Lance(); break;

                case 20: weapon = new PaladinSword(); break;

                case 21: weapon = new Scythe(); break;

                case 22: weapon = new Daisho(); break;

                case 23: weapon = new Lajatang(); break;

                case 24: weapon = new NoDachi(); break;

                case 25: weapon = new Tetsubo(); break;

                case 26: weapon = new Yumi(); break;

                case 27: weapon = new ElvenCompositeLongbow(); break;

                case 28: weapon = new OrnateAxe(); break;

                case 29: weapon = new RadiantScimitar(); break;

                case 30: weapon = new WarCleaver(); break;

                case 31: weapon = new WildStaff(); break;

                default: weapon = new DiamondMace(); break;
                }

                BaseRunicTool.ApplyAttributesTo(weapon, 5, 35, 50);
                weapon.Hue = 1461;

                PackItem(weapon);
            }

            if (Utility.RandomDouble() < 0.20)
            {
                BaseArmor armor = Loot.RandomArmor(true);
                switch (Utility.Random(5))
                {
                case 0: armor = new CrusaderGauntlets(); break;

                case 1: armor = new CrusaderGorget(); break;

                case 2: armor = new CrusaderLeggings(); break;

                case 3: armor = new CrusaderSleeves(); break;

                default: armor = new CrusaderBreastplate(); break;
                }

                BaseRunicTool.ApplyAttributesTo(armor, 5, 35, 50);
                armor.Hue = 1461;

                PackItem(armor);
            }

            if (Utility.RandomDouble() < 0.20)
            {
                BaseClothing clothing = Loot.RandomClothing(true);
                BaseRunicTool.ApplyAttributesTo(clothing, 5, 35, 50);
                clothing.Hue = 1461;

                PackItem(clothing);
            }

            if (Utility.RandomDouble() < 0.10)
            {
                BaseShield shield = new MetalKiteShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield, 5, 35, 50);
                }
                shield.Hue = 1461;

                PackItem(shield);
            }

            if (Utility.RandomDouble() < 0.10)
            {
                BaseJewel bracelet = new GoldBracelet();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(bracelet, 5, 35, 50);
                }
                bracelet.Hue = 1461;

                PackItem(bracelet);
            }

            if (Utility.RandomDouble() < 0.10)
            {
                BaseJewel earrings = new GoldEarrings();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(earrings, 5, 35, 50);
                }
                earrings.Hue = 1461;

                PackItem(earrings);
            }

            if (Utility.RandomDouble() < 0.10)
            {
                BaseJewel necklace = new GoldNecklace();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(necklace, 5, 35, 50);
                }
                necklace.Hue = 1461;

                PackItem(necklace);
            }

            if (Utility.RandomDouble() < 0.10)
            {
                BaseJewel ring = new GoldRing();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(ring, 5, 35, 50);
                }
                ring.Hue = 1461;

                PackItem(ring);
            }
        }
Exemplo n.º 5
0
        public AITester(int i)
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            this.Name = "Dark Knight";
            this.Body = 400;
            this.Hue  = 1175;

            this.SetStr(150);
            this.SetDex(180);
            this.SetInt(1500);

            this.SetHits(5000);
            this.SetDamage(15, 20);

            this.SetDamageType(ResistanceType.Physical, 100);

            this.SetResistance(ResistanceType.Physical, 50);
            this.SetResistance(ResistanceType.Fire, 50);
            this.SetResistance(ResistanceType.Cold, 50);
            this.SetResistance(ResistanceType.Poison, 50);
            this.SetResistance(ResistanceType.Energy, 50);

            if (i == 0)
            {
                this.SetSkill(SkillName.EvalInt, 120.0);
                this.SetSkill(SkillName.Magery, 120.0);
            }
            else if (i == 1)
            {
                this.SetSkill(SkillName.Necromancy, 120.0);
                this.SetSkill(SkillName.SpiritSpeak, 120.0);
            }
            else if (i == 2)
            {
                this.SetSkill(SkillName.Bushido, 120.0);
                this.SetSkill(SkillName.Parry, 120.0);
            }
            else if (i == 3)
            {
                this.SetSkill(SkillName.Ninjitsu, 120.0);
                this.SetSkill(SkillName.Hiding, 120.0);
                this.SetSkill(SkillName.Stealth, 120.0);
            }
            else if (i == 4)
            {
                this.SetSkill(SkillName.Spellweaving, 120.0);
                this.SetSkill(SkillName.EvalInt, 120.0);
            }
            else if (i == 5)
            {
                this.SetSkill(SkillName.Mysticism, 120.0);
            }

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

            this.Fame  = 32000;
            this.Karma = -32000;

            this.VirtualArmor = 80;

            int hue = 1175;

            GiveItem(this, hue, new DragonHelm());
            GiveItem(this, hue, new PlateGorget());
            GiveItem(this, hue, new DragonChest());
            GiveItem(this, hue, new DragonLegs());
            GiveItem(this, hue, new DragonArms());
            GiveItem(this, hue, new DragonGloves());

            Longsword sword = new Longsword();

            sword.ItemID = 9934;
            GiveItem(this, hue, sword);
        }
Exemplo n.º 6
0
        public DrowFighter() : base(AIType.AI_Melee, FightMode.Agressor, 10, 1, 0.2, 0.4)
        {
            Name      = NameList.RandomName("drowmale");
            Title     = "the Fighter";
            SpeechHue = Utility.RandomDyedHue();
            Hue       = 1109;
            Body      = 0x190;
            Level     = 7;
            NameHue   = 2545;

            LongHair hair = new LongHair();

            hair.Movable = false;
            AddItem(hair);
            ChainChest chest = new ChainChest();

            chest.Hue     = 0xA42;
            chest.Movable = false;
            AddItem(chest);
            RingmailArms arms = new RingmailArms();

            arms.Hue     = 0xA42;
            arms.Movable = false;
            AddItem(arms);
            RingmailGloves gloves = new RingmailGloves();

            gloves.Hue     = 0xA42;
            gloves.Movable = false;
            AddItem(gloves);
            ChainLegs legs = new ChainLegs();

            legs.Hue     = 0xA42;
            legs.Movable = false;
            AddItem(legs);
            Cloak cloak = new Cloak();

            cloak.Hue     = 0xA16;
            cloak.Movable = false;
            AddItem(cloak);
            MetalKiteShield shield = new MetalKiteShield();

            shield.Hue     = 0xA42;
            shield.Movable = false;
            AddItem(shield);
            Boots boots = new Boots();

            boots.Hue     = 0xA39;
            boots.Movable = false;
            AddItem(boots);

            PackGold(6, 8);

            SetSkill(SkillName.MagicResist, 50.0, 61.5);
            SetSkill(SkillName.Swords, 70.0, 90.5);
            SetSkill(SkillName.Tactics, 65.0, 87.5);
            SetSkill(SkillName.Wrestling, 25.0, 47.5);

            SetStr(90, 110);
            SetDex(161, 125);
            SetInt(61, 85);
            SetHits(130, 160);
            SetDamage(10, 16);

            Karma = -2000;
            Fame  = 1000;

            switch (Utility.Random(4))
            {
            case 0: Scimitar scim = new Scimitar();
                scim.Movable = false;
                AddItem(scim);
                break;

            case 1: Longsword lsword = new Longsword();
                lsword.Movable = false;
                AddItem(lsword);
                break;

            case 2: Broadsword bsword = new Broadsword();
                bsword.Movable = false;
                AddItem(bsword);
                break;

            case 3: Cutlass cl = new Cutlass();
                cl.Movable = false;
                AddItem(cl);
                break;
            }
        }
Exemplo n.º 7
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            PlayerMobile player = from as PlayerMobile;

            if (player != null)
            {
                QuestSystem qs = player.Quest;

                if (qs is UzeraanTurmoilQuest)
                {
                    if (dropped is UzeraanTurmoilHorn)
                    {
                        if (player.Young)
                        {
                            UzeraanTurmoilHorn horn = (UzeraanTurmoilHorn)dropped;

                            if (horn.Charges < 10)
                            {
                                SayTo(from, 1049384); // I have recharged the item for you.
                                horn.Charges = 10;
                            }
                            else
                            {
                                SayTo(from, 1049385); // That doesn't need recharging yet.
                            }
                        }
                        else
                        {
                            player.SendLocalizedMessage(1114333); //You must be young to have this item recharged.
                        }

                        return(false);
                    }

                    if (dropped is SchmendrickScrollOfPower)
                    {
                        QuestObjective obj = qs.FindObjective(typeof(ReturnScrollOfPowerObjective));

                        if (obj != null && !obj.Completed)
                        {
                            Container cont = GetNewContainer();

                            cont.DropItem(new TreasureMap(player.Young ? 0 : 1, Map.Trammel));
                            cont.DropItem(new Shovel());
                            cont.DropItem(new UzeraanTurmoilHorn());

                            if (!player.PlaceInBackpack(cont))
                            {
                                cont.Delete();
                                player.SendLocalizedMessage(1046260); // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                                return(false);
                            }
                            else
                            {
                                dropped.Delete();
                                obj.Complete();
                                return(true);
                            }
                        }
                    }
                    else if (dropped is QuestFertileDirt)
                    {
                        QuestObjective obj = qs.FindObjective(typeof(ReturnFertileDirtObjective));

                        if (obj != null && !obj.Completed)
                        {
                            Container cont = GetNewContainer();

                            if (player.Profession == 2) // magician
                            {
                                cont.DropItem(new BlackPearl(20));
                                cont.DropItem(new Bloodmoss(20));
                                cont.DropItem(new Garlic(20));
                                cont.DropItem(new Ginseng(20));
                                cont.DropItem(new MandrakeRoot(20));
                                cont.DropItem(new Nightshade(20));
                                cont.DropItem(new SulfurousAsh(20));
                                cont.DropItem(new SpidersSilk(20));

                                for (int i = 0; i < 3; i++)
                                {
                                    cont.DropItem(Loot.RandomScroll(0, 23, SpellbookType.Regular));
                                }
                            }
                            else
                            {
                                cont.DropItem(new Gold(300));
                                cont.DropItem(new Bandage(25));

                                for (int i = 0; i < 5; i++)
                                {
                                    cont.DropItem(new LesserHealPotion());
                                }
                            }

                            if (!player.PlaceInBackpack(cont))
                            {
                                cont.Delete();
                                player.SendLocalizedMessage(1046260); // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                                return(false);
                            }
                            else
                            {
                                dropped.Delete();
                                obj.Complete();
                                return(true);
                            }
                        }
                    }
                    else if (dropped is QuestDaemonBlood)
                    {
                        QuestObjective obj = qs.FindObjective(typeof(ReturnDaemonBloodObjective));

                        if (obj != null && !obj.Completed)
                        {
                            Item reward;

                            if (player.Profession == 2) // magician
                            {
                                Container cont = GetNewContainer();

                                cont.DropItem(new ExplosionScroll(4));
                                cont.DropItem(new MagicWizardsHat());

                                reward = cont;
                            }
                            else
                            {
                                BaseWeapon weapon;
                                switch (Utility.Random(6))
                                {
                                case 0: weapon = new Broadsword(); break;

                                case 1: weapon = new Cutlass(); break;

                                case 2: weapon = new Katana(); break;

                                case 3: weapon = new Longsword(); break;

                                case 4: weapon = new Scimitar(); break;

                                default: weapon = new VikingSword(); break;
                                }

                                if (Core.AOS)
                                {
                                    BaseRunicTool.ApplyAttributesTo(weapon, 3, 20, 40);
                                }
                                else
                                {
                                    weapon.DamageLevel     = (WeaponDamageLevel)BaseCreature.RandomMinMaxScaled(2, 4);
                                    weapon.AccuracyLevel   = (WeaponAccuracyLevel)BaseCreature.RandomMinMaxScaled(2, 4);
                                    weapon.DurabilityLevel = (WeaponDurabilityLevel)BaseCreature.RandomMinMaxScaled(2, 4);
                                }

                                weapon.Slayer = SlayerName.Silver;

                                reward = weapon;
                            }

                            if (!player.PlaceInBackpack(reward))
                            {
                                reward.Delete();
                                player.SendLocalizedMessage(1046260); // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                                return(false);
                            }
                            else
                            {
                                dropped.Delete();
                                obj.Complete();
                                return(true);
                            }
                        }
                    }
                    else if (dropped is QuestDaemonBone)
                    {
                        QuestObjective obj = qs.FindObjective(typeof(ReturnDaemonBoneObjective));

                        if (obj != null && !obj.Completed)
                        {
                            Container cont = GetNewContainer();
                            cont.DropItem(new BankCheck(2000));
                            cont.DropItem(new EnchantedSextant());

                            if (!player.PlaceInBackpack(cont))
                            {
                                cont.Delete();
                                player.SendLocalizedMessage(1046260); // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                                return(false);
                            }
                            else
                            {
                                dropped.Delete();
                                obj.Complete();
                                return(true);
                            }
                        }
                    }
                }
            }

            return(base.OnDragDrop(from, dropped));
        }
        public MilitiaFighter()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            this.InitStats(40, 30, 5);
            this.Title = "the Militia Fighter";

            this.SpeechHue = Utility.RandomDyedHue();

            this.Hue = Utility.RandomSkinHue();

            this.Female = false;
            this.Body   = 0x190;
            this.Name   = NameList.RandomName("male");

            Utility.AssignRandomHair(this);
            Utility.AssignRandomFacialHair(this, this.HairHue);

            this.AddItem(new ThighBoots(0x1BB));
            this.AddItem(new LeatherChest());
            this.AddItem(new LeatherArms());
            this.AddItem(new LeatherLegs());
            this.AddItem(new LeatherCap());
            this.AddItem(new LeatherGloves());
            this.AddItem(new LeatherGorget());

            Item weapon;

            switch (Utility.Random(6))
            {
            case 0:
                weapon = new Broadsword();
                break;

            case 1:
                weapon = new Cutlass();
                break;

            case 2:
                weapon = new Katana();
                break;

            case 3:
                weapon = new Longsword();
                break;

            case 4:
                weapon = new Scimitar();
                break;

            default:
                weapon = new VikingSword();
                break;
            }
            weapon.Movable = false;
            this.AddItem(weapon);

            Item shield = new BronzeShield();

            shield.Movable = false;
            this.AddItem(shield);

            this.SetSkill(SkillName.Swords, 20.0);
        }
Exemplo n.º 9
0
        private void AddEquipment(GuardType type)
        {
            AddItem(new Boots());
            AddItem(new Cloak(1155));
            AddItem(new BodySash(1155));

            switch (type)
            {
            default:
            case GuardType.Archer:
            {
                AddItem(new LeatherLegs());
                AddItem(new StuddedChest());
                AddItem(new LeatherGloves());
                AddItem(new LeatherArms());

                Bow bow = new Bow();
                bow.Quality = WeaponQuality.Exceptional;

                AddItem(bow);
                AddToBackpack(new Arrow(200));
            } break;

            case GuardType.Cavalry:
            {
                AddItem(new PlateLegs());
                AddItem(new RingmailChest());
                AddItem(new FancyShirt());
                AddItem(new PlateGorget());
                AddItem(new RingmailGloves());

                BaseWeapon weapon;

                if (Utility.RandomBool())
                {
                    weapon = new Halberd();
                }
                else
                {
                    weapon = new Bardiche();
                }

                weapon.Quality  = WeaponQuality.Exceptional;
                weapon.Resource = CraftResource.Gold;
                weapon.Speed   += 5;

                AddItem(weapon);
            } break;

            case GuardType.Pikeman:
            {
                AddItem(new RingmailLegs());
                AddItem(new RingmailChest());
                AddItem(new RingmailArms());
                AddItem(new RingmailGloves());
                AddItem(new PlateGorget());

                if (Utility.RandomBool())
                {
                    AddItem(new CloseHelm());
                }
                else
                {
                    AddItem(new NorseHelm());
                }

                AddItem(new Pike());
            }
            break;

            case GuardType.Swordsman:
            {
                AddItem(new ChainLegs());
                AddItem(new ChainChest());
                AddItem(new RingmailArms());
                AddItem(new RingmailGloves());
                AddItem(new PlateGorget());

                switch (Utility.Random(3))
                {
                case 0: AddItem(new CloseHelm()); break;

                case 1: AddItem(new NorseHelm()); break;

                case 2: AddItem(new PlateHelm()); break;
                }

                BaseWeapon weapon;

                switch (Utility.Random(4))
                {
                default:
                case 0: weapon = new Broadsword(); break;

                case 1: weapon = new Longsword(); break;

                case 2: weapon = new Katana(); break;

                case 3: weapon = new Axe(); break;
                }

                weapon.Quality  = WeaponQuality.Exceptional;
                weapon.Resource = CraftResource.Gold;
                weapon.Layer    = Layer.OneHanded;

                AddItem(weapon);

                if (Utility.RandomBool())
                {
                    AddItem(new HeaterShield());
                }
                else
                {
                    AddItem(new MetalKiteShield());
                }
            }
            break;

            case GuardType.Wizard:
            {
                AddItem(new WizardsHat(Utility.RandomGreenHue()));
                AddItem(new Robe(Utility.RandomGreenHue()));

                GnarledStaff staff = new GnarledStaff();
                staff.Attributes.SpellChanneling = 1;
                staff.Attributes.SpellDamage     = Utility.RandomMinMax(4, 8);
                AddItem(staff);
            }
            break;

            case GuardType.Medic:
            {
                AddItem(new Bandana(Utility.RandomGreenHue()));
                AddItem(new Robe(Utility.RandomGreenHue()));
            }
            break;
            }
        }
Exemplo n.º 10
0
        public override void OnAfterSpawn()
        {
            base.OnAfterSpawn();

            Region reg = Region.Find(this.Location, this.Map);

            string World = Server.Misc.Worlds.GetMyWorld(this.Map, this.Location, this.X, this.Y);

            int clothColor = 0;
            int shieldType = 0;
            int helmType   = 0;
            int cloakColor = 0;

            Item weapon = new VikingSword(); weapon.Delete();

            if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Village of Whisper")
            {
                clothColor = 0x96D;             shieldType = 0x1B72;    helmType = 0x140E;              cloakColor = 0x972;             weapon = new Longsword();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Town of Glacial Hills")
            {
                clothColor = 0xB70;             shieldType = 0x1B74;    helmType = 0x1412;              cloakColor = 0xB7A;             weapon = new Kryss();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Village of Springvale")
            {
                clothColor = 0x595;             shieldType = 0;                 helmType = 0x140E;              cloakColor = 0x593;             weapon = new Pike();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the City of Elidor")
            {
                clothColor = 0x665;             shieldType = 0x1B7B;    helmType = 0x1412;              cloakColor = 0x664;             weapon = new Katana();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Village of Islegem")
            {
                clothColor = 0x7D1;             shieldType = 0;                 helmType = 0x140E;              cloakColor = 0x7D6;             weapon = new Spear();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "Greensky Village")
            {
                clothColor = 0x7D7;             shieldType = 0;                 helmType = 0x1412;              cloakColor = 0x7DA;             weapon = new Bardiche();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Port of Dusk")
            {
                clothColor = 0x601;             shieldType = 0x1B76;    helmType = 0x140E;              cloakColor = 0x600;             weapon = new Cutlass();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Port of Starguide")
            {
                clothColor = 0x751;             shieldType = 0;                 helmType = 0x1412;              cloakColor = 0x758;             weapon = new BladedStaff();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Village of Portshine")
            {
                clothColor = 0x847;             shieldType = 0x1B7A;    helmType = 0x140E;              cloakColor = 0x851;             weapon = new Mace();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Ranger Outpost")
            {
                clothColor = 0x598;             shieldType = 0;                 helmType = 0x140E;              cloakColor = 0x83F;             weapon = new Spear();
            }
            else if (World == "the Land of Lodoria")               // ( Server.Misc.Worlds.GetRegionName( this.Map, this.Location ) == "the City of Lodoria" || Server.Misc.Worlds.GetRegionName( this.Map, this.Location ) == "the Castle of Knowledge" || Server.Misc.Worlds.GetRegionName( this.Map, this.Location ) == "the Lodoria City Park" || Server.Misc.Worlds.GetRegionName( this.Map, this.Location ) == "the Village of Lodoria" || Server.Misc.Worlds.GetRegionName( this.Map, this.Location ) == "the Lodoria Cemetery" )
            {
                clothColor = 0x6E4;             shieldType = 0x1BC4;    helmType = 0x1412;              cloakColor = 0x6E7;             weapon = new Scimitar();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Lunar City of Dawn")
            {
                clothColor = 0x9C4;             shieldType = 0;                 helmType = 11121;               cloakColor = 0x9C4;             weapon = new QuarterStaff();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "The Town of Devil Guard" || Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "The Farmland of Devil Guard")
            {
                clothColor = 0x430;             shieldType = 0;                 helmType = 0x140E;              cloakColor = 0;                 weapon = new LargeBattleAxe();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Town of Moon")
            {
                clothColor = 0x8AF;             shieldType = 0x1B72;    helmType = 0x1412;              cloakColor = 0x972;             weapon = new Longsword();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Village of Grey")
            {
                clothColor = 0;                 shieldType = 0;                 helmType = 0x140E;              cloakColor = 0x763;             weapon = new Halberd();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the City of Montor")
            {
                clothColor = 0x96F;             shieldType = 0x1B74;    helmType = 0x1412;              cloakColor = 0x529;             weapon = new Broadsword();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Village of Fawn")
            {
                clothColor = 0x59D;             shieldType = 0;                 helmType = 0x140E;              cloakColor = 0x59C;             weapon = new DoubleAxe();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Village of Yew")
            {
                clothColor = 0x83C;             shieldType = 0;                 helmType = 0x1412;              cloakColor = 0x850;             weapon = new Spear();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "Iceclad Fisherman's Village" || Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Town of Mountain Crest" || Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "Glacial Coast Village")
            {
                clothColor = 0x482;             shieldType = 0;                 helmType = 0x140E;              cloakColor = 0x47E;             weapon = new Bardiche();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Undercity of Umbra")
            {
                clothColor = 0x964;             shieldType = 0x1BC3;    helmType = 0x140E;              cloakColor = 0x966;             weapon = new BoneHarvester();
            }
            else if (World == "the Island of Umber Veil")
            {
                clothColor = 0xA5D;             shieldType = 0;                 helmType = 0x140E;              cloakColor = 0x96D;             weapon = new Halberd();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the City of Kuldara")
            {
                clothColor = 0x965;             shieldType = 0x1BC3;    helmType = 0x140E;              cloakColor = 0x845;             weapon = new Maul();
            }
            else if (World == "the Isles of Dread")
            {
                clothColor = 0x978;             shieldType = 0x1B7A;    helmType = 0;                   cloakColor = 0x973;             weapon = new VikingSword();
            }
            else if (Server.Misc.Worlds.GetRegionName(this.Map, this.Location) == "the Village of Barako")
            {
                clothColor = 0x515;             shieldType = 0x1B72;    helmType = 0x2645;              cloakColor = 0x58D;             weapon = new WarMace();
            }
            else if (World == "the Savaged Empire")               // ( Server.Misc.Worlds.GetRegionName( this.Map, this.Location ) == "the Village of Kurak" )
            {
                clothColor = 0x515;             shieldType = 0;                 helmType = 0x140E;              cloakColor = 0x59D;             weapon = new Spear();
            }
            else if (World == "the Serpent Island")               // ( Server.Misc.Worlds.GetRegionName( this.Map, this.Location ) == "the City of Furnace" )
            {
                clothColor = 0x515;             shieldType = 0;                 helmType = 0x2FBB;              cloakColor = 0;                 weapon = new Halberd();
            }
            else             // if ( Server.Misc.Worlds.GetRegionName( this.Map, this.Location ) == "the City of Britain" || Server.Misc.Worlds.GetRegionName( this.Map, this.Location ) == "the Britain Castle Grounds" || Server.Misc.Worlds.GetRegionName( this.Map, this.Location ) == "Lord British Castle" || Server.Misc.Worlds.GetRegionName( this.Map, this.Location ) == "the Britain Dungeons" )
            {
                clothColor = 0x9C4;             shieldType = 0x1BC4;    helmType = 0x140E;              cloakColor = 0x845;             weapon = new VikingSword();
            }

            weapon.Movable = false;
            ((BaseWeapon)weapon).MaxHitPoints = 1000;
            ((BaseWeapon)weapon).HitPoints    = 1000;
            ((BaseWeapon)weapon).MinDamage    = 500;
            ((BaseWeapon)weapon).MaxDamage    = 900;
            AddItem(weapon);

            Item arms = new RingmailArms();

            if (World == "the Serpent Island")
            {
                arms = new PlateArms();
            }                                                                                   // FOR GARGOYLES
            Item tunic = new PlateChest();
            Item legs  = new PlateLegs();
            Item neck  = new PlateGorget();
            Item hand  = new PlateGloves();
            Item foot  = new Boots( );

            if (World == "the Isles of Dread")
            {
                tunic.ItemID = 0x5652;  tunic.Name = "tunic";
                if (this.Female)
                {
                    tunic.ItemID = 0x563E;
                    Utility.AssignRandomHair(this);
                }
                else
                {
                    Utility.AssignRandomHair(this);
                    FacialHairItemID = Utility.RandomList(0, 8254, 8255, 8256, 8257, 8267, 8268, 8269);
                }

                this.HairHue       = 0x455;
                this.FacialHairHue = 0x455;

                arms.ItemID = 22093;    arms.Name = "sleeves";
                legs.ItemID = 7176;             legs.Name = "skirt";
                neck.ItemID = 0x5650;   neck.Name = "amulet";
                hand.ItemID = 0x564E;   hand.Name = "gloves";
                foot.ItemID = 5901;             foot.Name = "sandals";
            }
            else if (World == "the Moon of Luna")
            {
                tunic.ItemID = 7939;    tunic.Name = "robe";
                if (this.Female)
                {
                    Utility.AssignRandomHair(this);
                }
                else
                {
                    Utility.AssignRandomHair(this);
                    FacialHairItemID = Utility.RandomList(0, 8254, 8255, 8256, 8257, 8267, 8268, 8269);
                }

                this.HairHue       = Utility.RandomHairHue();
                this.FacialHairHue = this.HairHue;

                arms.ItemID = 22093;    arms.Name = "sleeves";
                legs.ItemID = 7176;             legs.Name = "skirt";
                neck.ItemID = 0x5650;   neck.Name = "amulet";
                hand.ItemID = 0x564E;   hand.Name = "gloves";
                foot.ItemID = 5901;             foot.Name = "sandals";
            }

            AddItem(tunic);
            AddItem(arms);
            AddItem(legs);
            AddItem(neck);
            AddItem(hand);
            AddItem(foot);

            if (helmType > 0)
            {
                PlateHelm helm = new PlateHelm();
                helm.ItemID = helmType;
                helm.Name   = "helm";
                if (helmType == 11121)
                {
                    helm.Name = "hood";
                }
                AddItem(helm);
            }
            if (shieldType > 0)
            {
                ChaosShield shield = new ChaosShield();
                shield.ItemID = shieldType;
                shield.Name   = "shield";
                AddItem(shield);
            }

            MorphingTime.ColorMyClothes(this, clothColor);

            if (cloakColor > 0)
            {
                Cloak cloak = new Cloak();
                cloak.Hue = cloakColor;
                AddItem(cloak);
            }

            Server.Misc.MorphingTime.CheckMorph(this);

            if (Utility.RandomBool() && !Server.Misc.Worlds.InBuilding(this) && this.Map != Map.SerpentIsland)
            {
                BaseMount mount = new EvilMount();

                if (this.Map == Map.SavagedEmpire)
                {
                    mount.Body = 0x11C; mount.ItemID = 0x3E92; mount.Hue = Utility.RandomList(0xB79, 0xB19, 0xAEF, 0xACE, 0xAB0);
                }
                else if (this.Map == Map.IslesDread)
                {
                    mount.Body = 0xD5; mount.ItemID = 0x3EC5; if (Server.Misc.MyServerSettings.ClientVersion())
                    {
                        mount.Body = 0x22; mount.ItemID = 34; if (Utility.RandomBool())
                        {
                            mount.Body = 0xB1; mount.ItemID = 177;
                        }
                    }
                    else
                    {
                        mount.Hue = Utility.RandomList(0xAB1, 0xAC0, 0x92B);
                    }
                }
                else
                {
                    mount.Body = 0xE2; mount.ItemID = 0x3EA0; if (Server.Misc.MyServerSettings.ClientVersion())
                    {
                        mount.ItemID = 594;
                    }
                    else
                    {
                        mount.Hue = Utility.RandomList(0, 0, 0, 0, 0, 0x780, 0x781, 0x782, 0x783, 0x8FD, 0x8FE, 0x8FF, 0x900, 0x901, 0x902, 0x903, 0x904, 0x905, 0x906, 0x907, 0x908, Utility.RandomNeutralHue(), Utility.RandomNeutralHue(), Utility.RandomNeutralHue(), Utility.RandomNeutralHue(), Utility.RandomNeutralHue(), Utility.RandomNeutralHue());
                    }
                }

                Server.Mobiles.BaseMount.Ride(mount, this);
            }
        }
Exemplo n.º 11
0
        public Urk() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            BaseSoundID      = 0x45A;
            Hue              = 0x430;
            Body             = 0x190;
            Name             = NameList.RandomName("urk");
            HairItemID       = 0;
            FacialHairItemID = 0;

            Item helm = new WornHumanDeco();

            helm.Name   = "urkish face";
            helm.ItemID = 0x141B;
            helm.Hue    = 0x430;
            helm.Layer  = Layer.Helm;
            AddItem(helm);

            if (Utility.RandomMinMax(1, 2) == 1)
            {
                LeatherArms ratarms = new LeatherArms();
                ratarms.Name        = "urkish rat skin arms";
                ratarms.PoisonBonus = 6;
                ratarms.Hue         = 0x972;
                AddItem(ratarms);

                LeatherChest ratchest = new LeatherChest();
                ratchest.Name        = "urkish rat skin tunic";
                ratchest.PoisonBonus = 8;
                ratchest.Hue         = 0x972;
                AddItem(ratchest);

                LeatherGloves ratgloves = new LeatherGloves();
                ratgloves.Name        = "urkish rat skin gloves";
                ratgloves.PoisonBonus = 5;
                ratgloves.Hue         = 0x972;
                AddItem(ratgloves);

                LeatherGorget ratgorget = new LeatherGorget();
                ratgorget.Name        = "urkish rat skin gorget";
                ratgorget.PoisonBonus = 4;
                ratgorget.Hue         = 0x972;
                AddItem(ratgorget);

                LeatherLegs ratlegs = new LeatherLegs();
                ratlegs.Name        = "urkish rat skin leggings";
                ratlegs.PoisonBonus = 7;
                ratlegs.Hue         = 0x972;
                AddItem(ratlegs);
            }
            else
            {
                BoneChest bonechest = new BoneChest();
                bonechest.Name        = "urkish chest piece";
                bonechest.PoisonBonus = 8;
                bonechest.Hue         = 0x972;
                AddItem(bonechest);

                BoneArms bonearms = new BoneArms();
                bonearms.Name        = "urkish bracers";
                bonearms.PoisonBonus = 6;
                bonearms.Hue         = 0x972;
                AddItem(bonearms);

                BoneLegs bonelegs = new BoneLegs();
                bonelegs.Name        = "urkish leggings";
                bonelegs.PoisonBonus = 7;
                bonelegs.Hue         = 0x972;
                AddItem(bonelegs);

                BoneGloves bonegloves = new BoneGloves();
                bonegloves.Name        = "urkish gauntlets";
                bonegloves.PoisonBonus = 5;
                bonegloves.Hue         = 0x972;
                AddItem(bonegloves);
            }

            Item weapon = new BattleAxe();

            switch (Utility.Random(28))
            {
            case 0: weapon = new BattleAxe(); weapon.Name = "battle axe"; break;

            case 1: weapon = new VikingSword(); weapon.Name = "great sword"; break;

            case 2: weapon = new Halberd(); weapon.Name = "halberd"; break;

            case 3: weapon = new DoubleAxe(); weapon.Name = "double axe"; break;

            case 4: weapon = new ExecutionersAxe(); weapon.Name = "great axe"; break;

            case 5: weapon = new WarAxe(); weapon.Name = "war axe"; break;

            case 6: weapon = new TwoHandedAxe(); weapon.Name = "two handed axe"; break;

            case 7: weapon = new Cutlass(); weapon.Name = "cutlass"; break;

            case 8: weapon = new Katana(); weapon.Name = "katana"; break;

            case 9: weapon = new Kryss(); weapon.Name = "kryss"; break;

            case 10: weapon = new Broadsword(); weapon.Name = "broadsword"; break;

            case 11: weapon = new Longsword(); weapon.Name = "longsword"; break;

            case 12: weapon = new ThinLongsword(); weapon.Name = "longsword"; break;

            case 13: weapon = new Scimitar(); weapon.Name = "scimitar"; break;

            case 14: weapon = new BoneHarvester(); weapon.Name = "sickle"; break;

            case 15: weapon = new CrescentBlade(); weapon.Name = "crescent blade"; break;

            case 16: weapon = new DoubleBladedStaff(); weapon.Name = "double bladed staff"; break;

            case 17: weapon = new Pike(); weapon.Name = "pike"; break;

            case 18: weapon = new Scythe(); weapon.Name = "scythe"; break;

            case 19: weapon = new Pitchfork(); weapon.Name = "trident"; break;

            case 20: weapon = new ShortSpear(); weapon.Name = "short spear"; break;

            case 21: weapon = new Spear(); weapon.Name = "spear"; break;

            case 22: weapon = new Club(); weapon.Name = "club"; break;

            case 23: weapon = new HammerPick(); weapon.Name = "hammer pick"; break;

            case 24: weapon = new Mace(); weapon.Name = "mace"; break;

            case 25: weapon = new Maul(); weapon.Name = "maul"; break;

            case 26: weapon = new WarHammer(); weapon.Name = "war hammer"; break;

            case 27: weapon = new WarMace(); weapon.Name = "war mace"; break;
            }

            weapon.Name = "urkish " + weapon.Name;
            weapon.Hue  = 0x7D1;
            ((BaseWeapon)weapon).AosElementDamages.Physical = 60;
            ((BaseWeapon)weapon).AosElementDamages.Poison   = 40;
            AddItem(weapon);

            switch (Utility.RandomMinMax(0, 5))
            {
            case 0: Title = "the urk warrior"; break;

            case 1: Title = "the urk savage"; break;

            case 2: Title = "the urk barbarian"; break;

            case 3: Title = "the urk fighter"; break;

            case 4: Title = "the urk gladiator"; break;

            case 5: Title = "the urk berserker"; break;
            }

            SetStr(196, 250);
            SetDex(76, 95);
            SetInt(36, 60);

            SetHits(118, 150);

            SetDamage(8, 18);

            SetDamageType(ResistanceType.Physical, 60);
            SetDamageType(ResistanceType.Poison, 40);

            SetResistance(ResistanceType.Physical, 35, 45);
            SetResistance(ResistanceType.Fire, 20, 30);
            SetResistance(ResistanceType.Cold, 50, 60);
            SetResistance(ResistanceType.Poison, 60, 80);
            SetResistance(ResistanceType.Energy, 30, 40);

            SetSkill(SkillName.MagicResist, 65.1, 80.0);
            SetSkill(SkillName.Tactics, 85.1, 100.0);
            SetSkill(SkillName.Macing, 85.1, 95.0);
            SetSkill(SkillName.Swords, 85.1, 95.0);
            SetSkill(SkillName.Fencing, 85.1, 95.0);
            SetSkill(SkillName.Wrestling, 85.1, 95.0);

            Fame  = 3000;
            Karma = -3000;

            VirtualArmor = 40;
        }
Exemplo n.º 12
0
        public WarriorGuard(Mobile target) : base(target)
        {
            InitStats(1000, 1000, 1000);

            SpeechHue = 0;

            Hue = Utility.RandomSkinHue();

            #region Armor
            for (int i = 0; i < m_GuardArmor.Length; ++i)
            {
                m_GuardArmor[i].Resource = GuardTheme;
                AddItem(m_GuardArmor[i]);
                m_GuardArmor[i].Movable = false;
            }
            #endregion

            #region Cloth
            BaseClothing bC = null;

            switch (Utility.Random(3))
            {
            case 0:
                bC = new Doublet();
                break;

            case 1:
                bC = new Tunic();
                break;

            case 2:
                bC       = new BodySash();
                bC.Layer = Layer.Earrings;
                break;
            }

            if (bC != null)
            {
                bC.Resource = GuardTheme;
                AddItem(bC);
                bC.Movable = false;
            }
            #endregion

            #region Male/Female
            if (Female = Utility.RandomBool())
            {
                Body = 0x191;
                if (string.IsNullOrEmpty(Name))
                {
                    Name  = NameList.RandomName("female");
                    Title = "the guard";
                }

                FemalePlateChest ar = new FemalePlateChest();
                ar.Resource = GuardTheme;
                AddItem(ar);
                ar.Movable = false;
            }
            else
            {
                Body = 0x190;
                if (string.IsNullOrEmpty(Name))
                {
                    Name  = NameList.RandomName("male");
                    Title = "the guard";
                }

                PlateChest ar = new PlateChest();
                ar.Resource = GuardTheme;
                AddItem(ar);
                ar.Movable = false;
            }
            #endregion

            Utility.AssignRandomHair(this);

            if (Utility.RandomBool())
            {
                Utility.AssignRandomFacialHair(this, HairHue);
            }

            #region Weapon
            BaseWeapon weapon;

            switch (Utility.Random(2))
            {
            case 1: weapon = new Halberd(); break;

            case 2:
                weapon = new Longsword();
                BaseShield shield = new OrderShield();
                shield.Resource = GuardTheme;
                AddItem(shield);
                shield.Movable = false;
                break;

            default:
                weapon = new Halberd(); break;
            }

            weapon.Crafter   = this;
            weapon.Resource  = GuardTheme;
            weapon.Quality   = WeaponQuality.Exceptional;
            weapon.Speed     = 300;
            weapon.MinDamage = 10000;
            weapon.MaxDamage = 10000;
            AddItem(weapon);
            weapon.Movable = false;
            #endregion

            Container pack = new Backpack();
            pack.Movable = false;
            pack.DropItem(new Gold(10, 25));
            AddItem(pack);

            Skills[SkillName.Anatomy].Base      = 120.0;
            Skills[SkillName.Tactics].Base      = 125.0;
            Skills[SkillName.Swords].Base       = 100.0;
            Skills[SkillName.MagicResist].Base  = 120.0;
            Skills[SkillName.DetectHidden].Base = 100.0;

            //if (Utility.RandomDouble() <= 0.1)
            //    new Horse().Rider = this;

            NextCombatTime = DateTime.Now + TimeSpan.FromSeconds(1.10);
            Focus          = target;
        }
Exemplo n.º 13
0
        //AIType, Fight Mode, Range Perception, Fighting Range, Active Speed, Passive Speed
        public VampireLord() : base(AIType.AI_SphereMage, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name = "Vampire Lord";
            Body = 0x0190;
            Hue  = 0x497;

            SetStr(750);
            SetDex(400, 500);
            SetInt(200, 250);

            SetHits(350, 400);
            SetStam(250, 300);
            SetMana(250, 300);

            SetDamage(20, 40);

            SetSkill(SkillName.Poisoning, 90.0, 100.0);
            SetSkill(SkillName.Tactics, 90.0, 98.0);
            SetSkill(SkillName.MagicResist, 75.0, 88.0);
            SetSkill(SkillName.Parry, 85.0, 98.0);
            SetSkill(SkillName.Wrestling, 67.0, 90.0);
            SetSkill(SkillName.DetectHidden, 90.0, 100.0);
            SetSkill(SkillName.Swords, 90.0, 95.0);
            SetSkill(SkillName.Magery, 95.0, 100.0);
            SetSkill(SkillName.EvalInt, 95.0, 100.0);

            Fame  = 3000;
            Karma = -10000;

            VirtualArmor = 40;

            Item temp = new PlateGloves {
                Movable = false, Hue = 0x0492, Name = "Vampire Plate Gauntlets"
            };

            AddItem(temp);
            temp = new PlateArms {
                Hue = 0x0492, Movable = false, Name = "Vampire Plate Arms"
            };
            AddItem(temp);
            temp = new PlateGorget {
                Movable = false, Hue = 0x0492, Name = "Vampire Plate Gorget"
            };
            AddItem(temp);
            temp = new PlateLegs {
                Movable = false, Hue = 0x0492, Name = "Vampire Plate Legs"
            };
            AddItem(temp);
            temp = new PlateChest {
                Movable = false, Hue = 0x0492, Name = "Vampire Plate Chest"
            };
            AddItem(temp);
            temp = new PlateHelm {
                Movable = false, Hue = 0x0492, Name = "Vampire Plate Helm"
            };
            AddItem(temp);
            temp = new BodySash {
                Movable = false, Hue = 0x1, Name = "Vampire Sash"
            };
            AddItem(temp);
            temp = new Cloak {
                Movable = false, Hue = 0x1
            };
            AddItem(temp);

            BaseArmor tarm;

            if (Utility.RandomDouble() < 0.3)
            {
                switch (Utility.Random(6))
                {
                case 0:
                    tarm = new PlateGloves {
                        Hue = 0x492, Name = "Vampire Plate Gauntlets"
                    };
                    break;

                case 1:
                    tarm = new PlateArms {
                        Hue = 0x492, Name = "Vampire Plate Arms"
                    };
                    break;

                case 2:
                    tarm = new PlateChest {
                        Hue = 0x492, Name = "Vampire Plate Chest"
                    };
                    break;

                case 3:
                    tarm = new PlateHelm {
                        Hue = 0x492, Name = "Vampire Plate Helm"
                    };
                    break;

                case 4:
                    tarm = new PlateLegs {
                        Hue = 0x492, Name = "Vampire Plate Legs"
                    };
                    break;

                default:
                    tarm = new PlateGorget {
                        Hue = 0x492, Name = "Vampire Plate Gorget"
                    };
                    break;
                }

                tarm.ProtectionLevel = (ArmorProtectionLevel)Utility.RandomMinMax(0, 5);
                AddItem(tarm);
            }

            BaseSword twep;

            switch (Utility.Random(8))
            {
            case 0:
                twep = new Broadsword();
                break;

            case 1:
                twep = new Cutlass();
                break;

            case 2:
                twep = new Scimitar();
                break;

            case 3:
                twep = new Katana();
                break;

            case 4:
                twep = new Kryss();
                break;

            case 5:
                twep = new Longsword();
                break;

            case 6:
                twep = new ThinLongsword();
                break;

            default:
                twep = new VikingSword();
                break;
            }
            switch (Utility.Random(3))
            {
            case 0:
                twep.DamageLevel = WeaponDamageLevel.Might;
                break;

            case 1:
                twep.DamageLevel = WeaponDamageLevel.Force;
                break;

            case 2:
                twep.DamageLevel = WeaponDamageLevel.Power;
                break;
            }

            AddItem(twep);
        }
Exemplo n.º 14
0
    public TestSerialization() : base()
    {
        Test("That can serialize inventory items safely and correctly", () => {
            Sheet c = new Sheet();

            Assert(c.inventory != null);
            c.inventory.items[0] = new GenericArmour(EquipmentSubtype.ARMOUR_CHAINMAIL);

            c.inventory.items[1] = new GenericWeapon(EquipmentSubtype.SIMPLE_DAGGER);
            Manager.Serialize(c, TestPath);

            Sheet after = Manager.Deserialize <Sheet>(TestPath);
            Assert(after.inventory != null);
            Assert(after.inventory.items != null);
            GenericArmour arm = after.inventory.items[0] as GenericArmour;
            GenericWeapon wep = after.inventory.items[1] as GenericWeapon;
            Assert(arm.Subtype == EquipmentSubtype.ARMOUR_CHAINMAIL);
            Assert(wep.Subtype == EquipmentSubtype.SIMPLE_DAGGER);
        });

        Test("That CanSerializeAFeatureFromAndToSubclass", () => {
            //create a subclass instance of a feature
            PerLevelHitPoints flhp = new PerLevelHitPoints(10, ClassType.FIGHTER);


            string path = Application.persistentDataPath + Path.DirectorySeparatorChar + "test123";

            Manager.Serialize(flhp, path);


            //System.Type t = System.Type.GetType ("AT.Characters.FirstLevelHitPointsWrapper");

            GenericFeature f = Manager.Deserialize <GenericFeature> (path);

            File.Delete(path);


            Sheet c    = new Sheet();
            int before = c.HitPoints;
            f.WhenActivatedOn(c);
            Assert(c.HitPoints != before);


            //create a subclass instance of a feature
            GaugeMod ability = new GaugeMod("dexterity", 10, "bullshit", true);
            Manager.Serialize(ability, TestPath);


            //System.Type t = System.Type.GetType ("AT.Characters.FirstLevelHitPointsWrapper");

            GenericFeature hamburgerFlip = Manager.Deserialize <GenericFeature> (TestPath);

            //		Debug.Log ("hf: " + hamburgerFlip.GetType());

            File.Delete(path);


            GaugeMod ab = (GaugeMod)hamburgerFlip;

            Assert(ab.isBase);


            Sheet cheese = new Sheet();
            int before1  = cheese.Dexterity;

            ab.WhenActivatedOn(cheese);
            //		Debug.Log ("prop aft" + cheese.GaugeByName("dexterity").ModifiedCurrent);
            Assert(cheese.Dexterity != before1);
        });

        Test("that CanSerializeFeatureBundle", () => {
            ClassLevel5e fb = new ClassLevel5e(ClassType.CLERIC, 0);
            fb.features.Add(new PerLevelHitPoints(10, ClassType.FIGHTER));
            fb.features.Add(new PerLevelHitPoints(4, ClassType.CLERIC));
            fb.features.Add(new PerLevelHitPoints(1, ClassType.ROGUE));


            string path = Application.persistentDataPath + Path.DirectorySeparatorChar + "Test";
            Manager.Serialize(fb, path);

            ClassLevel5e unse = Manager.Deserialize <ClassLevel5e> (path);
            File.Delete(path);

            Assert(unse.classType == fb.classType);

            for (int i = 0; i < fb.features.Count; i++)
            {
                PerLevelHitPoints before = (PerLevelHitPoints)fb.features [i];
                PerLevelHitPoints after  = (PerLevelHitPoints)unse.features [i];
                Assert(before.amount == after.amount);
            }
        });

        Test("that CanSerializeWeapon", () => {
            GenericWeapon sword = new Longsword();
            Manager.Serialize(sword, TestPath);


            GenericWeapon after = Manager.Deserialize <GenericWeapon> (TestPath);
            File.Delete(TestPath);


            Assert(after.Dice[0] == sword.Dice[0]);
            Assert(after.DamageType == sword.DamageType);
            Assert(after.Subtype == sword.Subtype);
            Assert(after.Type == sword.Type);
            //after.WhenEquipped (new Sheet ());
        });

        Test("that CanSerializeArmour", () => {
            GenericArmour armour = new PaddedArmour();

            Manager.Serialize(armour, TestPath);


            GenericArmour after = Manager.Deserialize <GenericArmour> (TestPath);
            File.Delete(TestPath);

            Assert(armour.BaseAc == after.BaseAc);
            Assert(armour.Subtype == after.Subtype);
            Assert(armour.Type == after.Type);
        });

        Test("that CanSerializePaperDoll", () => {
            PaperDoll pd = new PaperDoll();

            pd.slots.Add(EquipmentSlotType.BODY, new PaddedArmour());
            pd.slots.Add(EquipmentSlotType.MAIN_HAND, new Longsword());
            pd.slots.Add(EquipmentSlotType.OFF_HAND, new Dagger());

            Manager.Serialize(pd, TestPath);


            PaperDoll after = Manager.Deserialize <PaperDoll> (TestPath);
            File.Delete(TestPath);

            Assert(after.slots.Count == after.slots.Count);
        });

        Test("that CanSerializeGauge", () => {
            Gauge g = new Gauge("hello");
            Manager.Serialize(g, TestPath);

            Gauge after = Manager.Deserialize <Gauge> (TestPath);
            File.Delete(TestPath);


            Assert(after.ModifiedCurrent == g.ModifiedCurrent);
            Assert(after.ModifiedMax == g.ModifiedMax);
            Assert(after.Name == g.Name);
        });

        Test("that CanSerializeRace", () => {
            Race r = new Race(RaceName.TIEFLING);

            Manager.Serialize(r, TestPath);

            Race after = Manager.Deserialize <Race> (TestPath);

            Assert(after.name == r.name);

            Assert(after.speed.ModifiedCurrent == r.speed.ModifiedCurrent);

            int i = 0;

            foreach (GenericFeature f in after.features)
            {
                Assert(f.Name() == r.features [i].Name());
                i++;
            }
        });

        Test("that CanSerializeSheet", () => {
            Sheet c           = new Sheet();
            c.race            = new Race(RaceName.TIEFLING);
            ClassLevel5e lvl1 = new ClassLevel5e(ClassType.FIGHTER, 0);
            lvl1.features.Add(new FighterLevels.ArcheryFightingStyle());
            lvl1.features.Add(new FighterLevels.GreatWeaponFightingStyle());
            lvl1.features.Add(new FighterLevels.DuelingFightingStyle());
            lvl1.features.Add(new FighterLevels.DefenseFightingStyle());
            lvl1.features.Add(new FighterLevels.TwoWeaponFightingStyle());

            lvl1.InitDefaultFeatures();

            c.AddClassLevel(lvl1);

            c.ActivateFeatures();

            Manager.Serialize(c, TestPath);

            //c.DeactivateFeatures ();

            Sheet after = Manager.Deserialize <Sheet> (TestPath);

            after.ActivateFeatures();


            Debug.Log("rior " + c.HitPointsGauge.BaseModifierSum + ") " + c.HitPointsGauge.ToString() + " " + c.ToString());

            Debug.Log("after " + after.HitPointsGauge.BaseModifierSum + ") " + after.HitPointsGauge.ToString() + " " + after.ToString());



            Assert(after.ToString() == c.ToString());
        });
    }