示例#1
0
        public override Weapon DropWeapon()
        {
            Weapon wg = new Mace();

            wg.Create();
            return(wg);
        }
        public void TestEquipToHand_EquippingOneHandedWeaponToAnEmptyHandWhenTheOtherHandHoldsAOneHandedWeapon()
        {
            int expectedItemCountInInventory = 0;

            Dictionary <Dungeons_and_Dragons.Attribute, int> dict = new Dictionary <Dungeons_and_Dragons.Attribute, int>();

            dict.Add(Dungeons_and_Dragons.Attribute.Strength, 12);
            dict.Add(Dungeons_and_Dragons.Attribute.Dexterity, 15);
            dict.Add(Dungeons_and_Dragons.Attribute.Intelligence, 3);
            dict.Add(Dungeons_and_Dragons.Attribute.Wisdom, 18);
            dict.Add(Dungeons_and_Dragons.Attribute.Constitution, 17);
            dict.Add(Dungeons_and_Dragons.Attribute.Charisma, 9);
            int     xp      = 0;
            int     hp      = 3;
            Fighter fighter = new Fighter("Richard", Race.Human, dict, hp, xp);

            Sword sword = new Sword();
            Mace  mace  = new Mace();

            bool valSwordEquip = fighter.EquipToHand(sword, Hand.Right);

            Assert.IsTrue(valSwordEquip, "TEST1: It was expected equipping the sword to the right hand should return true");
            Assert.AreEqual(sword, fighter.equippedInRightHand, "TEST2: It was expected that the sword should be equipped");
            Assert.AreEqual(expectedItemCountInInventory, fighter.inventory.Count,
                            "TEST3: It was expected that the fighter's inventory was empty");

            bool valMaceEquip = fighter.EquipToHand(mace, Hand.Left);

            Assert.IsTrue(valMaceEquip, "TEST4: It was expected equipping the mace to the left hand should return true");
            Assert.AreEqual(mace, fighter.equippedInLeftHand, "TEST5: It was expected that the mace should be equipped in the left hand");
            Assert.AreEqual(sword, fighter.equippedInRightHand, "TEST6: It was expected that the sword should be equipped in the right hand");
            Assert.AreEqual(expectedItemCountInInventory, fighter.inventory.Count,
                            "TEST7: It was expected that the fighter's inventory was empty");
        }
示例#3
0
        /// <inheritdoc />
        public Weapon Convert(ItemDTO value, object state)
        {
            var entity = new Mace();

            this.Merge(entity, value, state);
            return(entity);
        }
示例#4
0
        protected override void OnFixedUpdate(float timeMult)
        {
            base.OnFixedUpdate(timeMult);

            if (frozenTimeLeft > 0)
            {
                return;
            }

            switch (state)
            {
            case StateWalking1: {
                if (stateTime <= 0f)
                {
                    FollowNearestPlayer(StateWalking2, 16);
                }
                else if (!CanMoveToPosition(speedX, 0))
                {
                    IsFacingLeft ^= true;
                    speedX        = -speedX;
                }
                break;
            }

            case StateWalking2: {
                if (stateTime <= 0f)
                {
                    speedX = 0f;

                    PlaySound("AttackStart");

                    state = StateTransition;
                    SetAnimation(AnimState.Idle);
                    SetTransition((AnimState)1073741824, false, delegate {
                            currentMace = new Mace();
                            currentMace.OnActivated(new ActorActivationDetails {
                                Api = api,
                                Pos = Transform.Pos
                            });
                            api.AddActor(currentMace);

                            SetTransition((AnimState)1073741825, false, delegate {
                                state     = StateAttacking;
                                stateTime = 10f;
                            });
                        });
                }
                else if (!CanMoveToPosition(speedX, 0))
                {
                    speedX = 0;

                    SetAnimation(AnimState.Idle);
                }
                break;
            }
            }

            stateTime -= timeMult;
        }
示例#5
0
 public override void OnDestroyed()
 {
     if (currentMace != null)
     {
         levelHandler.RemoveActor(currentMace);
         currentMace = null;
     }
 }
示例#6
0
 protected override void OnDeactivated(ShutdownContext context)
 {
     if (currentMace != null)
     {
         api.RemoveActor(currentMace);
         currentMace = null;
     }
 }
        public override void InitOutfit()
        {
            Name             = "Luthor Yorkshire";
            Body             = 400;
            Female           = false;
            Race             = Race.Human;
            Hue              = 33815;
            HairItemID       = 8261;
            HairHue          = 1149;
            FacialHairItemID = 8257;
            FacialHairHue    = 1149;

            SetStr(95);
            SetDex(72);
            SetInt(31);

            SetSkill(SkillName.ArmsLore, 64.0, 100.0);
            SetSkill(SkillName.Fencing, 45.0, 68.0);
            SetSkill(SkillName.Macing, 87.2, 95.3);
            SetSkill(SkillName.Parry, 61.0, 93.0);
            SetSkill(SkillName.Swords, 45.0, 68.0);
            SetSkill(SkillName.Tactics, 60.0, 83.0);

            PackGold(48, 96);

            AddItem(new HeavyBoots());

            LeatherArms arms = new LeatherArms();

            arms.Movable = true;
            AddItem(arms);

            RingmailChest chest = new RingmailChest();

            chest.Movable = true;
            AddItem(chest);

            LeatherGorget gorget = new LeatherGorget();

            gorget.Movable = true;
            AddItem(gorget);

            LeatherLegs legs = new LeatherLegs();

            legs.Movable = true;
            AddItem(legs);

            Mace weapon = new Mace();

            weapon.Movable = true;
            weapon.Quality = WeaponQuality.Exceptional;
            AddItem(weapon);
        }
示例#8
0
        public FireGolem() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name = "a fire golem";
            Body = 196;
            Hue  = 1161;

            // +100 to Stats
            SetStr(351, 450);               // Golem 251~350
            SetDex(176, 200);               // Golem 76~100
            SetInt(201, 250);               // Golem 101~150

            // +200HP
            SetHits(351, 510);               // Golem 151~210

            // +2 Damage
            SetDamage(15, 26);                         // Golem 13~24

            SetDamageType(ResistanceType.Physical, 0); // Golem 100
            SetDamageType(ResistanceType.Fire, 100);   // Golem 100

            // +10 Min Resists, immune to fire, weak vs cold.
            SetResistance(ResistanceType.Physical, 45, 55);        // Golem 35~55
            SetResistance(ResistanceType.Fire, 100);               // Golem 50~60
            SetResistance(ResistanceType.Cold, -50);               // Golem 10~30
            SetResistance(ResistanceType.Poison, 20, 25);          // Golem 10~25
            SetResistance(ResistanceType.Energy, 40);              // Golem 30~40

            // +30 Min to Starting Skills.
            SetSkill(SkillName.MagicResist, 150.1, 190.0);          // Golem 150.1~190.0
            SetSkill(SkillName.Tactics, 90.1, 100.0);               // Golem 60.1~100.0
            SetSkill(SkillName.Wrestling, 90.1, 100.0);             // Golem 60.1~100.0
            SetSkill(SkillName.Macing, 90.1, 100.0);

            Fame  = 10;
            Karma = 10;

            ControlSlots = 3;

            Mace mace = new Mace();

            mace.WeaponAttributes.HitFireArea = 25;
            mace.WeaponAttributes.HitFireball = 25;
            EquipItem(mace);
            mace.Movable = false;

            MinAuraDelay  = 5;
            MaxAuraDelay  = 15;
            MinAuraDamage = 15;
            MaxAuraDamage = 25;
            AuraRange     = 3;
            AuraType      = ResistanceType.Fire;
        }
