Ejemplo n.º 1
0
 /// <summary>
 /// Gets a string representation with the provided format. The following parameters are accepted :
 /// <list type="bullet">
 /// <item>%n for name (lower case)</item>
 /// <item>%N for name (CamelCase)</item>
 /// <item>%b for base value</item>
 /// <item>%i for implant bonus</item>
 /// <item>%s for skills bonus</item>
 /// <item>%s1 for lower skill bonus</item>
 /// <item>%s2 for upper skill bonus</item>
 /// <item>%f for learning factor</item>
 /// <item>%e for effective value</item>
 /// </list>
 /// </summary>
 /// <returns>The formatted string.</returns>
 public string ToString(string format)
 {
     format = format.Replace("%n", m_attrib.ToString().ToLower());
     format = format.Replace("%N", m_attrib.ToString());
     format = format.Replace("%b", m_base.ToString());
     format = format.Replace("%i", m_implantBonus.ToString());
     format = format.Replace("%s", SkillsBonus.ToString());
     format = format.Replace("%s1", m_lowerSkillBonus.ToString());
     format = format.Replace("%s2", m_upperSkillBonus.ToString());
     format = format.Replace("%f", m_learningFactor.ToString("0.00"));
     format = format.Replace("%e", m_effectiveAttribute.ToString("0.00"));
     return(format);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets a string representation with the provided format. The following parameters are accepted :
 /// <list type="bullet">
 /// <item>%n for name (lower case)</item>
 /// <item>%N for name (CamelCase)</item>
 /// <item>%b for base value</item>
 /// <item>%i for implant bonus</item>
 /// <item>%s for skills bonus</item>
 /// <item>%s1 for lower skill bonus</item>
 /// <item>%s2 for upper skill bonus</item>
 /// <item>%f for learning factor</item>
 /// <item>%e for effective value</item>
 /// </list>
 /// </summary>
 /// <returns>The formatted string.</returns>
 public string ToString(string format)
 {
     format = format.Replace("%n", m_attrib.ToString().ToLower());
     format = format.Replace("%N", m_attrib.ToString());
     format = format.Replace("%b", m_base.ToString());
     format = format.Replace("%i", ImplantBonus.ToString());
     format = format.Replace("%s", SkillsBonus.ToString());
     format = format.Replace("%s1", LowerSkillBonus.ToString());
     format = format.Replace("%s2", UpperSkillBonus.ToString());
     format = format.Replace("%f", m_character.LearningFactor.ToString("0.00"));
     format = format.Replace("%e", EffectiveValue.ToString("0.00"));
     return(format);
 }