Exemple #1
0
        private void SimRound(Round round)
        {
            //Adjust the stats of the fighters for endurance/cuts/tactics
            this.Fighter1.MakeAdjustments(this.Fighter2, this.Options);
            this.Fighter2.MakeAdjustments(this.Fighter1, this.Options);

            //run the base calculations for damage
            round.Fighter1Round = Fighter1.BeginFighting(this.Fighter2, round);
            round.Fighter2Round = Fighter2.BeginFighting(this.Fighter1, round);
            round.Fighter1Round.MultiplyDamageLuckFactor(Fighter1.RoundStats.LuckFactor);
            round.Fighter2Round.MultiplyDamageLuckFactor(Fighter2.RoundStats.LuckFactor);

            //Adjust damage if one of the fighters is stunned
            if (round.Fighter1Round.DamageDealt.StunValue > 1.5 && round.Fighter1Round.DamageDealt.StunValue > round.Fighter2Round.DamageDealt.StunValue)
            {
                Fighter2.RoundStats.LuckFactor *= 0.75;
                round.Fighter2Round.MultiplyDamageLuckFactor(0.75);
            }
            else if (round.Fighter2Round.DamageDealt.StunValue > 1.5 && round.Fighter2Round.DamageDealt.StunValue > round.Fighter1Round.DamageDealt.StunValue)
            {
                Fighter1.RoundStats.LuckFactor *= 0.75;
                round.Fighter1Round.MultiplyDamageLuckFactor(0.75);
            }

            round.Fighter1Round.DamageReceived = round.Fighter2Round.DamageDealt;
            round.Fighter2Round.DamageReceived = round.Fighter1Round.DamageDealt;
            round.Fighter1Round.SetCuts(Fighter1, round.Fighter2Round);
            round.Fighter2Round.SetCuts(Fighter2, round.Fighter1Round);
            round.Fighter1Round.SetPunches(Fighter1.RoundStats);
            round.Fighter2Round.SetPunches(Fighter2.RoundStats);

            Fighter1.TotalBaseDamage += round.Fighter1Round.DamageReceived.BaseDamage;
            Fighter2.TotalBaseDamage += round.Fighter2Round.DamageReceived.BaseDamage;

            Fighter1.FatigueRound(round.Fighter2Round.DamageDealt.EnduranceDamage);
            round.Fighter1Round.FatigueStartRound = Fighter1.FatigueLossStartRound;
            round.Fighter1Round.FatigueEndRound   = Fighter1.GetEndOfRoundFatigue();

            Fighter2.FatigueRound(round.Fighter1Round.DamageDealt.EnduranceDamage);
            round.Fighter2Round.FatigueStartRound = Fighter2.FatigueLossStartRound;
            round.Fighter2Round.FatigueEndRound   = Fighter2.GetEndOfRoundFatigue();

            round.Fighter1Round.IsTKOedByEndurance = Fighter1.EndurancePercent < 0;
            round.Fighter2Round.IsTKOedByEndurance = Fighter2.EndurancePercent < 0;

            round.Fighter1Round.Cuts = Fighter1.Cuts.Copy();
            round.Fighter2Round.Cuts = Fighter2.Cuts.Copy();

            round.Fighter1Round.EndEndurancePercent = Fighter1.EndurancePercent;
            round.Fighter2Round.EndEndurancePercent = Fighter2.EndurancePercent;
            round.Fighter1Round.EndEndurance        = Fighter1.EndurancePoints;
            round.Fighter2Round.EndEndurance        = Fighter2.EndurancePoints;

            round.Fighter1TotalScore = this.Fight.Fighter1Score;
            round.Fighter2TotalScore = this.Fight.Fighter2Score;
        }