示例#9
0
    public Weapons[] InitWeapons()
    {
        Weapons[] wepArr = new Weapons[6];

        wepArr[0] = new Dagger();
        wepArr[1] = new CrossBow();
        wepArr[2] = new Mace();
        wepArr[3] = new MorningStar();
        wepArr[4] = new Longsword();
        wepArr[5] = new BattleAxe();

        return(wepArr);
    }
示例#10
0
文件: Mace.cs 项目: ciarano84/barony
    public override void EquipItem(Unit unit)
    {
        itemModel = GameObject.Instantiate(GameAssets.i.MaceModel, unit.mainHandSlot);
        itemModel.transform.position = unit.mainHandSlot.position;

        Mace weapon = unit.gameObject.AddComponent <Mace>();

        weapon.owner      = unit.gameObject.GetComponent <TacticsMovement>();
        weapon.weaponData = this;

        unit.mainWeapon = weapon;

        //not sure what we're gonna do when they have TWO shortswords.
        Animator animator = weapon.owner.rig.gameObject.GetComponent <Animator>();

        animator.runtimeAnimatorController = GameAssets.i.OneHanded as RuntimeAnimatorController;

        //Will have to have an amendment when we get off hand weapons.
    }
        public void TestEquipToHand_EquippingTwoHandWeaponWhenBothHandsAreHoldingWeapons()
        {
            int expectedItemCountInInventory             = 0;
            int expectedItemCountInInventoryAfterTheSwap = 2;

            Dictionary <Dungeons_and_Dragons.Attribute, int> dict = new Dictionary <Dungeons_and_Dragons.Attribute, int>();

            dict.Add(Dungeons_and_Dragons.Attribute.Strength, 12);
            dict.Add(Dungeons_and_Dragons.Attribute.Dexterity, 15);
            dict.Add(Dungeons_and_Dragons.Attribute.Intelligence, 3);
            dict.Add(Dungeons_and_Dragons.Attribute.Wisdom, 18);
            dict.Add(Dungeons_and_Dragons.Attribute.Constitution, 17);
            dict.Add(Dungeons_and_Dragons.Attribute.Charisma, 9);
            int     xp      = 0;
            int     hp      = 3;
            Fighter fighter = new Fighter("Richard", Race.Human, dict, hp, xp);

            Mace           mace           = new Mace();
            Spear          spear          = new Spear();
            TwoHandedSword twoHandedSword = new TwoHandedSword();

            bool valMaceEquip  = fighter.EquipToHand(mace, Hand.Right);
            bool valSpearEquip = fighter.EquipToHand(spear, Hand.Left);

            Assert.IsTrue(valMaceEquip, "TEST1: It was expected equipping the mace to the right hand should return true");
            Assert.AreEqual(mace, fighter.equippedInRightHand, "TEST2: It was expected that the mace should be equipped to the right hand");
            Assert.IsTrue(valSpearEquip, "TEST3: It was expected equipping the spear to the left hand should return true");
            Assert.AreEqual(spear, fighter.equippedInLeftHand, "TEST4: It was expected that the spear should be equipped to the left hand");
            Assert.AreEqual(expectedItemCountInInventory, fighter.inventory.Count,
                            "TEST5: It was expected that the fighter's inventory was empty");

            bool valSwordEquip = fighter.EquipToHand(twoHandedSword, Hand.Left);

            Assert.IsTrue(valSwordEquip, "TEST5: It was expected equipping the two hand sword should return true");
            Assert.AreEqual(twoHandedSword, fighter.equippedInRightHand, "TEST6: It was expected that the two handed sword should be equipped in the right hand");
            Assert.AreEqual(twoHandedSword, fighter.equippedInLeftHand, "TEST7: It was expected that the two handed sword should be equipped in the left hand");
            Assert.AreEqual(expectedItemCountInInventoryAfterTheSwap, fighter.inventory.Count,
                            "TEST8: It was expected that the fighter's inventory should contain 2 items");
            Assert.AreEqual(mace, fighter.inventory[0], "TEST9: It was expected that the mace should be in the inventory");
            Assert.AreEqual(spear, fighter.inventory[1], "TEST10: It was expected that the spear should be in the inventory");
        }
