Esempio n. 1
0
 public string GetScaleString(bool left)
 {
     if (left)
     {
         return(ScaleLeft != 0 ? ScaleLeft.ToString() : Common.NoData);
     }
     else
     {
         return(ScaleRight != 0 ? ScaleRight.ToString() : Common.NoData);
     }
 }
Esempio n. 2
0
        public string GetData()
        {
            if (this == null)
            {
                return("");
            }
            string result = "";

            result += this.Name;
            if (this.IsMonster())
            {
                result += Environment.NewLine;
                result += this.IsFrame(FRAME.Xyz)
                    ? string.Format("Rank {0}", (double.IsNaN(Rank) ? "?" : Rank.ToString()))
                    : string.Format("Level {0}", (double.IsNaN(Level) ? "?" : Level.ToString()));
                result += " " + this.Attribute.ToString();
                if (Type != TYPE.NONE)
                {
                    result += " " + string.Format("{0}-Type", this.Type.GetString());
                }
                if (this.IsPendulum)
                {
                    result += " Pendulum";
                }
                result += " " + this.Frame;
                if (this.Abilities.Count > 0)
                {
                    result += " " + string.Join(" ", this.Abilities);
                }
                result += " Monster";
                result += Environment.NewLine;
                result += string.Format("ATK {0}\nDEF {1}",
                                        (double.IsNaN(ATK) ? "?" : ATK.ToString()),
                                        (double.IsNaN(DEF) ? "?" : DEF.ToString()));
                if (this.IsPendulum)
                {
                    result += "\nPendulum Scale ";
                    if (ScaleLeft.Equals(ScaleRight))
                    {
                        result += (double.IsNaN(ScaleLeft) ? "?" : ScaleLeft.ToString());
                    }
                    else
                    {
                        result += (double.IsNaN(ScaleLeft) ? "?" : ScaleLeft.ToString());
                        result += "/";
                        result += (double.IsNaN(ScaleRight) ? "?" : ScaleRight.ToString());
                    }
                }
                result += Environment.NewLine;
                if (this.IsPendulum)
                {
                    result += "Pendulum Effect:\n";
                    result += this.PendulumEffect.CleanUpUnnecessarySpace();
                    result += Environment.NewLine;
                    if (this.IsFrame(FRAME.Normal))
                    {
                        result += "Lore:";
                        result += Environment.NewLine;
                    }
                    else
                    {
                        result += "Monster Effect:";
                        result += Environment.NewLine;
                    }
                }
            }
            else
            {
                result += Environment.NewLine;
                if (Property != PROPERTY.NONE && Property != PROPERTY.Normal)
                {
                    result += Property.GetString() + " ";
                }
                result += Frame.ToString() + " Card";
                result += Environment.NewLine;
            }

            result += this.Description.CleanUpUnnecessarySpace();

            return(result);
        }