Example #1
0
        public string ExplainOption(Option option)
        {
            string report = "";

            foreach (Stat stat in option.Adjustments.Keys) {

                for (int i = 0; i < option.Adjustments[stat]; i++) {
                    if (option.IncreaseStat) {
                        report = (report + "+");
                    }
                    else {
                        report = (report + "-");
                    }
                }
                report = (report + (Char.ToUpper(stat.Name[0]) + stat.Name.Substring (1)));
            }
            return report;
        }
Example #2
0
 void AdjustStats(Option option)
 {
     foreach (Stat stat in option.Adjustments.Keys) {
         if (option.IncreaseStat) {
             currentStats[stat] = currentStats[stat] + option.Adjustments[stat];
         }
         else {
             currentStats[stat] = currentStats[stat] - option.Adjustments[stat];
         }
     }
 }
Example #3
0
        public string ReportOption(Option option)
        {
            string report = "";

            foreach (Stat stat in option.Adjustments.Keys) {
                if (option.IncreaseStat) {
                    if (stat.Percentile) {
                        report = ("*set " + stat.Name + " %+ " + (option.Adjustments[stat] * 10) +"\n");
                    }
                    else {
                        report = ("*set " + stat.Name + " + " + option.Adjustments[stat] +"\n");
                    }
                }
                else {
                    if (stat.Percentile) {
                        report = ("*set " + stat.Name + " %- " + (option.Adjustments[stat] * 10) +"\n");
                    }
                    else {
                        report = ("*set " + stat.Name + " - " + option.Adjustments[stat] +"\n");
                    }
                }
            }
            return report;
        }