示例#12
0
        public override void OnHandleCollision(ActorBase other)
        {
            base.OnHandleCollision(other);

            if (state == StateAttacking && stateTime <= 0f)
            {
                switch (other)
                {
                case Mace mace: {
                    currentMace.DecreaseHealth(int.MaxValue);
                    currentMace = null;

                    PlaySound("AttackEnd");

                    SetTransition((AnimState)1073741826, false, delegate {
                            FollowNearestPlayer(StateWalking1, MathF.Rnd.NextFloat(80, 160));
                        });
                    break;
                }
                }
            }
        }
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Dagger", typeof(Dagger), Dagger.GetSBPurchaseValue(), 25, 0xF52, 0));
                Add(new GenericBuyInfo("Kryss", typeof(Kryss), Kryss.GetSBPurchaseValue(), 25, 0x1401, 0));
                Add(new GenericBuyInfo("War Fork", typeof(WarFork), WarFork.GetSBPurchaseValue(), 25, 0x1405, 0));
                Add(new GenericBuyInfo("Short Spear", typeof(ShortSpear), ShortSpear.GetSBPurchaseValue(), 25, 0x1403, 0));
                Add(new GenericBuyInfo("Pitchfork", typeof(Pitchfork), Pitchfork.GetSBPurchaseValue(), 25, 0xE87, 0));
                Add(new GenericBuyInfo("Spear", typeof(Spear), Spear.GetSBPurchaseValue(), 25, 0xF62, 0));

                Add(new GenericBuyInfo("Hammer Pick", typeof(HammerPick), HammerPick.GetSBPurchaseValue(), 25, 0x143D, 0));
                Add(new GenericBuyInfo("War Axe", typeof(WarAxe), WarAxe.GetSBPurchaseValue(), 25, 0x13B0, 0));
                Add(new GenericBuyInfo("Mace", typeof(Mace), Mace.GetSBPurchaseValue(), 25, 0xF5C, 0));
                Add(new GenericBuyInfo("Maul", typeof(Maul), Maul.GetSBPurchaseValue(), 25, 0x143B, 0));
                Add(new GenericBuyInfo("WarHammer", typeof(WarHammer), WarHammer.GetSBPurchaseValue(), 25, 0x1439, 0));
                Add(new GenericBuyInfo("War Mace", typeof(WarMace), WarMace.GetSBPurchaseValue(), 25, 0x1407, 0));

                Add(new GenericBuyInfo("Butcher Knife", typeof(ButcherKnife), ButcherKnife.GetSBPurchaseValue(), 25, 0x13F6, 0));
                Add(new GenericBuyInfo("Skinning Knife", typeof(SkinningKnife), SkinningKnife.GetSBPurchaseValue(), 25, 0xEC4, 0));
                Add(new GenericBuyInfo("Cleaver", typeof(Cleaver), Cleaver.GetSBPurchaseValue(), 25, 0xEC3, 0));
                Add(new GenericBuyInfo("Cutlass", typeof(Cutlass), Cutlass.GetSBPurchaseValue(), 25, 0x1441, 0));
                Add(new GenericBuyInfo("Katana", typeof(Katana), Katana.GetSBPurchaseValue(), 25, 0x13FF, 0));
                Add(new GenericBuyInfo("Scimitar", typeof(Scimitar), Scimitar.GetSBPurchaseValue(), 25, 0x13B6, 0));
                Add(new GenericBuyInfo("Broadsword", typeof(Broadsword), Broadsword.GetSBPurchaseValue(), 25, 0xF5E, 0));
                Add(new GenericBuyInfo("Longsword", typeof(Longsword), Longsword.GetSBPurchaseValue(), 25, 0xF61, 0));
                Add(new GenericBuyInfo("Viking Sword", typeof(VikingSword), VikingSword.GetSBPurchaseValue(), 25, 0x13B9, 0));
                Add(new GenericBuyInfo("Axe", typeof(Axe), Axe.GetSBPurchaseValue(), 25, 0xF49, 0));
                Add(new GenericBuyInfo("Battle Axe", typeof(BattleAxe), BattleAxe.GetSBPurchaseValue(), 25, 0xF47, 0));
                Add(new GenericBuyInfo("Double Axe", typeof(DoubleAxe), DoubleAxe.GetSBPurchaseValue(), 25, 0xF4B, 0));
                Add(new GenericBuyInfo("Executioner's Axe", typeof(ExecutionersAxe), ExecutionersAxe.GetSBPurchaseValue(), 25, 0xF45, 0));
                Add(new GenericBuyInfo("Large Battle Axe", typeof(LargeBattleAxe), LargeBattleAxe.GetSBPurchaseValue(), 25, 0x13FB, 0));
                Add(new GenericBuyInfo("Two-Handed Axe", typeof(TwoHandedAxe), TwoHandedAxe.GetSBPurchaseValue(), 25, 0x1443, 0));
                Add(new GenericBuyInfo("Bardiche", typeof(Bardiche), Bardiche.GetSBPurchaseValue(), 25, 0xF4D, 0));
                Add(new GenericBuyInfo("Halberd", typeof(Halberd), Halberd.GetSBPurchaseValue(), 25, 0x143E, 0));

                Add(new GenericBuyInfo("Bow", typeof(Bow), Bow.GetSBPurchaseValue(), 25, 0x13B2, 0));
                Add(new GenericBuyInfo("Crossbow", typeof(Crossbow), Crossbow.GetSBPurchaseValue(), 25, 0xF50, 0));
                Add(new GenericBuyInfo("Heavy Crossbow", typeof(HeavyCrossbow), HeavyCrossbow.GetSBPurchaseValue(), 25, 0x13FD, 0));
            }
            public InternalSellInfo()
            {
                Add(typeof(Dagger), Dagger.GetSBSellValue());
                Add(typeof(Kryss), Kryss.GetSBSellValue());
                Add(typeof(WarFork), WarFork.GetSBSellValue());
                Add(typeof(ShortSpear), ShortSpear.GetSBSellValue());
                Add(typeof(Pitchfork), Pitchfork.GetSBSellValue());
                Add(typeof(Spear), Spear.GetSBSellValue());

                Add(typeof(HammerPick), HammerPick.GetSBSellValue());
                Add(typeof(WarAxe), WarAxe.GetSBSellValue());
                Add(typeof(Mace), Mace.GetSBSellValue());
                Add(typeof(Maul), Maul.GetSBSellValue());
                Add(typeof(WarHammer), WarHammer.GetSBSellValue());
                Add(typeof(WarMace), WarMace.GetSBSellValue());

                Add(typeof(ButcherKnife), ButcherKnife.GetSBSellValue());
                Add(typeof(SkinningKnife), SkinningKnife.GetSBSellValue());
                Add(typeof(Cleaver), Cleaver.GetSBSellValue());
                Add(typeof(Cutlass), Cutlass.GetSBSellValue());
                Add(typeof(Katana), Katana.GetSBSellValue());
                Add(typeof(Scimitar), Scimitar.GetSBSellValue());
                Add(typeof(Broadsword), Broadsword.GetSBSellValue());
                Add(typeof(Longsword), Longsword.GetSBSellValue());
                Add(typeof(VikingSword), VikingSword.GetSBSellValue());
                Add(typeof(Axe), Axe.GetSBSellValue());
                Add(typeof(BattleAxe), BattleAxe.GetSBSellValue());
                Add(typeof(DoubleAxe), DoubleAxe.GetSBSellValue());
                Add(typeof(ExecutionersAxe), ExecutionersAxe.GetSBSellValue());
                Add(typeof(LargeBattleAxe), LargeBattleAxe.GetSBSellValue());
                Add(typeof(TwoHandedAxe), TwoHandedAxe.GetSBSellValue());
                Add(typeof(Bardiche), Bardiche.GetSBSellValue());
                Add(typeof(Halberd), Halberd.GetSBSellValue());

                Add(typeof(Bow), Bow.GetSBSellValue());
                Add(typeof(Crossbow), Crossbow.GetSBSellValue());
                Add(typeof(HeavyCrossbow), HeavyCrossbow.GetSBSellValue());
            }
示例#15
0
        public void TestEquipToHand_WhereWeaponIsUseableByACleric()
        {
            Dictionary <Dungeons_and_Dragons.Attribute, int> dict = new Dictionary <Dungeons_and_Dragons.Attribute, int>();

            dict.Add(Dungeons_and_Dragons.Attribute.Strength, 12);
            dict.Add(Dungeons_and_Dragons.Attribute.Dexterity, 15);
            dict.Add(Dungeons_and_Dragons.Attribute.Intelligence, 3);
            dict.Add(Dungeons_and_Dragons.Attribute.Wisdom, 12);
            dict.Add(Dungeons_and_Dragons.Attribute.Constitution, 17);
            dict.Add(Dungeons_and_Dragons.Attribute.Charisma, 9);
            int    xp     = 0;
            int    hp     = 1;
            Cleric cleric = new Cleric("Fryer Ben", Race.Halfling, dict, hp, xp);

            Mace mace = new Mace();

            Assert.IsNull(cleric.equippedInRightHand, "TEST1: It was expected that nothing should be equipped to the Cleric's right hand");

            bool val = cleric.EquipToHand(mace, Hand.Right);

            Assert.IsTrue(val, "TEST2: It was expected equipping the mace to the right hand should return true");
            Assert.AreEqual(mace, cleric.equippedInRightHand, "TEST3: It was expected that the mace should be equipped");
            Assert.IsNull(cleric.equippedInLeftHand, "TEST4: It was expected that the left hand is empty");
        }
