public override string ToString() { if (Ability1 == Ability2) { if (Ability1 == Ability.None) { if (Feat == null || Feat == "") { return("Unassigned Ability Score Improvement"); } else { return("Feat: " + (ConfigManager.AlwaysShowSource ? Feat : SourceInvariantComparer.NoSource(Feat))); } } else { return("+2 " + Enum.GetName(typeof(Ability), Ability1)); } } else if (Ability2 == Ability.None) { return("+1 to " + Enum.GetName(typeof(Ability), Ability1) + " and ..."); } else { return("+1 to " + Enum.GetName(typeof(Ability), Ability1) + " and " + Enum.GetName(typeof(Ability), Ability2)); } }
public string ToString(OGLContext context, int level) { OGL.SubClass s = GetSubClass(context); if (s != null && s.SheetName != null && s.SheetName.Length > 0) { return(s.SheetName + " (" + getClassLevelUpToLevel(level) + ")"); } if (SubClassName != null && SubClassName != "") { return(SourceInvariantComparer.NoSource(SubClassName) + " (" + getClassLevelUpToLevel(level) + ")"); } return(SourceInvariantComparer.NoSource(ClassName) + " (" + getClassLevelUpToLevel(level) + ")"); }