public static string GenerateName(MDRRace race = null) { int numberOfSyllables = Util.SystemRoll(2) + 1; var result = ""; int lastChoice = -1; for (int lp = 0; lp < numberOfSyllables; lp++) { int choice = Util.SystemRoll(syllables.Length) - 1; if (choice == lastChoice) { continue; } result = result + syllables[choice]; lastChoice = choice; } result = result.Replace("ii", "i"); result = result.Replace("aa", "a"); result = result.Replace("uu", "u"); char firstLetter = result[0]; firstLetter = char.ToUpper(firstLetter); result = firstLetter + result.Remove(0, 1); return(result); }
/** Sets the stat defaults and limits based on a given races*/ public void SetRace(MDRRace race) { for (int lp = 0; lp < 6; lp++) { statAdjuster[lp].MinValue = race.MinStats[lp]; statAdjuster[lp].MaxValue = race.MaxStats[lp]; statAdjuster[lp].Value = race.DefaultStats[lp]; } FreePoints = race.BonusPoints; }
/** * Returns if this guild will accept characters of given race or not */ public bool CanAcceptRace(MDRRace race) { return(acceptedRaces.Contains(race)); }