示例#16
0
文件: Game.cs 项目: vi24/Lab-2
        public void NewLevel(Random random)
        {
            _level++;
            switch (_level)
            {
            case 1:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                };
                WeaponInRoom = new Sword(this, GetRandomLocation(random));
                break;

            case 2:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random)),
                };
                WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                break;

            case 3:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random)),
                };
                WeaponInRoom = new Bow(this, GetRandomLocation(random));
                break;

            case 4:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                    new Ghost(this, GetRandomLocation(random))
                };
                if (WeaponInRoom.PickedUp)
                {
                    WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                }
                break;

            case 5:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                    new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new RedPotion(this, GetRandomLocation(random));
                break;

            case 6:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random)),
                    new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Mace(this, GetRandomLocation(random));
                break;

            case 7:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                    new Ghost(this, GetRandomLocation(random)),
                    new Ghoul(this, GetRandomLocation(random)),
                };
                if (WeaponInRoom.PickedUp)
                {
                    WeaponInRoom = new Sword(this, GetRandomLocation(random));
                }
                break;

            case 8:
                Console.WriteLine("Finished");
                Application.Exit();
                break;
            }
        }
示例#17
0
 // Implement this method in a buddy class to set properties that are specific to 'Mace' (if any)
 partial void Merge(Mace entity, ItemDTO dto, object state);
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        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);
        }
示例#19
0
        void FillStartInventory()
        {
            Sword SwordWeapon = new Sword
            {
                Skin       = PictureSword,
                PlayerSkin = Player.Skin
            };
            Bow BowWeapon = new Bow
            {
                Skin       = PictureBow,
                PlayerSkin = Player.Skin
            };
            Mace MazeWeapon = new Mace
            {
                Skin       = PictureMace,
                PlayerSkin = Player.Skin
            };

            Potion BluePotion = new Potion(Player, pictureBluePotion);

            BluePotion.Name          = "BluePotion";
            BluePotion.HealingEffect = 5;
            Potion RedPotion = new Potion(Player, pictureRedPotion);

            RedPotion.Name           = "RedPotion";
            RedPotion.HealingEffect  = 3;
            RedPotion.Skin.Location  = new Point(474, 194);
            BluePotion.Skin.Location = new Point(474, 44);

            Player.Inventory.Add(SwordWeapon);
            StuffOnGround.Add(BowWeapon);
            StuffOnGround.Add(MazeWeapon);
            StuffOnGround.Add(BluePotion);
            StuffOnGround.Add(RedPotion);

            Bat Bat = new Bat
            {
                Skin      = PictureBat,
                Health    = 6,
                Damage    = 2,
                HealthMax = 6
            };
            Ghost Ghost = new Ghost
            {
                Skin      = PictureGhost,
                Health    = 8,
                Damage    = 3,
                HealthMax = 8
            };
            Ghoul Ghoul = new Ghoul
            {
                Skin      = PictureGhoul,
                Health    = 10,
                Damage    = 4,
                HealthMax = 10
            };

            AllEnemies.Add(Bat);
            AllEnemies.Add(Ghost);
            AllEnemies.Add(Ghoul);

            FillInventoryBox();
        }
示例#20
0
        private static Item[] Range()
        {
            var items = new List <Item>();

            switch (Dungeon.Depth)
            {
            case 6:
                Item item;
                if (Random.Int(2) == 0)
                {
                    item = new Quarterstaff();
                }
                else
                {
                    item = new Spear();
                }
                items.Add(item.Identify());
                items.Add(new LeatherArmor().Identify());
                items.Add(new SeedPouch());
                items.Add(new Weightstone());
                break;

            case 11:
                Item item1;
                if (Random.Int(2) == 0)
                {
                    item1 = new Sword();
                }
                else
                {
                    item1 = new Mace();
                }
                items.Add(item1.Identify());
                items.Add(new MailArmor().Identify());
                items.Add(new ScrollHolder());
                items.Add(new Weightstone());
                break;

            case 16:
                Item item3;
                if (Random.Int(2) == 0)
                {
                    item3 = new Longsword();
                }
                else
                {
                    item3 = new BattleAxe();
                }
                items.Add(item3.Identify());
                items.Add(new ScaleArmor().Identify());
                items.Add(new WandHolster());
                items.Add(new Weightstone());
                break;

            case 21:
                switch (Random.Int(3))
                {
                case 0:
                    items.Add(new Glaive().Identify());
                    break;

                case 1:
                    items.Add(new WarHammer().Identify());
                    break;

                case 2:
                    items.Add(new PlateArmor().Identify());
                    break;
                }
                items.Add(new Torch());
                items.Add(new Torch());
                break;
            }

            items.Add(new PotionOfHealing());
            for (var i = 0; i < 3; i++)
            {
                items.Add(Generator.Random(Generator.Category.POTION));
            }

            items.Add(new ScrollOfIdentify());
            items.Add(new ScrollOfRemoveCurse());
            items.Add(new ScrollOfMagicMapping());
            items.Add(Generator.Random(Generator.Category.SCROLL));

            items.Add(new OverpricedRation());
            items.Add(new OverpricedRation());

            items.Add(new Ankh());

            var range = items.ToArray();

            Random.Shuffle(range);

            return(range);
        }
            public InternalSellInfo()
            {
                //Tools
                Add(typeof(Tongs), Tongs.GetSBSellValue());
                Add(typeof(SmithHammer), SmithHammer.GetSBSellValue());

                //Armor
                Add(typeof(RingmailHelm), RingmailHelm.GetSBSellValue());
                Add(typeof(RingmailGorget), RingmailGorget.GetSBSellValue());
                Add(typeof(RingmailArms), RingmailArms.GetSBSellValue());
                Add(typeof(RingmailGloves), RingmailGloves.GetSBSellValue());
                Add(typeof(RingmailChest), RingmailChest.GetSBSellValue());
                Add(typeof(RingmailLegs), RingmailLegs.GetSBSellValue());

                Add(typeof(ChainmailCoif), ChainmailCoif.GetSBSellValue());
                Add(typeof(ChainmailGorget), ChainmailGorget.GetSBSellValue());
                Add(typeof(ChainmailArms), ChainmailArms.GetSBSellValue());
                Add(typeof(ChainmailGloves), ChainmailGloves.GetSBSellValue());
                Add(typeof(ChainmailChest), ChainmailChest.GetSBSellValue());
                Add(typeof(ChainmailLegs), ChainmailLegs.GetSBSellValue());

                Add(typeof(PlateHelm), PlateHelm.GetSBSellValue());
                Add(typeof(PlateGorget), PlateGorget.GetSBSellValue());
                Add(typeof(PlateArms), PlateArms.GetSBSellValue());
                Add(typeof(PlateGloves), PlateGloves.GetSBSellValue());
                Add(typeof(PlateChest), PlateChest.GetSBSellValue());
                Add(typeof(FemalePlateChest), FemalePlateChest.GetSBSellValue());
                Add(typeof(PlateLegs), PlateLegs.GetSBSellValue());

                Add(typeof(Bascinet), Bascinet.GetSBSellValue());
                Add(typeof(CloseHelm), CloseHelm.GetSBSellValue());
                Add(typeof(NorseHelm), NorseHelm.GetSBSellValue());

                Add(typeof(Buckler), Buckler.GetSBSellValue());
                Add(typeof(MetalShield), MetalShield.GetSBSellValue());
                Add(typeof(BronzeShield), BronzeShield.GetSBSellValue());
                Add(typeof(MetalKiteShield), MetalKiteShield.GetSBSellValue());
                Add(typeof(HeaterShield), HeaterShield.GetSBSellValue());

                //Weapons
                Add(typeof(Dagger), Dagger.GetSBSellValue());
                Add(typeof(Kryss), Kryss.GetSBSellValue());
                Add(typeof(WarFork), WarFork.GetSBSellValue());
                Add(typeof(ShortSpear), ShortSpear.GetSBSellValue());
                Add(typeof(Pitchfork), Pitchfork.GetSBSellValue());
                Add(typeof(Spear), Spear.GetSBSellValue());

                Add(typeof(HammerPick), HammerPick.GetSBSellValue());
                Add(typeof(WarAxe), WarAxe.GetSBSellValue());
                Add(typeof(Mace), Mace.GetSBSellValue());
                Add(typeof(Maul), Maul.GetSBSellValue());
                Add(typeof(WarHammer), WarHammer.GetSBSellValue());
                Add(typeof(WarMace), WarMace.GetSBSellValue());

                Add(typeof(ButcherKnife), ButcherKnife.GetSBSellValue());
                Add(typeof(SkinningKnife), SkinningKnife.GetSBSellValue());
                Add(typeof(Cleaver), Cleaver.GetSBSellValue());
                Add(typeof(Cutlass), Cutlass.GetSBSellValue());
                Add(typeof(Katana), Katana.GetSBSellValue());
                Add(typeof(Scimitar), Scimitar.GetSBSellValue());
                Add(typeof(Broadsword), Broadsword.GetSBSellValue());
                Add(typeof(Longsword), Longsword.GetSBSellValue());
                Add(typeof(VikingSword), VikingSword.GetSBSellValue());
                Add(typeof(Axe), Axe.GetSBSellValue());
                Add(typeof(BattleAxe), BattleAxe.GetSBSellValue());
                Add(typeof(DoubleAxe), DoubleAxe.GetSBSellValue());
                Add(typeof(ExecutionersAxe), ExecutionersAxe.GetSBSellValue());
                Add(typeof(LargeBattleAxe), LargeBattleAxe.GetSBSellValue());
                Add(typeof(TwoHandedAxe), TwoHandedAxe.GetSBSellValue());
                Add(typeof(Bardiche), Bardiche.GetSBSellValue());
                Add(typeof(Halberd), Halberd.GetSBSellValue());
            }
