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; }
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]; } } }
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; }