public static int AdjustDroppedKamas(IFightResult looter, int teamPP, long baseKamas)
        {
            int    prospecting = looter.Prospecting;
            double num         = (looter.Fight.GetFightBonus() <= 0) ? 1.0 : (1.0 + (double)looter.Fight.GetFightBonus() / 100.0);
            int    kamas       = (int)((double)baseKamas * ((double)prospecting / (double)teamPP) * num * (double)Rates.KamasRate);

            return(FightFormulas.InvokeWinKamasModifier(looter, kamas));
        }
        public uint AdjustDroppedKamas(IFightResult looter, int teamPP, long baseKamas, int dropBonusPercent)
        {
            int    prospecting = looter.Prospecting;
            double num         = (looter.Fight.AgeBonus <= 0) ? 1.0 : (1.0 + (double)looter.Fight.AgeBonus / 100.0);
            int    kamas       = (int)((double)baseKamas * ((double)prospecting / (double)teamPP) * num * (double)WorldConfiguration.Instance.KamasRate);

            kamas += kamas.GetPercentageOf(dropBonusPercent);
            return((uint)kamas);
        }
        public double AdjustDropChance(IFightResult looter, MonsterDrop item, sbyte dropperGradeId, int monsterAgeBonus, int dropBonusPercent)
        {
            dropBonusPercent = dropBonusPercent == 0 ? 1 : dropBonusPercent;
            var dropRate    = item.GetDropRate((int)dropperGradeId);
            var prospecting = ((double)looter.Prospecting / 100.0);
            int result      = (int)(dropRate * (double)prospecting * ((double)monsterAgeBonus / (double)100.0 + (double)1.0) * (double)WorldConfiguration.Instance.DropsRate);

            result += result.GetPercentageOf(dropBonusPercent);
            return(result / 5d);
        }
Beispiel #4
0
        public static double AdjustDropChance(IFightResult looter, DroppableItem item, Monster dropper, int monsterAgeBonus)
        {
            var challengeBonus = looter.Fight.GetChallengesBonus();
            var idolsBonus     = looter.Fight.GetIdolsDropBonus();

            var looterPP = looter.Prospecting + ((looter.Prospecting * (challengeBonus + idolsBonus)) / 100d);

            var rate = item.GetDropRate((int)dropper.Grade.GradeId) * (looterPP / 100d) * ((monsterAgeBonus / 100d) + 1) * Rates.DropsRate;

            return(InvokeDropRateModifier(looter, item, rate));
        }
Beispiel #5
0
        protected override System.Collections.Generic.IEnumerable <IFightResult> GenerateResults()
        {
            System.Collections.Generic.List <IFightResult> list = new System.Collections.Generic.List <IFightResult>();

            list.AddRange(
                from entry in base.GetFightersAndLeavers()
                where !(entry is SummonedFighter)
                select entry.GetFightResult());

            if (base.Map.TaxCollector != null && base.Map.TaxCollector.CanGatherLoots())
            {
                list.Add(new TaxCollectorFightResult(base.Map.TaxCollector, this));
            }

            FightTeam[] teams = this.m_teams;
            for (int i = 0; i < teams.Length; i++)
            {
                FightTeam team = teams[i];
                System.Collections.Generic.IEnumerable <FightActor> enumerable = ((team == base.RedTeam) ? base.BlueTeam : base.RedTeam).GetAllFighters((FightActor entry) => entry.IsDead()).ToList <FightActor>();

                IOrderedEnumerable <IFightResult> orderedEnumerable =
                    from x in list
                    where x.CanLoot(team)
                    select x into entry
                    orderby(entry is TaxCollectorFightResult) ? -1 : entry.Prospecting descending
                    select entry;

                int  teamPP       = team.GetAllFighters().Sum((FightActor entry) => entry.Stats[PlayerFields.Prospecting].Total);
                int  challengeSum = base.m_challenges.Sum((entry => entry.GetChallengeBonus()));
                long baseKamas    = enumerable.Sum((FightActor entry) => (long)((ulong)entry.GetDroppedKamas()));

                using (System.Collections.Generic.IEnumerator <IFightResult> enumerator = orderedEnumerable.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        IFightResult looter = enumerator.Current;

                        looter.Loot.Kamas = FightFormulas.AdjustDroppedKamas(looter, teamPP, baseKamas);
                        System.Collections.Generic.IEnumerable <FightActor> arg_1F0_0 = enumerable;
                        Func <FightActor, System.Collections.Generic.IEnumerable <DroppedItem> > selector = (FightActor dropper) => dropper.RollLoot(looter, challengeSum);
                        foreach (DroppedItem current in arg_1F0_0.SelectMany(selector))
                        {
                            looter.Loot.AddItem(current);
                        }

                        if (looter is IExperienceResult)
                        {
                            (looter as IExperienceResult).AddEarnedExperience(FightFormulas.CalculateWinExp(looter, team.GetAllFighters(), enumerable));
                        }
                    }
                }
            }
            return(list);
        }