示例#22
0
        protected override void OnUpdate()
        {
            base.OnUpdate();

            if (frozenTimeLeft > 0)
            {
                return;
            }

            switch (state)
            {
            case StateWalking1: {
                if (stateTime <= 0f)
                {
                    FollowNearestPlayer(StateWalking2, 16);
                }
                else if (!CanMoveToPosition(speedX, 0))
                {
                    IsFacingLeft ^= true;
                    speedX        = -speedX;
                }
                break;
            }

            case StateWalking2: {
                if (stateTime <= 0f)
                {
                    speedX = 0f;

                    PlaySound("AttackStart");

                    state = StateTransition;
                    SetAnimation(AnimState.Idle);
                    SetTransition((AnimState)1073741824, false, delegate {
                            currentMace = new Mace();
                            currentMace.OnAttach(new ActorInstantiationDetails {
                                Api = api,
                                Pos = Transform.Pos
                            });
                            api.AddActor(currentMace);

                            SetTransition((AnimState)1073741825, false, delegate {
                                state     = StateAttacking;
                                stateTime = 10f;
                            });
                        });
                }
                else if (!CanMoveToPosition(speedX, 0))
                {
                    speedX = 0;

                    SetAnimation(AnimState.Idle);
                }
                break;
            }

            case StateAttacking: {
                if (stateTime <= 0f)
                {
                    foreach (ActorBase collision in api.FindCollisionActors(this))
                    {
                        Mace mace = collision as Mace;
                        if (mace != null && mace == currentMace)
                        {
                            currentMace.DecreaseHealth(int.MaxValue);
                            currentMace = null;

                            PlaySound("AttackEnd");

                            SetTransition((AnimState)1073741826, false, delegate {
                                    FollowNearestPlayer(StateWalking1, MathF.Rnd.NextFloat(80, 160));
                                });
                        }
                    }
                }

                break;
            }
            }

            stateTime -= Time.TimeMult;
        }
示例#23
0
文件: Game.cs 项目: CamoIV/HF_Csharp
        public void NewLevel(Random random)
        {
            level++;
            switch (level)
            {
            case 1:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Sword(this, GetRandomLocation(random));
                break;

            case 2:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random))
                };
                WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                break;

            case 3:
                Enemies = new List <Enemy>()
                {
                    new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Bow(this, GetRandomLocation(random));
                break;

            case 4:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                    new Ghost(this, GetRandomLocation(random))
                };
                if (WeaponInRoom == Bow)
                {
                    WeaponInRoom = new BluePotion(this, GetRandomLocation(random));
                }
                else
                {
                    WeaponInRoom = new Bow(this, GetRandomLocation(random));
                }
                break;

            case 5:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                    new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new RedPotion(this, GetRandomLocation(random));
                break;

            case 6:
                Enemies = new List <Enemy>()
                {
                    new Ghost(this, GetRandomLocation(random)),
                    new Ghoul(this, GetRandomLocation(random))
                };
                WeaponInRoom = new Mace(this, GetRandomLocation(random));
                break;

            case 7:
                Enemies = new List <Enemy>()
                {
                    new Bat(this, GetRandomLocation(random)),
                    new Ghost(this, GetRandomLocation(random)),
                    new Ghoul(this, GetRandomLocation(random))
                };
                if (WeaponInRoom == Mace)
                {
                    WeaponInRoom = new RedPotion(this, GetRandomLocation(random));
                }
                else
                {
                    WeaponInRoom = new Mace(this, GetRandomLocation(random));
                }
                break;

            default:
                // end the game with Application.exit()
                break;
            }
        }
示例#24
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 = 0x482;             shieldType = 0x1B74;    helmType = 0x1412;              cloakColor = 0x542;             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 = 0x1B76;    helmType = 0x140E;              cloakColor = 0x9C4;             weapon = new DiamondMace();
            }
            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 = 0;                 helmType = 0x2645;              cloakColor = 0x973;             weapon = new OrnateAxe();
            }
            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);

            AddItem(new PlateChest());
            if (World == "the Serpent Island")
            {
                AddItem(new RingmailArms());
            }
            else
            {
                AddItem(new PlateArms());
            }                                                                                                                       // FOR GARGOYLES
            AddItem(new PlateLegs());
            AddItem(new PlateGorget());
            AddItem(new PlateGloves());
            AddItem(new Boots( ));

            if (helmType > 0)
            {
                PlateHelm helm = new PlateHelm();
                helm.ItemID = helmType;
                helm.Name   = "helm";
                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);
        }
