コード例 #1
0
        public override Item Build(int level, double additionalKoef = 1.0)
        {
            var damageValueKoef = RollItemDamageKoef(additionalKoef);
            var item            = new SimpleChest()
            {
                Level   = level,
                Defence = ChestStatsBalance.GetDefence(level, damageValueKoef),
                Bonuses = ItemBonusesFactory.Build(ChestStatsBalance, level, additionalKoef),
            };

            item.GoldValue.Base = GetBaseChestGoldValue(level);
            item.UpdateGoldValueKoef();

            return(item);
        }
コード例 #2
0
        public override IEnumerable <IItem> Build(int level, int count)
        {
            var result        = new IItem[count];
            var newLevel      = GetItemLevel(level);
            var baseGoldValue = GetBaseChestGoldValue(newLevel);

            for (int i = 0; i < count; i++)
            {
                var globalDamageValueKoef = RollGlobalItemDamageKoef(level);
                var item = new SimpleChest()
                {
                    Level   = newLevel,
                    Defence = ChestStatsBalance.GetDefence(newLevel, RollItemStatDamageKoef(level, globalDamageValueKoef)),
                    Bonuses = ItemBonusesFactory.Build(ChestStatsBalance, newLevel, globalDamageValueKoef),
                };
                item.GoldValue.Base = baseGoldValue;
                item.UpdateGoldValueKoef();
                result[i] = item;
            }
            return(result);
        }