Beispiel #6
0
        public static int AdjustDroppedKamas(IFightResult looter, int teamPP, long baseKamas, bool kamasRate = true)
        {
            var challengeBonus = looter.Fight.GetChallengesBonus();
            var idolsBonus     = looter.Fight.GetIdolsDropBonus();

            var looterPP = looter.Prospecting + ((looter.Prospecting * (challengeBonus + idolsBonus)) / 100d);

            var multiplicator = looter.Fight.AgeBonus <= 0 ? 1 : 1 + (looter.Fight.AgeBonus / 5) / 100d;
            var kamas         = (int)(baseKamas * (looterPP / teamPP) * multiplicator * (kamasRate ? Rates.KamasRate : 1));

            return(InvokeWinKamasModifier(looter, kamas));
        }
Beispiel #7
0
        public static int CalculateWinExp(IFightResult fighter, IEnumerable <FightActor> alliesResults, IEnumerable <FightActor> droppersResults)
        {
            var droppers = droppersResults as MonsterFighter[] ?? droppersResults.ToArray();
            var allies   = alliesResults as FightActor[] ?? alliesResults.ToArray();

            if (!droppers.Any() || !allies.Any())
            {
                return(0);
            }

            var sumPlayersLevel        = allies.Sum(entry => entry.Level);
            var maxPlayerLevel         = allies.Max(entry => entry.Level);
            var sumMonstersLevel       = droppers.Sum(entry => entry.Level);
            var sumMonstersHiddenLevel = droppers.OfType <MonsterFighter>().Sum(entry => entry.HiddenLevel == 0 ? entry.Level : entry.HiddenLevel);
            var maxMonsterLevel        = droppers.Max(entry => entry.Level);
            var sumMonsterXp           = droppers.Sum(entry => entry.GetGivenExperience());

            double levelCoeff = 1;

            if (sumPlayersLevel - 5 > sumMonstersLevel)
            {
                levelCoeff = (double)sumMonstersLevel / sumPlayersLevel;
            }
            else if (sumPlayersLevel + 10 < sumMonstersLevel)
            {
                levelCoeff = (sumPlayersLevel + 10) / (double)sumMonstersLevel;
            }

            var xpRatio = Math.Min(fighter.Level, Math.Truncate(2.5d * maxMonsterLevel)) / sumPlayersLevel * 100d;

            var regularGroupRatio = allies.Where(entry => entry.Level >= maxPlayerLevel / 3).Sum(entry => 1);

            if (regularGroupRatio <= 0)
            {
                regularGroupRatio = 1;
            }

            var baseXp         = Math.Truncate(xpRatio / 100 * Math.Truncate(sumMonsterXp * GroupCoefficients[regularGroupRatio - 1] * levelCoeff));
            var multiplicator  = fighter.Fight.AgeBonus <= 0 ? 1 : 1 + fighter.Fight.AgeBonus / 100d;
            var challengeBonus = fighter.Fight.GetChallengesBonus();

            var idolsBonus       = fighter.Fight.GetIdolsXPBonus();
            var idolsMalus       = Math.Pow(Math.Min(4, ((double)sumMonstersHiddenLevel / droppers.Count() / maxPlayerLevel)), 2);
            var idolsWisdomBonus = Math.Truncate((100 + fighter.Level * 2.5d) * Math.Truncate(idolsBonus * idolsMalus) / 100d);

            var xp = (int)Math.Truncate(Math.Truncate(baseXp * (100 + Math.Max(fighter.Wisdom + idolsWisdomBonus, 0)) / 100d) * multiplicator * Rates.XpRate);

            xp += (int)Math.Truncate(xp * (challengeBonus / 100d));

            return(InvokeWinXpModifier(fighter, xp));
        }
