Exemplo n.º 1
0
        public override Item Build(int level, double additionalKoef = 1.0)
        {
            var damageValueKoef = RollItemDamageKoef(additionalKoef);
            var item            = new SimpleSword()
            {
                Level   = level,
                Damage  = WeaponStatsBalance.GetDamage(level, damageValueKoef),
                Bonuses = ItemBonusesFactory.Build(WeaponStatsBalance, level, additionalKoef)
            };

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

            return(item);
        }
Exemplo n.º 2
0
        public override IEnumerable <IItem> Build(int level, int count)
        {
            var result        = new IItem[count];
            var newLevel      = GetItemLevel(level);
            var baseGoldValue = GetBaseWeaponGoldValue(newLevel);

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