Ejemplo n.º 1
0
 private Item getDrop()
 {
     Classes.Items.Type itemType = (Classes.Items.Type)((Level % 12) / 2 + (Level % 12) % 2);
     int grade = Level / 12;
     Item itemToDrop = null;
     switch (rGen.Next(1,5))
     {
         case 1:
             itemToDrop = new Consumable(grade, itemType, "A "+itemType+"+"+grade+" health potion! Enjoy it!");;
             break;
         case 2:
             itemToDrop = new Armor(itemType, grade, "Some "+itemType+"+"+grade+" armor! Enjoy it!");;
             break;
         case 3:
             WeaponType wepType = (Classes.Items.WeaponType)rGen.Next(1,4);
             itemToDrop = new Weapon(itemType, wepType, grade, "A "+itemType+"+"+grade+" " +wepType+"! Enjoy it!");;
             break;
         case 4:
             itemToDrop = new Consumable(grade, itemType, "A "+itemType+"+"+grade+" health potion! Enjoy it!");;
             break;
     }
     return itemToDrop;
 }
Ejemplo n.º 2
0
 public int CompareTo(Weapon item)
 {
     int ret = (Grade - item.Grade) + ((int)ItemType - (int)item.ItemType) + (StrengthModifier - item.StrengthModifier) + (IntelligenceModifier - item.IntelligenceModifier) + (DexterityModifier - item.DexterityModifier);
     return ret;
 }
Ejemplo n.º 3
0
        public void CharacterCreation()
        {
            numUnusedStatPoints = 10;

            Console.Write("Enter your character's name: ");
            Name = Console.ReadLine();

            assignStats();

            if (Strength > Intelligence && Strength > Dexterity)
            {
                EquippedWeapon = new Weapon(Items.Type.Bronze, WeaponType.Sword, 0, "A starting sword.", "Base Sword or normalness.");
            }
            else if (Intelligence > Strength && Intelligence > Dexterity)
            {
                EquippedWeapon = new Weapon(Items.Type.Bronze, WeaponType.Staff, 0, "A starting staff.", "Base Staff or normalness.");
            }
            else if (Dexterity > Intelligence && Dexterity > Strength)
            {
                EquippedWeapon = new Weapon(Items.Type.Bronze, WeaponType.Bow, 0, "A starting bow.", "Base Bow or normalness.");
            }
            else
            {
                EquippedWeapon = new Weapon(Items.Type.Bronze, WeaponType.Sword, 0, "A starting sword.", "Base Sword or normalness.");
            }

            EquippedArmor = new Armor(Items.Type.Bronze, 0, "A starting set of armor.", "Base sword or normalness.");
        }
Ejemplo n.º 4
0
        public void CharacterCreation()
        {
            int numStats = 10;

            Console.Write("Enter your character's name: ");
            Name = Console.ReadLine();

            assignStats(numStats);

            if (Strength > Intelligence && Strength > Dexterity)
            {
                EquippedWeapon = new Weapon(Items.Type.Bronze, WeaponType.Sword, 1);
            }
            else if (Intelligence > Strength && Intelligence > Dexterity)
            {
                EquippedWeapon = new Weapon(Items.Type.Bronze, WeaponType.Staff, 1);
            }
            else if (Dexterity > Intelligence && Dexterity > Strength)
            {
                EquippedWeapon = new Weapon(Items.Type.Bronze, WeaponType.Bow, 1);
            }
            else
            {
                EquippedWeapon = new Weapon(Items.Type.Bronze, WeaponType.Sword, 1);
            }
        }