Beispiel #8
0
        protected override IEnumerable <IFightResult> GenerateResults()
        {
            System.Collections.Generic.List <IFightResult> list = new System.Collections.Generic.List <IFightResult>();
            list.AddRange(
                from entry in base.GetAllFightersWithLeavers()
                where !(entry is IOwnable)
                select entry.GetFightResult());

            FightTeam[] teams = new FightTeam[] { BlueTeam, RedTeam };
            for (int i = 0; i < teams.Length; i++)
            {
                int xpBonusPercent = 0;

                int dropBonusPercent = 0;

                if (teams[i] == GetTeamChallenged())
                {
                    xpBonusPercent   += GetChallengesExpPercentBonus();
                    dropBonusPercent += GetChallengesDropPercentBonus();
                }

                FightTeam team = teams[i];
                System.Collections.Generic.IEnumerable <Fighter> enumerable = ((team == base.RedTeam) ? base.BlueTeam : base.RedTeam).GetDeads();
                IOrderedEnumerable <IFightResult> orderedEnumerable         = list.FindAll(x => x.CanLoot(team)).OrderBy(x => x.Prospecting);

                int teamPP = team.GetFighters(false).Sum((Fighter entry) => entry.Stats.Prospecting.TotalInContext());
                teamPP += teamPP.GetPercentageOf(dropBonusPercent);

                long baseKamas = enumerable.Sum((Fighter entry) => (long)((ulong)entry.GetDroppedKamas()));
                using (System.Collections.Generic.IEnumerator <IFightResult> enumerator = orderedEnumerable.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        IFightResult looter = enumerator.Current;
                        looter.Loot.Kamas = FormulasProvider.Instance.AdjustDroppedKamas(looter, teamPP, baseKamas, dropBonusPercent);
                        System.Collections.Generic.IEnumerable <Fighter> arg_1F0_0 = enumerable;
                        Func <Fighter, System.Collections.Generic.IEnumerable <DroppedItem> > selector = (Fighter dropper) => dropper.RollLoot(looter, dropBonusPercent);
                        foreach (DroppedItem current in arg_1F0_0.SelectMany(selector))
                        {
                            looter.Loot.AddItem(current);
                        }
                        if (looter is FightPlayerResult && looter.Outcome == FightOutcomeEnum.RESULT_VICTORY)
                        {
                            (looter as FightPlayerResult).AddEarnedExperience(xpBonusPercent);
                        }
                    }
                }
            }
            return(list);
        }
        public static int CalculateWinExp(IFightResult fighter, System.Collections.Generic.IEnumerable <FightActor> alliesResults, System.Collections.Generic.IEnumerable <FightActor> droppersResults)
        {
            MonsterFighter[] monsters = droppersResults as MonsterFighter[];

            FightActor[] droppers = (monsters != null) ? ((FightActor[])monsters) : droppersResults.ToArray <FightActor>();
            FightActor[] allies   = (alliesResults as FightActor[]) ?? alliesResults.ToArray <FightActor>();

            int result;

            if (!droppers.Any <FightActor>() || !allies.Any <FightActor>())
            {
                result = 0;
            }
            else
            {
                int   sumPlayersLevel    = allies.Sum((FightActor entry) => (int)entry.Level);
                short maxPlayerLevel     = allies.Max((FightActor entry) => entry.Level);
                int   sumDroppersLevel   = droppers.Sum((FightActor entry) => (int)entry.Level);
                short maxDropperLevel    = droppers.Max((FightActor entry) => entry.Level);
                int   sumGivenExperience = droppers.Sum((FightActor entry) => entry.GetGivenExperience());

                double num4 = 1.0;
                if (sumPlayersLevel - 5 > sumDroppersLevel)
                {
                    num4 = (double)sumDroppersLevel / (double)sumPlayersLevel;
                }
                else
                {
                    if (sumPlayersLevel + 10 < sumDroppersLevel)
                    {
                        num4 = (double)(sumPlayersLevel + 10) / (double)sumDroppersLevel;
                    }
                }
                double num5 = System.Math.Min((double)fighter.Level, System.Math.Truncate(2.5 * (double)maxDropperLevel)) / (double)sumPlayersLevel * 100.0;
                int    num6 = (
                    from entry in allies
                    where entry.Level >= maxPlayerLevel / 3
                    select entry).Sum((FightActor entry) => 1);
                if (num6 <= 0)
                {
                    num6 = 1;
                }
                double num7 = System.Math.Truncate(num5 / 100.0 * System.Math.Truncate((double)sumGivenExperience * FightFormulas.GroupCoefficients[num6 - 1] * num4));
                double num8 = (fighter.Fight.GetFightBonus() <= 0) ? 1.0 : (1.0 + (double)fighter.Fight.GetFightBonus() / 100.0);
                int    xp   = (int)System.Math.Truncate(System.Math.Truncate(num7 * (double)(100 + fighter.Wisdom) / 100.0) * num8 * (double)Rates.XpRate);
                result = FightFormulas.InvokeWinXpModifier(fighter, xp);
            }
            return(result);
        }
        public override IEnumerable <DroppedItem> RollLoot(IFightResult looter, int dropBonusPercent)
        {
            IEnumerable <DroppedItem> result;

            if (Alive)
            {
                result = new DroppedItem[0];
            }
            else
            {
                AsyncRandom        asyncRandom = new AsyncRandom();
                List <DroppedItem> list        = new List <DroppedItem>();
                int prospectingSum             = base.OposedTeam().GetFighters <CharacterFighter>().Sum((CharacterFighter entry) => entry.Stats.Prospecting.TotalInContext());
                foreach (var current in
                         from droppableItem in base.Template.Drops
                         where prospectingSum >= droppableItem.ProspectingLock && !droppableItem.HasCriteria
                         select droppableItem)
                {
                    int num = 0;
                    while (num < current.Count && (current.DropLimit <= 0 || !this.m_dropsCount.ContainsKey(current) || this.m_dropsCount[current] < current.DropLimit))
                    {
                        var    deci = asyncRandom.NextDouble();
                        double num2 = (double)asyncRandom.Next(0, 100) + deci;
                        double num3 = FormulasProvider.Instance.AdjustDropChance(looter, current, GradeId, (int)base.Fight.AgeBonus, dropBonusPercent);

                        if (num3 >= num2)
                        {
                            list.Add(new DroppedItem(current.ItemId, 1u));
                            if (!this.m_dropsCount.ContainsKey(current))
                            {
                                this.m_dropsCount.Add(current, 1);
                            }
                            else
                            {
                                System.Collections.Generic.Dictionary <MonsterDrop, int> dropsCount;
                                MonsterDrop key;
                                (dropsCount = this.m_dropsCount)[key = current] = dropsCount[key] + 1;
                            }
                        }
                        num++;
                    }
                }
                result = list;
            }
            return(result);
        }
 protected override System.Collections.Generic.IEnumerable <IFightResult> GenerateResults()
 {
     IFightResult[] array = (
         from entry in base.GetFightersAndLeavers()
         where !(entry is SummonedFighter)
         select entry into fighter
         select fighter.GetFightResult()).ToArray <IFightResult>();
     IFightResult[] array2 = array;
     for (int i = 0; i < array2.Length; i++)
     {
         IFightResult      fightResult       = array2[i];
         FightPlayerResult fightPlayerResult = fightResult as FightPlayerResult;
         if (fightPlayerResult != null)
         {
             fightPlayerResult.SetEarnedHonor(this.CalculateEarnedHonor(fightPlayerResult.Fighter), this.CalculateEarnedDishonor(fightPlayerResult.Fighter));
         }
     }
     return(array);
 }
