Exemplo n.º 1
0
        private EpicBossResults GetEpicBossResults(EpicBoss epicBoss, Guild guild, Player player)
        {
            EpicBossResults results = new EpicBossResults();
            results.Items = new List<EpicBossResultItem>();

            int playerHealth = GetPlayerHealth(player.Level);
            int playerStats = GetPlayerStats(player.Level);
            int followerHealth = GetFollowerHealth(player.Level);
            int followerStats = GetFollowerStats(player.Level);
            decimal baseAttack = GetBaseAttack(player.Level);
            decimal knightBonus = GetKnightBonus(player.KnightCount);

            foreach (PlayerArmor playerArmor in player.Armors)
            {
                Armor armor = ArmorTable.Instance.GetArmor(playerArmor.ArmorName);

                KeyValuePair<int, int> armorStats = GetArmorStats(armor, playerArmor.Level, playerArmor.IsPlus);
                decimal guildRankBonus = GetGuildRankBonus(guild.RankBonus);
                decimal guildElementBonus = GetGuildElementBonus(armor, guild);
                decimal playerBonus = GetPlayerBonus(epicBoss.Element1, epicBoss.Element2, armor, playerArmor.IsNemesis);
                decimal bossLevelBonus = GetBossLevelBonus(epicBoss.Level);
                decimal bossElementBonus = GetBossElementBonus(epicBoss, armor);

                int playerDamageDone = GetDamageDone(baseAttack, armorStats.Key + playerStats, epicBoss.Defense, guildRankBonus, guildElementBonus, playerBonus, knightBonus);
                int followerDamageDone = GetDamageDone(baseAttack, armorStats.Key + followerStats, epicBoss.Defense, guildRankBonus, guildElementBonus, playerBonus, knightBonus);

                int playerDamageTaken = GetDamageTaken(armorStats.Value + playerStats, epicBoss.Attack, guildRankBonus, guildElementBonus, bossLevelBonus, bossElementBonus);
                int followerDamageTaken = GetDamageTaken(armorStats.Value + followerStats, epicBoss.Attack, guildRankBonus, guildElementBonus, bossLevelBonus, bossElementBonus);

                int playerHitsTaken = (playerHealth / playerDamageTaken) + 1;
                int followerHitsTaken = (followerHealth / followerDamageTaken) + 1;

                results.Items.Add(new EpicBossResultItem(armor.Name, armor.SafeName, playerDamageDone, playerDamageTaken, playerHitsTaken, followerDamageDone, followerDamageTaken, followerHitsTaken));
            }
            results.Items.Sort((x, y) => -1 * x.PlayerTotalDamageDone.CompareTo(y.PlayerTotalDamageDone));

            return results;
        }
Exemplo n.º 2
0
 public CalculatorResults(EpicBossResults epicBoss)
     : this()
 {
     EpicBoss = epicBoss;
 }