public override string ToString() { StringBuilder res = new StringBuilder(name); if (!ManaCost.HasNoCost) { res.Append(" | ").Append(ManaCost.ToString()); } res.Append(" | ").Append(TypeLine); if (Power != null && Toughness != null) { res.Append(" | ").Append(Power.ToString()).Append("/").Append(Toughness.ToString()); } if (Loyalty != null) { res.Append(" | L=").Append(Loyalty.ToString()); } int len0 = oracleText.Length > 0 ? oracleText[0].Length : 0; switch (oracleText.Length) { case 0: break; case 1: res.Append(" | ").Append(len0 > 30 ? oracleText[0].Substring(0, 30) + "…" : oracleText[0]); break; default: res.Append(" | ").Append(len0 > 30 ? oracleText[0].Substring(0, 30) + "…" : oracleText[0]).Append(" +").Append(oracleText.Length - 1).Append(" more"); break; } return(res.ToString()); }
/** * TODO * Equipment * Powers * Hindrances * * Later: * Injuries **/ public override string ToString() { StringBuilder retval = new StringBuilder(""); retval.AppendLine("Name:" + Name); retval.AppendLine("Charisma:" + Charisma.ToString()); retval.AppendLine("Pace:" + Pace.ToString()); retval.AppendLine("Parry:" + Parry.ToString()); retval.AppendLine("Toughness:" + Toughness.ToString()); retval.AppendLine("Agility:" + Agility.ToString()); retval.AppendLine("Smarts:" + Smarts.ToString()); retval.AppendLine("Strength:" + Strength.ToString()); retval.AppendLine("Spirit:" + Spirit.ToString()); retval.AppendLine("Vigor:" + Vigor.ToString()); return(retval.ToString()); }