Example #1
0
        public FighterRound BeginFighting(FighterFight other, Round round)
        {
            FighterRound ret = new FighterRound(round);

            ret.Tactics               = FighterRoundPlan.Adjusted(this.RoundStats.Plan, this.RoundStats.AdjustedTactics);
            ret.StartEndurance        = this.EndurancePoints;
            ret.StartEndurancePercent = this.EndurancePercent;
            ret.CheckFighterWarning(this);
            this.RoundStats.AdjustDirty(ret.IsWarned);
            if (ret.IsWarned)
            {
                this.Warnings++;
                if (this.Warnings > 1)
                {
                    ret.DeductPointWarning = true;
                }
            }
            ret.DamageDealt = RoundDamage.CalculateRoundDamage(this.RoundStats.AdjustedStats, this.RoundStats.AdjustedTactics,
                                                               other.RoundStats.AdjustedStats, other.RoundStats.AdjustedTactics, this.RoundStats.Plan.TargetArea, this.RoundStats.DamageAdjustment);
            this.RoundStats.SetPunchAccuracy(other.RoundStats);
            return(ret);
        }
Example #2
0
        public void SetCuts(FighterFight fighter, FighterRound otherRound)
        {
            double cP1        = otherRound.DamageDealt.BaseDamage * otherRound.DamageDealt.BaseDamage / 1000;
            double cutPercent = fighter.RoundStats.CutPercent * cP1;

            cutPercent *= Resources.CutPercentMultiplier;
            if (cutPercent > 0.5)
            {
                cutPercent = 0.5;
            }
            double cutAggPercent = fighter.RoundStats.CutAggravatePercent * cP1;

            cutAggPercent *= Resources.CutPercentMultiplier;
            if (cutAggPercent > 0.5)
            {
                cutAggPercent = 0.5;
            }

            SetCuts(fighter.Cuts, cutPercent, cutAggPercent);
            otherRound.DamageDealt.EnduranceDamage += fighter.Cuts.DamageForRound();
            otherRound.DamageDealt.CutDamage        = fighter.Cuts.DamageForRound();
        }
Example #3
0
        public static FightScore GetRoundScore(FighterRound fighter1Round, FighterRound fighter2Round, double score1, double score2)
        {
            int fighter1Score = 10;
            int fighter2Score = 10;
            int stun1         = fighter1Round.StunsCaused;
            int stun2         = fighter2Round.StunsCaused;

            if (score1 / 4 > score2)
            {
                stun1++;
            }
            if (score2 / 4 > score1)
            {
                stun2++;
            }
            if (stun1 > stun2)
            {
                fighter1Score = 10;
                fighter2Score = 9;
                int stunDiff = stun1 - stun2;
                if (stunDiff >= 4)
                {
                    fighter2Score = 7;
                }
                else if (stunDiff >= 2)
                {
                    fighter2Score = 8;
                }
            }
            else if (stun2 > stun1)
            {
                fighter2Score = 10;
                fighter1Score = 9;
                int stunDiff = stun2 - stun1;
                if (stunDiff >= 4)
                {
                    fighter1Score = 7;
                }
                else if (stunDiff >= 2)
                {
                    fighter1Score = 8;
                }
            }
            else
            {
                if (score1 > score2 && (score1 - score2) > Resources.RoundTieThreshold)
                {
                    fighter2Score = 9;
                }
                else if (score2 > score1 && (score2 - score1) > Resources.RoundTieThreshold)
                {
                    fighter1Score = 9;
                }
            }
            if (fighter1Round.DeductPointWarning)
            {
                fighter1Score--;
            }
            if (fighter2Round.DeductPointWarning)
            {
                fighter2Score--;
            }
            return(new FightScore(fighter1Score, fighter2Score));
        }
Example #4
0
 public Round(int round, FighterRound fighter1Round, FighterRound fighter2Round)
 {
     this.Fighter1Round = fighter1Round;
     this.Fighter2Round = fighter2Round;
     this.RoundNumber   = round;
 }
Example #5
0
 public FighterRoundCompare(FighterRound round, RoundDamage computed)
 {
     this.FighterRound = round;
     this.Computed     = computed;
     this.Diff         = RoundDamage.Diff(Computed, round.DamageReceived);
 }
Example #6
0
 public void SetCutDamageAndFatigue(FighterRound round)
 {
     round.DamageReceived.CutDamage = this.Cuts.DamageForRound();
 }
Example #7
0
 public void SetDamageReceived(FighterRound other)
 {
     this.DamageDealt = other.DamageReceived;
 }