void AddToResist(StringBuilder sb) { sb.AddOpenTag("p"); AddAbilityTag(sb, "HP", pf: false); sb.Group(name: "hpextra", text: SB(", ").LinksOrText(new TextGroupOptions() { semicolon = false }), min: 0); var im = SB("; "); AddTextTag(im, "Immunities", new TextGroupOptions() { semicolon = false }); sb.Group(im, min: 0); var weak = SB("; "); AddTextTag(weak, "Weaknesses", new TextGroupOptions() { semicolon = false }); sb.Group(weak, min: 0); var resi = SB("; "); AddTextTag(resi, "Resistances", new TextGroupOptions() { semicolon = false }); sb.Group(resi, min: 0); sb.AddCloseTag("p"); }
public void AddFirstSection(StringBuilder sb) { sb.Whitespace(); StringBuilder traits = new StringBuilder(); traits.AddOpenTag("p", cl: "traits"); traits.OptionalGroup(SB().AddCloseTag("p")); traits.AddSpan(cl: "frequency-[a-z]+", content: SB().MakeTextGroup("frequency"), min: 0); traits.AddSpan(cl: "alignment", content: SB().MakeTextGroup("alignment")); traits.AddSpan(cl: "size", content: SB().MakeTextGroup("size")); traits.AddSpan(cl: "type_[a-z]+", content: SB().MakeTextGroup("typetrait"), min: 0); traits.AddSpan(cl: "trait", content: SB().TextOrUrlGroup("trait", "traitu"), min: 0, max: -1); sb.Append(traits.ToString()); }
public void AddToPerception(StringBuilder sb) { sb.AddCloseTag("p"); sb.AddOpenTag("p"); sb.AddTag("b", content: "Senses"); sb.AddLink("Perception"); sb.PFNumberGroup("perception"); var optper = SB().Append(" \\("); var ppp = SB().Append(",? ?").PFNumberGroup("optperval").Append(" ").TextGroup(group: "optpertext", options: new TextGroupOptions() { comma = false, paren = false }); optper.Group(ppp, "fullopt", min: 1, max: -1); optper.Append("\\)"); optper.ToString().SpitFile("optper.txt"); sb.Group(optper, name: "perceptionmods", min: 0); }
void AddToStats(StringBuilder sb) { /*sb.AddOpenTag("p").AddTag("b", content: "Languages"); * sb.TextGroup("languages"); * sb.AddCloseTag("p").Whitespace(); */ sb.PlainPLine("languages", "Languages"); //< p >< b > Skills </ b > var sksb = SB().AddOpenTag("p").AddTag("b", content: "Skills"); // <a href="https://pf2.d20pfsrd.com/rules/skills/#Acrobatics_Dex">Acrobatics</a> +16, //Axis <a href="https://pf2.d20pfsrd.com/rules/skills/#Lore_Int">Lore</a> +17, Craft +21, //<a href="https://pf2.d20pfsrd.com/rules/skills/#Diplomacy_Cha">Diplomacy</a> +15, //<a href="https://pf2.d20pfsrd.com/rules/skills/#Occultism_Int">Occultism</a> +17, //<a href="https://pf2.d20pfsrd.com/rules/skills/#Religion_Wis">Religion</a> +17 //</p>. var inditag = SB().TextGroup(options: new TextGroupOptions() { comma = false }, min: 0).Group(SB().AddLink(content: SB().TextGroup().ToString()).ToString(), min: 0) .TextGroup(options: new TextGroupOptions() { comma = false }, min: 0) .Append(" ").PFNumberGroup().Append("(,|</p)"); sksb.Group(inditag, min: 0, max: -1); sksb.SpitJSRegex("skills.txt"); sb.Group(sksb, name: "skills"); sb.Append(">").Whitespace(); // <p><b>Str</b> +5, <b>Dex</b> +1, <b>Con</b> +6, <b>Int</b> +3, <b>Wis</b> +5, <b>Cha</b> +4</p> sb.AddOpenTag("p"); AddAbilityTag(sb, "Str").Append(", "); AddAbilityTag(sb, "Dex").Append(", "); AddAbilityTag(sb, "Con").Append(", "); AddAbilityTag(sb, "Int").Append(", "); AddAbilityTag(sb, "Wis").Append(", "); AddAbilityTag(sb, "Cha"); sb.AddCloseTag("p"); }
void AddToSaves(StringBuilder sb) { sb.PlainPLine("itemsline", "Items", min: 0); //other abilities var oat = SB().AddOpenTag("p").AddTag("b", content: SB().TextGroup().ToString()); oat.LinksOrText(); oat.AddCloseTag("p").Whitespace(); sb.Group(oat, name: "otherpower", min: 0, max: -1); oat.SpitJSRegex("oat.txt"); sb.Append("<hr( /)?>").Whitespace(); sb.AddOpenTag("p").AddTag("b", "AC"); sb.Append(" ").NumberGroup(group: "ac").Append("; "); AddAbilityTag(sb, "Fort").Append(", "); AddAbilityTag(sb, "Ref").Append(", "); AddAbilityTag(sb, "Will"); sb.Group(SB("; ").TextGroup("bonussave"), min: 0); sb.AddCloseTag("p"); }