Example #1
0
 public Hand(bool dominant)
     : base()
 {
     hp     = maxHp = 5;
     armor  = new HandArmor(0, 0);
     weapon = new Blade(0, 0);
 }
Example #2
0
        public void VipersHands_HasExpectedValues()
        {
            // Arrange
            var attributes = new List <ItemStatAttribute>
            {
                new ItemStatAttribute("Power", .3m),
                new ItemStatAttribute("ConditionDamage", .3m),
                new ItemStatAttribute("Precision", .165m),
                new ItemStatAttribute("Expertise", .165m)
            };

            // Act
            var actual = new HandArmor(attributes);

            // Assert
            const int expectedPower           = 40;
            const int expectedConditionDamage = 40;
            const int expectedPrecision       = 22;
            const int expectedExpertise       = 22;

            Assert.AreEqual(expectedPower, actual.Power);
            Assert.AreEqual(expectedConditionDamage, actual.ConditionDamage);
            Assert.AreEqual(expectedPrecision, actual.Precision);
            Assert.AreEqual(expectedExpertise, actual.Expertise);
        }
Example #3
0
        public void BerserkersHands_HasExpectedValues()
        {
            // Arrange
            var attributes = new List <ItemStatAttribute>
            {
                new ItemStatAttribute("Power", .35m),
                new ItemStatAttribute("Precision", .25m),
                new ItemStatAttribute("Ferocity", .25m)
            };

            // Act
            var actual = new HandArmor(attributes);

            // Assert
            const int expectedPower     = 47;
            const int expectedPrecision = 34;
            const int expectedFerocity  = 34;

            Assert.AreEqual(expectedPower, actual.Power);
            Assert.AreEqual(expectedPrecision, actual.Precision);
            Assert.AreEqual(expectedFerocity, actual.Ferocity);
        }
Example #4
0
    void CreateNewItem(ItemCreator creator)
    {
        Item newItem = null;

        if(index1==0){
            if(index2==0){ //One Handed Melee
                OneHandedMelee ohm = new OneHandedMelee();
                newItem = ohm as Item;
            }
            else if(index2==1){ //Two Handed Melee
                TwoHandedMelee thm = new TwoHandedMelee();
                newItem = thm as Item;
            }
            else if(index2==2){ //Bow
                Bow b = new Bow();
                newItem = b as Item;
            }
            else if(index2==3){ //Staff
                Staff s = new Staff();
                newItem = s as Item;
            }
            else if(index2==4){ //Shield
                Shield s = new Shield();
                newItem = s as Item;
            }
        }
        else if(index1==1){
            if(index2==0){ //Head
                HeadArmor ha = new HeadArmor();
                newItem = ha as Item;
            }
            else if(index2==1){ //Body
                BodyArmor ba = new BodyArmor();
                newItem = ba as Item;
            }
            else if(index2==2){ //Hand
                HandArmor ha = new HandArmor();
                newItem = ha as Item;
            }
            else if(index2==3){ //Leg
                LegArmor la = new LegArmor();
                newItem = la as Item;
            }
        }
        else if(index1==2){

        }

        newItem.ID = creator.itemID;

        creator._Item = newItem;
        creator.Save();

        creator.AddSpriteManager(sm);

        creator.isEditing = true;
        creator.isCreating = false;
    }