예제 #1
0
파일: Equipment.cs 프로젝트: dahlia/lib9c
        public void LevelUpV2(IRandom random, EnhancementCostSheetV2.Row row, bool isGreatSuccess)
        {
            level++;
            var rand = isGreatSuccess ? row.BaseStatGrowthMax
                :random.Next(row.BaseStatGrowthMin, row.BaseStatGrowthMax + 1);
            var ratio    = rand.NormalizeFromTenThousandths();
            var baseStat = StatsMap.GetStat(UniqueStatType, true) * ratio;

            if (baseStat > 0)
            {
                baseStat = Math.Max(1.0m, baseStat);
            }

            StatsMap.AddStatValue(UniqueStatType, baseStat);

            if (GetOptionCount() > 0)
            {
                UpdateOptionsV2(random, row, isGreatSuccess);
            }
        }
예제 #2
0
 public decimal GetIncrementAmountOfEnhancement()
 {
     return(Math.Max(1.0m, StatsMap.GetStat(UniqueStatType, true) * 0.1m));
 }