コード例 #1
0
        public void Constructor()
        {
            var paragonBonus = new ParagonBonus("dexterityItem", new ItemValueRange(5), 50);

            Assert.AreEqual(paragonBonus.AttributeName, "dexterityItem");
            Assert.AreEqual(paragonBonus.BonusPerPoint, new ItemValueRange(5));
            Assert.AreEqual(paragonBonus.MaxPoints, 50);
            Assert.AreEqual(paragonBonus.CurrentPoints, 0);
        }
コード例 #2
0
        public void GetBonus()
        {
            var paragonBonus = new ParagonBonus("dexterityItem", new ItemValueRange(5), 50);
            paragonBonus.CurrentPoints = 5;
            var bonus = paragonBonus.GetBonus();

            Assert.AreEqual(bonus.dexterityItem, new ItemValueRange(25));
            Assert.AreEqual(bonus.intelligenceItem, null);
        }
コード例 #3
0
        public void Constructor()
        {
            var paragonBonus = new ParagonBonus("dexterityItem", new ItemValueRange(5), 50);

            Assert.AreEqual(paragonBonus.AttributeName, "dexterityItem");
            Assert.AreEqual(paragonBonus.BonusPerPoint, new ItemValueRange(5));
            Assert.AreEqual(paragonBonus.MaxPoints, 50);
            Assert.AreEqual(paragonBonus.CurrentPoints, 0);
        }
コード例 #4
0
        public void GetBonus()
        {
            var paragonBonus = new ParagonBonus("dexterityItem", new ItemValueRange(5), 50);

            paragonBonus.CurrentPoints = 5;
            var bonus = paragonBonus.GetBonus();

            Assert.AreEqual(bonus.dexterityItem, new ItemValueRange(25));
            Assert.AreEqual(bonus.intelligenceItem, null);
        }
コード例 #5
0
        /// <summary>
        /// Creates a new instance.
        /// </summary>
        /// <param name="heroClass"></param>
        public ParagonBuilder(HeroClass heroClass)
        {
            var mainCharacteristicName = String.Empty;

            switch (heroClass)
            {
            case HeroClass.Barbarian:
            case HeroClass.Crusader:
                mainCharacteristicName = "strengthItem";
                break;

            case HeroClass.DemonHunter:
            case HeroClass.Monk:
                mainCharacteristicName = "dexterityItem";
                break;

            case HeroClass.Necromancer:
            case HeroClass.WitchDoctor:
            case HeroClass.Wizard:
                mainCharacteristicName = "intelligenceItem";
                break;
            }

            CharacteristicsMain        = new ParagonBonus(mainCharacteristicName, new ItemValueRange(5), 0);
            CharacteristicsVitality    = new ParagonBonus("vitalityItem", new ItemValueRange(5), 0);
            CharacteristicsMovement    = new ParagonBonus("movementScalar", new ItemValueRange(0.5), 50);
            CharacteristicsResourceMax = new ParagonBonus("resourceMaxBonus", new ItemValueRange(1), 50);

            AttackPerSecond         = new ParagonBonus("attacksPerSecondPercent", new ItemValueRange(0.2), 50);
            AttackCooldownReduction = new ParagonBonus("powerCooldownReductionPercentAll", new ItemValueRange(0.2), 50);
            AttackCritChance        = new ParagonBonus("critPercentBonusCapped", new ItemValueRange(0.1), 50);
            AttackCritDamage        = new ParagonBonus("critDamagePercent", new ItemValueRange(1), 50);

            DefenseHitpoints = new ParagonBonus("hitpointsPercent", new ItemValueRange(0.5), 50);
            DefenseArmor     = new ParagonBonus(null /* TODO "armorBonusPercent"*/, new ItemValueRange(0.5), 50);
            DefenseResistAll = new ParagonBonus("resistance_All", new ItemValueRange(5), 50);
            DefenseRegen     = new ParagonBonus("hitpointsRegenPerSecond", new ItemValueRange(214.6), 50);

            OtherAreaDamage        = new ParagonBonus("splashDamageEffectPercent", new ItemValueRange(1), 50);
            OtherResourceReduction = new ParagonBonus("resourceCostReductionPercentAll", new ItemValueRange(0.2), 50);
            OtherHitpointsOnHit    = new ParagonBonus("hitpointsOnHit", new ItemValueRange(160.926), 50);
            OtherGold = new ParagonBonus("goldFind", new ItemValueRange(1), 50);
        }
コード例 #6
0
ファイル: ParagonBuilder.cs プロジェクト: djtms/D3-API-by-ZTn
        /// <summary>
        /// Creates a new instance.
        /// </summary>
        /// <param name="heroClass"></param>
        public ParagonBuilder(HeroClass heroClass)
        {
            var mainCharacteristicName = String.Empty;
            switch (heroClass)
            {
                case HeroClass.Barbarian:
                case HeroClass.Crusader:
                    mainCharacteristicName = "strengthItem";
                    break;

                case HeroClass.DemonHunter:
                case HeroClass.Monk:
                    mainCharacteristicName = "dexterityItem";
                    break;

                case HeroClass.WitchDoctor:
                case HeroClass.Wizard:
                    mainCharacteristicName = "intelligenceItem";
                    break;
            }

            CharacteristicsMain = new ParagonBonus(mainCharacteristicName, new ItemValueRange(5), 0);
            CharacteristicsVitality = new ParagonBonus("vitalityItem", new ItemValueRange(5), 0);
            CharacteristicsMovement = new ParagonBonus("movementScalar", new ItemValueRange(0.5), 50);
            CharacteristicsResourceMax = new ParagonBonus("resourceMaxBonus", new ItemValueRange(1), 50);

            AttackPerSecond = new ParagonBonus("attacksPerSecondPercent", new ItemValueRange(0.2), 50);
            AttackCooldownReduction = new ParagonBonus("powerCooldownReductionPercentAll", new ItemValueRange(0.2), 50);
            AttackCritChance = new ParagonBonus("critPercentBonusCapped", new ItemValueRange(0.1), 50);
            AttackCritDamage = new ParagonBonus("critDamagePercent", new ItemValueRange(1), 50);

            DefenseHitpoints = new ParagonBonus("hitpointsPercent", new ItemValueRange(0.5), 50);
            DefenseArmor = new ParagonBonus(null /* TODO "armorBonusPercent"*/, new ItemValueRange(0.5), 50);
            DefenseResistAll = new ParagonBonus("resistance_All", new ItemValueRange(5), 50);
            DefenseRegen = new ParagonBonus("hitpointsRegenPerSecond", new ItemValueRange(214.6), 50);

            OtherAreaDamage = new ParagonBonus("splashDamageEffectPercent", new ItemValueRange(1), 50);
            OtherResourceReduction = new ParagonBonus("resourceCostReductionPercentAll", new ItemValueRange(0.2), 50);
            OtherHitpointsOnHit = new ParagonBonus("hitpointsOnHit", new ItemValueRange(160.926), 50);
            OtherGold = new ParagonBonus("goldFind", new ItemValueRange(1), 50);
        }