コード例 #1
0
ファイル: GCA.WikiExport.cs プロジェクト: Syndaryl/GCAPlugins
        string SkillFormatter(GCATrait trait, GCAWriter fw)
        {
            var builder = new StringBuilder();
            builder.AppendFormat("{0} {1}:", trait.DisplayName, trait.get_TagItem("type"));
            var label = builder.ToString();

            builder.Clear();
            switch ((SkillType)int.Parse(trait.get_TagItem("sd")))
            {
                case SkillType.Skill:
                    string stepOff = trait.get_TagItem("stepoff");
                    if (!stepOff.Equals(string.Empty))
                    {
                        builder.Append(stepOff);
                        string step = trait.get_TagItem("step");
                        if (!step.Equals(string.Empty))
                            builder.Append(step);
                        else
                            builder.Append("?");
                    }
                    else
                    {
                        builder.Append("?+?");
                    }
                    builder.AppendFormat(" - {0}", trait.get_TagItem("level"));
                    break;
                case SkillType.Technique:
                    builder.AppendFormat(" - {0}", trait.get_TagItem("level"));
                    break;
                case SkillType.Combo:
                    builder.AppendFormat(" - {0}", trait.get_TagItem("combolevel"));
                    break;
                default:
                    break;
            }
            builder.AppendFormat(" [{0}]", trait.Points);

            return fw.FormatTrait(label, builder.ToString());
        }
コード例 #2
0
ファイル: GCA.WikiExport.cs プロジェクト: Syndaryl/GCAPlugins
        string AttributeFormatter(GCATrait trait, GCAWriter fw)
        {
            var builder = new StringBuilder();
            builder.Append(trait.DisplayName);

            var label = builder.ToString();

            builder.Clear();
            builder.Append(trait.DisplayScore);

            builder.AppendFormat(" [{0}]", trait.Points);
            return fw.FormatTrait(label, builder.ToString());
        }
コード例 #3
0
ファイル: GCA.WikiExport.cs プロジェクト: Syndaryl/GCAPlugins
        string EquipmentFormatter(GCATrait trait, GCAWriter fw)
        {
            var builder = new StringBuilder();
            builder.Append(trait.DisplayName);

            var label = builder.ToString();

            builder.Clear();
            if (!string.IsNullOrEmpty(trait.NameExt) || trait.Mods.Count() > 0)
                builder.Append("(");
            if (!string.IsNullOrEmpty(trait.NameExt))
                builder.Append(trait.NameExt);
            if (!string.IsNullOrEmpty(trait.NameExt) && trait.Mods.Count() > 0)
                builder.Append("; ");
            if (trait.Mods.Count() > 0)
            {
                var mods = new List<GCAModifier>();
                foreach (GCAModifier item in trait.Mods)
                {
                    mods.Add(item);
                }
                builder.Append(String.Join("; ", mods.Select(x => ModifierFormatter(x, fw))));
            }
            if (!string.IsNullOrEmpty(trait.NameExt) || trait.Mods.Count() > 0)
                builder.Append(")");

            if ( Convert.ToInt32( trait.get_TagItem("count")) > 1 )
            {
                builder.AppendFormat(" {0} lbs, ${1} ×{2} = {3} lbs ${4}", trait.get_TagItem("precountweight"), trait.get_TagItem("precountcost"), trait.get_TagItem("count"), trait.get_TagItem("weight"), trait.get_TagItem("cost"));
            }
            else
            {
                builder.AppendFormat(" {0} lbs ${1}", trait.get_TagItem("weight"), trait.get_TagItem("cost"));
            }
            return fw.FormatTrait(label, builder.ToString());
        }
コード例 #4
0
ファイル: GCA.WikiExport.cs プロジェクト: Syndaryl/GCAPlugins
        string AdvantageFormatter(GCATrait trait, GCAWriter fw)
        {
            var builder = new StringBuilder();
            builder.Append(trait.Name);
            if (!trait.get_TagItem("level").Equals("1") || !string.IsNullOrEmpty(trait.get_TagItem("upto")) || !string.IsNullOrEmpty(trait.LevelName)) // has more than one level
            {
                builder.AppendFormat(" {0}", string.IsNullOrEmpty(trait.LevelName) ? trait.get_TagItem("level") : trait.LevelName);
            }

            var label = builder.ToString();

            builder.Clear();
            if (!string.IsNullOrEmpty(trait.NameExt) || trait.Mods.Count() > 0)
                builder.Append(" (");
            if (!string.IsNullOrEmpty(trait.NameExt))
                builder.Append(trait.NameExt);
            if (!string.IsNullOrEmpty(trait.NameExt) && trait.Mods.Count() > 0)
                builder.Append("; ");
            if (trait.Mods.Count() > 0)
            {
                var mods = new List<GCAModifier>();
                foreach (GCAModifier item in trait.Mods)
                {
                    mods.Add(item);
                }
                builder.Append(String.Join("; ", mods.Select(x => ModifierFormatter(x, fw))));
            }
            if (!string.IsNullOrEmpty(trait.NameExt) || trait.Mods.Count() > 0)
                builder.Append(")");

            builder.AppendFormat(" [{0}]", trait.Points);

            return fw.FormatTrait(label, builder.ToString());
        }