Ejemplo n.º 5
0
        public void testBalance(int lvl, int statPrio)
        {
            Level = lvl;
            MaxHP = (StartHp) + (int)Math.Round(3.5 * Level);
            HP = MaxHP;
            numUnusedStatPoints = 10 + 2 * (lvl-1);
            if (statPrio == 0)
            {
                Strength = numUnusedStatPoints;
                Intelligence = 0;
                Dexterity = 0;
                numUnusedStatPoints = 0;

                Classes.Items.Type equipType = (Classes.Items.Type)((Level % 12) / 2 + (Level % 12) % 2);
                int grade = Level / 12;
                Weapon wep = new Weapon(equipType, WeaponType.Sword, grade, "uncreative");
                EquipItem(wep);
                Armor arm = new Armor(equipType, grade, "uncreative");
                EquipItem(arm);
            }
            if (statPrio == 1)
            {
                Strength = 0;
                Intelligence = numUnusedStatPoints;
                Dexterity = 0;
                numUnusedStatPoints = 0;

                Classes.Items.Type equipType = (Classes.Items.Type)((Level % 12) / 2 + (Level % 12) % 2);
                int grade = Level / 12;
                Weapon wep = new Weapon(equipType, WeaponType.Staff, grade, "uncreative");
                EquipItem(wep);
                Armor arm = new Armor(equipType, grade, "uncreative");
                EquipItem(arm);
            }
            if (statPrio == 2)
            {
                Strength = 0;
                Intelligence = 0;
                Dexterity = numUnusedStatPoints;
                numUnusedStatPoints = 0;

                Classes.Items.Type equipType = (Classes.Items.Type)((Level % 12) / 2 + (Level % 12) % 2);
                int grade = Level / 12;
                Weapon wep = new Weapon(equipType, WeaponType.Bow, grade, "uncreative");
                EquipItem(wep);
                Armor arm = new Armor(equipType, grade, "uncreative");
                EquipItem(arm);
            }
            if (statPrio == 3)
            {
                Strength = (int) Math.Round(numUnusedStatPoints/2.0);
                Intelligence = (int) Math.Round(numUnusedStatPoints / 4.0);
                Dexterity = (int) Math.Round(numUnusedStatPoints / 4.0);
                numUnusedStatPoints = 0;

                Classes.Items.Type equipType = (Classes.Items.Type)((Level % 12) / 2 + (Level % 12) % 2);
                int grade = Level / 12;
                Weapon wep = new Weapon(equipType, WeaponType.Sword, grade, "uncreative");
                EquipItem(wep);
                Armor arm = new Armor(equipType, grade, "uncreative");
                EquipItem(arm);
            }
            if (statPrio == 4)
            {
                Strength = (int) Math.Round(numUnusedStatPoints / 4.0);
                Intelligence = (int) Math.Round(numUnusedStatPoints / 2.0);
                Dexterity = (int) Math.Round(numUnusedStatPoints / 4.0);
                numUnusedStatPoints = 0;

                Classes.Items.Type equipType = (Classes.Items.Type)((Level % 12) / 2 + (Level % 12) % 2);
                int grade = Level / 12;
                Weapon wep = new Weapon(equipType, WeaponType.Staff, grade, "uncreative");
                EquipItem(wep);
                Armor arm = new Armor(equipType, grade, "uncreative");
                EquipItem(arm);
            }
            if (statPrio == 5)
            {
                Strength = (int) Math.Round(numUnusedStatPoints / 4.0);
                Intelligence = (int) Math.Round(numUnusedStatPoints / 4.0);
                Dexterity = (int) Math.Round(numUnusedStatPoints / 2.0);
                numUnusedStatPoints = 0;

                Classes.Items.Type equipType = (Classes.Items.Type)((Level % 12) / 2 + (Level % 12) % 2);
                int grade = Level / 12;
                Weapon wep = new Weapon(equipType, WeaponType.Bow, grade, "uncreative");
                EquipItem(wep);
                Armor arm = new Armor(equipType, grade, "uncreative");
                EquipItem(arm);
            }
        }
Ejemplo n.º 6
0
        public int CompareTo(Weapon item)
        {
            int ret = (Grade - item.Grade) + ((int)ItemType - (int)item.ItemType) + (StrengthModifier - item.StrengthModifier) + (IntelligenceModifier - item.IntelligenceModifier) + (DexterityModifier - item.DexterityModifier);

            return(ret);
        }