コード例 #1
0
        public string ScrollsCount(ILevelingContainer result)
        {
            StringBuilder scrollPrices = new StringBuilder();
            string        delimeter    = ", ";

            if (result.CollectedScrolls.HundredKkScrollCount > 0)
            {
                scrollPrices.Append($"100kk exp scrolls: [{result.CollectedScrolls.HundredKkScrollCount}]");
            }
            if (result.CollectedScrolls.FiftyKkScrollCount > 0)
            {
                if (scrollPrices.Length > 0)
                {
                    scrollPrices.Append(delimeter);
                    scrollPrices.Append(Environment.NewLine);
                }
                scrollPrices.Append($"50kk exp scrolls: [{result.CollectedScrolls.FiftyKkScrollCount}]");
            }
            if (result.CollectedScrolls.TenKkScrollCount > 0)
            {
                if (scrollPrices.Length > 0)
                {
                    scrollPrices.Append(delimeter);
                    scrollPrices.Append(Environment.NewLine);
                }
                scrollPrices.Append($"10kk exp scrolls: [{result.CollectedScrolls.TenKkScrollCount}]");
            }
            return(scrollPrices.ToString());
        }
コード例 #2
0
        public string ScrollPrices(ILevelingContainer result)
        {
            StringBuilder scrollPrices = new StringBuilder();
            string        delimeter    = ", ";

            if (result.CollectedScrolls.HundredKkScrollCount > 0)
            {
                scrollPrices.Append($"{result.CollectedScrolls.HundredKkScrollCount} scrolls x 500k = [{string.Format("{0,9:N0}", (uint)result.CollectedScrolls.HundredKkScrollCount * ScrollConstants.hundredMilScrollPrice)} Aden]");
            }
            if (result.CollectedScrolls.FiftyKkScrollCount > 0)
            {
                if (scrollPrices.Length > 0)
                {
                    scrollPrices.Append(delimeter);
                    scrollPrices.Append(Environment.NewLine);
                }
                scrollPrices.Append($"{result.CollectedScrolls.FiftyKkScrollCount} scrolls x 400k = [{string.Format("{0,9:N0}", (uint)result.CollectedScrolls.FiftyKkScrollCount * ScrollConstants.fiftyMilScrollPrice)} Aden]");
            }
            if (result.CollectedScrolls.TenKkScrollCount > 0)
            {
                if (scrollPrices.Length > 0)
                {
                    scrollPrices.Append(delimeter);
                    scrollPrices.Append(Environment.NewLine);
                }
                scrollPrices.Append($"{result.CollectedScrolls.TenKkScrollCount} scrolls x 100k = [{string.Format("{0,9:N0}", (uint)result.CollectedScrolls.TenKkScrollCount * ScrollConstants.tenMilScrollPrice)} Aden]");
            }
            return(scrollPrices.ToString());
        }
コード例 #3
0
 private bool LevelUp(ILevelingContainer container, ulong expIncrease)
 {
     container.ExperienceOnLevel += expIncrease;
     if (container.ExperienceOnLevel >= m_ExperienceProvidere.ExperienceForLevel[container.CurrentLevel + 1])
     {
         container.CurrentLevel      += 1;
         container.ExperienceOnLevel -= m_ExperienceProvidere.ExperienceForLevel[container.CurrentLevel];
         return(true);
     }
     return(false);
 }
コード例 #4
0
 public void Apply(ILevelingContainer container)
 {
     if (!LevelUpPossible(container.CurrentLevel))
     {
         return;
     }
     if (m_EpicBossProvider.ZakenExpPerLevelTable.ContainsKey(container.CurrentLevel) &&
         container.RemainingExperience > m_EpicBossProvider.ZakenExpPerLevelTable[container.CurrentLevel].TotalExp)
     {
         var rewards = (Scrolls)m_EpicBossProvider.ZakenExpPerLevelTable[container.CurrentLevel];
         ApplyScrolls(container, rewards);
     }
 }
コード例 #5
0
        public void Apply(ILevelingContainer container)
        {
            if (!LevelUpPossible(container.CurrentLevel))
            {
                return;
            }
            var rewards = (Scrolls)m_ClanArena.Reward(container.CurrentLevel, m_StartBossStage, m_EndBossStage);

            if (container.RemainingExperience > rewards.TotalExp)
            {
                //ArenaRbKillCount += endBossStage - startBossStage;
                ApplyScrolls(container, rewards);
            }
        }
コード例 #6
0
 public void Apply(ILevelingContainer container)
 {
     if (!LevelUpPossible(container.CurrentLevel))
     {
         return;
     }
     for (int day = 0; day < m_Days; day++)
     {
         var rewards = (Scrolls)m_DailyQuests.DailyReward(container.CurrentLevel);
         if (container.RemainingExperience > rewards.TotalExp)
         {
             ApplyScrolls(container, rewards);
         }
     }
 }
コード例 #7
0
        private ILevelingContainer ApplyStrategies(IReadOnlyCollection <IStrategy> strategies, ILevelingContainer container)
        {
            bool calculationNeeded = true;

            while (calculationNeeded)
            {
                var tempExpMark = container.RemainingExperience;
                foreach (var strategy in strategies)
                {
                    strategy.Apply(container);
                }
                container.WeeklyCyclesNeeded++;
                if (tempExpMark - container.RemainingExperience == 0)
                {
                    calculationNeeded             = false;
                    container.WeeklyCyclesNeeded -= 1;
                }
            }
            return(container);
        }
コード例 #8
0
 public string WeeksCount(ILevelingContainer result)
 {
     return(string.Format("{0,9:N0}", result?.WeeklyCyclesNeeded));
 }
コード例 #9
0
 public string TotalExperience(ILevelingContainer result)
 {
     return(string.Format("{0,9:N0}", result?.TotalExperience));
 }
コード例 #10
0
 public void ApplyScrolls(ILevelingContainer container, Scrolls rewards)
 {
     container.CollectedScrolls     = (Scrolls)container.CollectedScrolls + rewards;
     container.RemainingExperience -= rewards.TotalExp;
     LevelUp(container, rewards.TotalExp);
 }