Beispiel #12
0
        public static int InvokeWinKamasModifier(IFightResult looter, int kamas)
        {
            var handler = WinKamasModifier;

            return(handler != null?handler(looter, kamas) : kamas);
        }
Beispiel #13
0
        public static double InvokeDropRateModifier(IFightResult looter, DroppableItem item, double rate)
        {
            var handler = DropRateModifier;

            return(handler != null?handler(looter, item, rate) : rate);
        }
Beispiel #14
0
        public override System.Collections.Generic.IEnumerable <DroppedItem> RollLoot(IFightResult looter, int challengeBonus)
        {
            System.Collections.Generic.IEnumerable <DroppedItem> result;
            if (!base.IsDead())
            {
                result = new DroppedItem[0];
            }
            else
            {
                AsyncRandom asyncRandom = new AsyncRandom();
                System.Collections.Generic.List <DroppedItem> list = new System.Collections.Generic.List <DroppedItem>();
                int prospectingSum = base.OpposedTeam.GetAllFighters <CharacterFighter>().Sum((CharacterFighter entry) => entry.Stats[PlayerFields.Prospecting].Total);

                foreach (DroppableItem current in
                         from droppableItem in this.Monster.Template.DroppableItems
                         where prospectingSum >= droppableItem.ProspectingLock
                         select droppableItem)
                {
                    int num = 0;
                    while (num < current.RollsCounter && (current.DropLimit <= 0 || !this.m_dropsCount.ContainsKey(current) || this.m_dropsCount[current] < current.DropLimit))
                    {
                        double num2 = (double)asyncRandom.Next(0, 100) + asyncRandom.NextDouble();
                        double num3 = FightFormulas.AdjustDropChance(looter, current, this.Monster, this.Fight.GetFightBonus());
                        if (num3 >= num2)
                        {
                            list.Add(new DroppedItem((int)current.ItemId, 1u));
                            if (!this.m_dropsCount.ContainsKey(current))
                            {
                                this.m_dropsCount.Add(current, 1);
                            }
                            else
                            {
                                System.Collections.Generic.Dictionary <DroppableItem, int> dropsCount;
                                DroppableItem key;
                                (dropsCount = this.m_dropsCount)[key = current] = dropsCount[key] + 1;
                            }
                        }
                        num++;
                    }
                }
                result = list;
            }
            return(result);
        }
