Esempio n. 1
0
        public static CutPenalty CutGroupPenalty(CutGroup cutGroup, CutSeverity level)
        {
            CutPenalty cp = new CutPenalty();

            if (cutGroup == CutGroup.BleedAbove)
            {
                cp.SpeedPenalty += 0.5 * (int)level;
                if (level == CutSeverity.High)
                {
                    cp.AgilityPenalty += 0.5;
                }
                else if (level == CutSeverity.Critical)
                {
                    cp.AgilityPenalty += 1;
                }
            }
            //else if (cutGroup == CutGroup.BleedBelow)
            //{
            //    double penalty = ((int) level - 1) * 0.5;
            //    cp.SpeedPenalty += penalty;
            //    cp.AgilityPenalty += penalty;
            //}
            else if (cutGroup == CutGroup.Swell && (int)level >= 2)
            {
                double penalty = (level == CutSeverity.Medium) ? 0.5 : level == CutSeverity.High ? 1.5 : 3.0;
                cp.AgilityPenalty += penalty;
                cp.SpeedPenalty   += penalty;
            }
            else if (cutGroup == CutGroup.Nose)
            {
                cp.FatiguePenalty = 1;
            }
            return(cp);
        }
Esempio n. 2
0
 private void AdjustCutPenalty(CutPenalty cp)
 {
     this.Agility -= cp.AgilityPenalty;
     this.Speed   -= cp.SpeedPenalty;
     if (this.Agility <= 1)
     {
         this.Agility = 1;
     }
     if (this.Speed <= 1)
     {
         this.Speed = 1;
     }
 }
Esempio n. 3
0
        public CutPenalty GetPenalty()
        {
            CutPenalty cp = Resources.CutGroupPenaltyDictionary[this.CutGroup][this.Level];

            if (IsSwollenShut && AggravatedTimes >= 1)
            {
                cp = cp.Copy();
                CutPenalty cp3 = Resources.CutGroupPenaltyDictionary[this.CutGroup][CutSeverity.High];
                for (int i = 1; i <= AggravatedTimes; i++)
                {
                    cp.Add(cp3);
                }
            }
            return(cp);
            //return Resources.CutGroupPenaltyDictionary[this.CutGroup][this.Level];
        }
Esempio n. 4
0
 public void Add(CutPenalty other)
 {
     this.AgilityPenalty += other.AgilityPenalty;
     this.SpeedPenalty   += other.SpeedPenalty;
     this.FatiguePenalty += other.FatiguePenalty;
 }
Esempio n. 5
0
        private void AdjustCut(CutBase cut)
        {
            CutPenalty cp = cut.GetPenalty();

            AdjustCutPenalty(cp);
        }