示例#25
0
 IEnumerator PlayerWait(Mace mace)
 {
     yield return null;
     playerJoint.connectedBody = PlayerController.instance.GetComponent<Rigidbody2D>();
     mace.chainTransforms[3] = PlayerController.instance.transform;
 }
示例#26
0
        private MeleeWeapon ChangeWeapon(MeleeWeapon w)
        {
            MeleeWeapon n = null;

            if (w is Knuckles)
            {
                n = new Dagger();
            }
            else if (w is Dagger)
            {
                n = new Knuckles();
            }
            else if (w is Spear)
            {
                n = new Quarterstaff();
            }
            else if (w is Quarterstaff)
            {
                n = new Spear();
            }
            else if (w is Sword)
            {
                n = new Mace();
            }
            else if (w is Mace)
            {
                n = new Sword();
            }
            else if (w is Longsword)
            {
                n = new BattleAxe();
            }
            else if (w is BattleAxe)
            {
                n = new Longsword();
            }
            else if (w is Glaive)
            {
                n = new WarHammer();
            }
            else if (w is WarHammer)
            {
                n = new Glaive();
            }

            if (n == null)
            {
                return(null);
            }

            var level = w.level;

            if (level > 0)
            {
                n.Upgrade(level);
            }
            else if (level < 0)
            {
                n.Degrade(-level);
            }

            if (w.IsEnchanted)
            {
                n.Enchant(Weapon.Enchantment.Random());
            }

            n.levelKnown  = w.levelKnown;
            n.cursedKnown = w.cursedKnown;
            n.cursed      = w.cursed;

            Journal.Remove(Journal.Feature.WELL_OF_TRANSMUTATION);

            return(n);
        }
示例#27
0
        static void PlayerChooseLoadout()
        {
            Render  code  = new Render();
            Program code1 = new Program();

            code.RenderPlayerChoosing(1);
            string info2 = Console.ReadLine();
            int    playerInput;

            try
            {
                playerInput = Int32.Parse(info2);
            }
            catch
            {
                Console.WriteLine("Creation Error... Shutting...Down....");
                PlayerChooseLoadout();
                return;
            }
            switch (playerInput)
            {
            case 1:
                player1.classType = "Warrior";
                Console.WriteLine("Warrior it is...");
                break;

            case 2:
                player1.classType = "Mage";
                Console.WriteLine("Mage it is...");
                break;

            case 3:
                player1.classType = "Rogue";
                Console.WriteLine("Rogue it is...");
                break;

            default:
                Console.WriteLine("Creation Error... Shutting...Down....");
                PlayerChooseLoadout();
                return;
            }

            code.RenderPlayerChoosing(2);
            string info = Console.ReadLine();

            try
            {
                playerInput = Int32.Parse(info);
            }
            catch
            {
                Console.WriteLine("Creation Error... Shutting...Down....");
                PlayerChooseLoadout();
                return;
            }

            int         weaponLevel = GetRandom(1, 5);
            ItemFactory code3       = new ItemFactory();

            switch (playerInput)
            {
            case 1:
                Broadsword PlayerWeapon = new Broadsword("", weaponLevel);
                player1.EntityWeapon = PlayerWeapon;
                Console.WriteLine("Broadsword it is...");
                break;

            case 2:
                Mace PlayerWeapon2 = new Mace("", weaponLevel);
                player1.EntityWeapon = PlayerWeapon2;
                Console.WriteLine("Mace it is...");
                break;

            case 3:
                Daggers PlayerWeapon3 = new Daggers("", weaponLevel);
                player1.EntityWeapon = PlayerWeapon3;
                Console.WriteLine("Twin Daggers it is...");
                break;

            case 4:
                Axe PlayerWeapon4 = new Axe("", weaponLevel);
                player1.EntityWeapon = PlayerWeapon4;
                Console.WriteLine("War Axe it is...");
                break;

            case 5:
                Weapon PlayerWeapon5 = code3.CreateRandomWeapon(weaponLevel);
                player1.EntityWeapon = PlayerWeapon5;
                Console.WriteLine(player1.EntityWeapon.name + " it is...");
                break;

            default:
                Console.WriteLine("Creation Error... Shutting...Down....");
                PlayerChooseLoadout();
                return;
            }

            code.RenderPlayerChoosing(3);
            string info1 = Console.ReadLine();

            try
            {
                playerInput = Int32.Parse(info1);
            }
            catch
            {
                Console.WriteLine("Creation Error... Restarting...");
                PlayerChooseLoadout();
                return;
            }
            int armorLevel = GetRandom(1, 5);

            switch (playerInput)
            {
            case 1:
                Chainmail PlayerArmor = new Chainmail("", armorLevel);
                player1.EntityArmor = PlayerArmor;
                Console.WriteLine("Chainmail it is...");
                break;

            case 2:
                Leather PlayerArmor2 = new Leather("", armorLevel);
                player1.EntityArmor = PlayerArmor2;
                Console.WriteLine("Thick Leather it is...");
                break;

            case 3:
                Cloth PlayerArmor3 = new Cloth("", armorLevel);
                player1.EntityArmor = PlayerArmor3;
                Console.WriteLine("Sleek Silken Thinking Cloth... is that even armor?");
                break;

            case 4:
                Plate PlayerArmor4 = new Plate("", armorLevel);
                player1.EntityArmor = PlayerArmor4;
                Console.WriteLine("Plate it is...");
                break;

            case 5:
                Armor PlayerArmor5 = code3.CreateRandomArmor(armorLevel);
                player1.EntityArmor = PlayerArmor5;
                Console.WriteLine(player1.EntityArmor.name + " it is...");
                break;

            default:
                Console.WriteLine("Creation Error... Restarting...");
                PlayerChooseLoadout();
                return;
            }
            code.RenderPlayerChoosing(4);
            string info3 = Console.ReadLine();

            try
            {
                playerInput = Int32.Parse(info3);
            }
            catch
            {
                Console.WriteLine("Creation Error... Restarting...");
                PlayerChooseLoadout();
                return;
            }
            int potionLevel = GetRandom(1, 5);

            switch (playerInput)
            {
            case 1:
                Health_Potion playerPotion = new Health_Potion("Health_Potion", potionLevel);
                player1.entityPotions.Add(playerPotion);
                Console.WriteLine("Health Potion it is...");
                break;

            case 2:
                Fire_Potion playerPotion1 = new Fire_Potion("Fire_Potion", potionLevel);
                player1.entityPotions.Add(playerPotion1);
                Console.WriteLine("Fire Potion it is...");
                break;

            default:
                Console.WriteLine("Creation Error... Restarting...");
                PlayerChooseLoadout();
                return;
            }
            while (player1.entityPotions.Count < 4)
            {
                Potion empty = new Potion("Empty_Potion", player1.entityPotions.Count + 1);
                player1.entityPotions.Add(empty);
            }
            ColorWriter(ConsoleColor.Gray, "ready yourself, Gladiator...\n");
            Thread.Sleep(1000);
            int howManyMonsters = GetRandom(1, 5);

            MonsterIntro(player1, howManyMonsters);
        }