Beispiel #15
0
        public static int InvokeWinXpModifier(IFightResult looter, int xp)
        {
            var handler = WinXpModifier;

            return(handler != null?handler(looter, xp) : xp);
        }
Beispiel #16
0
        // TODO: Rewrite drops
        protected override IEnumerable <IFightResult> GenerateResults()
        {
            List <IFightResult> allFighters = new List <IFightResult>();

            allFighters.AddRange(from entry in this.GetAllFightersWithLeavers()
                                 where !(entry is IOwnable)
                                 select entry.GetFightResult());

            FightTeam[] teams = { this.BlueTeam, this.RedTeam };
            foreach (FightTeam team in teams)
            {
                int xpBonusPercent   = 0;
                int dropBonusPercent = 0;

                if (team == this.GetTeamChallenged())
                {
                    xpBonusPercent   += this.GetChallengesExpPercentBonus();
                    dropBonusPercent += this.GetChallengesDropPercentBonus();
                }

                FightTeam             enemyTeam   = team == this.RedTeam ? this.BlueTeam : this.RedTeam;
                IEnumerable <Fighter> deadEnemies = enemyTeam.GetDeads();

                // Retrieve the fighters who can loot, ordered by their pp (asc)
                List <IFightResult> looterFighters = allFighters.FindAll(x => x.CanLoot(team));
                IOrderedEnumerable <IFightResult> orderedLooters = looterFighters.OrderBy(x => x.Prospecting);

                List <Fighter> fighters = team.GetFighters(false);
                int            teamPP   = fighters.Sum(entry => entry.Stats.Prospecting.TotalInContext());
                teamPP += teamPP.GetPercentageOf(dropBonusPercent);

                // drops
                List <DroppedItem> teamLoots = new List <DroppedItem>();
                IEnumerable <DroppedItem> Selector(Fighter dropper) => dropper.RollLoot(teamPP, dropBonusPercent);

                foreach (DroppedItem current in deadEnemies.SelectMany(Selector))
                {
                    teamLoots.Add(current);
                }

                long baseKamas = deadEnemies.Sum(entry => (long)((ulong)entry.GetDroppedKamas()));
                using (IEnumerator <IFightResult> orderedLootersEnumerator = orderedLooters.GetEnumerator()) {
                    while (orderedLootersEnumerator.MoveNext())
                    {
                        IFightResult looter = orderedLootersEnumerator.Current;

                        // kamas
                        looter.Loot.Kamas = FormulasProvider.Instance.AdjustDroppedKamas(looter, teamPP, baseKamas, dropBonusPercent);

                        // Xp
                        if (looter is FightPlayerResult && looter.Outcome == FightOutcomeEnum.RESULT_VICTORY)
                        {
                            (looter as FightPlayerResult).AddEarnedExperience(xpBonusPercent);
                        }
                    }

                    // Distribution of loots :
                    if (teamLoots.Any())
                    {
                        AsyncRandom rand = new AsyncRandom();
                        // For each looted item...
                        foreach (DroppedItem item in teamLoots)
                        {
                            // We choose a random looter, but pp still has a little impact on the choice.
                            // For each player, we generate a random number between 0 and its max prospecting in context
                            // We sort the list in ascending order and get the last. We therefore get the fighter with the higher randomly generated number.
                            // Prospecting still has an impact since a player with higher pp has more chances to get a higher random number.
                            Fighter randomLooter = fighters.OrderBy(x => x.Stats.Prospecting.TotalInContext() * rand.NextDouble()).Last();

                            // Give the item looted by the team to this player.
                            randomLooter.Loot.AddItem(item);
                        }
                    }
                }
            }

            return(allFighters);
        }