示例#28
0
        public static void Weapon()
        {
            string prefixName;
            int    prefixValue;
            string prefixStat;

            (prefixName, prefixStat, prefixValue) = Prefix.Generate("Weapon");

            string suffixName;
            string suffixStat;
            int    suffixValue;

            (suffixName, suffixStat, suffixValue) = Suffix.Generate("Weapon");


            int _weaponType = random.Next(1, 27); //26 weapons

            switch (_weaponType)
            {
            case 1:
                Axe axe = new Axe(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                // Console.WriteLine("prefixName: " + prefixName + ", prefixStat: " + prefixStat + ", prefixValue: " + prefixValue + ", suffixName: " + suffixName + ", suffixStat: " + suffixStat + ", suffixVallue: " + suffixValue);
                axe.WeaponAddToInventory();
                break;

            case 2:
                BastardSword bastardSword = new BastardSword(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                bastardSword.WeaponAddToInventory();
                break;

            case 3:
                BattleAxe battleAxe = new BattleAxe(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                battleAxe.WeaponAddToInventory();
                break;

            case 4:
                Blade blade = new Blade(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                blade.WeaponAddToInventory();
                break;

            case 5:
                BroadAxe broadAxe = new BroadAxe(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                broadAxe.WeaponAddToInventory();
                break;

            case 6:
                BroadSword broadSword = new BroadSword(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                broadSword.WeaponAddToInventory();
                break;

            case 7:
                Claymore claymore = new Claymore(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                claymore.WeaponAddToInventory();
                break;

            case 8:
                Club club = new Club(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                club.WeaponAddToInventory();
                break;

            case 9:
                Dagger dagger = new Dagger(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                dagger.WeaponAddToInventory();
                break;

            case 10:
                Falchion falchion = new Falchion(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                falchion.WeaponAddToInventory();
                break;

            case 11:
                Flail flail = new Flail(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                flail.WeaponAddToInventory();
                break;

            case 12:
                GreatAxe greatAxe = new GreatAxe(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                greatAxe.WeaponAddToInventory();
                break;

            case 13:
                GreatSword greatSword = new GreatSword(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                greatSword.WeaponAddToInventory();
                break;

            case 14:
                LargeAxe largeAxe = new LargeAxe(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                largeAxe.WeaponAddToInventory();
                break;

            case 15:
                LongSword longSword = new LongSword(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                longSword.WeaponAddToInventory();
                break;

            case 16:
                Mace mace = new Mace(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                mace.WeaponAddToInventory();
                break;

            case 17:
                Maul maul = new Maul(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                maul.WeaponAddToInventory();
                break;

            case 19:
                MorningStar morningStar = new MorningStar(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                morningStar.WeaponAddToInventory();
                break;

            case 20:
                Sabre sabre = new Sabre(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                sabre.WeaponAddToInventory();
                break;

            case 21:
                Scimitar scimitar = new Scimitar(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                scimitar.WeaponAddToInventory();
                break;

            case 22:
                ShortSword shortSword = new ShortSword(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                shortSword.WeaponAddToInventory();
                break;

            case 23:
                SmallAxe smallAxe = new SmallAxe(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                smallAxe.WeaponAddToInventory();
                break;

            case 24:
                SpikedClub spikedClub = new SpikedClub(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                spikedClub.WeaponAddToInventory();
                break;

            case 25:
                TwoHandedSword twoHandedSword = new TwoHandedSword(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                twoHandedSword.WeaponAddToInventory();
                break;

            case 26:
                WarHammer warHammer = new WarHammer(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue);
                warHammer.WeaponAddToInventory();
                break;
            }
        }
示例#29
0
        public Item GetItem(int id)
        {
            Item nextItem;

            switch (id)
            {
            case 100:
                nextItem = new Mace();
                return(nextItem);

            case 101:
                nextItem = new Dagger();
                return(nextItem);

            case 102:
                nextItem = new Spear();
                return(nextItem);

            case 103:
                nextItem = new Longsword();
                return(nextItem);

            case 150:
                nextItem = new LeatherA();
                return(nextItem);

            case 151:
                nextItem = new ChainMail();
                return(nextItem);

            case 152:
                nextItem = new ScaleMail();
                return(nextItem);

            case 153:
                nextItem = new BandedMail();
                return(nextItem);

            case 154:
                nextItem = new PlateMail();
                return(nextItem);

            case 200:
                nextItem = new Health_Potion();
                return(nextItem);

            case 201:
                nextItem = new STR_Potion();
                return(nextItem);

            case 202:
                nextItem = new DEF_Potion();
                return(nextItem);

            case 250:
                nextItem = new Food();
                return(nextItem);

            case 251:
                nextItem = new Scroll_Ident();
                return(nextItem);

            case 252:
                nextItem = new Diamond();
                return(nextItem);

            default:
                nextItem = new Mace();
                return(nextItem);
            }
        }
示例#30
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);
            }
        }
            public InternalBuyInfo()
            {
                //Tools
                Add(new GenericBuyInfo("Tongs", typeof(Tongs), Tongs.GetSBPurchaseValue(), 50, 0xFBB, 0));
                Add(new GenericBuyInfo("Smith's Hammer", typeof(SmithHammer), SmithHammer.GetSBPurchaseValue(), 50, 0x13E3, 0));

                //Armor
                Add(new GenericBuyInfo("Ringmail Helm", typeof(RingmailHelm), RingmailHelm.GetSBPurchaseValue(), 25, 5131, 0));
                Add(new GenericBuyInfo("Ringmail Gorget", typeof(RingmailGorget), RingmailGorget.GetSBPurchaseValue(), 25, 5078, 1812));
                Add(new GenericBuyInfo("Ringmail Arms", typeof(RingmailArms), RingmailArms.GetSBPurchaseValue(), 25, 0x13EE, 0));
                Add(new GenericBuyInfo("Ringmail Gloves", typeof(RingmailGloves), RingmailGloves.GetSBPurchaseValue(), 25, 0x13eb, 0));
                Add(new GenericBuyInfo("Ringmail Chest", typeof(RingmailChest), RingmailChest.GetSBPurchaseValue(), 25, 0x13ec, 0));
                Add(new GenericBuyInfo("Ringmail Legs", typeof(RingmailLegs), RingmailLegs.GetSBPurchaseValue(), 25, 0x13F0, 0));

                Add(new GenericBuyInfo("Chainmail Coif", typeof(ChainmailCoif), ChainmailCoif.GetSBPurchaseValue(), 25, 0x13BB, 0));
                Add(new GenericBuyInfo("Chainmail Gorget", typeof(ChainmailGorget), ChainmailGorget.GetSBPurchaseValue(), 25, 5063, 2500));
                Add(new GenericBuyInfo("Chainmail Arms", typeof(ChainmailArms), ChainmailArms.GetSBPurchaseValue(), 25, 5103, 2500));
                Add(new GenericBuyInfo("Chainmail Gloves", typeof(ChainmailGloves), ChainmailGloves.GetSBPurchaseValue(), 25, 5106, 2500));
                Add(new GenericBuyInfo("Chainmail Chest", typeof(ChainmailChest), ChainmailChest.GetSBPurchaseValue(), 25, 0x13BF, 0));
                Add(new GenericBuyInfo("Chainmail Legs", typeof(ChainmailLegs), ChainmailLegs.GetSBPurchaseValue(), 25, 0x13BE, 0));

                Add(new GenericBuyInfo("Platemail Helm", typeof(PlateHelm), PlateHelm.GetSBPurchaseValue(), 25, 0x1412, 0));
                Add(new GenericBuyInfo("Platemail Gorget", typeof(PlateGorget), PlateGorget.GetSBPurchaseValue(), 25, 0x1413, 0));
                Add(new GenericBuyInfo("Platemail Arms", typeof(PlateArms), PlateArms.GetSBPurchaseValue(), 25, 0x1410, 0));
                Add(new GenericBuyInfo("Platemail Gloves", typeof(PlateGloves), PlateGloves.GetSBPurchaseValue(), 25, 0x1414, 0));
                Add(new GenericBuyInfo("Platemail PlateChest", typeof(PlateChest), PlateChest.GetSBPurchaseValue(), 25, 0x1415, 0));
                Add(new GenericBuyInfo("Female Plate Chest", typeof(FemalePlateChest), FemalePlateChest.GetSBPurchaseValue(), 25, 7173, 0));
                Add(new GenericBuyInfo("Platemail Legs", typeof(PlateLegs), PlateLegs.GetSBPurchaseValue(), 25, 0x1411, 0));

                Add(new GenericBuyInfo("Bascinet", typeof(Bascinet), Bascinet.GetSBPurchaseValue(), 25, 5132, 0));
                Add(new GenericBuyInfo("Close Helm", typeof(CloseHelm), CloseHelm.GetSBPurchaseValue(), 25, 5129, 0));
                Add(new GenericBuyInfo("Norse Helm", typeof(NorseHelm), NorseHelm.GetSBPurchaseValue(), 25, 5135, 0));

                Add(new GenericBuyInfo("Buckler", typeof(Buckler), Buckler.GetSBPurchaseValue(), 25, 0x1B73, 0));
                Add(new GenericBuyInfo("Metal Shield", typeof(MetalShield), MetalShield.GetSBPurchaseValue(), 25, 0x1B7B, 0));
                Add(new GenericBuyInfo("Bronze Shield", typeof(BronzeShield), BronzeShield.GetSBPurchaseValue(), 25, 0x1B72, 0));
                Add(new GenericBuyInfo("Metal Kite Shield", typeof(MetalKiteShield), MetalKiteShield.GetSBPurchaseValue(), 25, 0x1B74, 0));
                Add(new GenericBuyInfo("Heater Shield", typeof(HeaterShield), HeaterShield.GetSBPurchaseValue(), 25, 0x1B76, 0));

                //Weapons
                Add(new GenericBuyInfo("Dagger", typeof(Dagger), Dagger.GetSBPurchaseValue(), 25, 0xF52, 0));
                Add(new GenericBuyInfo("Kryss", typeof(Kryss), Kryss.GetSBPurchaseValue(), 25, 0x1401, 0));
                Add(new GenericBuyInfo("War Fork", typeof(WarFork), WarFork.GetSBPurchaseValue(), 25, 0x1405, 0));
                Add(new GenericBuyInfo("Short Spear", typeof(ShortSpear), ShortSpear.GetSBPurchaseValue(), 25, 0x1403, 0));
                Add(new GenericBuyInfo("Pitchfork", typeof(Pitchfork), Pitchfork.GetSBPurchaseValue(), 25, 0xE87, 0));
                Add(new GenericBuyInfo("Spear", typeof(Spear), Spear.GetSBPurchaseValue(), 25, 0xF62, 0));

                Add(new GenericBuyInfo("Hammer Pick", typeof(HammerPick), HammerPick.GetSBPurchaseValue(), 25, 0x143D, 0));
                Add(new GenericBuyInfo("War Axe", typeof(WarAxe), WarAxe.GetSBPurchaseValue(), 25, 0x13B0, 0));
                Add(new GenericBuyInfo("Mace", typeof(Mace), Mace.GetSBPurchaseValue(), 25, 0xF5C, 0));
                Add(new GenericBuyInfo("Maul", typeof(Maul), Maul.GetSBPurchaseValue(), 25, 0x143B, 0));
                Add(new GenericBuyInfo("WarHammer", typeof(WarHammer), WarHammer.GetSBPurchaseValue(), 25, 0x1439, 0));
                Add(new GenericBuyInfo("War Mace", typeof(WarMace), WarMace.GetSBPurchaseValue(), 25, 0x1407, 0));

                Add(new GenericBuyInfo("Butcher Knife", typeof(ButcherKnife), ButcherKnife.GetSBPurchaseValue(), 25, 0x13F6, 0));
                Add(new GenericBuyInfo("Skinning Knife", typeof(SkinningKnife), SkinningKnife.GetSBPurchaseValue(), 25, 0xEC4, 0));
                Add(new GenericBuyInfo("Cleaver", typeof(Cleaver), Cleaver.GetSBPurchaseValue(), 25, 0xEC3, 0));
                Add(new GenericBuyInfo("Cutlass", typeof(Cutlass), Cutlass.GetSBPurchaseValue(), 25, 0x1441, 0));
                Add(new GenericBuyInfo("Katana", typeof(Katana), Katana.GetSBPurchaseValue(), 25, 0x13FF, 0));
                Add(new GenericBuyInfo("Scimitar", typeof(Scimitar), Scimitar.GetSBPurchaseValue(), 25, 0x13B6, 0));
                Add(new GenericBuyInfo("Broadsword", typeof(Broadsword), Broadsword.GetSBPurchaseValue(), 25, 0xF5E, 0));
                Add(new GenericBuyInfo("Longsword", typeof(Longsword), Longsword.GetSBPurchaseValue(), 25, 0xF61, 0));
                Add(new GenericBuyInfo("Viking Sword", typeof(VikingSword), VikingSword.GetSBPurchaseValue(), 25, 0x13B9, 0));
                Add(new GenericBuyInfo("Axe", typeof(Axe), Axe.GetSBPurchaseValue(), 25, 0xF49, 0));
                Add(new GenericBuyInfo("Battle Axe", typeof(BattleAxe), BattleAxe.GetSBPurchaseValue(), 25, 0xF47, 0));
                Add(new GenericBuyInfo("Double Axe", typeof(DoubleAxe), DoubleAxe.GetSBPurchaseValue(), 25, 0xF4B, 0));
                Add(new GenericBuyInfo("Executioner's Axe", typeof(ExecutionersAxe), ExecutionersAxe.GetSBPurchaseValue(), 25, 0xF45, 0));
                Add(new GenericBuyInfo("Large Battle Axe", typeof(LargeBattleAxe), LargeBattleAxe.GetSBPurchaseValue(), 25, 0x13FB, 0));
                Add(new GenericBuyInfo("Two-Handed Axe", typeof(TwoHandedAxe), TwoHandedAxe.GetSBPurchaseValue(), 25, 0x1443, 0));
                Add(new GenericBuyInfo("Bardiche", typeof(Bardiche), Bardiche.GetSBPurchaseValue(), 25, 0xF4D, 0));
                Add(new GenericBuyInfo("Halberd", typeof(Halberd), Halberd.GetSBPurchaseValue(), 25, 0x143E, 0));
            }