Beispiel #17
0
        protected override IEnumerable <IFightResult> GenerateLeaverResults(CharacterFighter leaver, out IFightResult leaverResult)
        {
            var rankLoose = CalculateRankLoose(leaver);

            leaverResult = null;

            var list = new List <IFightResult>();

            foreach (var fighter in GetFightersAndLeavers().OfType <CharacterFighter>())
            {
                var outcome = fighter.Team == leaver.Team
                    ? FightOutcomeEnum.RESULT_LOST
                    : FightOutcomeEnum.RESULT_VICTORY;

                var result = new ArenaFightResult(fighter, outcome, new FightLoot(), fighter == leaver ? rankLoose : 0, false);

                if (fighter == leaver)
                {
                    leaverResult = result;
                }

                list.Add(result);
            }

            return(list);
        }
Beispiel #18
0
        public override IEnumerable <DroppedItem> RollLoot(IFightResult looter)
        {
            // have to be dead before
            if (!IsDead())
            {
                return(new DroppedItem[0]);
            }

            var random = new AsyncRandom();
            var items  = new List <DroppedItem>();

            var prospectingSum = OpposedTeam.GetAllFighters <CharacterFighter>().Sum(entry => entry.Stats[PlayerFields.Prospecting].Total);
            var droppedGroups  = new List <int>();

            foreach (var droppableItem in Monster.Template.DroppableItems.Where(droppableItem => prospectingSum >= droppableItem.ProspectingLock).Shuffle())
            {
                if (droppedGroups.Contains(droppableItem.DropGroup))
                {
                    continue;
                }

                if (looter is TaxCollectorProspectingResult && droppableItem.TaxCollectorCannotLoot)
                {
                    continue;
                }

                for (var i = 0; i < droppableItem.RollsCounter; i++)
                {
                    if (droppableItem.DropLimit > 0 && m_dropsCount.ContainsKey(droppableItem) && m_dropsCount[droppableItem] >= droppableItem.DropLimit)
                    {
                        break;
                    }

                    var chance   = (random.Next(0, 100) + random.NextDouble());
                    var dropRate = FightFormulas.AdjustDropChance(looter, droppableItem, Monster, Fight.AgeBonus);

                    if (!(dropRate >= chance))
                    {
                        continue;
                    }

                    if (droppableItem.DropGroup != 0)
                    {
                        droppedGroups.Add(droppableItem.DropGroup);
                    }

                    items.Add(new DroppedItem(droppableItem.ItemId, 1));

                    if (!m_dropsCount.ContainsKey(droppableItem))
                    {
                        m_dropsCount.Add(droppableItem, 1);
                    }
                    else
                    {
                        m_dropsCount[droppableItem]++;
                    }
                }
            }


            return(items);
        }
        public static double AdjustDropChance(IFightResult looter, DroppableItem item, Monster dropper, int bonus)
        {
            double rate = item.GetDropRate((int)dropper.Grade.GradeId) * ((double)looter.Prospecting / 100.0) * ((double)bonus / 100.0 + 1.0) * (double)Rates.DropsRate;

            return(FightFormulas.InvokeDropRateModifier(looter, item, rate));
        }
        public static int InvokeWinXpModifier(IFightResult looter, int xp)
        {
            Func <IFightResult, int, int> winXpModifier = FightFormulas.WinXpModifier;

            return((winXpModifier != null) ? winXpModifier(looter, xp) : xp);
        }
        public static double InvokeDropRateModifier(IFightResult looter, DroppableItem item, double rate)
        {
            Func <IFightResult, DroppableItem, double, double> dropRateModifier = FightFormulas.DropRateModifier;

            return((dropRateModifier != null) ? dropRateModifier(looter, item, rate) : rate);
        }
        public static int InvokeWinKamasModifier(IFightResult looter, int kamas)
        {
            Func <IFightResult, int, int> winKamasModifier = FightFormulas.WinKamasModifier;

            return((winKamasModifier != null) ? winKamasModifier(looter, kamas) : kamas);
        }