mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 11:42:29 +00:00
4950 lines
319 KiB
HTML
4950 lines
319 KiB
HTML
|
|
<button name="act_k-network-call" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_sheet_state" value="settings" type="hidden" title="@{sheet_state}"/>
|
|
<input name="attr_collapsed" value="" type="hidden" title="@{collapsed}"/>
|
|
<div class="subsystem-style compendium-drop-target antagonists" id="main">
|
|
<input name="attr_drop_name" accept="Name" value="" type="hidden" title="@{drop_name}"/>
|
|
<input name="attr_drop_data" accept="data" value="" type="hidden" title="@{drop_data}"/>
|
|
<nav class="sheet-nav" id="main-nav">
|
|
<button class="subsystem-style sheet-nav__tab sheet-nav__tab--possible sheet-nav__tab--possible--character all" name="act_nav-all" data-i18n="all pages" data-i18n-title="View all sections" role="heading" aria-level="5" type="action">
|
|
</button>
|
|
<button class="subsystem-style sheet-nav__tab sheet-nav__tab--possible sheet-nav__tab--possible--character general" name="act_nav-general" data-i18n="general pages" data-i18n-title="View general information" role="heading" aria-level="5" type="action">
|
|
</button>
|
|
<button class="subsystem-style sheet-nav__tab sheet-nav__tab--possible sheet-nav__tab--possible--character powers" name="act_nav-powers" data-i18n="powers pages" data-i18n-title="View powers information" role="heading" aria-level="5" type="action">
|
|
</button>
|
|
<button class="subsystem-style sheet-nav__tab sheet-nav__tab--possible sheet-nav__tab--possible--antagonist antagonist" name="act_nav-antagonist" data-i18n="antagonist" data-i18n-title="View antagonist" role="heading" aria-level="5" type="action">
|
|
</button>
|
|
<button class="subsystem-style sheet-nav__tab sheet-nav__tab--possible sheet-nav__tab--possible--gm_screen gm_screen" name="act_nav-gm-screen" data-i18n="gm screen" data-i18n-title="View gm screen" role="heading" aria-level="5" type="action">
|
|
</button>
|
|
<button class="subsystem-style sheet-nav__tab sheet-nav__tab--possible sheet-nav__tab--possible--party_screen party_screen" name="act_nav-party-screen" data-i18n="party screen" data-i18n-title="View party screen" role="heading" aria-level="5" type="action">
|
|
</button>
|
|
<button class="pictos active sheet-nav__tab settings" name="act_nav-settings" data-i18n-title="open the settings page" role="heading" aria-level="5" type="action">y
|
|
</button>
|
|
</nav>
|
|
<article class="navigable-section--settings navigable-section settings active" id="settings">
|
|
<section class="section-system-panel" id="system-panel">
|
|
<h2 data-i18n="system options"></h2>
|
|
<label class="input-label"><span data-i18n="system"></span>
|
|
<select class="underlined input-label__input" name="attr_system" title="@{system}">
|
|
<option value="scion-origin" data-i18n="scion-origin" selected="">
|
|
</option>
|
|
<option value="scion-hero" data-i18n="scion-hero">
|
|
</option>
|
|
</select>
|
|
</label>
|
|
<label class="input-label"><span data-i18n="sheet type"></span>
|
|
<select class="underlined input-label__input" name="attr_sheet_type" title="@{sheet_type}">
|
|
<option value="character" data-i18n="character" selected="">
|
|
</option>
|
|
<option value="antagonist" data-i18n="antagonist">
|
|
</option>
|
|
<option value="gm_screen" data-i18n="gm screen">
|
|
</option>
|
|
<option value="party_screen" data-i18n="party screen">
|
|
</option>
|
|
</select>
|
|
</label>
|
|
<label class="input-label"><span data-i18n="target number"></span>
|
|
<input class="underlined input-label__input" name="attr_target_number" type="number" value="8" title="@{target_number}"/>
|
|
</label>
|
|
<label class="input-label"><span data-i18n="again"></span>
|
|
<input class="underlined input-label__input" name="attr_again" type="number" value="10" min="2" max="10" title="@{again}"/>
|
|
</label>
|
|
<h3 class="span-all" data-i18n="System Supplements"></h3>
|
|
<div class="flex-box flex-wrap half-gap">
|
|
<label class="input-label"><span class="input-label__text" data-i18n="titanomachy"></span>
|
|
<input class="input-label__input" name="attr_titanomachy" type="checkbox" value="1" title="@{titanomachy}"/>
|
|
</label>
|
|
</div>
|
|
</section>
|
|
<section class="section-sheet-behavior" id="sheet-behavior">
|
|
<h2 data-i18n="sheet behavior"></h2>
|
|
<label class="input-label"><span data-i18n="difficulty automation"></span>
|
|
<select class="underlined input-label__input" name="attr_difficulty_query" title="@{difficulty_query}">
|
|
<option value="off" data-i18n="off" selected="">
|
|
</option>
|
|
<option value="on" data-i18n="on">
|
|
</option>
|
|
</select>
|
|
</label>
|
|
<label class="input-label"><span data-i18n="enhancement automation"></span>
|
|
<select class="underlined input-label__input" name="attr_enhancement_query" title="@{enhancement_query}">
|
|
<option value="off" data-i18n="off" selected="">
|
|
</option>
|
|
<option value="on" data-i18n="on">
|
|
</option>
|
|
</select>
|
|
</label>
|
|
<label class="input-label"><span data-i18n="rolls are"></span>
|
|
<select class="underlined input-label__input" name="attr_whisper" title="@{whisper}">
|
|
<option value="" data-i18n="public" selected="">
|
|
</option>
|
|
<option value="/w gm " data-i18n="whispered to gm">
|
|
</option>
|
|
</select>
|
|
</label>
|
|
</section>
|
|
</article>
|
|
<article class="navigable-section sheet navigable-section--all navigable-section--general navigable-section--powers subsystem-style system-scion-origin system-scion-hero" id="sheet">
|
|
<section class="section-image-head" id="image-head"><img class="subsystem-display scion-origin active" alt="Scion Origin" role="heading" aria-level="1" src="https://s3.amazonaws.com/files.d20.io/images/251683701/lgeAjNoeRDqQccd7s0hsNQ/original.png"/><img class="subsystem-display scion-hero" alt="Scion Hero" role="heading" aria-level="1" src="https://s3.amazonaws.com/files.d20.io/images/251683696/wYblqZVpGI3AhAS9R3a-TA/original.png"/></section>
|
|
<section class="section-character_details" id="character_details">
|
|
<label class="input-label stacked"><span data-i18n="name"></span>
|
|
<input class="underlined input-label__input" type="text" name="attr_character_name" role="heading" aria-level="4" title="@{character_name}"/>
|
|
</label>
|
|
<label class="input-label stacked"><span data-i18n="player"></span>
|
|
<input class="underlined input-label__input" type="text" name="attr_player" role="heading" aria-level="4" title="@{player}"/>
|
|
</label>
|
|
<label class="input-label stacked"><span data-i18n="chronicle"></span>
|
|
<input class="underlined input-label__input" type="text" name="attr_chronicle" role="heading" aria-level="4" title="@{chronicle}"/>
|
|
</label>
|
|
<label class="input-label stacked"><span data-i18n="parent"></span>
|
|
<input class="underlined input-label__input" type="text" name="attr_parent" role="heading" aria-level="4" title="@{parent}"/>
|
|
</label>
|
|
</section>
|
|
<section class="section-momentum subsystem-style" id="momentum">
|
|
<button class="subsystem-style subsystem-display scion-origin expandable-header momentum" name="act_momentum" data-i18n="momentum" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button>
|
|
<button class="subsystem-style subsystem-display scion-hero split expandable-header momentum" name="act_momentum" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
<h2 data-i18n="momentum"></h2>
|
|
<h2 data-i18n="legend"></h2>
|
|
</button>
|
|
<div class="dot-row twelve-dots momentum-content boxes">
|
|
<select class="dot-number underlined" name="attr_momentum" title="@{momentum}">
|
|
<option value="0" selected="">12
|
|
</option>
|
|
<option value="1">12
|
|
</option>
|
|
<option value="2">12
|
|
</option>
|
|
<option value="3">12
|
|
</option>
|
|
<option value="4">12
|
|
</option>
|
|
<option value="5">12
|
|
</option>
|
|
<option value="6">12
|
|
</option>
|
|
<option value="7">12
|
|
</option>
|
|
<option value="8">12
|
|
</option>
|
|
<option value="9">12
|
|
</option>
|
|
<option value="10">12
|
|
</option>
|
|
<option value="11">12
|
|
</option>
|
|
<option value="12">12
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="clearer dot" name="attr_momentum" checked="" value="0" type="radio" title="@{momentum}"/>
|
|
<input class="dot" name="attr_momentum" value="1" type="radio" title="@{momentum}"/>
|
|
<input class="dot" name="attr_momentum" value="2" type="radio" title="@{momentum}"/>
|
|
<input class="dot" name="attr_momentum" value="3" type="radio" title="@{momentum}"/>
|
|
<input class="dot" name="attr_momentum" value="4" type="radio" title="@{momentum}"/>
|
|
<input class="dot" name="attr_momentum" value="5" type="radio" title="@{momentum}"/>
|
|
<input class="dot" name="attr_momentum" value="6" type="radio" title="@{momentum}"/>
|
|
<input class="dot" name="attr_momentum" value="7" type="radio" title="@{momentum}"/>
|
|
<input class="dot" name="attr_momentum" value="8" type="radio" title="@{momentum}"/>
|
|
<input class="dot" name="attr_momentum" value="9" type="radio" title="@{momentum}"/>
|
|
<input class="dot" name="attr_momentum" value="10" type="radio" title="@{momentum}"/>
|
|
<input class="dot" name="attr_momentum" value="11" type="radio" title="@{momentum}"/>
|
|
<input class="dot" name="attr_momentum" value="12" type="radio" title="@{momentum}"/>
|
|
</div>
|
|
</div>
|
|
<div class="dot-row four-dots legend-content subsystem-display scion-hero">
|
|
<select class="dot-number underlined" name="attr_legend" title="@{legend}">
|
|
<option value="0" selected="">4
|
|
</option>
|
|
<option value="1">4
|
|
</option>
|
|
<option value="2">4
|
|
</option>
|
|
<option value="3">4
|
|
</option>
|
|
<option value="4">4
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="clearer dot" name="attr_legend" checked="" value="0" type="radio" title="@{legend}"/>
|
|
<input class="dot" name="attr_legend" value="1" type="radio" title="@{legend}"/>
|
|
<input class="dot" name="attr_legend" value="2" type="radio" title="@{legend}"/>
|
|
<input class="dot" name="attr_legend" value="3" type="radio" title="@{legend}"/>
|
|
<input class="dot" name="attr_legend" value="4" type="radio" title="@{legend}"/>
|
|
</div>
|
|
</div>
|
|
<div class="dot-row four-dots legend-max-content boxes subsystem-display scion-hero">
|
|
<select class="dot-number underlined" name="attr_legend_max" title="@{legend|max}">
|
|
<option value="0" selected="">4
|
|
</option>
|
|
<option value="1">4
|
|
</option>
|
|
<option value="2">4
|
|
</option>
|
|
<option value="3">4
|
|
</option>
|
|
<option value="4">4
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="clearer dot" name="attr_legend_max" checked="" value="0" type="radio" title="@{legend|max}"/>
|
|
<input class="dot" name="attr_legend_max" value="1" type="radio" title="@{legend|max}"/>
|
|
<input class="dot" name="attr_legend_max" value="2" type="radio" title="@{legend|max}"/>
|
|
<input class="dot" name="attr_legend_max" value="3" type="radio" title="@{legend|max}"/>
|
|
<input class="dot" name="attr_legend_max" value="4" type="radio" title="@{legend|max}"/>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section class="section-virtue subsystem-display scion-hero scion-origin" id="virtue">
|
|
<button class="subsystem-style expandable-header virtue" name="act_virtue" data-i18n="virtue" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button>
|
|
<div class="dot-row size-number">
|
|
<input class="underlined" name="attr_virtue_1" type="text" title="@{virtue_1}"/>
|
|
<select class="dot-number underlined" name="attr_virtue" title="@{virtue}">
|
|
<option value="-2">2
|
|
</option>
|
|
<option value="-1">2
|
|
</option>
|
|
<option value="0" selected="">2
|
|
</option>
|
|
<option value="1">2
|
|
</option>
|
|
<option value="2">2
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-fill dot" name="attr_virtue" value="-2" type="radio" title="@{virtue}"/>
|
|
<input class="no-fill dot" name="attr_virtue" value="-1" type="radio" title="@{virtue}"/>
|
|
<input class="no-fill dot" name="attr_virtue" checked="" value="0" type="radio" title="@{virtue}"/>
|
|
<input class="no-fill dot" name="attr_virtue" value="1" type="radio" title="@{virtue}"/>
|
|
<input class="no-fill dot" name="attr_virtue" value="2" type="radio" title="@{virtue}"/>
|
|
</div>
|
|
<input class="underlined" name="attr_virtue_2" type="text" title="@{virtue_2}"/>
|
|
</div>
|
|
</section>
|
|
<section class="section-skills navigable-section navigable-section--all navigable-section--general" id="skills">
|
|
<button class="subsystem-style expandable-header skills" name="act_skills" data-i18n="skills" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button><span class="locked column-2" hidden=""></span>
|
|
<fieldset class="repeating_skill">
|
|
<input name="attr_name" hidden="" type="text" title="@{repeating_skill_$X_name}"/>
|
|
<input name="attr_path" type="checkbox" title="@{repeating_skill_$X_path}"/>
|
|
<div class="dot-row">
|
|
<button class="roller" name="roll_roll" value="@{action}" type="roll"><span name="attr_name" data-i18n-dynamic="" title="@{repeating_skill_$X_name}"></span>
|
|
</button>
|
|
<button name="act_action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_action" type="hidden" title="@{repeating_skill_$X_action}"/>
|
|
<input class="subsystem-display scion-origin scion-hero active underlined" name="attr_specialty" type="text" title="@{repeating_skill_$X_specialty}"/>
|
|
<select class="dot-number underlined" name="attr_rating" title="@{repeating_skill_$X_rating}">
|
|
<option value="0" selected="">5
|
|
</option>
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="clearer dot" name="attr_rating" checked="" value="0" type="radio" title="@{repeating_skill_$X_rating}"/>
|
|
<input class="dot" name="attr_rating" value="1" type="radio" title="@{repeating_skill_$X_rating}"/>
|
|
<input class="dot" name="attr_rating" value="2" type="radio" title="@{repeating_skill_$X_rating}"/>
|
|
<input class="dot" name="attr_rating" value="3" type="radio" title="@{repeating_skill_$X_rating}"/>
|
|
<input class="dot" name="attr_rating" value="4" type="radio" title="@{repeating_skill_$X_rating}"/>
|
|
<input class="dot" name="attr_rating" value="5" type="radio" title="@{repeating_skill_$X_rating}"/>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</section>
|
|
<section class="section-attributes navigable-section navigable-section--all navigable-section--general" id="attributes">
|
|
<button class="subsystem-style expandable-header attributes" name="act_attributes" data-i18n="attributes" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button>
|
|
<h3 class="subsystem-display scion-hero scion-origin active" data-i18n="mental"></h3>
|
|
<h3 class="subsystem-display scion-hero scion-origin active" data-i18n="physical"></h3>
|
|
<h3 class="subsystem-display scion-hero scion-origin" data-i18n="social"></h3>
|
|
<div class="approach-container power">
|
|
<h4 class="subsystem-display scion-hero scion-origin active" data-i18n="power"></h4>
|
|
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
|
<button class="roller" name="roll_intellect" role="header" aria-level="5" data-i18n="intellect" value="@{intellect_action}" type="roll">
|
|
</button>
|
|
<button name="act_intellect-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_intellect_action" type="hidden" title="@{intellect_action}"/>
|
|
<select class="dot-number underlined" name="attr_intellect" title="@{intellect}">
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-clear dot" name="attr_intellect" value="1" type="radio" title="@{intellect}"/>
|
|
<input class="no-clear dot" name="attr_intellect" value="2" type="radio" title="@{intellect}"/>
|
|
<input class="no-clear dot" name="attr_intellect" value="3" type="radio" title="@{intellect}"/>
|
|
<input class="no-clear dot" name="attr_intellect" value="4" type="radio" title="@{intellect}"/>
|
|
<input class="no-clear dot" name="attr_intellect" value="5" type="radio" title="@{intellect}"/>
|
|
</div>
|
|
</div>
|
|
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
|
<button class="roller" name="roll_might" role="header" aria-level="5" data-i18n="might" value="@{might_action}" type="roll">
|
|
</button>
|
|
<button name="act_might-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_might_action" type="hidden" title="@{might_action}"/>
|
|
<select class="dot-number underlined" name="attr_might" title="@{might}">
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-clear dot" name="attr_might" value="1" type="radio" title="@{might}"/>
|
|
<input class="no-clear dot" name="attr_might" value="2" type="radio" title="@{might}"/>
|
|
<input class="no-clear dot" name="attr_might" value="3" type="radio" title="@{might}"/>
|
|
<input class="no-clear dot" name="attr_might" value="4" type="radio" title="@{might}"/>
|
|
<input class="no-clear dot" name="attr_might" value="5" type="radio" title="@{might}"/>
|
|
</div>
|
|
</div>
|
|
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
|
<button class="roller" name="roll_presence" role="header" aria-level="5" data-i18n="presence" value="@{presence_action}" type="roll">
|
|
</button>
|
|
<button name="act_presence-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_presence_action" type="hidden" title="@{presence_action}"/>
|
|
<select class="dot-number underlined" name="attr_presence" title="@{presence}">
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-clear dot" name="attr_presence" value="1" type="radio" title="@{presence}"/>
|
|
<input class="no-clear dot" name="attr_presence" value="2" type="radio" title="@{presence}"/>
|
|
<input class="no-clear dot" name="attr_presence" value="3" type="radio" title="@{presence}"/>
|
|
<input class="no-clear dot" name="attr_presence" value="4" type="radio" title="@{presence}"/>
|
|
<input class="no-clear dot" name="attr_presence" value="5" type="radio" title="@{presence}"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="approach-container finesse">
|
|
<h4 class="subsystem-display scion-hero scion-origin active" data-i18n="finesse"></h4>
|
|
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
|
<button class="roller" name="roll_cunning" role="header" aria-level="5" data-i18n="cunning" value="@{cunning_action}" type="roll">
|
|
</button>
|
|
<button name="act_cunning-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_cunning_action" type="hidden" title="@{cunning_action}"/>
|
|
<select class="dot-number underlined" name="attr_cunning" title="@{cunning}">
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-clear dot" name="attr_cunning" value="1" type="radio" title="@{cunning}"/>
|
|
<input class="no-clear dot" name="attr_cunning" value="2" type="radio" title="@{cunning}"/>
|
|
<input class="no-clear dot" name="attr_cunning" value="3" type="radio" title="@{cunning}"/>
|
|
<input class="no-clear dot" name="attr_cunning" value="4" type="radio" title="@{cunning}"/>
|
|
<input class="no-clear dot" name="attr_cunning" value="5" type="radio" title="@{cunning}"/>
|
|
</div>
|
|
</div>
|
|
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
|
<button class="roller" name="roll_dexterity" role="header" aria-level="5" data-i18n="dexterity" value="@{dexterity_action}" type="roll">
|
|
</button>
|
|
<button name="act_dexterity-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_dexterity_action" type="hidden" title="@{dexterity_action}"/>
|
|
<select class="dot-number underlined" name="attr_dexterity" title="@{dexterity}">
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-clear dot" name="attr_dexterity" value="1" type="radio" title="@{dexterity}"/>
|
|
<input class="no-clear dot" name="attr_dexterity" value="2" type="radio" title="@{dexterity}"/>
|
|
<input class="no-clear dot" name="attr_dexterity" value="3" type="radio" title="@{dexterity}"/>
|
|
<input class="no-clear dot" name="attr_dexterity" value="4" type="radio" title="@{dexterity}"/>
|
|
<input class="no-clear dot" name="attr_dexterity" value="5" type="radio" title="@{dexterity}"/>
|
|
</div>
|
|
</div>
|
|
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
|
<button class="roller" name="roll_manipulation" role="header" aria-level="5" data-i18n="manipulation" value="@{manipulation_action}" type="roll">
|
|
</button>
|
|
<button name="act_manipulation-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_manipulation_action" type="hidden" title="@{manipulation_action}"/>
|
|
<select class="dot-number underlined" name="attr_manipulation" title="@{manipulation}">
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-clear dot" name="attr_manipulation" value="1" type="radio" title="@{manipulation}"/>
|
|
<input class="no-clear dot" name="attr_manipulation" value="2" type="radio" title="@{manipulation}"/>
|
|
<input class="no-clear dot" name="attr_manipulation" value="3" type="radio" title="@{manipulation}"/>
|
|
<input class="no-clear dot" name="attr_manipulation" value="4" type="radio" title="@{manipulation}"/>
|
|
<input class="no-clear dot" name="attr_manipulation" value="5" type="radio" title="@{manipulation}"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="approach-container resistance">
|
|
<h4 class="subsystem-display scion-hero scion-origin active" data-i18n="resilience"></h4>
|
|
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
|
<button class="roller" name="roll_resolve" role="header" aria-level="5" data-i18n="resolve" value="@{resolve_action}" type="roll">
|
|
</button>
|
|
<button name="act_resolve-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_resolve_action" type="hidden" title="@{resolve_action}"/>
|
|
<select class="dot-number underlined" name="attr_resolve" title="@{resolve}">
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-clear dot" name="attr_resolve" value="1" type="radio" title="@{resolve}"/>
|
|
<input class="no-clear dot" name="attr_resolve" value="2" type="radio" title="@{resolve}"/>
|
|
<input class="no-clear dot" name="attr_resolve" value="3" type="radio" title="@{resolve}"/>
|
|
<input class="no-clear dot" name="attr_resolve" value="4" type="radio" title="@{resolve}"/>
|
|
<input class="no-clear dot" name="attr_resolve" value="5" type="radio" title="@{resolve}"/>
|
|
</div>
|
|
</div>
|
|
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
|
<button class="roller" name="roll_stamina" role="header" aria-level="5" data-i18n="stamina" value="@{stamina_action}" type="roll">
|
|
</button>
|
|
<button name="act_stamina-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_stamina_action" type="hidden" title="@{stamina_action}"/>
|
|
<select class="dot-number underlined" name="attr_stamina" title="@{stamina}">
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-clear dot" name="attr_stamina" value="1" type="radio" title="@{stamina}"/>
|
|
<input class="no-clear dot" name="attr_stamina" value="2" type="radio" title="@{stamina}"/>
|
|
<input class="no-clear dot" name="attr_stamina" value="3" type="radio" title="@{stamina}"/>
|
|
<input class="no-clear dot" name="attr_stamina" value="4" type="radio" title="@{stamina}"/>
|
|
<input class="no-clear dot" name="attr_stamina" value="5" type="radio" title="@{stamina}"/>
|
|
</div>
|
|
</div>
|
|
<div class="dot-row size-number subsystem-display scion-hero scion-origin active">
|
|
<button class="roller" name="roll_composure" role="header" aria-level="5" data-i18n="composure" value="@{composure_action}" type="roll">
|
|
</button>
|
|
<button name="act_composure-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_composure_action" type="hidden" title="@{composure_action}"/>
|
|
<select class="dot-number underlined" name="attr_composure" title="@{composure}">
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-clear dot" name="attr_composure" value="1" type="radio" title="@{composure}"/>
|
|
<input class="no-clear dot" name="attr_composure" value="2" type="radio" title="@{composure}"/>
|
|
<input class="no-clear dot" name="attr_composure" value="3" type="radio" title="@{composure}"/>
|
|
<input class="no-clear dot" name="attr_composure" value="4" type="radio" title="@{composure}"/>
|
|
<input class="no-clear dot" name="attr_composure" value="5" type="radio" title="@{composure}"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section class="section-health" id="health">
|
|
<button class="subsystem-style expandable-header health" name="act_health" data-i18n="health" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-injury" data-i18n-title="create a injury" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-injury" data-i18n-title="edit section" type="action">
|
|
</button>
|
|
<div class="input-label input-label--button">
|
|
<button class="roller" name="roll_movement_dice" data-i18n="movement dice" role="heading" aria-level="5" value="@{movement_dice_action}" type="roll">
|
|
</button>
|
|
<input class="underlined input-label__input" name="attr_movement_dice" type="number" readonly="" value="1" title="@{movement_dice}"/>
|
|
</div>
|
|
<button name="act_movement-dice-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_movement_dice_action" type="hidden" title="@{movement_dice_action}"/>
|
|
<div class="input-label input-label--button">
|
|
<button class="roller" name="roll_defense" role="heading" data-i18n="defense roll" aria-level="5" value="@{defense_action}" type="roll">
|
|
</button>
|
|
<input class="underlined input-label__input" name="attr_defense" type="number" readonly="" value="1" title="@{defense}"/>
|
|
</div>
|
|
<button name="act_defense-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_defense_action" type="hidden" title="@{defense_action}"/>
|
|
<div class="input-label input-label--button initiative-label">
|
|
<button class="roller" name="roll_pc_initiative" data-i18n="initiative" role="heading" aria-level="5" value="@{pc_initiative_action}" type="roll">
|
|
</button>
|
|
<button name="act_pc-initiative-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_pc_initiative_action" type="hidden" title="@{pc_initiative_action}"/>
|
|
<select class="underlined" name="attr_initiative_skill" id="initiative-skill-select" title="@{initiative_skill}">
|
|
<option value="" data-i18n="select one">
|
|
</option>
|
|
</select>
|
|
</div><span class="pseudo-control" hidden=""></span>
|
|
<fieldset class="repeating_injury">
|
|
<input class="type-control" name="attr_display_state" value="bruised" type="hidden" title="@{repeating_injury_$X_display_state}"/>
|
|
<div class="type">
|
|
<input class="collapse-control" name="attr_collapse" value="1" type="hidden" title="@{repeating_injury_$X_collapse}"/>
|
|
<label class="collapse-interface">
|
|
<input name="attr_collapse" value="1" hidden="" checked="" type="checkbox" title="@{repeating_injury_$X_collapse}"/>
|
|
</label>
|
|
<input name="attr_affected" type="checkbox" title="@{repeating_injury_$X_affected}"/>
|
|
<select class="underlined" name="attr_type" title="@{repeating_injury_$X_type}">
|
|
<option value="bruised" data-i18n="bruised" selected="">
|
|
</option>
|
|
<option value="injured" data-i18n="injured">
|
|
</option>
|
|
<option value="maimed" data-i18n="maimed">
|
|
</option>
|
|
</select>
|
|
<input class="underlined" name="attr_name" data-i18n-placeholder="injury name" type="text" title="@{repeating_injury_$X_name}"/>
|
|
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_effect" title="@{repeating_injury_$X_effect}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_effect" data-i18n-placeholder="injury effect" title="@{repeating_injury_$X_effect}"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="taken-out">
|
|
<input name="attr_affected" type="checkbox" title="@{repeating_injury_$X_affected}"/><span name="attr_type" data-i18n-dynamic="" title="@{repeating_injury_$X_type}"></span>
|
|
</div>
|
|
</fieldset>
|
|
</section>
|
|
<section class="section-deeds subsystem-display scion-hero scion-origin navigable-section navigable-section--all navigable-section--general" id="deeds">
|
|
<button class="subsystem-style expandable-header deeds" name="act_deeds" data-i18n="deeds" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-deed" data-i18n-title="create a deed" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-deed" data-i18n-title="edit section" type="action">
|
|
</button>
|
|
<div class="experience">
|
|
<h5 data-i18n="experience"></h5>
|
|
<div class="input-label"><span data-i18n="used"></span>
|
|
<input class="underlined" name="attr_experience_used" type="number" title="@{experience_used}"/>
|
|
</div>
|
|
<div class="input-label"><span data-i18n="earned"></span>
|
|
<input class="underlined" name="attr_experience_earned" type="number" title="@{experience_earned}"/>
|
|
</div>
|
|
<div class="input-label"><span data-i18n="remaining"></span>
|
|
<input class="underlined" name="attr_experience_remaining" readonly="" type="number" title="@{experience_remaining}"/>
|
|
</div>
|
|
</div><span class="pseudo-control" hidden=""></span>
|
|
<fieldset class="repeating_deed">
|
|
<select name="attr_type" title="@{repeating_deed_$X_type}">
|
|
<option value="short" data-i18n="short" selected="">
|
|
</option>
|
|
<option value="long" data-i18n="long">
|
|
</option>
|
|
<option value="band" data-i18n="band">
|
|
</option>
|
|
</select>
|
|
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_name" title="@{repeating_deed_$X_name}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_name" data-i18n-placeholder="deed description" title="@{repeating_deed_$X_name}"></textarea>
|
|
</div>
|
|
<input name="attr_completed" value="1" type="checkbox" title="@{repeating_deed_$X_completed}"/>
|
|
</fieldset>
|
|
<button class="subsystem-style completed-deed expandable-header completed deed" name="act_completed-deed" data-i18n="completed deeds" aria-level="3" role="heading" data-i18n-title="collapse/expand the section" type="action">
|
|
</button><span class="pseudo-control" hidden=""></span>
|
|
<fieldset class="repeating_completed-deed">
|
|
<select name="attr_type" title="@{repeating_completed-deed_$X_type}">
|
|
<option value="short" data-i18n="short" selected="">
|
|
</option>
|
|
<option value="long" data-i18n="long">
|
|
</option>
|
|
<option value="band" data-i18n="band">
|
|
</option>
|
|
</select>
|
|
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_name" title="@{repeating_completed-deed_$X_name}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_name" data-i18n-placeholder="deed description" title="@{repeating_completed-deed_$X_name}"></textarea>
|
|
</div>
|
|
<input name="attr_completed" value="1" type="checkbox" title="@{repeating_completed-deed_$X_completed}"/>
|
|
</fieldset>
|
|
</section>
|
|
<section class="section-paths navigable-section navigable-section--all navigable-section--powers" id="paths">
|
|
<button class="subsystem-style expandable-header paths" name="act_paths" data-i18n="paths" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-path" data-i18n-title="create a path" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-path" data-i18n-title="edit section" type="action">
|
|
</button><span class="pseudo-control image-borders" hidden=""></span>
|
|
<fieldset class="repeating_path">
|
|
<input class="border-control" name="attr_display_state" type="hidden" title="@{repeating_path_$X_display_state}"/>
|
|
<div class="image-border">
|
|
<div class="upper-blur"></div>
|
|
<div class="lower-blur"></div>
|
|
</div>
|
|
<input name="attr_master_id" type="hidden" title="@{repeating_path_$X_master_id}"/>
|
|
<input class="display-control" name="attr_display_state" value="short-master" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
|
<div class="display-target short-master">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
|
</label><span name="attr_type" role="heading" aria-level="5" title="@{repeating_path_$X_type}"></span><span name="attr_name" title="@{repeating_path_$X_name}"></span>
|
|
<select name="attr_status" title="@{repeating_path_$X_status}">
|
|
<option value="available" data-i18n="available" selected="">
|
|
</option>
|
|
<option value="invoked" data-i18n="invoked">
|
|
</option>
|
|
<option value="suspended" data-i18n="suspended">
|
|
</option>
|
|
<option value="revoked" data-i18n="revoked">
|
|
</option>
|
|
</select><span class="short-text description" name="attr_condition" title="@{repeating_path_$X_condition}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="master" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
|
<div class="display-target master">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
|
</label>
|
|
<input class="underlined" name="attr_type" data-i18n-placeholder="type" role="heading" aria-level="5" type="text" title="@{repeating_path_$X_type}"/>
|
|
<input class="underlined" name="attr_name" data-i18n-placeholder="name of the path" type="text" title="@{repeating_path_$X_name}"/>
|
|
<input name="attr_status" value="available" type="hidden" title="@{repeating_path_$X_status}"/>
|
|
<select name="attr_status" title="@{repeating_path_$X_status}">
|
|
<option value="available" data-i18n="available" selected="">
|
|
</option>
|
|
<option value="invoked" data-i18n="invoked">
|
|
</option>
|
|
<option value="suspended" data-i18n="suspended">
|
|
</option>
|
|
<option value="revoked" data-i18n="revoked">
|
|
</option>
|
|
</select>
|
|
<input class="underlined skills" name="attr_skill" data-i18n-placeholder="Associated skills" type="text" title="@{repeating_path_$X_skill}"/>
|
|
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_condition" title="@{repeating_path_$X_condition}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_condition" data-i18n-placeholder="Path condition" title="@{repeating_path_$X_condition}"></textarea>
|
|
</div>
|
|
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_description" title="@{repeating_path_$X_description}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="describe the path" title="@{repeating_path_$X_description}"></textarea>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="short-contact" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
|
<div class="display-target short-contact">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
|
</label>
|
|
<h5 data-i18n="contact"></h5><span name="attr_name" title="@{repeating_path_$X_name}"></span>
|
|
<input class="underlined" name="attr_tags" data-i18n-placeholder="tags" type="text" title="@{repeating_path_$X_tags}"/>
|
|
<select class="dot-number underlined" name="attr_rating" title="@{repeating_path_$X_rating}">
|
|
<option value="0">5
|
|
</option>
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="contact" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
|
<div class="display-target contact">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
|
</label>
|
|
<h5 data-i18n="contact"></h5>
|
|
<input class="underlined" name="attr_name" data-i18n-placeholder="name" type="text" title="@{repeating_path_$X_name}"/>
|
|
<input class="underlined" name="attr_tags" data-i18n-placeholder="tags" type="text" title="@{repeating_path_$X_tags}"/>
|
|
<div class="dot-row size-number">
|
|
<select class="dot-number underlined" name="attr_rating" title="@{repeating_path_$X_rating}">
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-clear dot" name="attr_rating" value="1" type="radio" title="@{repeating_path_$X_rating}"/>
|
|
<input class="no-clear dot" name="attr_rating" value="2" type="radio" title="@{repeating_path_$X_rating}"/>
|
|
<input class="no-clear dot" name="attr_rating" value="3" type="radio" title="@{repeating_path_$X_rating}"/>
|
|
<input class="no-clear dot" name="attr_rating" value="4" type="radio" title="@{repeating_path_$X_rating}"/>
|
|
<input class="no-clear dot" name="attr_rating" value="5" type="radio" title="@{repeating_path_$X_rating}"/>
|
|
</div>
|
|
</div>
|
|
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_description" title="@{repeating_path_$X_description}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="describe your contact" title="@{repeating_path_$X_description}"></textarea>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="short-group" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
|
<div class="display-target short-group">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
|
</label>
|
|
<h5 data-i18n="group"></h5><span class="short-text" name="attr_group" title="@{repeating_path_$X_group}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="group" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
|
<div class="display-target group">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
|
</label>
|
|
<h5 data-i18n="group"></h5>
|
|
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_group" title="@{repeating_path_$X_group}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_group" data-i18n-placeholder="describe the group" title="@{repeating_path_$X_group}"></textarea>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="short-access" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
|
<div class="display-target short-access">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
|
</label>
|
|
<h5 data-i18n="access"></h5><span class="short-text" name="attr_access" title="@{repeating_path_$X_access}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="access" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
|
<div class="display-target access">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
|
</label>
|
|
<h5 data-i18n="access"></h5>
|
|
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_access" title="@{repeating_path_$X_access}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_access" data-i18n-placeholder="describe the access" title="@{repeating_path_$X_access}"></textarea>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="short-obligation" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
|
<div class="display-target short-obligation">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
|
</label>
|
|
<h5 data-i18n="obligation"></h5><span class="short-text" name="attr_obligation" title="@{repeating_path_$X_obligation}"></span>
|
|
<select class="underlined" name="attr_obligation_status" title="@{repeating_path_$X_obligation_status}">
|
|
<option value="pending" data-i18n="pending" selected="">
|
|
</option>
|
|
<option value="completed" data-i18n="completed">
|
|
</option>
|
|
<option value="failed" data-i18n="failed">
|
|
</option>
|
|
</select>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="obligation" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
|
<div class="display-target obligation">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_path_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_path_$X_collapse}"/>
|
|
</label>
|
|
<h5 data-i18n="obligation"></h5>
|
|
<input name="attr_obligation_status" value="pending" type="hidden" title="@{repeating_path_$X_obligation_status}"/>
|
|
<select class="underlined" name="attr_obligation_status" title="@{repeating_path_$X_obligation_status}">
|
|
<option value="pending" data-i18n="pending" selected="">
|
|
</option>
|
|
<option value="completed" data-i18n="completed">
|
|
</option>
|
|
<option value="failed" data-i18n="failed">
|
|
</option>
|
|
</select>
|
|
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_obligation" title="@{repeating_path_$X_obligation}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_obligation" data-i18n-placeholder="describe the obligation" title="@{repeating_path_$X_obligation}"></textarea>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="add-detail" hidden="" type="radio" title="@{repeating_path_$X_display_state}"/>
|
|
<div class="display-target add-detail">
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-contact" data-i18n-title="create a contact" data-i18n="contact" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-group" data-i18n-title="create a group" data-i18n="group" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-access" data-i18n-title="create a access" data-i18n="access" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-obligation" data-i18n-title="create a obligation" data-i18n="obligation" type="action">
|
|
</button>
|
|
</div>
|
|
</fieldset>
|
|
</section>
|
|
<section class="section-calling subsystem-display scion-hero scion-origin navigable-section navigable-section--all navigable-section--powers" id="calling">
|
|
<button class="subsystem-display subsystem-style scion-origin expandable-header calling" name="act_calling" data-i18n="calling & knacks" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button>
|
|
<button class="subsystem-display subsystem-style scion-hero expandable-header calling" name="act_calling" data-i18n="callings & knacks" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-calling" data-i18n-title="create a calling" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-calling" data-i18n-title="edit section" type="action">
|
|
</button><span class="pseudo-control image-borders" hidden=""></span>
|
|
<fieldset class="repeating_calling">
|
|
<input name="attr_level" value="mortal" type="hidden" title="@{repeating_calling_$X_level}"/>
|
|
<input class="border-control" name="attr_display_state" type="hidden" title="@{repeating_calling_$X_display_state}"/>
|
|
<div class="image-border">
|
|
<div class="upper-blur"></div>
|
|
<div class="lower-blur"></div>
|
|
</div>
|
|
<input name="attr_master_id" type="hidden" title="@{repeating_calling_$X_master_id}"/>
|
|
<input class="display-control" name="attr_display_state" value="master" hidden="" type="radio" title="@{repeating_calling_$X_display_state}"/>
|
|
<div class="display-target calling">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_calling_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_calling_$X_collapse}"/>
|
|
</label>
|
|
<div class="dot-row size-number contents used"><span class="dot-number" name="attr_rating" title="@{repeating_calling_$X_rating}"></span>
|
|
<div class="dot-button-container">
|
|
<input class="dot" name="attr_rating" value="0" hidden="" checked="" type="radio" title="@{repeating_calling_$X_rating}"/><span class="readonly-dot"></span>
|
|
<input class="dot" name="attr_rating" value="1" hidden="" type="radio" title="@{repeating_calling_$X_rating}"/><span class="readonly-dot"></span>
|
|
<input class="dot" name="attr_rating" value="2" hidden="" type="radio" title="@{repeating_calling_$X_rating}"/><span class="readonly-dot"></span>
|
|
<input class="dot" name="attr_rating" value="3" hidden="" type="radio" title="@{repeating_calling_$X_rating}"/><span class="readonly-dot"></span>
|
|
<input class="dot" name="attr_rating" value="4" hidden="" type="radio" title="@{repeating_calling_$X_rating}"/><span class="readonly-dot"></span>
|
|
<input class="dot" name="attr_rating" value="5" hidden="" type="radio" title="@{repeating_calling_$X_rating}"/><span class="readonly-dot"></span>
|
|
</div>
|
|
</div>
|
|
<div class="dot-row size-number contents">
|
|
<input class="underlined" name="attr_name" role="heading" aria-level="5" type="text" title="@{repeating_calling_$X_name}"/>
|
|
<select class="dot-number underlined" name="attr_rating_max" title="@{repeating_calling_$X_rating|max}">
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-clear dot" name="attr_rating_max" value="1" type="radio" title="@{repeating_calling_$X_rating|max}"/>
|
|
<input class="no-clear dot" name="attr_rating_max" value="2" type="radio" title="@{repeating_calling_$X_rating|max}"/>
|
|
<input class="no-clear dot" name="attr_rating_max" value="3" type="radio" title="@{repeating_calling_$X_rating|max}"/>
|
|
<input class="no-clear dot" name="attr_rating_max" value="4" type="radio" title="@{repeating_calling_$X_rating|max}"/>
|
|
<input class="no-clear dot" name="attr_rating_max" value="5" type="radio" title="@{repeating_calling_$X_rating|max}"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="short-knack" hidden="" type="radio" title="@{repeating_calling_$X_display_state}"/>
|
|
<div class="display-target short-knack">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_calling_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_calling_$X_collapse}"/>
|
|
</label>
|
|
<button class="roller" name="roll_clash" data-i18n-alt="roll clash of wills" title="%{repeating_calling_$X_calling}" value="@{clash_action}" type="roll">
|
|
</button>
|
|
<button name="act_clash-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_clash_action" type="hidden" title="@{repeating_calling_$X_clash_action}"/><span name="attr_name" title="@{repeating_calling_$X_name}"></span><span class="parentheses subsystem-display scion-hero" name="attr_level" data-i18n-dynamic="" title="@{repeating_calling_$X_level}"></span>
|
|
<input name="attr_active" value="1" type="checkbox" title="@{repeating_calling_$X_active}"/>
|
|
<input name="attr_clash_stat_2" value="rating" type="hidden" title="@{repeating_calling_$X_clash_stat_2}"/>
|
|
<input class="clash-display-control" name="attr_clash_stat_1" value="select" type="hidden" title="@{repeating_calling_$X_clash_stat_1}"/>
|
|
<div class="clash"><span name="attr_clash_stat_1" data-i18n-dynamic="" title="@{repeating_calling_$X_clash_stat_1}"></span><span>+</span><span name="attr_clash_stat_2" value="rating" data-i18n-dynamic="" title="@{repeating_calling_$X_clash_stat_2}"></span>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="knack" hidden="" type="radio" title="@{repeating_calling_$X_display_state}"/>
|
|
<div class="display-target knack">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_calling_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_calling_$X_collapse}"/>
|
|
</label>
|
|
<button class="roller" name="roll_clash" data-i18n-alt="roll clash of wills" title="%{repeating_calling_$X_calling}" value="@{clash_action}" type="roll">
|
|
</button>
|
|
<button name="act_clash-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_clash_action" type="hidden" title="@{repeating_calling_$X_clash_action}"/>
|
|
<input class="underlined" name="attr_name" type="text" title="@{repeating_calling_$X_name}"/>
|
|
<input name="attr_level" value="mortal" type="hidden" title="@{repeating_calling_$X_level}"/>
|
|
<select class="parentheses subsystem-display scion-hero" name="attr_level" title="@{repeating_calling_$X_level}">
|
|
<option value="mortal" data-i18n="mortal" selected="">
|
|
</option>
|
|
<option value="immortal" data-i18n="immortal">
|
|
</option>
|
|
</select>
|
|
<input name="attr_active" value="1" type="checkbox" title="@{repeating_calling_$X_active}"/>
|
|
<div class="clash">
|
|
<h5></h5>
|
|
<div class="select-container">
|
|
<select class="underlined" name="attr_clash_stat_1" title="@{repeating_calling_$X_clash_stat_1}">
|
|
<option value="select" data-i18n="select" selected="">
|
|
</option>
|
|
<option value="query" data-i18n="query">
|
|
</option>
|
|
<option value="academics" data-i18n="academics">
|
|
</option>
|
|
<option value="athletics" data-i18n="athletics">
|
|
</option>
|
|
<option value="close combat" data-i18n="close combat">
|
|
</option>
|
|
<option value="culture" data-i18n="culture">
|
|
</option>
|
|
<option value="empathy" data-i18n="empathy">
|
|
</option>
|
|
<option value="firearms" data-i18n="firearms">
|
|
</option>
|
|
<option value="integrity" data-i18n="integrity">
|
|
</option>
|
|
<option value="leadership" data-i18n="leadership">
|
|
</option>
|
|
<option value="medicine" data-i18n="medicine">
|
|
</option>
|
|
<option value="occult" data-i18n="occult">
|
|
</option>
|
|
<option value="persuasion" data-i18n="persuasion">
|
|
</option>
|
|
<option value="pilot" data-i18n="pilot">
|
|
</option>
|
|
<option value="science" data-i18n="science">
|
|
</option>
|
|
<option value="subterfuge" data-i18n="subterfuge">
|
|
</option>
|
|
<option value="survival" data-i18n="survival">
|
|
</option>
|
|
<option value="technology" data-i18n="technology">
|
|
</option>
|
|
</select><span>+</span><span name="attr_clash_stat_2" value="rating" data-i18n-dynamic="" title="@{repeating_calling_$X_clash_stat_2}"></span>
|
|
</div>
|
|
</div>
|
|
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_description" title="@{repeating_calling_$X_description}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_description" title="@{repeating_calling_$X_description}"></textarea>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="add-detail" hidden="" type="radio" title="@{repeating_calling_$X_display_state}"/>
|
|
<div class="display-target add-detail">
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-knack" data-i18n-title="create a knack" type="action">
|
|
</button>
|
|
</div>
|
|
</fieldset>
|
|
</section>
|
|
<section class="section-purview subsystem-display scion-hero navigable-section navigable-section--all navigable-section--powers" id="purview">
|
|
<button class="subsystem-display subsystem-style scion-hero expandable-header purview" name="act_purview" data-i18n="purviews" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-purview" data-i18n-title="create a purview" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-purview" data-i18n-title="edit section" type="action">
|
|
</button><span class="pseudo-control image-borders" hidden=""></span>
|
|
<fieldset class="repeating_purview">
|
|
<input class="border-control" name="attr_display_state" type="hidden" title="@{repeating_purview_$X_display_state}"/>
|
|
<div class="image-border">
|
|
<div class="upper-blur"></div>
|
|
<div class="lower-blur"></div>
|
|
</div>
|
|
<input name="attr_master_id" type="hidden" title="@{repeating_purview_$X_master_id}"/>
|
|
<input class="display-control" name="attr_display_state" value="short-master" hidden="" type="radio" title="@{repeating_purview_$X_display_state}"/>
|
|
<div class="display-target short-master">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_purview_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_purview_$X_collapse}"/>
|
|
</label><span name="attr_name" role="heading" aria-level="4" title="@{repeating_purview_$X_name}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="master" hidden="" type="radio" title="@{repeating_purview_$X_display_state}"/>
|
|
<div class="display-target master">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_purview_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_purview_$X_collapse}"/>
|
|
</label>
|
|
<input class="underlined" name="attr_name" role="heading" aria-level="4" data-i18n-placeholder="purview name" type="text" title="@{repeating_purview_$X_name}"/>
|
|
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_innate_power" title="@{repeating_purview_$X_innate_power}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_innate_power" data-i18n-placeholder="What is the purview's innate power?" title="@{repeating_purview_$X_innate_power}"></textarea>
|
|
</div>
|
|
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_description" title="@{repeating_purview_$X_description}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="describe the purview" title="@{repeating_purview_$X_description}"></textarea>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="short-boon" hidden="" type="radio" title="@{repeating_purview_$X_display_state}"/>
|
|
<div class="display-target short-boon">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_purview_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_purview_$X_collapse}"/>
|
|
</label><span class="name" name="attr_name" role="heading" aria-level="5" title="@{repeating_purview_$X_name}"></span>
|
|
<input class="display-control" name="attr_cost" value="" type="hidden" title="@{repeating_purview_$X_cost}"/>
|
|
<label class="input-label cost">
|
|
<h5 class="cost" data-i18n="cost"></h5><span class="cost" name="attr_cost" title="@{repeating_purview_$X_cost}"></span>
|
|
</label>
|
|
<input class="display-control" name="attr_duration" value="" type="hidden" title="@{repeating_purview_$X_duration}"/>
|
|
<label class="input-label duration">
|
|
<h5 class="duration" data-i18n="duration"></h5><span class="duration" name="attr_duration" title="@{repeating_purview_$X_duration}"></span>
|
|
</label>
|
|
<input class="display-control" name="attr_subject" value="" type="hidden" title="@{repeating_purview_$X_subject}"/>
|
|
<label class="input-label subject">
|
|
<h5 class="subject" data-i18n="subject"></h5><span class="subject" name="attr_subject" title="@{repeating_purview_$X_subject}"></span>
|
|
</label>
|
|
<input class="display-control" name="attr_range" value="" type="hidden" title="@{repeating_purview_$X_range}"/>
|
|
<label class="input-label range">
|
|
<h5 class="range" data-i18n="range"></h5><span class="range" name="attr_range" title="@{repeating_purview_$X_range}"></span>
|
|
</label>
|
|
<input class="display-control" name="attr_action" value="" type="hidden" title="@{repeating_purview_$X_action}"/>
|
|
<label class="input-label action">
|
|
<h5 class="action" data-i18n="action"></h5><span class="action" name="attr_action" title="@{repeating_purview_$X_action}"></span>
|
|
</label>
|
|
<input class="clash-display-control" name="attr_clash_stat_1" value="select" type="hidden" title="@{repeating_purview_$X_clash_stat_1}"/>
|
|
<input class="clash-display-control" name="attr_clash_stat_2" value="select" type="hidden" title="@{repeating_purview_$X_clash_stat_2}"/>
|
|
<div class="clash">
|
|
<button class="roller" name="roll_clash" data-i18n-alt="roll clash of wills" title="%{repeating_purview_$X_purview}" value="@{clash_action}" type="roll">
|
|
</button>
|
|
<button name="act_clash-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_clash_action" type="hidden" title="@{repeating_purview_$X_clash_action}"/><span name="attr_clash_stat_1" data-i18n-dynamic="" title="@{repeating_purview_$X_clash_stat_1}"></span><span>+</span><span name="attr_clash_stat_2" data-i18n-dynamic="" title="@{repeating_purview_$X_clash_stat_2}"></span><span class="vs" data-i18n="vs"></span><span name="attr_clash_defense_1" data-i18n-dynamic="" title="@{repeating_purview_$X_clash_defense_1}"></span><span>+</span><span name="attr_clash_defense_2" data-i18n-dynamic="" title="@{repeating_purview_$X_clash_defense_2}"></span>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="boon" hidden="" type="radio" title="@{repeating_purview_$X_display_state}"/>
|
|
<div class="display-target boon">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_purview_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_purview_$X_collapse}"/>
|
|
</label>
|
|
<input class="name underlined" name="attr_name" role="heading" aria-level="5" data-i18n-placeholder="boon name" type="text" title="@{repeating_purview_$X_name}"/>
|
|
<label class="input-label cost">
|
|
<h5 data-i18n="cost"></h5>
|
|
<input class="underlined" name="attr_cost" type="text" title="@{repeating_purview_$X_cost}"/>
|
|
</label>
|
|
<label class="input-label duration">
|
|
<h5 data-i18n="duration"></h5>
|
|
<input class="underlined" name="attr_duration" type="text" title="@{repeating_purview_$X_duration}"/>
|
|
</label>
|
|
<label class="input-label subject">
|
|
<h5 data-i18n="subject"></h5>
|
|
<input class="underlined" name="attr_subject" type="text" title="@{repeating_purview_$X_subject}"/>
|
|
</label>
|
|
<label class="input-label range">
|
|
<h5 data-i18n="range"></h5>
|
|
<input class="underlined" name="attr_range" type="text" title="@{repeating_purview_$X_range}"/>
|
|
</label>
|
|
<label class="input-label action">
|
|
<h5 data-i18n="action"></h5>
|
|
<input class="underlined" name="attr_action" type="text" title="@{repeating_purview_$X_action}"/>
|
|
</label>
|
|
<div class="clash">
|
|
<button class="roller" name="roll_clash" data-i18n-alt="roll clash of wills" title="%{repeating_purview_$X_purview}" value="@{clash_action}" type="roll">
|
|
</button>
|
|
<button name="act_clash-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_clash_action" type="hidden" title="@{repeating_purview_$X_clash_action}"/>
|
|
<h5 data-i18n="clash"></h5>
|
|
<div class="select-container">
|
|
<select class="underlined" name="attr_clash_stat_1" title="@{repeating_purview_$X_clash_stat_1}">
|
|
<option value="select" data-i18n="select" selected="">
|
|
</option>
|
|
<option value="query" data-i18n="query">
|
|
</option>
|
|
<option value="legend" data-i18n="legend">
|
|
</option>
|
|
<option value="intellect" data-i18n="intellect">
|
|
</option>
|
|
<option value="cunning" data-i18n="cunning">
|
|
</option>
|
|
<option value="resolve" data-i18n="resolve">
|
|
</option>
|
|
<option value="might" data-i18n="might">
|
|
</option>
|
|
<option value="dexterity" data-i18n="dexterity">
|
|
</option>
|
|
<option value="stamina" data-i18n="stamina">
|
|
</option>
|
|
<option value="presence" data-i18n="presence">
|
|
</option>
|
|
<option value="manipulation" data-i18n="manipulation">
|
|
</option>
|
|
<option value="composure" data-i18n="composure">
|
|
</option>
|
|
<option value="academics" data-i18n="academics">
|
|
</option>
|
|
<option value="athletics" data-i18n="athletics">
|
|
</option>
|
|
<option value="close combat" data-i18n="close combat">
|
|
</option>
|
|
<option value="culture" data-i18n="culture">
|
|
</option>
|
|
<option value="empathy" data-i18n="empathy">
|
|
</option>
|
|
<option value="firearms" data-i18n="firearms">
|
|
</option>
|
|
<option value="integrity" data-i18n="integrity">
|
|
</option>
|
|
<option value="leadership" data-i18n="leadership">
|
|
</option>
|
|
<option value="medicine" data-i18n="medicine">
|
|
</option>
|
|
<option value="occult" data-i18n="occult">
|
|
</option>
|
|
<option value="persuasion" data-i18n="persuasion">
|
|
</option>
|
|
<option value="pilot" data-i18n="pilot">
|
|
</option>
|
|
<option value="science" data-i18n="science">
|
|
</option>
|
|
<option value="subterfuge" data-i18n="subterfuge">
|
|
</option>
|
|
<option value="survival" data-i18n="survival">
|
|
</option>
|
|
<option value="technology" data-i18n="technology">
|
|
</option>
|
|
</select><span>+</span>
|
|
<select class="underlined" name="attr_clash_stat_2" title="@{repeating_purview_$X_clash_stat_2}">
|
|
<option value="select" data-i18n="select" selected="">
|
|
</option>
|
|
<option value="query" data-i18n="query">
|
|
</option>
|
|
<option value="legend" data-i18n="legend">
|
|
</option>
|
|
<option value="intellect" data-i18n="intellect">
|
|
</option>
|
|
<option value="cunning" data-i18n="cunning">
|
|
</option>
|
|
<option value="resolve" data-i18n="resolve">
|
|
</option>
|
|
<option value="might" data-i18n="might">
|
|
</option>
|
|
<option value="dexterity" data-i18n="dexterity">
|
|
</option>
|
|
<option value="stamina" data-i18n="stamina">
|
|
</option>
|
|
<option value="presence" data-i18n="presence">
|
|
</option>
|
|
<option value="manipulation" data-i18n="manipulation">
|
|
</option>
|
|
<option value="composure" data-i18n="composure">
|
|
</option>
|
|
<option value="academics" data-i18n="academics">
|
|
</option>
|
|
<option value="athletics" data-i18n="athletics">
|
|
</option>
|
|
<option value="close combat" data-i18n="close combat">
|
|
</option>
|
|
<option value="culture" data-i18n="culture">
|
|
</option>
|
|
<option value="empathy" data-i18n="empathy">
|
|
</option>
|
|
<option value="firearms" data-i18n="firearms">
|
|
</option>
|
|
<option value="integrity" data-i18n="integrity">
|
|
</option>
|
|
<option value="leadership" data-i18n="leadership">
|
|
</option>
|
|
<option value="medicine" data-i18n="medicine">
|
|
</option>
|
|
<option value="occult" data-i18n="occult">
|
|
</option>
|
|
<option value="persuasion" data-i18n="persuasion">
|
|
</option>
|
|
<option value="pilot" data-i18n="pilot">
|
|
</option>
|
|
<option value="science" data-i18n="science">
|
|
</option>
|
|
<option value="subterfuge" data-i18n="subterfuge">
|
|
</option>
|
|
<option value="survival" data-i18n="survival">
|
|
</option>
|
|
<option value="technology" data-i18n="technology">
|
|
</option>
|
|
</select><span class="vs" data-i18n="vs"></span>
|
|
<select class="underlined" name="attr_clash_defense_1" title="@{repeating_purview_$X_clash_defense_1}">
|
|
<option value="select" data-i18n="select" selected="">
|
|
</option>
|
|
<option value="legend" data-i18n="legend">
|
|
</option>
|
|
<option value="intellect" data-i18n="intellect">
|
|
</option>
|
|
<option value="cunning" data-i18n="cunning">
|
|
</option>
|
|
<option value="resolve" data-i18n="resolve">
|
|
</option>
|
|
<option value="might" data-i18n="might">
|
|
</option>
|
|
<option value="dexterity" data-i18n="dexterity">
|
|
</option>
|
|
<option value="stamina" data-i18n="stamina">
|
|
</option>
|
|
<option value="presence" data-i18n="presence">
|
|
</option>
|
|
<option value="manipulation" data-i18n="manipulation">
|
|
</option>
|
|
<option value="composure" data-i18n="composure">
|
|
</option>
|
|
<option value="academics" data-i18n="academics">
|
|
</option>
|
|
<option value="athletics" data-i18n="athletics">
|
|
</option>
|
|
<option value="close combat" data-i18n="close combat">
|
|
</option>
|
|
<option value="culture" data-i18n="culture">
|
|
</option>
|
|
<option value="empathy" data-i18n="empathy">
|
|
</option>
|
|
<option value="firearms" data-i18n="firearms">
|
|
</option>
|
|
<option value="integrity" data-i18n="integrity">
|
|
</option>
|
|
<option value="leadership" data-i18n="leadership">
|
|
</option>
|
|
<option value="medicine" data-i18n="medicine">
|
|
</option>
|
|
<option value="occult" data-i18n="occult">
|
|
</option>
|
|
<option value="persuasion" data-i18n="persuasion">
|
|
</option>
|
|
<option value="pilot" data-i18n="pilot">
|
|
</option>
|
|
<option value="science" data-i18n="science">
|
|
</option>
|
|
<option value="subterfuge" data-i18n="subterfuge">
|
|
</option>
|
|
<option value="survival" data-i18n="survival">
|
|
</option>
|
|
<option value="technology" data-i18n="technology">
|
|
</option>
|
|
</select><span>+</span>
|
|
<select class="underlined" name="attr_clash_defense_2" title="@{repeating_purview_$X_clash_defense_2}">
|
|
<option value="select" data-i18n="select" selected="">
|
|
</option>
|
|
<option value="legend" data-i18n="legend">
|
|
</option>
|
|
<option value="intellect" data-i18n="intellect">
|
|
</option>
|
|
<option value="cunning" data-i18n="cunning">
|
|
</option>
|
|
<option value="resolve" data-i18n="resolve">
|
|
</option>
|
|
<option value="might" data-i18n="might">
|
|
</option>
|
|
<option value="dexterity" data-i18n="dexterity">
|
|
</option>
|
|
<option value="stamina" data-i18n="stamina">
|
|
</option>
|
|
<option value="presence" data-i18n="presence">
|
|
</option>
|
|
<option value="manipulation" data-i18n="manipulation">
|
|
</option>
|
|
<option value="composure" data-i18n="composure">
|
|
</option>
|
|
<option value="academics" data-i18n="academics">
|
|
</option>
|
|
<option value="athletics" data-i18n="athletics">
|
|
</option>
|
|
<option value="close combat" data-i18n="close combat">
|
|
</option>
|
|
<option value="culture" data-i18n="culture">
|
|
</option>
|
|
<option value="empathy" data-i18n="empathy">
|
|
</option>
|
|
<option value="firearms" data-i18n="firearms">
|
|
</option>
|
|
<option value="integrity" data-i18n="integrity">
|
|
</option>
|
|
<option value="leadership" data-i18n="leadership">
|
|
</option>
|
|
<option value="medicine" data-i18n="medicine">
|
|
</option>
|
|
<option value="occult" data-i18n="occult">
|
|
</option>
|
|
<option value="persuasion" data-i18n="persuasion">
|
|
</option>
|
|
<option value="pilot" data-i18n="pilot">
|
|
</option>
|
|
<option value="science" data-i18n="science">
|
|
</option>
|
|
<option value="subterfuge" data-i18n="subterfuge">
|
|
</option>
|
|
<option value="survival" data-i18n="survival">
|
|
</option>
|
|
<option value="technology" data-i18n="technology">
|
|
</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_description" title="@{repeating_purview_$X_description}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="describe the boon" title="@{repeating_purview_$X_description}"></textarea>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="add-detail" hidden="" type="radio" title="@{repeating_purview_$X_display_state}"/>
|
|
<div class="display-target add-detail">
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-boon" data-i18n-title="create a boon" type="action">
|
|
</button>
|
|
</div>
|
|
</fieldset>
|
|
</section>
|
|
<section class="section-birthrights navigable-section navigable-section--powers navigable-section--all" id="birthrights">
|
|
<button class="subsystem-style expandable-header birthrights" name="act_birthrights" data-i18n="birthrights" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-birthright" data-i18n-title="edit section" type="action">
|
|
</button>
|
|
<label class="input-label"><span class="input-label__text" data-i18n="legendary titles" role="heading" aria-level="5"></span>
|
|
<input class="underlined input-label__input" name="attr_legendary_title" type="text" value="" title="@{legendary_title}"/>
|
|
</label><span class="pseudo-control bordered-item" hidden=""></span>
|
|
<fieldset class="repeating_birthright">
|
|
<div class="image-border"></div>
|
|
<input class="display-control" name="attr_display_state" value="short-relic" hidden="" type="radio" title="@{repeating_birthright_$X_display_state}"/>
|
|
<div class="display-target short-relic">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_birthright_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_birthright_$X_collapse}"/>
|
|
</label>
|
|
<h5 data-i18n="relic"></h5><span class="name" name="attr_name" role="heading" aria-level="4" title="@{repeating_birthright_$X_name}"></span>
|
|
<select class="dot-number underlined" name="attr_rating" title="@{repeating_birthright_$X_rating}">
|
|
<option value="0" data-i18n="0">
|
|
</option>
|
|
<option value="1" data-i18n="1">
|
|
</option>
|
|
<option value="2" data-i18n="2">
|
|
</option>
|
|
<option value="3" data-i18n="3">
|
|
</option>
|
|
<option value="4" data-i18n="4">
|
|
</option>
|
|
<option value="5" data-i18n="5">
|
|
</option>
|
|
</select>
|
|
<input class="display-control" name="attr_variety" value="" type="hidden" title="@{repeating_birthright_$X_variety}"/>
|
|
<div class="input-label variety">
|
|
<h5 data-i18n="variety" style="align-self:start;"></h5><span name="attr_variety" title="@{repeating_birthright_$X_variety}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_tag" value="" type="hidden" title="@{repeating_birthright_$X_tag}"/>
|
|
<div class="input-label tag">
|
|
<h5 data-i18n="tag" style="align-self:start;"></h5><span name="attr_tag" title="@{repeating_birthright_$X_tag}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_deed" value="" type="hidden" title="@{repeating_birthright_$X_deed}"/>
|
|
<div class="input-label deed">
|
|
<h5 data-i18n="deed" style="align-self:start;"></h5><span name="attr_deed" title="@{repeating_birthright_$X_deed}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_purview" value="" type="hidden" title="@{repeating_birthright_$X_purview}"/>
|
|
<div class="input-label purview">
|
|
<h5 data-i18n="purview" style="align-self:start;"></h5><span name="attr_purview" title="@{repeating_birthright_$X_purview}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_motif" value="" type="hidden" title="@{repeating_birthright_$X_motif}"/>
|
|
<div class="input-label motif">
|
|
<h5 data-i18n="motif" style="align-self:start;"></h5><span name="attr_motif" title="@{repeating_birthright_$X_motif}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_enhancement" value="" type="hidden" title="@{repeating_birthright_$X_enhancement}"/>
|
|
<div class="input-label enhancement">
|
|
<h5 data-i18n="enhancement" style="align-self:start;"></h5><span name="attr_enhancement" title="@{repeating_birthright_$X_enhancement}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_knack" value="" type="hidden" title="@{repeating_birthright_$X_knack}"/>
|
|
<div class="input-label knack">
|
|
<h5 data-i18n="knack" style="align-self:start;"></h5><span name="attr_knack" title="@{repeating_birthright_$X_knack}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_flaw" value="" type="hidden" title="@{repeating_birthright_$X_flaw}"/>
|
|
<div class="input-label flaw">
|
|
<h5 data-i18n="flaw" style="align-self:start;"></h5><span name="attr_flaw" title="@{repeating_birthright_$X_flaw}"></span>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="short-guide" hidden="" type="radio" title="@{repeating_birthright_$X_display_state}"/>
|
|
<div class="display-target short-guide">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_birthright_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_birthright_$X_collapse}"/>
|
|
</label>
|
|
<h5 data-i18n="guide"></h5><span class="name" name="attr_name" role="heading" aria-level="4" title="@{repeating_birthright_$X_name}"></span>
|
|
<select class="dot-number underlined" name="attr_rating" title="@{repeating_birthright_$X_rating}">
|
|
<option value="0" data-i18n="0">
|
|
</option>
|
|
<option value="1" data-i18n="1">
|
|
</option>
|
|
<option value="2" data-i18n="2">
|
|
</option>
|
|
<option value="3" data-i18n="3">
|
|
</option>
|
|
<option value="4" data-i18n="4">
|
|
</option>
|
|
<option value="5" data-i18n="5">
|
|
</option>
|
|
</select>
|
|
<input class="display-control" name="attr_skills" value="" type="hidden" title="@{repeating_birthright_$X_skills}"/>
|
|
<div class="input-label skills">
|
|
<h5 data-i18n="skills"></h5><span name="attr_skills" title="@{repeating_birthright_$X_skills}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_benefit" value="" type="hidden" title="@{repeating_birthright_$X_benefit}"/>
|
|
<div class="input-label benefit">
|
|
<h5 data-i18n="benefit"></h5><span name="attr_benefit" title="@{repeating_birthright_$X_benefit}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_stunt" value="" type="hidden" title="@{repeating_birthright_$X_stunt}"/>
|
|
<div class="input-label stunt">
|
|
<h5 data-i18n="stunt"></h5><span name="attr_stunt" title="@{repeating_birthright_$X_stunt}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_purview" value="" type="hidden" title="@{repeating_birthright_$X_purview}"/>
|
|
<div class="input-label purview">
|
|
<h5 data-i18n="purview"></h5><span name="attr_purview" title="@{repeating_birthright_$X_purview}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_calling" value="" type="hidden" title="@{repeating_birthright_$X_calling}"/>
|
|
<div class="input-label calling">
|
|
<h5 data-i18n="calling"></h5><span name="attr_calling" title="@{repeating_birthright_$X_calling}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_title" value="" type="hidden" title="@{repeating_birthright_$X_title}"/>
|
|
<div class="input-label title">
|
|
<h5 data-i18n="title"></h5><span name="attr_title" title="@{repeating_birthright_$X_title}"></span>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="short-follower" hidden="" type="radio" title="@{repeating_birthright_$X_display_state}"/>
|
|
<div class="display-target short-follower">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_birthright_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_birthright_$X_collapse}"/>
|
|
</label>
|
|
<h5 data-i18n="follower"></h5><span class="name" name="attr_name" role="heading" aria-level="4" title="@{repeating_birthright_$X_name}"></span>
|
|
<select class="dot-number underlined" name="attr_rating" title="@{repeating_birthright_$X_rating}">
|
|
<option value="0" data-i18n="0">
|
|
</option>
|
|
<option value="1" data-i18n="1">
|
|
</option>
|
|
<option value="2" data-i18n="2">
|
|
</option>
|
|
<option value="3" data-i18n="3">
|
|
</option>
|
|
<option value="4" data-i18n="4">
|
|
</option>
|
|
<option value="5" data-i18n="5">
|
|
</option>
|
|
</select>
|
|
<input class="display-control" name="attr_archetype" value="" type="hidden" title="@{repeating_birthright_$X_archetype}"/>
|
|
<div class="input-label archetype">
|
|
<h5 data-i18n="archetype"></h5><span name="attr_archetype" title="@{repeating_birthright_$X_archetype}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_tag" value="" type="hidden" title="@{repeating_birthright_$X_tag}"/>
|
|
<div class="input-label tag">
|
|
<h5 data-i18n="tag"></h5><span name="attr_tag" title="@{repeating_birthright_$X_tag}"></span>
|
|
</div>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="short-creature" hidden="" type="radio" title="@{repeating_birthright_$X_display_state}"/>
|
|
<div class="display-target short-creature">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_birthright_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_birthright_$X_collapse}"/>
|
|
</label>
|
|
<h5 data-i18n="creature"></h5><span class="name" name="attr_name" role="heading" aria-level="4" data-i18n-placeholder="name" title="@{repeating_birthright_$X_name}"></span>
|
|
<select class="dot-number underlined" name="attr_rating" title="@{repeating_birthright_$X_rating}">
|
|
<option value="0" data-i18n="0">
|
|
</option>
|
|
<option value="1" data-i18n="1">
|
|
</option>
|
|
<option value="2" data-i18n="2">
|
|
</option>
|
|
<option value="3" data-i18n="3">
|
|
</option>
|
|
<option value="4" data-i18n="4">
|
|
</option>
|
|
<option value="5" data-i18n="5">
|
|
</option>
|
|
</select>
|
|
</div>
|
|
<input class="expanded-control" name="attr_display_state" value="relic" type="hidden" title="@{repeating_birthright_$X_display_state}"/>
|
|
<div class="display-target">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_birthright_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_birthright_$X_collapse}"/>
|
|
</label>
|
|
<h5 class="relic conditional-show" data-i18n="relic"></h5>
|
|
<h5 class="guide conditional-show" data-i18n="guide"></h5>
|
|
<h5 class="follower conditional-show" data-i18n="follower"></h5>
|
|
<h5 class="creature conditional-show" data-i18n="creature"></h5>
|
|
<input class="name underlined" name="attr_name" role="heading" aria-level="4" data-i18n-placeholder="name" type="text" title="@{repeating_birthright_$X_name}"/>
|
|
<div class="dot-row size-number rating">
|
|
<select class="dot-number underlined" name="attr_rating" title="@{repeating_birthright_$X_rating}">
|
|
<option value="1">5
|
|
</option>
|
|
<option value="2">5
|
|
</option>
|
|
<option value="3">5
|
|
</option>
|
|
<option value="4">5
|
|
</option>
|
|
<option value="5">5
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="no-clear dot" name="attr_rating" value="1" type="radio" title="@{repeating_birthright_$X_rating}"/>
|
|
<input class="no-clear dot" name="attr_rating" value="2" type="radio" title="@{repeating_birthright_$X_rating}"/>
|
|
<input class="no-clear dot" name="attr_rating" value="3" type="radio" title="@{repeating_birthright_$X_rating}"/>
|
|
<input class="no-clear dot" name="attr_rating" value="4" type="radio" title="@{repeating_birthright_$X_rating}"/>
|
|
<input class="no-clear dot" name="attr_rating" value="5" type="radio" title="@{repeating_birthright_$X_rating}"/>
|
|
</div>
|
|
</div>
|
|
<div class="detail-container">
|
|
<div class="input-label variety conditional-show relic">
|
|
<h5 data-i18n="variety"></h5>
|
|
<input class="underlined" name="attr_variety" type="text" title="@{repeating_birthright_$X_variety}"/>
|
|
</div>
|
|
<div class="input-label archetype conditional-show follower">
|
|
<h5 data-i18n="archetype"></h5>
|
|
<input class="underlined" name="attr_archetype" type="text" title="@{repeating_birthright_$X_archetype}"/>
|
|
</div>
|
|
<div class="input-label tag conditional-show relic follower">
|
|
<h5 data-i18n="tag"></h5>
|
|
<input class="underlined" name="attr_tag" type="text" title="@{repeating_birthright_$X_tag}"/>
|
|
</div>
|
|
<div class="input-label deed conditional-show relic">
|
|
<h5 data-i18n="deed"></h5>
|
|
<input class="underlined" name="attr_deed" type="text" title="@{repeating_birthright_$X_deed}"/>
|
|
</div>
|
|
<div class="input-label skills conditional-show guide">
|
|
<h5 data-i18n="skills"></h5>
|
|
<input class="underlined" name="attr_skills" type="text" title="@{repeating_birthright_$X_skills}"/>
|
|
</div>
|
|
<div class="input-label benefit conditional-show guide">
|
|
<h5 data-i18n="benefit"></h5>
|
|
<input class="underlined" name="attr_benefit" type="text" title="@{repeating_birthright_$X_benefit}"/>
|
|
</div>
|
|
<div class="input-label stunt conditional-show guide">
|
|
<h5 data-i18n="stunt"></h5>
|
|
<input class="underlined" name="attr_stunt" type="text" title="@{repeating_birthright_$X_stunt}"/>
|
|
</div>
|
|
<div class="input-label purview conditional-show relic guide">
|
|
<h5 data-i18n="purview"></h5>
|
|
<input class="underlined" name="attr_purview" type="text" title="@{repeating_birthright_$X_purview}"/>
|
|
</div>
|
|
<div class="input-label calling conditional-show guide">
|
|
<h5 data-i18n="calling"></h5>
|
|
<input class="underlined" name="attr_calling" type="text" title="@{repeating_birthright_$X_calling}"/>
|
|
</div>
|
|
<div class="input-label motif conditional-show relic">
|
|
<h5 data-i18n="motif"></h5>
|
|
<input class="underlined" name="attr_motif" type="text" title="@{repeating_birthright_$X_motif}"/>
|
|
</div>
|
|
<div class="input-label enhancement conditional-show relic">
|
|
<h5 data-i18n="enhancement"></h5>
|
|
<input class="underlined" name="attr_enhancement" type="text" title="@{repeating_birthright_$X_enhancement}"/>
|
|
</div>
|
|
<div class="input-label flaw conditional-show relic">
|
|
<h5 data-i18n="flaw"></h5>
|
|
<input class="underlined" name="attr_flaw" type="text" title="@{repeating_birthright_$X_flaw}"/>
|
|
</div>
|
|
<div class="input-label title conditional-show guide">
|
|
<h5 data-i18n="title"></h5>
|
|
<input class="underlined" name="attr_title" type="text" title="@{repeating_birthright_$X_title}"/>
|
|
</div>
|
|
<div class="input-label knack flex-column conditional-show relic grid-span-all">
|
|
<h5 data-i18n="knack" style="align-self:start"></h5>
|
|
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_knack" title="@{repeating_birthright_$X_knack}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_knack" title="@{repeating_birthright_$X_knack}"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<div class="add-container bordered-item">
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-birthright-creature" data-i18n-title="create a birthright-creature" data-i18n="creature" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-birthright-follower" data-i18n-title="create a birthright-follower" data-i18n="follower" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-birthright-guide" data-i18n-title="create a birthright-guide" data-i18n="guide" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-birthright-relic" data-i18n-title="create a birthright-relic" data-i18n="relic" type="action">
|
|
</button>
|
|
</div>
|
|
</section>
|
|
<section class="section-equipment subsystem-style navigable-section navigable-section--all navigable-section--general" id="equipment">
|
|
<button class="subsystem-style expandable-header equipment" name="act_equipment" data-i18n="equipment" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--add" name="act_add-equipment" data-i18n-title="create a equipment" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--edit" name="act_edit-equipment" data-i18n-title="edit section" type="action">
|
|
</button><span class="pseudo-control bordered-item" hidden=""></span>
|
|
<fieldset class="repeating_equipment">
|
|
<input class="display-control" name="attr_display_state" type="hidden" title="@{repeating_equipment_$X_display_state}"/>
|
|
<div class="image-border"></div>
|
|
<input class="display-control" name="attr_display_state" value="short-equipment" hidden="" type="radio" title="@{repeating_equipment_$X_display_state}"/>
|
|
<div class="display-target short-equipment">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_equipment_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_equipment_$X_collapse}"/>
|
|
</label><span name="attr_name" title="@{repeating_equipment_$X_name}"></span><span name="attr_tag" title="@{repeating_equipment_$X_tag}"></span>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="equipment" hidden="" type="radio" title="@{repeating_equipment_$X_display_state}"/>
|
|
<div class="display-target equipment">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_equipment_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_equipment_$X_collapse}"/>
|
|
</label>
|
|
<input class="underlined" name="attr_name" data-i18n-placeholder="name" type="text" title="@{repeating_equipment_$X_name}"/>
|
|
<input class="underlined" name="attr_tag" data-i18n-placeholder="tags" type="text" title="@{repeating_equipment_$X_tag}"/>
|
|
<div class="adaptive adaptive--text description"><span class="adaptive--text__span" name="attr_description" title="@{repeating_equipment_$X_description}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="describe the item" title="@{repeating_equipment_$X_description}"></textarea>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</section>
|
|
<section class="section-notes navigable-section navigable-section--all navigable-section--general" id="notes">
|
|
<button class="subsystem-style expandable-header notes" name="act_notes" data-i18n="notes" role="heading" aria-level="2" data-i18n-title="collapse/expand the section" type="action">
|
|
</button>
|
|
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_notes" title="@{notes}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_notes" title="@{notes}"></textarea>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
<article class="navigable-section navigable-section--antagonist subsystem-style system-scion-origin statblock" id="antagonist">
|
|
<section class="antagonist" id="antagonist-details">
|
|
<div class="statblock__row statblock__row--header">
|
|
<input class="image-display-control" name="attr_archetype_symbol" value="" type="hidden" title="@{archetype_symbol}"/><img name="attr_archetype_symbol" src=" " data-i18n-alt="archetype symbol" title="@{archetype_symbol}"/>
|
|
<input name="attr_character_name" role="heading" aria-level="1" type="text" title="@{character_name}"/>
|
|
</div>
|
|
<div class="statblock__row">
|
|
<label class="input-label"><span class="input-label__text" data-i18n="archetype" role="heading" aria-level="3"></span>
|
|
<input class="underlined input-label__input" name="attr_archetype" type="text" title="@{archetype}"/>
|
|
</label>
|
|
</div>
|
|
<div class="statblock__row">
|
|
<label class="input-label"><span class="input-label__text" data-i18n="drive" role="heading" aria-level="3"></span>
|
|
<input class="underlined input-label__input" name="attr_drive" type="text" title="@{drive}"/>
|
|
</label>
|
|
</div>
|
|
<div class="statblock__row">
|
|
<div class="input-label input-label--button">
|
|
<button class="roller input-label__text" name="roll_primary_pool" data-i18n="primary pool" role="heading" aria-level="3" value="@{primary_pool_action}" type="roll">
|
|
</button>
|
|
<input class="input-label__input" name="attr_primary_pool" type="number" value="1" role="heading" aria-level="3" title="@{primary_pool}"/>
|
|
</div>
|
|
<button name="act_primary-pool-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_primary_pool_action" type="hidden" title="@{primary_pool_action}"/>
|
|
<input class="underlined" name="attr_primary_actions" type="text" title="@{primary_actions}"/>
|
|
</div>
|
|
<div class="statblock__row">
|
|
<div class="input-label input-label--button">
|
|
<button class="roller input-label__text" name="roll_secondary_pool" data-i18n="secondary pool" role="heading" aria-level="3" value="@{secondary_pool_action}" type="roll">
|
|
</button>
|
|
<input class="input-label__input" name="attr_secondary_pool" type="number" value="1" role="heading" aria-level="3" title="@{secondary_pool}"/>
|
|
</div>
|
|
<button name="act_secondary-pool-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_secondary_pool_action" type="hidden" title="@{secondary_pool_action}"/>
|
|
<input class="underlined" name="attr_secondary_actions" type="text" title="@{secondary_actions}"/>
|
|
</div>
|
|
<div class="statblock__row">
|
|
<div class="input-label input-label--button">
|
|
<button class="roller input-label__text" name="roll_desperation_pool" data-i18n="desperation pool" role="heading" aria-level="3" value="@{desperation_pool_action}" type="roll">
|
|
</button>
|
|
<input class="input-label__input" name="attr_desperation_pool" type="number" value="1" role="heading" aria-level="3" title="@{desperation_pool}"/>
|
|
</div>
|
|
<button name="act_desperation-pool-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_desperation_pool_action" type="hidden" title="@{desperation_pool_action}"/>
|
|
</div>
|
|
<div class="statblock__row statblock__row--auto-grid">
|
|
<label class="input-label"><span class="input-label__text" data-i18n="health" role="heading" aria-level="3"></span>
|
|
<input class="underlined input-label__input" name="attr_health" type="number" title="@{health}"/>
|
|
</label>
|
|
<label class="input-label"><span class="input-label__text" data-i18n="defense" role="heading" aria-level="3"></span>
|
|
<input class="underlined input-label__input" name="attr_defense" type="number" title="@{defense}"/>
|
|
</label>
|
|
<div class="input-label input-label--button">
|
|
<button class="roller input-label__text" name="roll_initiative" data-i18n="initiative" role="heading" aria-level="3" value="@{initiative_action}" type="roll">
|
|
</button>
|
|
<input class="underlined input-label__input" name="attr_initiative" type="number" title="@{initiative}"/>
|
|
</div>
|
|
<button name="act_initiative-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_initiative_action" type="hidden" title="@{initiative_action}"/>
|
|
</div>
|
|
<div class="statblock__row statblock__row--inline-container">
|
|
<h3 data-i18n="qualities"></h3><span class="inline-fieldset" hidden=""></span>
|
|
<fieldset class="repeating_quality">
|
|
<input class="display-control" name="attr_display_state" value="short-display" hidden="" type="radio" title="@{repeating_quality_$X_display_state}"/>
|
|
<div class="inline-fieldset__summary display-target">
|
|
<label class="pointer">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_quality_$X_collapse}"/><span name="attr_name" title="@{repeating_quality_$X_name}"></span>
|
|
</label>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="display" checked="" hidden="" type="radio" title="@{repeating_quality_$X_display_state}"/>
|
|
<div class="inline-fieldset__detail display-target">
|
|
<input class="underlined" name="attr_name" role="heading" aria-level="3" data-i18n-placeholder="quality name" type="text" title="@{repeating_quality_$X_name}"/>
|
|
<div class="statblock__row statblock__row--flex display-target">
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="cost" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_cost" title="@{repeating_quality_$X_cost}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_cost" type="text" title="@{repeating_quality_$X_cost}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="duration" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_duration" title="@{repeating_quality_$X_duration}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_duration" type="text" title="@{repeating_quality_$X_duration}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="subject" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_subject" title="@{repeating_quality_$X_subject}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_subject" type="text" title="@{repeating_quality_$X_subject}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="range" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_range" title="@{repeating_quality_$X_range}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_range" type="text" title="@{repeating_quality_$X_range}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="action" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_action" title="@{repeating_quality_$X_action}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_action" type="text" title="@{repeating_quality_$X_action}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="cooldown" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_cooldown" title="@{repeating_quality_$X_cooldown}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_cooldown" type="text" title="@{repeating_quality_$X_cooldown}"/>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_description" title="@{repeating_quality_$X_description}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="qualities description" title="@{repeating_quality_$X_description}"></textarea>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<button class="repcontrol-button repcontrol-button--add repcontrol-button--inline" name="act_add-quality" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--edit repcontrol-button--inline" name="act_edit-quality" type="action">
|
|
</button>
|
|
</div>
|
|
<div class="statblock__row statblock__row--inline-container">
|
|
<h3 data-i18n="flairs"></h3><span class="inline-fieldset" hidden=""></span>
|
|
<fieldset class="repeating_flair">
|
|
<input class="display-control" name="attr_display_state" value="short-display" hidden="" type="radio" title="@{repeating_flair_$X_display_state}"/>
|
|
<div class="inline-fieldset__summary display-target">
|
|
<label class="pointer">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_flair_$X_collapse}"/><span name="attr_name" title="@{repeating_flair_$X_name}"></span>
|
|
</label>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="display" checked="" hidden="" type="radio" title="@{repeating_flair_$X_display_state}"/>
|
|
<div class="inline-fieldset__detail display-target">
|
|
<input class="underlined" name="attr_name" role="heading" aria-level="3" data-i18n-placeholder="flair name" type="text" title="@{repeating_flair_$X_name}"/>
|
|
<div class="statblock__row statblock__row--flex display-target">
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="cost" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_cost" title="@{repeating_flair_$X_cost}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_cost" type="text" title="@{repeating_flair_$X_cost}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="duration" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_duration" title="@{repeating_flair_$X_duration}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_duration" type="text" title="@{repeating_flair_$X_duration}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="subject" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_subject" title="@{repeating_flair_$X_subject}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_subject" type="text" title="@{repeating_flair_$X_subject}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="range" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_range" title="@{repeating_flair_$X_range}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_range" type="text" title="@{repeating_flair_$X_range}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="action" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_action" title="@{repeating_flair_$X_action}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_action" type="text" title="@{repeating_flair_$X_action}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="cooldown" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_cooldown" title="@{repeating_flair_$X_cooldown}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_cooldown" type="text" title="@{repeating_flair_$X_cooldown}"/>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_description" title="@{repeating_flair_$X_description}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="flairs description" title="@{repeating_flair_$X_description}"></textarea>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<button class="repcontrol-button repcontrol-button--add repcontrol-button--inline" name="act_add-flair" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--edit repcontrol-button--inline" name="act_edit-flair" type="action">
|
|
</button>
|
|
</div>
|
|
<div class="statblock__row statblock__row--inline-container">
|
|
<h3 data-i18n="extras"></h3><span class="inline-fieldset" hidden=""></span>
|
|
<fieldset class="repeating_extra">
|
|
<input class="display-control" name="attr_display_state" value="short-display" hidden="" type="radio" title="@{repeating_extra_$X_display_state}"/>
|
|
<div class="inline-fieldset__summary display-target">
|
|
<label class="pointer">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_extra_$X_collapse}"/><span name="attr_name" title="@{repeating_extra_$X_name}"></span>
|
|
</label>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="display" checked="" hidden="" type="radio" title="@{repeating_extra_$X_display_state}"/>
|
|
<div class="inline-fieldset__detail display-target">
|
|
<input class="underlined" name="attr_name" role="heading" aria-level="3" data-i18n-placeholder="extra name" type="text" title="@{repeating_extra_$X_name}"/>
|
|
<div class="statblock__row statblock__row--flex display-target">
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="cost" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_cost" title="@{repeating_extra_$X_cost}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_cost" type="text" title="@{repeating_extra_$X_cost}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="duration" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_duration" title="@{repeating_extra_$X_duration}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_duration" type="text" title="@{repeating_extra_$X_duration}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="subject" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_subject" title="@{repeating_extra_$X_subject}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_subject" type="text" title="@{repeating_extra_$X_subject}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="range" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_range" title="@{repeating_extra_$X_range}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_range" type="text" title="@{repeating_extra_$X_range}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="action" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_action" title="@{repeating_extra_$X_action}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_action" type="text" title="@{repeating_extra_$X_action}"/>
|
|
</div>
|
|
</label>
|
|
<label class="input-label input-label--adaptive"><span class="input-label__text" data-i18n="cooldown" role="heading" aria-level="4"></span>
|
|
<div class="adaptive adaptive--input"><span class="adaptive--input__span" name="attr_cooldown" title="@{repeating_extra_$X_cooldown}"></span>
|
|
<input class="underlined input-label__input adaptive--input__input" name="attr_cooldown" type="text" title="@{repeating_extra_$X_cooldown}"/>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_description" title="@{repeating_extra_$X_description}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="extras description" title="@{repeating_extra_$X_description}"></textarea>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<button class="repcontrol-button repcontrol-button--add repcontrol-button--inline" name="act_add-extra" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--edit repcontrol-button--inline" name="act_edit-extra" type="action">
|
|
</button>
|
|
</div>
|
|
<div class="statblock__row statblock__row--inline-container">
|
|
<h3 data-i18n="callings"></h3><span class="inline-fieldset" hidden=""></span>
|
|
<fieldset class="repeating_antagonist-calling">
|
|
<input class="display-control" name="attr_display_state" value="short-display" hidden="" type="radio" title="@{repeating_antagonist-calling_$X_display_state}"/>
|
|
<div class="inline-fieldset__summary display-target">
|
|
<label class="pointer">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_antagonist-calling_$X_collapse}"/><span name="attr_name" title="@{repeating_antagonist-calling_$X_name}"></span> <span class="inline-fieldset__summary__text" name="attr_rating" title="@{repeating_antagonist-calling_$X_rating}"></span>
|
|
</label>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="display" checked="" hidden="" type="radio" title="@{repeating_antagonist-calling_$X_display_state}"/>
|
|
<div class="inline-fieldset__detail display-target">
|
|
<input class="collapse-control" name="attr_collapse" value="0" type="hidden" title="@{repeating_antagonist-calling_$X_collapse}"/>
|
|
<label class="collapse-interface" data-i18n-title="collapse subsection">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_antagonist-calling_$X_collapse}"/>
|
|
</label>
|
|
<div class="statblock__row statblock__row--auto-grid">
|
|
<input class="underlined" name="attr_name" role="heading" aria-level="3" data-i18n-placeholder="Calling name" type="text" title="@{repeating_antagonist-calling_$X_name}"/>
|
|
<input class="underlined" name="attr_rating" type="number" title="@{repeating_antagonist-calling_$X_rating}"/>
|
|
</div>
|
|
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_description" title="@{repeating_antagonist-calling_$X_description}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="Calling description" title="@{repeating_antagonist-calling_$X_description}"></textarea>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<button class="repcontrol-button repcontrol-button--add repcontrol-button--inline" name="act_add-antagonist-calling" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--edit repcontrol-button--inline" name="act_edit-antagonist-calling" type="action">
|
|
</button>
|
|
</div>
|
|
<div class="statblock__row statblock__row--inline-container">
|
|
<h3 data-i18n="purviews"></h3><span class="inline-fieldset" hidden=""></span>
|
|
<fieldset class="repeating_antagonist-purview">
|
|
<input class="display-control" name="attr_display_state" value="short-display" hidden="" type="radio" title="@{repeating_antagonist-purview_$X_display_state}"/>
|
|
<div class="inline-fieldset__summary display-target">
|
|
<label class="pointer">
|
|
<input name="attr_collapse" value="1" hidden="" type="checkbox" title="@{repeating_antagonist-purview_$X_collapse}"/><span name="attr_name" title="@{repeating_antagonist-purview_$X_name}"></span>
|
|
</label>
|
|
</div>
|
|
<input class="display-control" name="attr_display_state" value="display" checked="" hidden="" type="radio" title="@{repeating_antagonist-purview_$X_display_state}"/>
|
|
<div class="inline-fieldset__detail display-target">
|
|
<input class="underlined" name="attr_name" role="heading" aria-level="3" data-i18n-placeholder="Purview name" type="text" title="@{repeating_antagonist-purview_$X_name}"/>
|
|
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_innate_power" title="@{repeating_antagonist-purview_$X_innate_power}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_innate_power" data-i18n-placeholder="Innate power" title="@{repeating_antagonist-purview_$X_innate_power}"></textarea>
|
|
</div>
|
|
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_description" title="@{repeating_antagonist-purview_$X_description}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_description" data-i18n-placeholder="Purview description" title="@{repeating_antagonist-purview_$X_description}"></textarea>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<button class="repcontrol-button repcontrol-button--add repcontrol-button--inline" name="act_add-antagonist-purview" type="action">
|
|
</button>
|
|
<button class="repcontrol-button repcontrol-button--edit repcontrol-button--inline" name="act_edit-antagonist-purview" type="action">
|
|
</button>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
<article class="navigable-section navigable-section--gm-screen gm-screen subsystem-style system-scion-origin statblock" id="gm-screen">
|
|
<section class="section-tension subsystem-style" id="tension">
|
|
<h2 class="subsystem-style scion-hero" data-i18n="tension"></h2>
|
|
<div class="dot-row twelve-dots momentum-content boxes">
|
|
<select class="dot-number underlined" name="attr_tension" title="@{tension}">
|
|
<option value="0" selected="">12
|
|
</option>
|
|
<option value="1">12
|
|
</option>
|
|
<option value="2">12
|
|
</option>
|
|
<option value="3">12
|
|
</option>
|
|
<option value="4">12
|
|
</option>
|
|
<option value="5">12
|
|
</option>
|
|
<option value="6">12
|
|
</option>
|
|
<option value="7">12
|
|
</option>
|
|
<option value="8">12
|
|
</option>
|
|
<option value="9">12
|
|
</option>
|
|
<option value="10">12
|
|
</option>
|
|
<option value="11">12
|
|
</option>
|
|
<option value="12">12
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="clearer dot" name="attr_tension" checked="" value="0" type="radio" title="@{tension}"/>
|
|
<input class="dot" name="attr_tension" value="1" type="radio" title="@{tension}"/>
|
|
<input class="dot" name="attr_tension" value="2" type="radio" title="@{tension}"/>
|
|
<input class="dot" name="attr_tension" value="3" type="radio" title="@{tension}"/>
|
|
<input class="dot" name="attr_tension" value="4" type="radio" title="@{tension}"/>
|
|
<input class="dot" name="attr_tension" value="5" type="radio" title="@{tension}"/>
|
|
<input class="dot" name="attr_tension" value="6" type="radio" title="@{tension}"/>
|
|
<input class="dot" name="attr_tension" value="7" type="radio" title="@{tension}"/>
|
|
<input class="dot" name="attr_tension" value="8" type="radio" title="@{tension}"/>
|
|
<input class="dot" name="attr_tension" value="9" type="radio" title="@{tension}"/>
|
|
<input class="dot" name="attr_tension" value="10" type="radio" title="@{tension}"/>
|
|
<input class="dot" name="attr_tension" value="11" type="radio" title="@{tension}"/>
|
|
<input class="dot" name="attr_tension" value="12" type="radio" title="@{tension}"/>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
<article class="navigable-section navigable-section--party-screen party-screen subsystem-style system-scion-origin statblock" id="party-screen">
|
|
<section class="section-party-momentum subsystem-style" id="party-momentum">
|
|
<h2 class="subsystem-style scion-hero" data-i18n="momentum"></h2>
|
|
<div class="dot-row twelve-dots momentum-content boxes">
|
|
<select class="dot-number underlined" name="attr_party_momentum" title="@{party_momentum}">
|
|
<option value="0" selected="">12
|
|
</option>
|
|
<option value="1">12
|
|
</option>
|
|
<option value="2">12
|
|
</option>
|
|
<option value="3">12
|
|
</option>
|
|
<option value="4">12
|
|
</option>
|
|
<option value="5">12
|
|
</option>
|
|
<option value="6">12
|
|
</option>
|
|
<option value="7">12
|
|
</option>
|
|
<option value="8">12
|
|
</option>
|
|
<option value="9">12
|
|
</option>
|
|
<option value="10">12
|
|
</option>
|
|
<option value="11">12
|
|
</option>
|
|
<option value="12">12
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="clearer dot" name="attr_party_momentum" checked="" value="0" type="radio" title="@{party_momentum}"/>
|
|
<input class="dot" name="attr_party_momentum" value="1" type="radio" title="@{party_momentum}"/>
|
|
<input class="dot" name="attr_party_momentum" value="2" type="radio" title="@{party_momentum}"/>
|
|
<input class="dot" name="attr_party_momentum" value="3" type="radio" title="@{party_momentum}"/>
|
|
<input class="dot" name="attr_party_momentum" value="4" type="radio" title="@{party_momentum}"/>
|
|
<input class="dot" name="attr_party_momentum" value="5" type="radio" title="@{party_momentum}"/>
|
|
<input class="dot" name="attr_party_momentum" value="6" type="radio" title="@{party_momentum}"/>
|
|
<input class="dot" name="attr_party_momentum" value="7" type="radio" title="@{party_momentum}"/>
|
|
<input class="dot" name="attr_party_momentum" value="8" type="radio" title="@{party_momentum}"/>
|
|
<input class="dot" name="attr_party_momentum" value="9" type="radio" title="@{party_momentum}"/>
|
|
<input class="dot" name="attr_party_momentum" value="10" type="radio" title="@{party_momentum}"/>
|
|
<input class="dot" name="attr_party_momentum" value="11" type="radio" title="@{party_momentum}"/>
|
|
<input class="dot" name="attr_party_momentum" value="12" type="radio" title="@{party_momentum}"/>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section class="section-collateral supplement-titanomachy subsystem-style" id="collateral">
|
|
<h2 class="subsystem-style scion-hero" data-i18n="collateral"></h2>
|
|
<div class="dot-row twelve-dots momentum-content boxes">
|
|
<select class="dot-number underlined" name="attr_collateral" title="@{collateral}">
|
|
<option value="0" selected="">12
|
|
</option>
|
|
<option value="1">12
|
|
</option>
|
|
<option value="2">12
|
|
</option>
|
|
<option value="3">12
|
|
</option>
|
|
<option value="4">12
|
|
</option>
|
|
<option value="5">12
|
|
</option>
|
|
<option value="6">12
|
|
</option>
|
|
<option value="7">12
|
|
</option>
|
|
<option value="8">12
|
|
</option>
|
|
<option value="9">12
|
|
</option>
|
|
<option value="10">12
|
|
</option>
|
|
<option value="11">12
|
|
</option>
|
|
<option value="12">12
|
|
</option>
|
|
</select>
|
|
<div class="dot-button-container">
|
|
<input class="clearer dot" name="attr_collateral" checked="" value="0" type="radio" title="@{collateral}"/>
|
|
<input class="dot" name="attr_collateral" value="1" type="radio" title="@{collateral}"/>
|
|
<input class="dot" name="attr_collateral" value="2" type="radio" title="@{collateral}"/>
|
|
<input class="dot" name="attr_collateral" value="3" type="radio" title="@{collateral}"/>
|
|
<input class="dot" name="attr_collateral" value="4" type="radio" title="@{collateral}"/>
|
|
<input class="dot" name="attr_collateral" value="5" type="radio" title="@{collateral}"/>
|
|
<input class="dot" name="attr_collateral" value="6" type="radio" title="@{collateral}"/>
|
|
<input class="dot" name="attr_collateral" value="7" type="radio" title="@{collateral}"/>
|
|
<input class="dot" name="attr_collateral" value="8" type="radio" title="@{collateral}"/>
|
|
<input class="dot" name="attr_collateral" value="9" type="radio" title="@{collateral}"/>
|
|
<input class="dot" name="attr_collateral" value="10" type="radio" title="@{collateral}"/>
|
|
<input class="dot" name="attr_collateral" value="11" type="radio" title="@{collateral}"/>
|
|
<input class="dot" name="attr_collateral" value="12" type="radio" title="@{collateral}"/>
|
|
</div>
|
|
</div>
|
|
<button class="roller" name="roll_collateral" value="@{collateral_action}" type="roll">
|
|
</button>
|
|
<button name="act_collateral-action" hidden="" type="action">
|
|
</button>
|
|
<input name="attr_collateral_action" type="hidden" title="@{collateral_action}"/>
|
|
</section>
|
|
<section class="section-party-notes" id="notes">
|
|
<h2 class="subsystem-style scion-hero" data-i18n="notes"></h2>
|
|
<div class="adaptive adaptive--text"><span class="adaptive--text__span" name="attr_notes" title="@{notes}"></span>
|
|
<textarea class="underlined adaptive--text__textarea" name="attr_notes" title="@{notes}"></textarea>
|
|
</div>
|
|
</section>
|
|
</article>
|
|
</div>
|
|
<rolltemplate class="sheet-rolltemplate-storypath">{{#^rollBetween() computed::finished 0 0}}<span class="finished"></span>{{/^rollBetween() computed::finished 0 0}}
|
|
<div class="template storypath{{#continuation}} continuation{{/continuation}}{{#first}} first{{/first}} finished">
|
|
<div class="upper-blur"></div>
|
|
<div class="lower-blur"></div>
|
|
<div class="content">
|
|
<div class="header">{{#title}}
|
|
<h3 class="title">{{title}}</h3>{{/title}}{{#attribute}}
|
|
<h4>{{attribute}}</h4>{{/attribute}}{{#skill}}{{#attribute}}
|
|
<h4 class="amp">&</h4>{{/attribute}}
|
|
<h4>{{skill}}</h4>{{/skill}}{{^continuation}}{{#character_name}}{{#character_id}}
|
|
<h4 class="character_name">[{{character_name}}](http://journal.roll20.net/character/{{character_id}})</h4>{{/character_id}}{{^character_id}}
|
|
<h4 class="character_name">{{character_name}}</h4>{{/character_id}}{{/character_name}}{{/continuation}}
|
|
</div>{{#vs}}
|
|
<div class="tempalte-row vs">
|
|
<h5 data-i18n="opposed by"></h5><span>{{vs}}</span>
|
|
</div>{{/vs}}{{#display_dice}}
|
|
<div class="template-row results">{{^continuation}}
|
|
<h5 data-i18n="results"></h5>{{/continuation}}<span>{{roll_1}}</span><span>{{roll_2}}</span><span>{{roll_3}}</span><span>{{roll_4}}</span><span>{{roll_5}}</span><span>{{roll_6}}</span><span>{{roll_7}}</span><span>{{roll_8}}</span><span>{{roll_9}}</span><span>{{roll_10}}</span>
|
|
</div>{{/display_dice}}{{#^rollTotal() computed::finished 0}}{{#enhancements}}
|
|
<div class="template-row">
|
|
<h5 data-i18n="enhancements"></h5><span>{{enhancements}}</span>
|
|
</div>{{/enhancements}}{{#successes}}
|
|
<div class="template-row">
|
|
<h5 data-i18n="successes"></h5><span>{{computed::successes}}</span>
|
|
</div>{{/successes}}{{#difficulty}}
|
|
<div class="template-row">
|
|
<h5 data-i18n="difficulty"></h5><span>{{computed::difficulty}}</span>
|
|
</div>{{/difficulty}}{{#extra_successes}}
|
|
<div class="template-row">
|
|
<h5 data-i18n="extra successes"></h5><span>{{computed::extra_successes}}</span>
|
|
</div>{{/extra_successes}}{{#description}}
|
|
<div class="template-block">
|
|
<h5 data-i18n="description"></h5><span class="description">{{description}}</span>
|
|
</div>{{/description}}{{/^rollTotal() computed::finished 0}}
|
|
</div>
|
|
</div>
|
|
</rolltemplate>
|
|
<input name="attr_template_start" value="@{whisper}&{template:storypath} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{system=@{system}}}" type="hidden" title="@{template_start}"/>
|
|
<script type="text/worker">//# sourceURL=storypath.js
|
|
|
|
const k = (function(){
|
|
const kFuncs = {};
|
|
|
|
const cascades = {"attr_character_name":{"name":"character_name","type":"text","defaultValue":"","affects":[],"triggeredFuncs":["setActionCalls"],"listenerFunc":"accessSheet","listener":"change:character_name"},"act_k-network-call":{"name":"k-network-call","type":"action","triggeredFuncs":["kReceive"],"affects":[],"addFuncs":[],"listener":"clicked:k-network-call","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_sheet_state":{"name":"sheet_state","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:sheet_state","listenerFunc":"accessSheet","defaultValue":"settings","calculation":"","initialFunc":"","formula":""},"attr_collapsed":{"name":"collapsed","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:collapsed","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_drop_name":{"name":"drop_name","type":"hidden","triggeredFuncs":["handleCompendiumDrop"],"affects":[],"addFuncs":[],"listener":"change:drop_name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_drop_data":{"name":"drop_data","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:drop_data","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_nav-all":{"name":"nav-all","type":"action","triggeredFuncs":["navigateSheet"],"affects":[],"addFuncs":[],"listener":"clicked:nav-all","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_nav-general":{"name":"nav-general","type":"action","triggeredFuncs":["navigateSheet"],"affects":[],"addFuncs":[],"listener":"clicked:nav-general","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_nav-powers":{"name":"nav-powers","type":"action","triggeredFuncs":["navigateSheet"],"affects":[],"addFuncs":[],"listener":"clicked:nav-powers","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_nav-antagonist":{"name":"nav-antagonist","type":"action","triggeredFuncs":["navigateSheet"],"affects":[],"addFuncs":[],"listener":"clicked:nav-antagonist","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_nav-gm-screen":{"name":"nav-gm-screen","type":"action","triggeredFuncs":["navigateSheet"],"affects":[],"addFuncs":[],"listener":"clicked:nav-gm-screen","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_nav-party-screen":{"name":"nav-party-screen","type":"action","triggeredFuncs":["navigateSheet"],"affects":[],"addFuncs":[],"listener":"clicked:nav-party-screen","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_nav-settings":{"name":"nav-settings","type":"action","triggeredFuncs":["navigateSheet"],"affects":[],"addFuncs":[],"listener":"clicked:nav-settings","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_system":{"name":"system","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:system","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_sheet_type":{"name":"sheet_type","type":"select","triggeredFuncs":["styleCharacterType"],"affects":[],"addFuncs":[],"listener":"change:sheet_type","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_target_number":{"name":"target_number","type":"number","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:target_number","listenerFunc":"accessSheet","defaultValue":"8","calculation":"","initialFunc":"","formula":""},"attr_again":{"name":"again","type":"number","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:again","listenerFunc":"accessSheet","defaultValue":"10","calculation":"","initialFunc":"","formula":""},"attr_titanomachy":{"name":"titanomachy","type":"checkbox","triggeredFuncs":["showSupplements"],"affects":[],"addFuncs":[],"listener":"change:titanomachy","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"attr_difficulty_query":{"name":"difficulty_query","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:difficulty_query","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_enhancement_query":{"name":"enhancement_query","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:enhancement_query","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_whisper":{"name":"whisper","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:whisper","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_player":{"name":"player","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:player","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_chronicle":{"name":"chronicle","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:chronicle","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_parent":{"name":"parent","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:parent","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_momentum":{"name":"momentum","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:momentum","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_momentum":{"name":"momentum","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:momentum","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_legend":{"name":"legend","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:legend","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_legend_max":{"name":"legend_max","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:legend_max","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_virtue":{"name":"virtue","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:virtue","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_virtue_1":{"name":"virtue_1","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:virtue_1","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_virtue":{"name":"virtue","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:virtue","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_virtue_2":{"name":"virtue_2","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:virtue_2","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_skills":{"name":"skills","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:skills","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_skill_$x_name":{"name":"repeating_skill_$x_name","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_skill:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_skill_$x_path":{"name":"repeating_skill_$x_path","type":"checkbox","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_skill:path","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"act_repeating_skill_$x_action":{"name":"repeating_skill_$x_action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:repeating_skill:action","listenerFunc":"rollTask","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_skill_$x_action":{"name":"repeating_skill_$x_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_skill:action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_skill_$x_specialty":{"name":"repeating_skill_$x_specialty","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_skill:specialty","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_skill_$x_rating":{"name":"repeating_skill_$x_rating","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_skill:rating","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_attributes":{"name":"attributes","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:attributes","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_intellect-action":{"name":"intellect-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:intellect-action","listenerFunc":"rollTask","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_intellect_action":{"name":"intellect_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:intellect_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_intellect":{"name":"intellect","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:intellect","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_might-action":{"name":"might-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:might-action","listenerFunc":"rollTask","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_might_action":{"name":"might_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:might_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_might":{"name":"might","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:might","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_presence-action":{"name":"presence-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:presence-action","listenerFunc":"rollTask","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_presence_action":{"name":"presence_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:presence_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_presence":{"name":"presence","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:presence","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_cunning-action":{"name":"cunning-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:cunning-action","listenerFunc":"rollTask","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_cunning_action":{"name":"cunning_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:cunning_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_cunning":{"name":"cunning","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:cunning","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_dexterity-action":{"name":"dexterity-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:dexterity-action","listenerFunc":"rollTask","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_dexterity_action":{"name":"dexterity_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:dexterity_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_dexterity":{"name":"dexterity","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:dexterity","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_manipulation-action":{"name":"manipulation-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:manipulation-action","listenerFunc":"rollTask","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_manipulation_action":{"name":"manipulation_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:manipulation_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_manipulation":{"name":"manipulation","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:manipulation","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_resolve-action":{"name":"resolve-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:resolve-action","listenerFunc":"rollTask","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_resolve_action":{"name":"resolve_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:resolve_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_resolve":{"name":"resolve","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:resolve","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_stamina-action":{"name":"stamina-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:stamina-action","listenerFunc":"rollTask","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_stamina_action":{"name":"stamina_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:stamina_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_stamina":{"name":"stamina","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:stamina","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_composure-action":{"name":"composure-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:composure-action","listenerFunc":"rollTask","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_composure_action":{"name":"composure_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:composure_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_composure":{"name":"composure","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:composure","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_health":{"name":"health","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:health","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-injury":{"name":"add-injury","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-injury","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_edit-injury":{"name":"edit-injury","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:edit-injury","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_movement_dice":{"name":"movement_dice","type":"number","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:movement_dice","listenerFunc":"accessSheet","defaultValue":"1","calculation":"movementCalc","initialFunc":"","formula":""},"act_movement-dice-action":{"name":"movement-dice-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:movement-dice-action","listenerFunc":"singleAttributeRoll","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_movement_dice_action":{"name":"movement_dice_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:movement_dice_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_defense":{"name":"defense","type":"number","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:defense","listenerFunc":"accessSheet","defaultValue":"1","calculation":"defenseCalc","initialFunc":"","formula":""},"act_defense-action":{"name":"defense-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:defense-action","listenerFunc":"singleAttributeRoll","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_defense_action":{"name":"defense_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:defense_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_pc-initiative-action":{"name":"pc-initiative-action","type":"action","triggeredFuncs":["rollPCInitiative"],"affects":[],"addFuncs":[],"listener":"clicked:pc-initiative-action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_pc_initiative_action":{"name":"pc_initiative_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:pc_initiative_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_initiative_skill":{"name":"initiative_skill","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:initiative_skill","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_injury_$x_display_state":{"name":"repeating_injury_$x_display_state","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_injury:display_state","listenerFunc":"accessSheet","defaultValue":"bruised","calculation":"","initialFunc":"","formula":""},"attr_repeating_injury_$x_collapse":{"name":"repeating_injury_$x_collapse","type":"hidden","triggeredFuncs":["collapseSection"],"affects":[],"addFuncs":[],"listener":"change:repeating_injury:collapse","listenerFunc":"accessSheet","defaultValue":1,"calculation":"","initialFunc":"","formula":""},"attr_repeating_injury_$x_affected":{"name":"repeating_injury_$x_affected","type":"checkbox","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_injury:affected","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"attr_repeating_injury_$x_type":{"name":"repeating_injury_$x_type","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_injury:type","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_injury_$x_name":{"name":"repeating_injury_$x_name","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_injury:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_injury_$x_effect":{"name":"repeating_injury_$x_effect","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_injury:effect","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_deeds":{"name":"deeds","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:deeds","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-deed":{"name":"add-deed","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-deed","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_edit-deed":{"name":"edit-deed","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:edit-deed","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_experience_used":{"name":"experience_used","type":"number","triggeredFuncs":[],"affects":["experience_remaining"],"addFuncs":[],"listener":"change:experience_used","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"attr_experience_earned":{"name":"experience_earned","type":"number","triggeredFuncs":[],"affects":["experience_remaining"],"addFuncs":[],"listener":"change:experience_earned","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"attr_experience_remaining":{"name":"experience_remaining","type":"number","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:experience_remaining","listenerFunc":"accessSheet","defaultValue":0,"calculation":"calcXP","initialFunc":"","formula":""},"fieldset_repeating_deed":{"name":"repeating_deed","type":"fieldset","triggeredFuncs":["deedDisplay"],"affects":[],"addFuncs":[],"listener":"remove:repeating_deed","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_deed_$x_type":{"name":"repeating_deed_$x_type","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_deed:type","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_deed_$x_name":{"name":"repeating_deed_$x_name","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_deed:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_deed_$x_completed":{"name":"repeating_deed_$x_completed","type":"checkbox","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_deed:completed","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"orderDeeds","formula":""},"act_completed-deed":{"name":"completed-deed","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:completed-deed","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"fieldset_repeating_completed-deed":{"name":"repeating_completed-deed","type":"fieldset","triggeredFuncs":["deedDisplay"],"affects":[],"addFuncs":[],"listener":"remove:repeating_completed-deed","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_completed-deed_$x_type":{"name":"repeating_completed-deed_$x_type","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_completed-deed:type","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_completed-deed_$x_name":{"name":"repeating_completed-deed_$x_name","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_completed-deed:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_completed-deed_$x_completed":{"name":"repeating_completed-deed_$x_completed","type":"checkbox","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_completed-deed:completed","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"orderDeeds","formula":""},"act_paths":{"name":"paths","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:paths","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-path":{"name":"add-path","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-path","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_edit-path":{"name":"edit-path","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:edit-path","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"fieldset_repeating_path":{"name":"repeating_path","type":"fieldset","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"remove:repeating_path","listenerFunc":"clearChildItems","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_display_state":{"name":"repeating_path_$x_display_state","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:display_state","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_master_id":{"name":"repeating_path_$x_master_id","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:master_id","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_collapse":{"name":"repeating_path_$x_collapse","type":"hidden","triggeredFuncs":["collapseSection"],"affects":[],"addFuncs":[],"listener":"change:repeating_path:collapse","listenerFunc":"accessSheet","defaultValue":"0","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_type":{"name":"repeating_path_$x_type","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:type","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_name":{"name":"repeating_path_$x_name","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_status":{"name":"repeating_path_$x_status","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:status","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_condition":{"name":"repeating_path_$x_condition","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:condition","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_skill":{"name":"repeating_path_$x_skill","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:skill","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_description":{"name":"repeating_path_$x_description","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:description","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_tags":{"name":"repeating_path_$x_tags","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:tags","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_rating":{"name":"repeating_path_$x_rating","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:rating","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_group":{"name":"repeating_path_$x_group","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:group","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_access":{"name":"repeating_path_$x_access","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:access","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_obligation":{"name":"repeating_path_$x_obligation","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:obligation","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_path_$x_obligation_status":{"name":"repeating_path_$x_obligation_status","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_path:obligation_status","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_repeating_path_$x_add-contact":{"name":"repeating_path_$x_add-contact","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:repeating_path:add-contact","listenerFunc":"addSubsection","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_repeating_path_$x_add-group":{"name":"repeating_path_$x_add-group","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:repeating_path:add-group","listenerFunc":"addSubsection","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_repeating_path_$x_add-access":{"name":"repeating_path_$x_add-access","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:repeating_path:add-access","listenerFunc":"addSubsection","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_repeating_path_$x_add-obligation":{"name":"repeating_path_$x_add-obligation","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:repeating_path:add-obligation","listenerFunc":"addSubsection","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_calling":{"name":"calling","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:calling","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-calling":{"name":"add-calling","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-calling","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_edit-calling":{"name":"edit-calling","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:edit-calling","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"fieldset_repeating_calling":{"name":"repeating_calling","type":"fieldset","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"remove:repeating_calling","listenerFunc":"clearChildItems","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_calling_$x_level":{"name":"repeating_calling_$x_level","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_calling:level","listenerFunc":"accessSheet","defaultValue":"mortal","calculation":"","initialFunc":"","formula":""},"attr_repeating_calling_$x_display_state":{"name":"repeating_calling_$x_display_state","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_calling:display_state","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_calling_$x_master_id":{"name":"repeating_calling_$x_master_id","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_calling:master_id","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_calling_$x_collapse":{"name":"repeating_calling_$x_collapse","type":"hidden","triggeredFuncs":["collapseSection"],"affects":[],"addFuncs":[],"listener":"change:repeating_calling:collapse","listenerFunc":"accessSheet","defaultValue":"0","calculation":"","initialFunc":"","formula":""},"attr_repeating_calling_$x_rating":{"name":"repeating_calling_$x_rating","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_calling:rating","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_calling_$x_name":{"name":"repeating_calling_$x_name","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_calling:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_calling_$x_rating_max":{"name":"repeating_calling_$x_rating_max","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_calling:rating_max","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_repeating_calling_$x_clash-action":{"name":"repeating_calling_$x_clash-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:repeating_calling:clash-action","listenerFunc":"rollClash","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_calling_$x_clash_action":{"name":"repeating_calling_$x_clash_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_calling:clash_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_calling_$x_active":{"name":"repeating_calling_$x_active","type":"checkbox","triggeredFuncs":["sumActiveCallings"],"affects":[],"addFuncs":[],"listener":"change:repeating_calling:active","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"attr_repeating_calling_$x_clash_stat_2":{"name":"repeating_calling_$x_clash_stat_2","type":"hidden","triggeredFuncs":["sumActiveCallings","clashBasis"],"affects":[],"addFuncs":[],"listener":"change:repeating_calling:clash_stat_2","listenerFunc":"accessSheet","defaultValue":"rating","calculation":"","initialFunc":"","formula":""},"attr_repeating_calling_$x_clash_stat_1":{"name":"repeating_calling_$x_clash_stat_1","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_calling:clash_stat_1","listenerFunc":"accessSheet","defaultValue":"select","calculation":"","initialFunc":"","formula":""},"attr_repeating_calling_$x_description":{"name":"repeating_calling_$x_description","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_calling:description","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_repeating_calling_$x_add-knack":{"name":"repeating_calling_$x_add-knack","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:repeating_calling:add-knack","listenerFunc":"addSubsection","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_purview":{"name":"purview","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:purview","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-purview":{"name":"add-purview","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-purview","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_edit-purview":{"name":"edit-purview","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:edit-purview","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"fieldset_repeating_purview":{"name":"repeating_purview","type":"fieldset","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"remove:repeating_purview","listenerFunc":"clearChildItems","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_display_state":{"name":"repeating_purview_$x_display_state","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:display_state","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_master_id":{"name":"repeating_purview_$x_master_id","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:master_id","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_collapse":{"name":"repeating_purview_$x_collapse","type":"hidden","triggeredFuncs":["collapseSection"],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:collapse","listenerFunc":"accessSheet","defaultValue":"0","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_name":{"name":"repeating_purview_$x_name","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_innate_power":{"name":"repeating_purview_$x_innate_power","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:innate_power","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_description":{"name":"repeating_purview_$x_description","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:description","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_cost":{"name":"repeating_purview_$x_cost","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:cost","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_duration":{"name":"repeating_purview_$x_duration","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:duration","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_subject":{"name":"repeating_purview_$x_subject","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:subject","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_range":{"name":"repeating_purview_$x_range","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:range","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_action":{"name":"repeating_purview_$x_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_clash_stat_1":{"name":"repeating_purview_$x_clash_stat_1","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:clash_stat_1","listenerFunc":"accessSheet","defaultValue":"select","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_clash_stat_2":{"name":"repeating_purview_$x_clash_stat_2","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:clash_stat_2","listenerFunc":"accessSheet","defaultValue":"select","calculation":"","initialFunc":"","formula":""},"act_repeating_purview_$x_clash-action":{"name":"repeating_purview_$x_clash-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:repeating_purview:clash-action","listenerFunc":"rollClash","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_clash_action":{"name":"repeating_purview_$x_clash_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:clash_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_clash_defense_1":{"name":"repeating_purview_$x_clash_defense_1","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:clash_defense_1","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_purview_$x_clash_defense_2":{"name":"repeating_purview_$x_clash_defense_2","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_purview:clash_defense_2","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_repeating_purview_$x_add-boon":{"name":"repeating_purview_$x_add-boon","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:repeating_purview:add-boon","listenerFunc":"addSubsection","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_birthrights":{"name":"birthrights","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:birthrights","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_edit-birthright":{"name":"edit-birthright","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:edit-birthright","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_legendary_title":{"name":"legendary_title","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:legendary_title","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_display_state":{"name":"repeating_birthright_$x_display_state","type":"radio","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:display_state","listenerFunc":"accessSheet","defaultValue":"short-relic","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_collapse":{"name":"repeating_birthright_$x_collapse","type":"hidden","triggeredFuncs":["collapseSection"],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:collapse","listenerFunc":"accessSheet","defaultValue":"0","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_name":{"name":"repeating_birthright_$x_name","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_rating":{"name":"repeating_birthright_$x_rating","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:rating","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_variety":{"name":"repeating_birthright_$x_variety","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:variety","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_tag":{"name":"repeating_birthright_$x_tag","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:tag","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_deed":{"name":"repeating_birthright_$x_deed","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:deed","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_purview":{"name":"repeating_birthright_$x_purview","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:purview","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_motif":{"name":"repeating_birthright_$x_motif","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:motif","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_enhancement":{"name":"repeating_birthright_$x_enhancement","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:enhancement","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_knack":{"name":"repeating_birthright_$x_knack","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:knack","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_flaw":{"name":"repeating_birthright_$x_flaw","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:flaw","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_skills":{"name":"repeating_birthright_$x_skills","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:skills","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_benefit":{"name":"repeating_birthright_$x_benefit","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:benefit","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_stunt":{"name":"repeating_birthright_$x_stunt","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:stunt","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_calling":{"name":"repeating_birthright_$x_calling","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:calling","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_title":{"name":"repeating_birthright_$x_title","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:title","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_birthright_$x_archetype":{"name":"repeating_birthright_$x_archetype","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_birthright:archetype","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-birthright-creature":{"name":"add-birthright-creature","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-birthright-creature","listenerFunc":"addSubsection","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-birthright-follower":{"name":"add-birthright-follower","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-birthright-follower","listenerFunc":"addSubsection","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-birthright-guide":{"name":"add-birthright-guide","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-birthright-guide","listenerFunc":"addSubsection","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-birthright-relic":{"name":"add-birthright-relic","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-birthright-relic","listenerFunc":"addSubsection","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_equipment":{"name":"equipment","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:equipment","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-equipment":{"name":"add-equipment","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-equipment","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_edit-equipment":{"name":"edit-equipment","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:edit-equipment","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_equipment_$x_display_state":{"name":"repeating_equipment_$x_display_state","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_equipment:display_state","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_equipment_$x_collapse":{"name":"repeating_equipment_$x_collapse","type":"hidden","triggeredFuncs":["collapseSection"],"affects":[],"addFuncs":[],"listener":"change:repeating_equipment:collapse","listenerFunc":"accessSheet","defaultValue":"0","calculation":"","initialFunc":"","formula":""},"attr_repeating_equipment_$x_name":{"name":"repeating_equipment_$x_name","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_equipment:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_equipment_$x_tag":{"name":"repeating_equipment_$x_tag","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_equipment:tag","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_equipment_$x_description":{"name":"repeating_equipment_$x_description","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_equipment:description","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_notes":{"name":"notes","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:notes","listenerFunc":"expandHeader","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_notes":{"name":"notes","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:notes","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_archetype_symbol":{"name":"archetype_symbol","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:archetype_symbol","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_archetype":{"name":"archetype","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:archetype","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_drive":{"name":"drive","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:drive","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_primary_pool":{"name":"primary_pool","type":"number","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:primary_pool","listenerFunc":"accessSheet","defaultValue":1,"calculation":"","initialFunc":"","formula":""},"act_primary-pool-action":{"name":"primary-pool-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:primary-pool-action","listenerFunc":"singleAttributeRoll","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_primary_pool_action":{"name":"primary_pool_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:primary_pool_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_primary_actions":{"name":"primary_actions","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:primary_actions","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_secondary_pool":{"name":"secondary_pool","type":"number","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:secondary_pool","listenerFunc":"accessSheet","defaultValue":1,"calculation":"","initialFunc":"","formula":""},"act_secondary-pool-action":{"name":"secondary-pool-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:secondary-pool-action","listenerFunc":"singleAttributeRoll","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_secondary_pool_action":{"name":"secondary_pool_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:secondary_pool_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_secondary_actions":{"name":"secondary_actions","type":"text","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:secondary_actions","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_desperation_pool":{"name":"desperation_pool","type":"number","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:desperation_pool","listenerFunc":"accessSheet","defaultValue":1,"calculation":"","initialFunc":"","formula":""},"act_desperation-pool-action":{"name":"desperation-pool-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:desperation-pool-action","listenerFunc":"singleAttributeRoll","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_desperation_pool_action":{"name":"desperation_pool_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:desperation_pool_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_health":{"name":"health","type":"number","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:health","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"attr_initiative":{"name":"initiative","type":"number","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:initiative","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"act_initiative-action":{"name":"initiative-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:initiative-action","listenerFunc":"singleAttributeRoll","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_initiative_action":{"name":"initiative_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:initiative_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_quality_$x_display_state":{"name":"repeating_quality_$x_display_state","type":"radio","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_quality:display_state","listenerFunc":"accessSheet","defaultValue":"short-display","calculation":"","initialFunc":"","formula":""},"attr_repeating_quality_$x_collapse":{"name":"repeating_quality_$x_collapse","type":"checkbox","triggeredFuncs":["collapseSection"],"affects":[],"addFuncs":[],"listener":"change:repeating_quality:collapse","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"attr_repeating_quality_$x_name":{"name":"repeating_quality_$x_name","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_quality:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_quality_$x_cost":{"name":"repeating_quality_$x_cost","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_quality:cost","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_quality_$x_duration":{"name":"repeating_quality_$x_duration","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_quality:duration","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_quality_$x_subject":{"name":"repeating_quality_$x_subject","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_quality:subject","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_quality_$x_range":{"name":"repeating_quality_$x_range","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_quality:range","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_quality_$x_action":{"name":"repeating_quality_$x_action","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_quality:action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_quality_$x_cooldown":{"name":"repeating_quality_$x_cooldown","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_quality:cooldown","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_quality_$x_description":{"name":"repeating_quality_$x_description","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_quality:description","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-quality":{"name":"add-quality","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-quality","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_edit-quality":{"name":"edit-quality","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:edit-quality","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_flair_$x_display_state":{"name":"repeating_flair_$x_display_state","type":"radio","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_flair:display_state","listenerFunc":"accessSheet","defaultValue":"short-display","calculation":"","initialFunc":"","formula":""},"attr_repeating_flair_$x_collapse":{"name":"repeating_flair_$x_collapse","type":"checkbox","triggeredFuncs":["collapseSection"],"affects":[],"addFuncs":[],"listener":"change:repeating_flair:collapse","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"attr_repeating_flair_$x_name":{"name":"repeating_flair_$x_name","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_flair:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_flair_$x_cost":{"name":"repeating_flair_$x_cost","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_flair:cost","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_flair_$x_duration":{"name":"repeating_flair_$x_duration","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_flair:duration","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_flair_$x_subject":{"name":"repeating_flair_$x_subject","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_flair:subject","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_flair_$x_range":{"name":"repeating_flair_$x_range","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_flair:range","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_flair_$x_action":{"name":"repeating_flair_$x_action","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_flair:action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_flair_$x_cooldown":{"name":"repeating_flair_$x_cooldown","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_flair:cooldown","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_flair_$x_description":{"name":"repeating_flair_$x_description","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_flair:description","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-flair":{"name":"add-flair","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-flair","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_edit-flair":{"name":"edit-flair","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:edit-flair","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_extra_$x_display_state":{"name":"repeating_extra_$x_display_state","type":"radio","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_extra:display_state","listenerFunc":"accessSheet","defaultValue":"short-display","calculation":"","initialFunc":"","formula":""},"attr_repeating_extra_$x_collapse":{"name":"repeating_extra_$x_collapse","type":"checkbox","triggeredFuncs":["collapseSection"],"affects":[],"addFuncs":[],"listener":"change:repeating_extra:collapse","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"attr_repeating_extra_$x_name":{"name":"repeating_extra_$x_name","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_extra:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_extra_$x_cost":{"name":"repeating_extra_$x_cost","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_extra:cost","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_extra_$x_duration":{"name":"repeating_extra_$x_duration","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_extra:duration","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_extra_$x_subject":{"name":"repeating_extra_$x_subject","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_extra:subject","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_extra_$x_range":{"name":"repeating_extra_$x_range","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_extra:range","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_extra_$x_action":{"name":"repeating_extra_$x_action","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_extra:action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_extra_$x_cooldown":{"name":"repeating_extra_$x_cooldown","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_extra:cooldown","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_extra_$x_description":{"name":"repeating_extra_$x_description","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_extra:description","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-extra":{"name":"add-extra","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-extra","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_edit-extra":{"name":"edit-extra","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:edit-extra","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_antagonist-calling_$x_display_state":{"name":"repeating_antagonist-calling_$x_display_state","type":"radio","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_antagonist-calling:display_state","listenerFunc":"accessSheet","defaultValue":"short-display","calculation":"","initialFunc":"","formula":""},"attr_repeating_antagonist-calling_$x_collapse":{"name":"repeating_antagonist-calling_$x_collapse","type":"checkbox","triggeredFuncs":["collapseSection"],"affects":[],"addFuncs":[],"listener":"change:repeating_antagonist-calling:collapse","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"attr_repeating_antagonist-calling_$x_name":{"name":"repeating_antagonist-calling_$x_name","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_antagonist-calling:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_antagonist-calling_$x_rating":{"name":"repeating_antagonist-calling_$x_rating","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_antagonist-calling:rating","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_antagonist-calling_$x_description":{"name":"repeating_antagonist-calling_$x_description","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_antagonist-calling:description","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-antagonist-calling":{"name":"add-antagonist-calling","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-antagonist-calling","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_edit-antagonist-calling":{"name":"edit-antagonist-calling","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:edit-antagonist-calling","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_antagonist-purview_$x_display_state":{"name":"repeating_antagonist-purview_$x_display_state","type":"radio","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_antagonist-purview:display_state","listenerFunc":"accessSheet","defaultValue":"short-display","calculation":"","initialFunc":"","formula":""},"attr_repeating_antagonist-purview_$x_collapse":{"name":"repeating_antagonist-purview_$x_collapse","type":"checkbox","triggeredFuncs":["collapseSection"],"affects":[],"addFuncs":[],"listener":"change:repeating_antagonist-purview:collapse","listenerFunc":"accessSheet","defaultValue":0,"calculation":"","initialFunc":"","formula":""},"attr_repeating_antagonist-purview_$x_name":{"name":"repeating_antagonist-purview_$x_name","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_antagonist-purview:name","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_antagonist-purview_$x_innate_power":{"name":"repeating_antagonist-purview_$x_innate_power","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_antagonist-purview:innate_power","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_repeating_antagonist-purview_$x_description":{"name":"repeating_antagonist-purview_$x_description","type":"span","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:repeating_antagonist-purview:description","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_add-antagonist-purview":{"name":"add-antagonist-purview","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:add-antagonist-purview","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_edit-antagonist-purview":{"name":"edit-antagonist-purview","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:edit-antagonist-purview","listenerFunc":"sectionInteract","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_tension":{"name":"tension","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:tension","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_party_momentum":{"name":"party_momentum","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:party_momentum","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_collateral":{"name":"collateral","type":"select","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:collateral","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"act_collateral-action":{"name":"collateral-action","type":"action","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"clicked:collateral-action","listenerFunc":"singleAttributeRoll","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_collateral_action":{"name":"collateral_action","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:collateral_action","listenerFunc":"accessSheet","defaultValue":"","calculation":"","initialFunc":"","formula":""},"attr_template_start":{"name":"template_start","type":"hidden","triggeredFuncs":[],"affects":[],"addFuncs":[],"listener":"change:template_start","listenerFunc":"accessSheet","defaultValue":"@{whisper}&{template:storypath} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{system=@{system}}}","calculation":"","initialFunc":"","formula":""}};
|
|
|
|
kFuncs.cascades = cascades;
|
|
|
|
const repeatingSectionDetails = [{"section":"repeating_skill","fields":["name","path","action","specialty","rating"]},{"section":"repeating_injury","fields":["display_state","collapse","affected","type","name","effect"]},{"section":"repeating_deed","fields":["type","name","completed"]},{"section":"repeating_completed-deed","fields":["type","name","completed"]},{"section":"repeating_path","fields":["display_state","master_id","collapse","type","name","status","condition","skill","description","tags","rating","group","access","obligation","obligation_status"]},{"section":"repeating_calling","fields":["level","display_state","master_id","collapse","rating","name","rating_max","clash_action","active","clash_stat_2","clash_stat_1","description"]},{"section":"repeating_purview","fields":["display_state","master_id","collapse","name","innate_power","description","cost","duration","subject","range","action","clash_stat_1","clash_stat_2","clash_action","clash_defense_1","clash_defense_2"]},{"section":"repeating_birthright","fields":["display_state","collapse","name","rating","variety","tag","deed","purview","motif","enhancement","knack","flaw","skills","benefit","stunt","calling","title","archetype"]},{"section":"repeating_equipment","fields":["display_state","collapse","name","tag","description"]},{"section":"repeating_quality","fields":["display_state","collapse","name","cost","duration","subject","range","action","cooldown","description"]},{"section":"repeating_flair","fields":["display_state","collapse","name","cost","duration","subject","range","action","cooldown","description"]},{"section":"repeating_extra","fields":["display_state","collapse","name","cost","duration","subject","range","action","cooldown","description"]},{"section":"repeating_antagonist-calling","fields":["display_state","collapse","name","rating","description"]},{"section":"repeating_antagonist-purview","fields":["display_state","collapse","name","innate_power","description"]}];
|
|
|
|
kFuncs.repeatingSectionDetails = repeatingSectionDetails;
|
|
|
|
const persistentTabs = [];
|
|
|
|
kFuncs.persistentTabs = persistentTabs;
|
|
/**
|
|
* The K-scaffold provides several variables to allow your scripts to tap into its information flow.
|
|
* @namespace Sheetworkers.Variables
|
|
*/
|
|
/**
|
|
* This stores the name of your sheet for use in the logging functions {@link log} and {@link debug}. Accessible by `k.sheetName`
|
|
* @memberof Variables
|
|
* @var
|
|
* @type {string}
|
|
*/
|
|
let sheetName = 'kScaffold Powered Sheet';
|
|
kFuncs.sheetName = sheetName;
|
|
/**
|
|
* This stores the version of your sheet for use in the logging functions{@link log} and {@link debug}. It is also stored in the sheet_version attribute on your character sheet. Accessible via `k.version`
|
|
* @memberof Variables
|
|
* @var
|
|
* @type {number}
|
|
*/
|
|
let version = 0;
|
|
kFuncs.version = version;
|
|
/**
|
|
* A boolean flag that tells the script whether to enable or disable {@link debug} calls. If the version of the sheet is `0`, or an attribute named `debug_mode` is found on opening this is set to true for your entire session. Otherwise, it remains false.
|
|
* @memberof Variables
|
|
* @var
|
|
* @type {boolean}
|
|
*/
|
|
let debugMode = false;
|
|
kFuncs.debugMode = debugMode;
|
|
const funcs = {};
|
|
kFuncs.funcs = funcs;
|
|
const updateHandlers = {};
|
|
const openHandlers = {};
|
|
const initialSetups = {};
|
|
const allHandlers = {};
|
|
const addFuncs = {};
|
|
|
|
const kscaffoldJSVersion = '1.0.0';
|
|
const kscaffoldPUGVersion = '1.0.0';
|
|
/**
|
|
* Defines the rollstring that rolls made using k.startRoll begin with. Defaults to "&{template:default}".
|
|
* @memberof Variables
|
|
* @var
|
|
* @type {string}
|
|
*/
|
|
let defaultRollStart = '&{template:default}';
|
|
kFuncs.defaultRollStart = defaultRollStart;/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
/**
|
|
* These are utility functions that are not directly related to Roll20 systems. They provide easy methods for everything from processing text and numbers to querying the user for input.
|
|
* @namespace Sheetworkers.Utilities
|
|
* @alias Utilities
|
|
*/
|
|
/**
|
|
* Replaces problem characters to use a string as a regex
|
|
* @memberof Utilities
|
|
* @param {string} text - The text to replace characters in
|
|
* @returns {string}
|
|
* @example
|
|
* const textForRegex = k.sanitizeForRegex('.some thing[with characters]');
|
|
* console.log(textForRegex);// => "\.some thing\[with characters\]"
|
|
*/
|
|
const sanitizeForRegex = function(text){
|
|
return text.replace(/\.|\||\(|\)|\[|\]|\-|\+|\?|\/|\{|\}|\^|\$|\*/g,'\\$&');
|
|
};
|
|
kFuncs.sanitizeForRegex = sanitizeForRegex;
|
|
|
|
/**
|
|
* Converts a value to a number, it\'s default value, or `0` if no default value passed.
|
|
* @memberof Utilities
|
|
* @param {string|number} val - Value to convert to a number
|
|
* @param {number} def - The default value, uses 0 if not passed
|
|
* @returns {number|undefined}
|
|
* @example
|
|
* const num = k.value('100');
|
|
* console.log(num);// => 100
|
|
*/
|
|
const value = function(val,def){
|
|
const convertVal = +val;
|
|
if(def !== undefined && isNaN(def)){
|
|
throw(`K-scaffold Error: invalid default for value(). Default: ${def}`);
|
|
}
|
|
return convertVal === 0 ?
|
|
convertVal :
|
|
(+val||def||0);
|
|
};
|
|
kFuncs.value = value;
|
|
|
|
/**
|
|
* Extracts the section (e.g. `repeating_equipment`), rowID (e.g `-;lkj098J:LKj`), and field name (e.g. `bulk`) from a repeating attribute name.
|
|
* @memberof Utilities
|
|
* @param {string} string - The string to parse
|
|
* @returns {array} - Array of matches. Index 0: the section name, e.g. repeating_equipment | Index 1:the row ID | index 2: The name of the attribute
|
|
* @returns {string[]}
|
|
* @example
|
|
* //Extract info from a full repeating name
|
|
* const [section,rowID,attrName] = k.parseRepeatName('repeating_equipment_-8908asdflkjZlkj23_name');
|
|
* console.log(section);// => "repeating_equipment"
|
|
* console.log(rowID);// => "-8908asdflkjZlkj23"
|
|
* console.log(attrName);// => "name"
|
|
*
|
|
* //Extract info from just a row name
|
|
* const [section,rowID,attrName] = k.parseRepeatName('repeating_equipment_-8908asdflkjZlkj23');
|
|
* console.log(section);// => "repeating_equipment"
|
|
* console.log(rowID);// => "-8908asdflkjZlkj23"
|
|
* console.log(attrName);// => undefined
|
|
*/
|
|
const parseRepeatName = function(string){
|
|
let match = string.match(/(repeating_[^_]+)_([^_]+)(?:_(.+))?/);
|
|
match.shift();
|
|
return match;
|
|
};
|
|
kFuncs.parseRepeatName = parseRepeatName;
|
|
|
|
/**
|
|
* Parses out the components of a trigger name similar to [parseRepeatName](#parserepeatname). Aliases: parseClickTrigger.
|
|
*
|
|
* Aliases: `k.parseClickTrigger`
|
|
* @memberof Utilities
|
|
* @param {string} string The triggerName property of the
|
|
* @returns {array} - For a repeating button named `repeating_equipment_-LKJhpoi98;lj_roll`, the array will be `['repeating_equipment','-LKJhpoi98;lj','roll']`. For a non repeating button named `roll`, the array will be `[undefined,undefined,'roll']`
|
|
* @returns {string[]}
|
|
* @example
|
|
* //Parse a non repeating trigger
|
|
* const [section,rowID,attrName] = k.parseTriggerName('clicked:some-button');
|
|
* console.log(section);// => undefined
|
|
* console.log(rowID);// => undefined
|
|
* console.log(attrName);// => "some-button"
|
|
*
|
|
* //Parse a repeating trigger
|
|
* const [section,rowID,attrName] = k.parseTriggerName('clicked:repeating_attack_-234lkjpd8fu8usadf_some-button');
|
|
* console.log(section);// => "repeating_attack"
|
|
* console.log(rowID);// => "-234lkjpd8fu8usadf"
|
|
* console.log(attrName);// => "some-button"
|
|
*
|
|
* //Parse a repeating name
|
|
* const [section,rowID,attrName] = k.parseTriggerName('repeating_attack_-234lkjpd8fu8usadf_some-button');
|
|
* console.log(section);// => "repeating_attack"
|
|
* console.log(rowID);// => "-234lkjpd8fu8usadf"
|
|
* console.log(attrName);// => "some-button"
|
|
*/
|
|
const parseTriggerName = function(string){
|
|
let match = string.replace(/^clicked:/,'').match(/(?:(repeating_[^_]+)_([^_]+)_)?(.+)/);
|
|
match.shift();
|
|
return match;
|
|
};
|
|
kFuncs.parseTriggerName = parseTriggerName;
|
|
const parseClickTrigger = parseTriggerName;
|
|
kFuncs.parseClickTrigger = parseClickTrigger;
|
|
|
|
/**
|
|
* Parses out the attribute name from the htmlattribute name.
|
|
* @memberof Utilities
|
|
* @param {string} string - The triggerName property of the [event](https://wiki.roll20.net/Sheet_Worker_Scripts#eventInfo_Object).
|
|
* @returns {string}
|
|
* @example
|
|
* //Parse a name
|
|
* const attrName = k.parseHtmlName('attr_attribute_1');
|
|
* console.log(attrName);// => "attribute_1"
|
|
*/
|
|
const parseHTMLName = function(string){
|
|
let match = string.match(/(?:attr|act|roll)_(.+)/);
|
|
match.shift();
|
|
return match[0];
|
|
};
|
|
kFuncs.parseHTMLName = parseHTMLName;
|
|
|
|
/**
|
|
* Capitalize each word in a string
|
|
* @memberof Utilities
|
|
* @param {string} string - The string to capitalize
|
|
* @returns {string}
|
|
* @example
|
|
* const capitalized = k.capitalize('a word');
|
|
* console.log(capitalized);// => "A Word"
|
|
*/
|
|
const capitalize = function(string){
|
|
return string.replace(/(?:^|\s+|\/)[a-z]/ig,(letter)=>letter.toUpperCase());
|
|
};
|
|
kFuncs.capitalize = capitalize;
|
|
|
|
/**
|
|
* Extracts a roll query result for use in later functions. Must be awaited as per [startRoll documentation](https://wiki.roll20.net/Sheet_Worker_Scripts#Roll_Parsing.28NEW.29). Stolen from [Oosh\'s Adventures with Startroll thread](https://app.roll20.net/forum/post/10346883/adventures-with-startroll).
|
|
* @memberof Utilities
|
|
* @param {string} query - The query should be just the text as the `?{` and `}` at the start/end of the query are added by the function.
|
|
* @returns {Promise} - Resolves to the selected value from the roll query
|
|
* @example
|
|
* const rollFunction = async function(){
|
|
* //Get the result of a choose from list query
|
|
* const queryResult = await extractQueryResult('Prompt Text Here|Option 1|Option 2');
|
|
* console.log(queryResult);//=> "Option 1" or "Option 2" depending on what the user selects
|
|
*
|
|
* //Get free form input from the user
|
|
* const freeResult = await extractQueryResult('Prompt Text Here');
|
|
* consoel.log(freeResult);// => Whatever the user entered
|
|
* }
|
|
*/
|
|
const extractQueryResult = async function(query){
|
|
debug('entering extractQueryResult');
|
|
const rollObj = {
|
|
query:`[[0[response=?{${query}}]]]`
|
|
};
|
|
let {roll} = await _startRoll(rollObj,'!');
|
|
roll.finish();
|
|
return roll.results.query.expression.replace(/^.+?response=|\]$/g,'');
|
|
};
|
|
kFuncs.extractQueryResult = extractQueryResult;
|
|
|
|
/**
|
|
* Simulates a query for ensuring that async/await works correctly in the sheetworker environment when doing conditional startRolls. E.g. if you have an if/else and only one of the conditions results in `startRoll` being called (and thus an `await`), the sheetworker environment would normally crash. Awaiting this in the condition that does not actually need to call `startRoll` will keep the environment in sync.
|
|
* @memberof Utilities
|
|
* @param {string|number} [value] - The value to return. Optional.
|
|
* @returns {Promise} - Resolves to the value passed to the function
|
|
* @example
|
|
* const rollFunction = async function(){
|
|
* //Get the result of a choose from list query
|
|
* const queryResult = await pseudoQuery('a value');
|
|
* console.log(queryResult);//=> "a value"
|
|
* }
|
|
*/
|
|
const pseudoQuery = async function(value){
|
|
const rollObj = {
|
|
query:`[[0[response=${value}]]]`
|
|
};
|
|
let {roll} = await _startRoll(rollObj,'!');
|
|
roll.finish();
|
|
return roll.results.query.expression.replace(/^.+?response=|\]$/g,'');
|
|
};
|
|
kFuncs.pseudoQuery = pseudoQuery;
|
|
|
|
/**
|
|
* An alias for console.log.
|
|
* @memberof Utilities
|
|
* @param {any} msg - The message can be a straight string, an object, or an array. If it is an object or array, the object will be broken down so that each key is used as a label to output followed by the value of that key. If the value of the key is an object or array, it will be output via `console.table`.
|
|
*/
|
|
const log = function(msg){
|
|
if(typeof msg === 'string'){
|
|
console.log(`%c${kFuncs.sheetName} log| ${msg}`,"background-color:#159ccf");
|
|
}else if(typeof msg === 'object'){
|
|
Object.keys(msg).forEach((m)=>{
|
|
if(typeof msg[m] === 'string'){
|
|
console.log(`%c${kFuncs.sheetName} log| ${m}: ${msg[m]}`,"background-color:#159ccf");
|
|
}else{
|
|
console.log(`%c${kFuncs.sheetName} log| ${typeof msg[m]} ${m}`,"background-color:#159ccf");
|
|
console.table(msg[m]);
|
|
}
|
|
});
|
|
}
|
|
};
|
|
kFuncs.log = log;
|
|
|
|
/**
|
|
* Alias for console.log that only triggers when debug mode is enabled or when the sheet\'s version is `0`. Useful for entering test logs that will not pollute the console on the live sheet.
|
|
* @memberof Utilities
|
|
* @param {any} msg - 'See {@link k.log}
|
|
* @param {boolean} force - Pass as a truthy value to force the debug output to be output to the console regardless of debug mode.
|
|
* @returns {void}
|
|
*/
|
|
const debug = function(msg,force){
|
|
if(!kFuncs.debugMode && !force && kFuncs.version > 0) return;
|
|
if(typeof msg === 'string'){
|
|
console.warn(`%c${kFuncs.sheetName} DEBUG| ${msg}`,"background-color:tan;color:red;");
|
|
}else if(typeof msg === 'object'){
|
|
Object.keys(msg).forEach((m)=>{
|
|
if(typeof msg[m] === 'string'){
|
|
console.warn(`%c${kFuncs.sheetName} DEBUG| ${m}: ${msg[m]}`,"background-color:tan;color:red;");
|
|
}else{
|
|
console.warn(`%c${kFuncs.sheetName} DEBUG| ${typeof msg[m]} ${m}`,"background-color:tan;color:red;font-weight:bold;");
|
|
console.table(msg[m]);
|
|
}
|
|
});
|
|
}
|
|
};
|
|
kFuncs.debug = debug;
|
|
|
|
/**
|
|
* Orders the section id arrays for all sections in the `sections` object to match the repOrder attribute.
|
|
* @memberof Utilities
|
|
* @param {attributesProxy} attributes - The attributes object that must have a value for the reporder for each section.
|
|
* @param {object[]} sections - Object containing the IDs for the repeating sections, indexed by repeating section name.
|
|
*/
|
|
const orderSections = function(attributes,sections){
|
|
Object.keys(sections).forEach((section)=>{
|
|
attributes.attributes[`_reporder_${section}`] = commaArray(attributes[`_reporder_${section}`]);
|
|
sections[section] = orderSection(attributes.attributes[`_reporder_${section}`],sections[section]);
|
|
});
|
|
};
|
|
kFuncs.orderSections = orderSections;
|
|
|
|
/**
|
|
* Orders a single ID array.
|
|
* @memberof Utilities
|
|
* @param {string[]} repOrder - Array of IDs in the order they are in on the sheet.
|
|
* @param {string[]} IDs - Array of IDs to be ordered. Aka the default ID Array passed to the getSectionIDs callback
|
|
* @returns {string[]} - The ordered id array
|
|
*/
|
|
const orderSection = function(repOrder,IDs=[]){
|
|
const idArr = [...repOrder.filter(v => v),...IDs.filter(id => !repOrder.includes(id.toLowerCase()))];
|
|
return idArr;
|
|
};
|
|
kFuncs.orderSection = orderSection;
|
|
|
|
/**
|
|
* Splits a comma delimited string into an array
|
|
* @memberof Utilities
|
|
* @param {string} string - The string to split.
|
|
* @returns {array} - The string segments of the comma delimited list.
|
|
*/
|
|
const commaArray = function(string=''){
|
|
return string.toLowerCase().split(/\s*,\s*/);
|
|
};
|
|
kFuncs.commaArray = commaArray;
|
|
|
|
// Roll escape functions for passing data in action button calls. Base64 encodes/decodes the data.
|
|
const RE = {
|
|
chars: {
|
|
'"': '%quot;',
|
|
',': '%comma;',
|
|
':': '%colon;',
|
|
'}': '%rcub;',
|
|
'{': '%lcub;',
|
|
},
|
|
escape(data) {
|
|
return typeof data === 'object' ?
|
|
`KDATA${btoa(JSON.stringify(data))}` :
|
|
`KSTRING${btoa(data)}`;
|
|
},
|
|
unescape(string) {
|
|
const isData = typeof string === 'string' &&
|
|
(
|
|
string.startsWith('KDATA') ||
|
|
string.startsWith('KSTRING')
|
|
);
|
|
return isData ?
|
|
(
|
|
string.startsWith('KDATA') ?
|
|
JSON.parse(atob(string.replace(/^KDATA/,''))) :
|
|
atob(string.replace(/^KSTRING/,''))
|
|
) :
|
|
string;
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* Encodes data in Base64. This is useful for passing roll information to action buttons called from roll buttons.
|
|
* @function
|
|
* @param {string|object|any[]} data - The data that you want to Base64 encode
|
|
* @returns {string} - The encoded data
|
|
* @memberof! Utilities
|
|
*/
|
|
const escape = RE.escape;
|
|
/**
|
|
* Decodes Base64 encoded strings that were created by the K-scaffold
|
|
* @function
|
|
* @param {string|object|any[]} string - The string of encoded data to decode. If this is not a string, or is not a string that was encoded by the K-scaffold, it will be returned as is.
|
|
* @returns {string|object|any[]}
|
|
* @memberof! Utilities
|
|
*/
|
|
const unescape = RE.unescape;
|
|
|
|
Object.assign(kFuncs,{escape,unescape});
|
|
|
|
/**
|
|
* Parses a macro so that it is reduced to the final values of all attributes contained in the macro. Will drill down up to 99 levels deep. If the string was not parseable, string will be returned with as much parsed as possible.
|
|
* @memberof Utilities
|
|
* @param {string} mutStr - The string macro to parse
|
|
* @param {AttributesProxy} attributes - The K-scaffold Attributes Proxy
|
|
* @param {Object} sections - The K-scaffold sections object
|
|
* @returns {string} - The string with all attributes replaced by their values (if possible).
|
|
*/
|
|
const parseMacro = (str,attributes,sections) => {
|
|
let iter = 0;
|
|
let mutStr = str;
|
|
while(mutStr.match(/@{.+?}/) && iter < 99){
|
|
mutStr = mutStr.replace(/@{(.+?)}/g,(match,name) => {
|
|
name = name.replace(/\|/,'_');
|
|
return attributes[name] !== null && attributes[name] !== undefined ?
|
|
attributes[name] :
|
|
`@(${name})`;
|
|
})
|
|
iter++;
|
|
}
|
|
mutStr = mutStr.replace(/@\((.+?)\)/g,'@{$1}');
|
|
return mutStr;
|
|
}
|
|
kFuncs.parseMacro = parseMacro;
|
|
|
|
/**
|
|
* Sends data to another character sheet to cause a change on that sheet. WARNING, this function should not be used in response to an attribute change to avoid spamming the chat with api messages.
|
|
*
|
|
* 
|
|
* @memberof Utilities
|
|
* @param {string} characterName - The character to connect to
|
|
* @param {string} funcName - Name of the function to call similar to function name used in {@link callFunc}.
|
|
* @param {...any} args - The arguments to pass to the function call no the other sheet. These are passed after the normal destructure object for a K-scaffold function call.
|
|
* @example
|
|
* //Function that is called by the source sheet
|
|
* const dispatchPartner = async function({trigger,attributes,sections,casc}){
|
|
* const partnerName = await (
|
|
* attributes.partner_name ?
|
|
* k.pseudoQuery(attributes.partner_name) :
|
|
* k.extractQueryResult('Partner name')
|
|
* );
|
|
* attributes.partner_name = partnerName;
|
|
* //passing the attributes of the source sheet
|
|
* k.send(partnerName,'receivePartner',attributes);
|
|
* attributes.set();
|
|
* };
|
|
* k.registerFuncs({dispatchPartner});
|
|
*
|
|
* //Function called on target sheet. Partner is the attributes from the source sheet
|
|
* const receivePartner = function({trigger,attributes,sections,casc},partner){
|
|
* attributes.from_partner = partner.for_partner;
|
|
* attributes.partner_name = partner.character_name;
|
|
* };
|
|
* k.registerFuncs({receivePartner });
|
|
*/
|
|
const send = async function(characterName,funcName,...args){
|
|
const data = RE.escape({
|
|
funcName,
|
|
args
|
|
});
|
|
const roll = await startRoll(`!@{${characterName}|character_name}%{${characterName}|k-network-call||${data}}&{noerror}`);
|
|
finishRoll(roll.rollId);
|
|
};
|
|
kFuncs.send = send;
|
|
|
|
const kReceive = function({trigger,attributes,sections,casc}) {
|
|
const data = trigger.rollData;
|
|
callFunc(data.funcName,{attributes,sections,casc},...data.args);
|
|
};
|
|
funcs.kReceive = kReceive;/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
|
|
//# Attribute Obj Proxy handler
|
|
const createAttrProxy = function(attrs,sections,casc){
|
|
//creates a proxy for the attributes object so that values can be worked with more easily.
|
|
const getCascObj = function(event){
|
|
const eventName = event.triggerName || event.sourceAttribute;
|
|
let typePrefix = eventName.startsWith('clicked:') ?
|
|
'act_' :
|
|
event.removedInfo ?
|
|
'fieldset_' :
|
|
'attr_';
|
|
let cascName = `${typePrefix}${eventName.replace(/(?:removed?|clicked):/,'')}`;
|
|
let cascObj = casc[cascName];
|
|
k.debug({[cascName]:cascObj});
|
|
if(event && cascObj){
|
|
Object.assign(cascObj,event);
|
|
if(event.originalRollId){
|
|
cascObj.rollData = RE.unescape(event.originalRollId);
|
|
}
|
|
}
|
|
return cascObj || {};
|
|
};
|
|
|
|
const triggerFunctions = function(obj){
|
|
if(obj.triggeredFuncs && obj.triggeredFuncs.length){
|
|
debug(`triggering functions for ${obj.name}`);
|
|
obj.triggeredFuncs && obj.triggeredFuncs.forEach(func=>funcs[func] ?
|
|
funcs[func]({trigger:obj,attributes,sections,casc}) :
|
|
debug(`!!!Warning!!! no function named ${func} found. Triggered function not called for ${obj.name}`,true));
|
|
}
|
|
};
|
|
|
|
const initialFunction = function(obj){
|
|
if(obj.initialFunc){
|
|
debug(`initial functions for ${obj.name}`);
|
|
funcs[obj.initialFunc] ?
|
|
funcs[obj.initialFunc]({trigger:obj,attributes,sections}) :
|
|
debug(`!!!Warning!!! no function named ${obj.initialFunc} found. Initial function not called for ${obj.name}`,true);
|
|
}
|
|
};
|
|
const alwaysFunctions = function(trigger){
|
|
Object.values(allHandlers).forEach((handler)=>{
|
|
handler({trigger,attributes,sections,casc});
|
|
});
|
|
};
|
|
const processChange = function({event,trigger}){
|
|
if(event && !trigger){
|
|
debug(`${event.sourceAttribute} change detected. No trigger found`);
|
|
return;
|
|
}
|
|
if(!attributes || !sections || !casc){
|
|
debug(`!!! Insufficient arguments || attributes > ${!!attributes} | sections > ${!!sections} | casc > ${!!casc} !!!`);
|
|
return;
|
|
}
|
|
debug({trigger});
|
|
if(event){
|
|
debug('checking for initial & always functions');
|
|
if(Array.isArray(trigger.affects)){
|
|
attributes.queue.push(...trigger.affects);
|
|
}
|
|
alwaysFunctions(trigger,attributes,sections,casc);//Functions that should be run for all events.
|
|
initialFunction(trigger,attributes,sections,casc);//functions that should only be run if the attribute was the thing changed by the user
|
|
|
|
}
|
|
if(trigger){
|
|
debug(`processing ${trigger.name}`);
|
|
triggerFunctions(trigger,attributes,sections,casc);
|
|
if(!event){
|
|
// Handle autocalc formula
|
|
if(trigger.formula){
|
|
attributes[trigger.name] = parseKFormula({trigger,attributes,sections,casc});
|
|
}
|
|
// handle calculation of element
|
|
if(
|
|
trigger.calculation &&
|
|
funcs[trigger.calculation]
|
|
){
|
|
attributes[trigger.name] = funcs[trigger.calculation]({trigger,attributes,sections,casc});
|
|
}else if(trigger.calculation && !funcs[trigger.calculation]){
|
|
debug(`K-Scaffold Error: No function named ${trigger.calculation} found`);
|
|
}
|
|
}
|
|
}
|
|
attributes.set();
|
|
};
|
|
const attrTarget = {
|
|
updates:{},
|
|
attributes:{...attrs},
|
|
repOrders:{},
|
|
queue: [],
|
|
casc:{},
|
|
alwaysFunctions,
|
|
processChange,
|
|
triggerFunctions,
|
|
initialFunction,
|
|
getCascObj
|
|
};
|
|
const attrHandler = {
|
|
get:function(obj,prop){//gets the most value of the attribute.
|
|
//If it is a repeating order, returns the array, otherwise returns the update value or the original value
|
|
if(prop === 'toJSON'){
|
|
return () => ({...obj.attributes,...obj.updates});
|
|
} else if(prop === 'set'){
|
|
return function(){
|
|
let {callback,vocal} = arguments[0] ? arguments[0] : {};
|
|
if(sections && casc && attributes.queue.length){
|
|
const triggerName = attributes.queue.shift();
|
|
const trigger = getCascObj({sourceAttribute:triggerName});
|
|
processChange({trigger,attributes,sections,casc});
|
|
}else{
|
|
debug({updates:obj.updates});
|
|
const trueCallback = Object.keys(obj.repOrders).length ?
|
|
function(){
|
|
Object.entries(obj.repOrders).forEach(([section,order])=>{
|
|
_setSectionOrder(section,order)
|
|
});
|
|
callback && callback();
|
|
}:
|
|
callback;
|
|
Object.keys(obj.updates).forEach((key)=>obj.attributes[key] = obj.updates[key]);
|
|
const update = obj.updates;
|
|
obj.updates = {};
|
|
set(update,vocal,trueCallback);
|
|
}
|
|
}
|
|
}else if(Object.keys(obj).some(key=>key===prop)){
|
|
return Reflect.get(...arguments)
|
|
}else{
|
|
let retValue;
|
|
switch(true){
|
|
case obj.repOrders.hasOwnProperty(prop):
|
|
retValue = obj.repOrders[prop];
|
|
break;
|
|
case obj.updates.hasOwnProperty(prop):
|
|
retValue = obj.updates[prop];
|
|
break;
|
|
default:
|
|
retValue = obj.attributes[prop];
|
|
break;
|
|
}
|
|
let cascRef = `attr_${prop.replace(/(repeating_[^_]+_)[^_]+/,'$1\$X')}`;
|
|
let numRetVal = +retValue;
|
|
if(!Number.isNaN(numRetVal) && retValue !== ''){
|
|
retValue = numRetVal;
|
|
}else if(cascades[cascRef] && (typeof cascades[cascRef].defaultValue === 'number' || cascades[cascRef].type === 'number')){
|
|
retValue = cascades[cascRef].defaultValue;
|
|
}
|
|
return retValue;
|
|
}
|
|
},
|
|
set:function(obj,prop,value){
|
|
//Sets the value. Also verifies that the value is a valid attribute value
|
|
//e.g. not undefined, null, or NaN
|
|
if(value || value===0 || value===''){
|
|
if(/reporder|^repeating_[^_]+$/.test(prop)){
|
|
let section = prop.replace(/_reporder_/,'');
|
|
obj.repOrders[section] = value;
|
|
}else if(`${obj.attributes}` !== `${value}` ||
|
|
(obj.updates[prop] && `${obj.updates}` !== `${value}`)
|
|
){
|
|
if(sections && casc){
|
|
const trigger = getCascObj({sourceAttribute:prop});
|
|
if(Array.isArray(trigger.affects)){
|
|
attributes.queue.push(...trigger.affects);
|
|
}
|
|
}
|
|
obj.updates[prop] = value;
|
|
}
|
|
}else{
|
|
debug(`!!!Warning: Attempted to set ${prop} to an invalid value:${value}; value not stored!!!`);
|
|
}
|
|
return true;
|
|
},
|
|
deleteProperty(obj,prop){
|
|
//removes the property from the original attributes, updates, and the reporders
|
|
Object.keys(obj).forEach((key)=>{
|
|
delete obj[key][prop.toLowerCase()];
|
|
});
|
|
}
|
|
};
|
|
const attributes = new Proxy(attrTarget,attrHandler);
|
|
return attributes;
|
|
};
|
|
|
|
/**
|
|
* Function that registers a function for being called via the funcs object. Returns true if the function was successfully registered, and false if it could not be registered for any reason.
|
|
* @memberof Utilities
|
|
* @param {object} funcObj - Object with keys that are names to register functions under and values that are functions.
|
|
* @param {object} optionsObj - Object that contains options to use for this registration.
|
|
* @param {string[]} optionsObj.type - Array that contains the types of specialized functions that apply to the functions being registered. Valid types are `"opener"`, `"updater"`, and `"default"`. `"default"` is always used, and never needs to be passed.
|
|
* @returns {boolean} - True if the registration succeeded, false if it failed.
|
|
* @example
|
|
* //Basic Registration
|
|
* const myFunc = function({trigger,attributes,sections,casc}){};
|
|
* k.registerFuncs({myFunc});
|
|
*
|
|
* //Register a function to run on sheet open
|
|
* const openFunc = function({trigger,attributes,sections,casc}){};
|
|
* k.registerFuncs({openFunc},{type:['opener']})
|
|
*
|
|
* //Register a function to run on all events
|
|
* const allFunc = function({trigger,attributes,sections,casc}){};
|
|
* k.registerFuncs({allFunc},{type:['all']})
|
|
*/
|
|
const registerFuncs = function(funcObj,optionsObj = {}){
|
|
if(typeof funcObj !== 'object' || typeof optionsObj !== 'object'){
|
|
debug(`!!!! K-scaffold error: Improper arguments to register functions !!!!`);
|
|
return false;
|
|
}
|
|
const typeArr = optionsObj.type ? ['default',...optionsObj.type] : ['default'];
|
|
const typeSwitch = {
|
|
'opener':openHandlers,
|
|
'updater':updateHandlers,
|
|
'new':initialSetups,
|
|
'all':allHandlers,
|
|
'default':funcs
|
|
};
|
|
let setState;
|
|
Object.entries(funcObj).map(([prop,value])=>{
|
|
typeArr.forEach((type)=>{
|
|
if(typeSwitch[type][prop]){
|
|
debug(`!!! Duplicate function name for ${prop} as ${type}!!!`);
|
|
setState = false;
|
|
}else if(typeof value === 'function'){
|
|
typeSwitch[type][prop] = value;
|
|
setState = setState !== false ? true : false;
|
|
}else{
|
|
debug(`!!! K-scaffold error: Function registration requires a function. Invalid value to register as ${type} !!!`);
|
|
setState = false;
|
|
}
|
|
});
|
|
});
|
|
return setState;
|
|
};
|
|
kFuncs.registerFuncs = registerFuncs;
|
|
|
|
/**
|
|
* Function that sets up the action calls used in the roller mixin.
|
|
* @memberof Sheetworkers
|
|
* @param {object} attributes - The attribute values of the character
|
|
* @param {object[]} sections - All the repeating section IDs
|
|
*/
|
|
const setActionCalls = function({attributes,sections}){
|
|
actionAttributes.forEach((base)=>{
|
|
let [section,,field] = k.parseTriggerName(base);
|
|
let fieldAction = field.replace(/_/g,'-');
|
|
if(section){
|
|
sections[section].forEach((id)=>{
|
|
attributes[`${section}_${id}_${field}`] = `%{${attributes.character_name}|${section}_${id}_${fieldAction}}`;
|
|
});
|
|
}else{
|
|
attributes[`${field}`] = `%{${attributes.character_name}|${fieldAction}}`;
|
|
}
|
|
});
|
|
};
|
|
funcs.setActionCalls = setActionCalls;
|
|
kFuncs.setActionCalls = setActionCalls;
|
|
|
|
|
|
/**
|
|
* Function that reduces Roll20 macro syntax formulas down to their calculated value.
|
|
* @memberof Sheetworkers
|
|
* @param {object} attributes - The attribute values of the character
|
|
* @param {object[]} sections - All the repeating section IDs
|
|
*/
|
|
const parseKFormula = ({trigger,attributes,sections,casc}) => {
|
|
const [baseSection,rowID,attrName] = parseTriggerName(trigger.name);
|
|
const repeatBlockRx = baseSection ?
|
|
/(@{repeating_.+?_\$X_.+?})/g :
|
|
/={([^)]*repeating_[^_]+[^)]*)}=/g;
|
|
let mutFormula = trigger.formula;
|
|
mutFormula = mutFormula.replace(repeatBlockRx,(match,repeatMacro) => {
|
|
const [section] = repeatMacro.match(/repeating_[^_]+/);
|
|
const idArray = baseSection ?
|
|
[rowID] :
|
|
sections[section];
|
|
return idArray.map(id => {
|
|
return `(${repeatMacro.replace(/repeating_[^_]+?_[^_]+?_([^}]+)/g,`${section}_${id}_$1`)})`;
|
|
}).join(
|
|
trigger.type === 'number' ?
|
|
' + ' :
|
|
''
|
|
);
|
|
});
|
|
mutFormula = parseMacro(mutFormula,attributes)
|
|
.replace(/@{.+?}/g,'0');
|
|
const mathKeys = ['floor','ceil','round','abs'];
|
|
mathKeys.forEach(func => mutFormula = mutFormula.replace(new RegExp(`${func}\\(`,'g'),`Math.${func}(`));
|
|
const mathRx = new RegExp(`Math\\.(?:${mathKeys.join('|')})`,'g');
|
|
let noAlphaStr = mutFormula
|
|
.replace(mathRx,'');
|
|
return trigger.type !== 'text' ?
|
|
(
|
|
!noAlphaStr.match(/[a-z]/i) ?
|
|
eval(mutFormula) :
|
|
undefined
|
|
) :
|
|
mutFormula;
|
|
};
|
|
funcs.parseKFormula = parseKFormula;
|
|
kFuncs.parseKFormula = parseKFormula;
|
|
|
|
/**
|
|
* Function to call a function previously registered to the funcs object. May not be used that much in actual sheets, but very useful when writing unit tests for your sheet. Either returns the function or null if no function exists.
|
|
* @memberof Sheetworkers
|
|
* @param {string} funcName - The name of the function to invoke.
|
|
* @param {...any} args - The arguments to call the function with.
|
|
* @returns {function|null}
|
|
* @example
|
|
* //Call myFunc with two arguments
|
|
* k.callFunc('myFunc','an argument','another argument');
|
|
*/
|
|
const callFunc = function(funcName,...args){
|
|
if(funcs[funcName]){
|
|
debug(`calling ${funcName}`);
|
|
return funcs[funcName](...args);
|
|
}else{
|
|
debug(`Invalid function name: ${funcName}`);
|
|
return null;
|
|
}
|
|
};
|
|
kFuncs.callFunc = callFunc;/**@namespace Sheetworkers */
|
|
/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
//Sheet Updaters and styling functions
|
|
/**
|
|
* Function that calls the K-scaffold's update and sheet initialization routines.
|
|
*/
|
|
const updateSheet = function(){
|
|
log('updating sheet');
|
|
getAllAttrs({props:['debug_mode',...baseGet],callback:(attributes,sections,casc)=>{
|
|
kFuncs.debugMode = kFuncs.debugMode || !!attributes.debug_mode;
|
|
debug({sheet_version:attributes.sheet_version});
|
|
if(!attributes.sheet_version){
|
|
Object.entries(initialSetups).forEach(([funcName,handler])=>{
|
|
if(typeof funcs[funcName] === 'function'){
|
|
debug(`running ${funcName}`);
|
|
funcs[funcName]({attributes,sections,casc});
|
|
}else{
|
|
debug(`!!!Warning!!! no function named ${funcName} found. Initial sheet setup not performed.`);
|
|
}
|
|
});
|
|
}else{
|
|
Object.entries(updateHandlers).forEach(([ver,handler])=>{
|
|
if(attributes.sheet_version < +ver){
|
|
handler({attributes,sections,casc});
|
|
}
|
|
});
|
|
}
|
|
k.debug({openHandlers});
|
|
Object.entries(openHandlers).forEach(([funcName,func])=>{
|
|
if(typeof funcs[funcName] === 'function'){
|
|
debug(`running ${funcName}`);
|
|
funcs[funcName]({attributes,sections,casc});
|
|
}else{
|
|
debug(`!!!Warning!!! no function named ${funcName} found. Sheet open handling not performed.`);
|
|
}
|
|
});
|
|
setActionCalls({attributes,sections});
|
|
attributes.sheet_version = kFuncs.version;
|
|
log(`Sheet Update applied. Current Sheet Version ${kFuncs.version}`);
|
|
attributes.set();
|
|
log('Sheet ready for use');
|
|
}});
|
|
};
|
|
kFuncs.updateSheet = updateSheet;
|
|
|
|
const initialSetup = function(attributes,sections){
|
|
debug('Initial sheet setup');
|
|
};
|
|
|
|
/**
|
|
* This is the default listener function for attributes that the K-Scaffold uses. It utilizes the `triggerFuncs`, `listenerFunc`, `calculation`, and `affects` properties of the K-scaffold trigger object (see the Pug section of the scaffold for more details).
|
|
* @memberof Sheetworkers
|
|
* @param {Roll20Event} event - The Roll20 event object
|
|
* @returns {void}
|
|
* @example
|
|
* //Call from an attribute change
|
|
* on('change:an_attribute',k.accessSheet);
|
|
*/
|
|
const accessSheet = function(event){
|
|
debug({funcs:Object.keys(funcs)});
|
|
debug({event});
|
|
getAllAttrs({callback:(attributes,sections,casc)=>{
|
|
let trigger = attributes.getCascObj(event,casc);
|
|
attributes.processChange({event,trigger,attributes,sections,casc});
|
|
}});
|
|
};
|
|
funcs.accessSheet = accessSheet;/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
/*
|
|
Cascade Expansion functions
|
|
*/
|
|
//Expands the repeating section templates in cascades to reflect the rows actually available
|
|
const expandCascade = function(cascade,sections){
|
|
return _.keys(cascade).reduce((memo,key)=>{//iterate through cascades and replace references to repeating attributes with correct row ids.
|
|
if(/^(?:act|attr)_repeating_/.test(key)){//If the attribute is a repeating attribute, do special logic
|
|
expandRepeating(memo,key,cascade,sections);
|
|
}else if(key){//for non repeating attributes do this logic
|
|
expandNormal(memo,key,cascade,sections);
|
|
}
|
|
return memo;
|
|
},{});
|
|
};
|
|
|
|
const expandRepeating = function(memo,key,cascade,sections){
|
|
key.replace(/((?:attr|act)_)(repeating_[^_]+)_[^_]+?_(.+)/,(match,type,section,field)=>{
|
|
(sections[section]||[]).forEach((id)=>{
|
|
memo[`${type}${section}_${id}_${field}`]=_.clone(cascade[key]);//clone the details so that each row's attributes have correct ids
|
|
memo[`${type}${section}_${id}_${field}`].name = `${section}_${id}_${field}`;
|
|
if(key.startsWith('attr_')){
|
|
memo[`${type}${section}_${id}_${field}`].affects = memo[`${type}${section}_${id}_${field}`].affects.reduce((m,affected)=>{
|
|
if(affected.startsWith(section)){//otherwise if the affected attribute is in the same section, simply set the affected attribute to have the same row id.
|
|
m.push(applyID(affected,id));
|
|
}else if(/repeating/.test(affected)){//If the affected attribute isn't in the same repeating section but is still a repeating attribute, add all the rows of that section
|
|
addAllRows(affected,m,sections);
|
|
}else{//otherwise the affected attribute is a non repeating attribute. Simply add it to the computed affected array
|
|
m.push(affected);
|
|
}
|
|
return m;
|
|
},[]);
|
|
}
|
|
});
|
|
});
|
|
};
|
|
|
|
const applyID = function(affected,id){
|
|
return affected.replace(/(repeating_[^_]+_)[^_]+(.+)/,`$1${id}$2`);
|
|
};
|
|
|
|
const expandNormal = function(memo,key,cascade,sections){
|
|
memo[key] = _.clone(cascade[key]);
|
|
if(key.startsWith('attr_')){
|
|
memo[key].affects = memo[key].affects || [];
|
|
memo[key].affects = memo[key].affects.reduce((m,a)=>{
|
|
if(/^repeating/.test(a)){
|
|
addAllRows(a,m,sections);
|
|
}else{
|
|
m.push(a);
|
|
}
|
|
return m;
|
|
},[]);
|
|
}
|
|
};
|
|
|
|
const addAllRows = function(affected,memo,sections){
|
|
affected.replace(/(repeating_[^_]+?)_[^_]+?_(.+)/,(match,section,field)=>{
|
|
sections[section].forEach(id=>memo.push(`${section}_${id}_${field}`));
|
|
});
|
|
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
/**
|
|
* These are functions that provide K-scaffold aliases for the basic Roll20 sheetworker functions. These functions also provide many additional features on top of the standard Roll20 sheetworkers.
|
|
* @namespace Sheetworkers.Sheetworker Aliases
|
|
*/
|
|
/**
|
|
* Alias for [setSectionOrder()](https://wiki.roll20.net/Sheet_Worker_Scripts#setSectionOrder.28.3CRepeating_Section_Name.3E.2C_.3CSection_Array.3E.2C_.3CCallback.3E.29) that allows you to use the section name in either `repeating_section` or `section` formats. Note that the Roll20 sheetworker [setSectionOrder](https://wiki.roll20.net/Sheet_Worker_Scripts#setSectionOrder.28.3CRepeating_Section_Name.3E.2C_.3CSection_Array.3E.2C_.3CCallback.3E.29) currently causes some display issues on sheets.
|
|
* @memberof Sheetworker Aliases
|
|
* @name setSectionOrder
|
|
* @param {string} section - The name of the section, with or without `repeating_`
|
|
* @param {string[]} order - Array of ids describing the desired order of the section.
|
|
* @returns {void}
|
|
* @example
|
|
* //Set the order of a repeating_weapon section
|
|
* k.setSectionOrder('repeating_equipment',['id1','id2','id3']);
|
|
* //Can also specify the section name without the repeating_ prefix
|
|
* k.setSectionOrder('equipment',['id1','id2','id3']);
|
|
*/
|
|
const _setSectionOrder = function(section,order){
|
|
let trueSection = section.replace(/repeating_/,'');
|
|
setSectionOrder(trueSection,order);
|
|
};
|
|
kFuncs.setSectionOrder = _setSectionOrder;
|
|
|
|
/**
|
|
* Alias for [removeRepeatingRow](https://wiki.roll20.net/Sheet_Worker_Scripts#removeRepeatingRow.28_RowID_.29) that also removes the row from the current object of attribute values and array of section IDs to ensure that erroneous updates are not issued.
|
|
* @memberof Sheetworker Aliases
|
|
* @name removeRepeatingRow
|
|
* @param {string} row - The row id to be removed
|
|
* @param {attributesProxy} attributes - The attribute values currently in memory
|
|
* @param {object} sections - Object that contains arrays of all the IDs in sections on the sheet indexed by repeating name.
|
|
* @returns {void}
|
|
* @example
|
|
* //Remove a repeating Row
|
|
* k.getAllAttrs({
|
|
* callback:(attributes,sections)=>{
|
|
* const rowID = sections.repeating_equipment[0];
|
|
* k.removeRepeatingRow(`repeating_equipment_${rowID}`,attributes,sections);
|
|
* console.log(sections.repeating_equipment); // => rowID no longer exists in the array.
|
|
* console.log(attributes[`repeating_equipment_${rowID}_name`]); // => undefined
|
|
* }
|
|
* })
|
|
*/
|
|
const _removeRepeatingRow = function(row,attributes,sections){
|
|
debug(`removing ${row}`);
|
|
Object.keys(attributes.attributes).forEach((key)=>{
|
|
if(key.startsWith(row)){
|
|
delete attributes[key];
|
|
}
|
|
});
|
|
let [,section,rowID] = row.match(/(repeating_[^_]+)_(.+)/,'');
|
|
sections[section] = sections[section].filter((id)=>id!==rowID);
|
|
removeRepeatingRow(row);
|
|
};
|
|
kFuncs.removeRepeatingRow = _removeRepeatingRow;
|
|
|
|
/**
|
|
* Alias for [getAttrs()](https://wiki.roll20.net/Sheet_Worker_Scripts#getAttrs.28attributeNameArray.2C_callback.29) that converts the default object of attribute values into an {@link attributesProxy} and passes that back to the callback function.
|
|
* @memberof Sheetworker Aliases
|
|
* @name getAttrs
|
|
* @param {string[]} [props=baseGet] - Array of attribute names to get the value of. Defaults to {@link baseGet} if not passed.
|
|
* @param {function(attributesProxy)} callback - The function to call after the attribute values have been gotten. An {@link attributesProxy} is passed to the callback.
|
|
* @example
|
|
* //Gets the attributes named in props.
|
|
* k.getAttrs({
|
|
* props:['attribute_1','attribute_2'],
|
|
* callback:(attributes)=>{
|
|
* //Work with the attributes as you would in a normal getAttrs, or use the superpowers of the K-scaffold attributes object like so:
|
|
* attributes.attribute_1 = 'new value';
|
|
* attributes.set();
|
|
* }
|
|
* })
|
|
*/
|
|
const _getAttrs = function({props=baseGet,callback}){
|
|
getAttrs(props,(values)=>{
|
|
const attributes = createAttrProxy(values);
|
|
callback(attributes);
|
|
});
|
|
};
|
|
kFuncs.getAttrs = _getAttrs;
|
|
|
|
/**
|
|
* Alias for [getAttrs()](https://wiki.roll20.net/Sheet_Worker_Scripts#getAttrs.28attributeNameArray.2C_callback.29) and [getSectionIDs](https://wiki.roll20.net/Sheet_Worker_Scripts#getSectionIDs.28section_name.2Ccallback.29) that combines the actions of both sheetworker functions and converts the default object of attribute values into an {@link attributesProxy}. Also gets the details on how to handle all attributes from the master {@link cascades} object and.
|
|
* @memberof Sheetworker Aliases
|
|
* @param {Object} args
|
|
* @param {string[]} [args.props=baseGet] - Array of attribute names to get the value of. Defaults to {@link baseGet} if not passed.
|
|
* @param {repeatingSectionDetails} sectionDetails - Array of details about a section to get the IDs for and attributes that need to be gotten.
|
|
* @param {function(attributesProxy,sectionObj,expandedCascade):void} args.callback - The function to call after the attribute values have been gotten. An {@link attributesProxy} is passed to the callback along with a {@link sectionObj} and {@link expandedCascade}.
|
|
* @example
|
|
* //Get every K-scaffold linked attribute on the sheet
|
|
* k.getAllAttrs({
|
|
* callback:(attributes,sections,casc)=>{
|
|
* //Work with the attributes as you please.
|
|
* attributes.some_attribute = 'a value';
|
|
* attributes.set();//Apply our change
|
|
* }
|
|
* })
|
|
*/
|
|
const getAllAttrs = function({props=baseGet,sectionDetails=repeatingSectionDetails,callback}){
|
|
getSections(sectionDetails,(repeats,sections)=>{
|
|
getAttrs([...props,...repeats],(values)=>{
|
|
const casc = expandCascade(cascades,sections);
|
|
const attributes = createAttrProxy(values,sections,casc);
|
|
orderSections(attributes,sections);
|
|
callback(attributes,sections,casc);
|
|
})
|
|
});
|
|
};
|
|
kFuncs.getAllAttrs = getAllAttrs;
|
|
|
|
/**
|
|
* Alias for [getSectionIDs()](https://wiki.roll20.net/Sheet_Worker_Scripts#getSectionIDs.28section_name.2Ccallback.29) that allows you to iterate through several functions at once. Also assembles an array of repeating attributes to get.
|
|
* @memberof Sheetworker Aliases
|
|
* @param {object[]} sectionDetails - Array of details about a section to get the IDs for and attributes that need to be gotten.
|
|
* @param {string} sectionDetails.section - The full name of the repeating section including the `repeating_` prefix.
|
|
* @param {string[]} sectionDetails.fields - Array of field names that need to be gotten from the repeating section
|
|
* @param {function(string[],sectionObj)} callback - The function to call once all IDs have been gotten and the array of repating attributes to get has been assembled. The callback is passed the array of repating attributes to get and a {@link sectionObj}.
|
|
* @example
|
|
* // Get some section details
|
|
* const sectionDetails = {
|
|
* {section:'repeating_equipment',fields:['name','weight','cost']},
|
|
* {section:'repeating_weapon',fields:['name','attack','damage']}
|
|
* };
|
|
* k.getSections(sectionDetails,(attributeNames,sections)=>{
|
|
* console.log(attributeNames);// => Array containing all row specific attribute names
|
|
* console.log(sections);// => Object with arrays containing the row ids. Indexed by section name (e.g. repeating_eqiupment)
|
|
* })
|
|
*/
|
|
const getSections = function(sectionDetails,callback){
|
|
let queueClone = _.clone(sectionDetails);
|
|
const worker = (queue,repeatAttrs=[],sections={})=>{
|
|
let detail = queue.shift();
|
|
getSectionIDs(detail.section,(IDs)=>{
|
|
sections[detail.section] = IDs;
|
|
IDs.forEach((id)=>{
|
|
detail.fields.forEach((f)=>{
|
|
repeatAttrs.push(`${detail.section}_${id}_${f}`);
|
|
});
|
|
});
|
|
repeatAttrs.push(`_reporder_${detail.section}`);
|
|
if(queue.length){
|
|
worker(queue,repeatAttrs,sections);
|
|
}else{
|
|
callback(repeatAttrs,sections);
|
|
}
|
|
});
|
|
};
|
|
if(!queueClone[0]){
|
|
callback([],{});
|
|
}else{
|
|
worker(queueClone);
|
|
}
|
|
};
|
|
kFuncs.getSections = getSections;
|
|
|
|
// Sets the attributes while always calling with {silent:true}
|
|
// Can be awaited to get the values returned from _setAttrs
|
|
/**
|
|
* Alias for [setAttrs()](https://wiki.roll20.net/Sheet_Worker_Scripts#setAttrs.28values.2Coptions.2Ccallback.29) that sets silently by default.
|
|
* @memberof Sheetworker Aliases
|
|
* @alias setAttrs
|
|
* @param {object} obj - The object containting attributes to set
|
|
* @param {boolean} [vocal=false] - Whether to set silently (default value) or not.
|
|
* @param {function()} [callback] - The callback function to invoke after the setting has been completed. No arguments are passed to the callback function.
|
|
* @example
|
|
* //Set some attributes silently
|
|
* k.setAttrs({attribute_1:'new value'})
|
|
* //Set some attributes and triggers listeners
|
|
* k.setAttrs({attribute_1:'new value',true})
|
|
* //Set some attributes and call a callback function
|
|
* k.setAttrs({attribute_1:'new value'},null,()=>{
|
|
* //Do something after the attribute is set
|
|
* })
|
|
*/
|
|
const set = function(obj,vocal=false,callback){
|
|
setAttrs(obj,{silent:!vocal},callback);
|
|
};
|
|
kFuncs.setAttrs = set;
|
|
|
|
const generateCustomID = function(string){
|
|
if(!string.startsWith('-')){
|
|
string = `-${string}`;
|
|
}
|
|
rowID = generateRowID();
|
|
let re = new RegExp(`^.{${string.length}}`);
|
|
return `${string}${rowID.replace(re,'')}`;
|
|
};
|
|
|
|
|
|
/**
|
|
* Alias for generateRowID that adds the new id to the {@link sectionObj}. Also allows for creation of custom IDs that conform to the section ID requirements.
|
|
* @memberof Sheetworker Aliases
|
|
* @name generateRowID
|
|
* @param {sectionObj} sections
|
|
* @param {string} [customText] - Custom text to start the ID with. This text should not be longer than the standard repeating section ID format.
|
|
* @returns {string} - The created ID
|
|
* @example
|
|
* k.getAllAttrs({
|
|
* callback:(attributes,sections,casc)=>{
|
|
* //Create a new row ID
|
|
* const rowID = k.generateRowID('repeating_equipment',sections);
|
|
* console.log(rowID);// => repeating_equipment_-p8rg908ug0suzz
|
|
* //Create a custom row ID
|
|
* const customID = k.generateRowID('repeating_equipment',sections,'custom');
|
|
* console.log(customID);// => repeating_equipment_-custom98uadj89kj
|
|
* }
|
|
* });
|
|
*/
|
|
const _generateRowID = function(section,sections,customText){
|
|
let rowID = customText ?
|
|
generateCustomID(customText) :
|
|
generateRowID();
|
|
section = section.match(/^repeating_[^_]+$/) ?
|
|
section :
|
|
`repeating_${section}`;
|
|
sections[section] = sections[section] || [];
|
|
sections[section].push(rowID);
|
|
return `${section}_${rowID}`;
|
|
};
|
|
kFuncs.generateRowID = _generateRowID;
|
|
|
|
/**
|
|
* An alias for [Roll20's getTranslationByKey](https://wiki.roll20.net/Sheet_Worker_Scripts#getTranslationByKey.28.5Bkey.5D.29) that also supports data-i18n-vars syntax replacement and returns the translation key if no value is found instead of `false`.
|
|
* @memberof Sheetworker Aliases
|
|
* @name getTranslationByKey
|
|
* @param {string} key - The translation key to look up.
|
|
* @param {string[]} [variables = []] - An array of variable values to replace variable indexes with.
|
|
* @returns {string}
|
|
*/
|
|
const _getTranslationByKey = (key,variables = []) => {
|
|
let translate = getTranslationByKey(key) || key;
|
|
console.warn('getTranslationByKey',getTranslationByKey(key));
|
|
console.warn('translate:',translate);
|
|
variables.forEach((v,i) => {
|
|
translate = translate.replace(new RegExp(`\\{\\{${i}\\}\\}`,'g'),v);
|
|
});
|
|
return translate;
|
|
}
|
|
kFuncs.getTranslationByKey = _getTranslationByKey;
|
|
|
|
/**
|
|
* Assembles the roll string from the roll object
|
|
* @param {object} rollObj - object describing the roll
|
|
* @param {string} [rollStart = '@{template_start}'] - The string to start the roll with.
|
|
* @returns {string}
|
|
*/
|
|
const assembleRoll = (rollObj,rollStart = kFuncs.defaultRollStart) => {
|
|
return Object.entries(rollObj).reduce((str,[field,content])=>{
|
|
return str += content ?
|
|
` {{${field}=${content}}}` :
|
|
'';
|
|
},`${rollStart}`);
|
|
};
|
|
|
|
|
|
/**
|
|
* @typedef {Object} kRoll
|
|
* @property {Object} roll - The roll object returned by [Roll20's startRoll](https://wiki.roll20.net/Custom_Roll_Parsing#Sheetworker_Functions).
|
|
* @property {Function} roll.finish - Finishes the associated roll passing it the computeObj and rollId.
|
|
* @property {Object} computeObj - object for storing manipulations to the roll. Assign manipulations to this, DO NOT reassign it to a new object.
|
|
*/
|
|
|
|
/**
|
|
*
|
|
* @param {object} rollObj - Object specifying the fields to pass to the rolltemplate. Object keys are field names. Object values are the field values.
|
|
* @param {string} [startString = '@{template_start}'] - Text that should be prepended to the roll string that results from rollObj.
|
|
* @returns {kRoll}
|
|
*/
|
|
const _startRoll = async (rollObj,startString) => {
|
|
const rollString = assembleRoll(rollObj,startString);
|
|
const roll = await startRoll(rollString);
|
|
const computeObj = {};
|
|
roll.finish = () => {
|
|
finishRoll(roll.rollId,computeObj);
|
|
};
|
|
return {roll, computeObj};
|
|
};
|
|
kFuncs.startRoll = _startRoll;/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
const listeners = {};
|
|
|
|
/**
|
|
* The array of attribute names that the k-scaffold gets by default. Does not incude repeating attributes.
|
|
* @memberof Variables
|
|
* @var
|
|
* @type {array}
|
|
*/
|
|
const baseGet = Object.entries(cascades).reduce((memo,[attrName,detailObj])=>{
|
|
if(!/repeating/.test(attrName) && detailObj.type !== 'action'){
|
|
memo.push(detailObj.name);
|
|
}
|
|
if(detailObj.listener){
|
|
listeners[detailObj.listener] = detailObj.listenerFunc;
|
|
}
|
|
return memo;
|
|
},[]);
|
|
kFuncs.baseGet = baseGet;
|
|
|
|
const registerEventHandlers = function(){
|
|
on('sheet:opened',updateSheet);
|
|
debug({funcKeys:Object.keys(funcs),funcs});
|
|
//Roll20 change and click listeners
|
|
Object.entries(listeners).forEach(([event,funcName])=>{
|
|
if(funcs[funcName]){
|
|
on(event,funcs[funcName]);
|
|
}else{
|
|
debug(`!!!Warning!!! no function named ${funcName} found. No listener created for ${event}`,true);
|
|
}
|
|
});
|
|
log(`kScaffold Loaded`);
|
|
};
|
|
setTimeout(registerEventHandlers,0);//Delay the execution of event registration to ensure all event properties are present.
|
|
|
|
/**
|
|
* Function to add a repeating section when the add button of a customControlFieldset or inlineFieldset is clicked.
|
|
* @memberof Sheetworkers
|
|
* @param {object} event - The R20 event object
|
|
*/
|
|
const addItem = function(event){
|
|
let [,,section] = parseClickTrigger(event.triggerName);
|
|
section = section.replace(/add-/,'');
|
|
getAllAttrs({
|
|
callback:(attributes,sections,casc) => {
|
|
let row = _generateRowID(section,sections);
|
|
debug({row});
|
|
attributes[`${row}_name`] = '';
|
|
setActionCalls({attributes,sections});
|
|
const trigger = cascades[`fieldset_repeating_${section}`];
|
|
if(trigger){
|
|
if(trigger.addFuncs){
|
|
trigger.addFuncs.forEach((funcName) => {
|
|
if(funcs[funcName]){
|
|
funcs[funcName]({attributes,sections,casc,trigger,newRow:row});
|
|
}
|
|
});
|
|
}
|
|
if(Array.isArray(trigger.affects)){
|
|
attributes.queue.push(...trigger.affects);
|
|
}
|
|
}
|
|
attributes.set({attributes,sections,casc});
|
|
}
|
|
});
|
|
};
|
|
funcs.addItem = addItem;/**
|
|
* The default tab navigation function of the K-scaffold. Courtesy of Riernar. It will add `k-active-tab` to the active tab-container and `k-active-button` to the active button. You can either write your own CSS to control display of these, or use the default CSS included in `scaffold/_k.scss`. Note that `k-active-button` has no default CSS as it is assumed that you will want to style the active button to match your system.
|
|
* @memberof Sheetworkers
|
|
* @param {Object} trigger - The trigger object
|
|
* @param {object} attributes - The attribute values of the character
|
|
*/
|
|
const kSwitchTab = function ({ trigger, attributes }) {
|
|
const [container, tab] = (
|
|
trigger.name.match(/nav-tabs-(.+)--(.+)/) ||
|
|
[]
|
|
).slice(1);
|
|
$20(`[data-container-tab="${container}"]`).removeClass('k-active-tab');
|
|
$20(`[data-container-tab="${container}"][data-tab="${tab}"]`).addClass('k-active-tab');
|
|
$20(`[data-container-button="${container}"]`).removeClass('k-active-button');
|
|
$20(`[data-container-button="${container}"][data-button="${tab}"]`).addClass('k-active-button');
|
|
const tabInputName = `${container.replace(/\-/g,'_')}_tab`;
|
|
if(persistentTabs.indexOf(tabInputName) > -1){
|
|
attributes[tabInputName] = trigger.name;
|
|
}
|
|
}
|
|
|
|
registerFuncs({ kSwitchTab });
|
|
|
|
/**
|
|
* Sets persistent tabs to their last active state
|
|
* @memberof Sheetworkers
|
|
* @param {object} attributes - The attribute values of the character
|
|
*/
|
|
const kTabOnOpen = function({trigger,attributes,sections,casc}){
|
|
if(typeof persistentTabs === 'undefined') return;
|
|
persistentTabs.forEach((tabInput) => {
|
|
const pseudoTrigger = {name:attributes[tabInput]};
|
|
kSwitchTab({trigger:pseudoTrigger, attributes});
|
|
});
|
|
};
|
|
registerFuncs({ kTabOnOpen },{type:['opener']});
|
|
return kFuncs;
|
|
}());
|
|
const actionAttributes = ["repeating_skill_$X_action","intellect_action","might_action","presence_action","cunning_action","dexterity_action","manipulation_action","resolve_action","stamina_action","composure_action","movement_dice_action","defense_action","pc_initiative_action","repeating_calling_$X_clash_action","repeating_purview_$X_clash_action","primary_pool_action","secondary_pool_action","desperation_pool_action","initiative_action","collateral_action"];const supplements = {"titanomachy":"titanomachy"};let deedName = "deed";const singular = {"Paths":"Path","Callings":"Calling","Knacks":"Knack","Purviews":"Purview","Boons":"Boon","Equipment":"Equipment","Flairs":"Flair","Qualities":"Quality","Extras":"Extra"};const sectionDisplayNames = {"path":"short-master","calling":"master","purview":"short-master","knack":"short-knack","contact":"short-contact","group":"short-group","access":"short-access","obligation":"short-obligation","boon":"short-boon","creature":"short-creature","follower":"short-follower","guide":"short-guide","relic":"short-relic","flair":"short-display","quality":"short-display","extra":"short-display","antagonist-calling":"short-display","antagonist-purview":"short-display"};const antagonistSpecialSections = {"calling":"antagonist-calling","purview":"antagonist-purview"};const specialCategories = {"antagonist-calling":"Callings","antagonist-purview":"Purviews"};const itemCategories = ["Callings","Equipment","Knacks","Paths","Qualities","Flairs","Extras","antagonist-calling","antagonist-purview"];/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
//Sheet Variables
|
|
k.sheetName = 'Storypath';
|
|
k.version = 1.04;
|
|
const sectionDisplays = {
|
|
general:['section-skills','section-attributes','section-equipment','section-notes','section-deeds'],
|
|
powers:['section-paths','section-calling','section-purview','section-birthrights']
|
|
};
|
|
sectionDisplays.all = Object.entries(sectionDisplays).reduce((arr,[prop,sections])=>[...arr,...sections],[]);
|
|
|
|
const navDisplays = {
|
|
antagonist:{show:['antagonist'],hide:['all','general','powers','gm_screen','party_screen']},
|
|
character:{show:['all','general','powers'],hide:['antagonist','gm_screen','party_screen']},
|
|
gm_screen:{show:['gm_screen'],hide:['all','general','powers','antagonist','party_screen']},
|
|
party_screen:{show:['party_screen'],hide:['all','general','powers','antagonist','gm_screen']}
|
|
};
|
|
|
|
const generalSections = ['skills','attributes','equipment','notes','deeds'];
|
|
const powerSections = ['paths','calling','purview','birthrights'];
|
|
//Object that defines how the attributes affect each other
|
|
const complexRepeatingSections = ['repeating_calling','repeating_path','repeating_purview'];
|
|
const collapsibleMasters = ['repeating_path','repeating_purview'];
|
|
const systemDefaults = {
|
|
'scion-origin':{
|
|
repeating_skill:{field:'name',additional:false,values:['academics','athletics','close combat','culture','empathy','firearms','integrity','leadership','medicine','occult','persuasion','pilot','science','subterfuge','survival','technology']},
|
|
repeating_path:{field:'display_state',values:['master','add-detail'],additional:true},
|
|
repeating_calling:{field:'display_state',values:['master','add-detail'],additional:true},
|
|
repeating_deed:{field:'type',values:['short','long','band'],additional:true},
|
|
'repeating_completed-deed':{field:'type',values:[],additional:true},
|
|
repeating_injury:{field:'type',values:['taken out'],additional:true},
|
|
repeating_equipment:{number:0,field:'display_state',values:['equipment'],additional:true},
|
|
repeating_birthright:{number:0,additional:true},
|
|
repeating_quality:{number:0,field:'name',values:[''],additional:true},
|
|
repeating_flair:{number:0,field:'name',values:[''],additional:true},
|
|
repeating_extra:{number:0,field:'name',values:[''],additional:true},
|
|
'repeating_antagonist-calling':{number:0,field:'name',values:[''],additional:true},
|
|
'repeating_antagonist-purview':{number:0,field:'name',values:[''],additional:true},
|
|
attributes:['intellect','cunning','resolve','might','dexterity','stamina','presence','manipulation','composure'],
|
|
clashStats:['intellect','cunning','resolve','might','dexterity','stamina','presence','manipulation','composure']
|
|
},
|
|
'scion-hero':{
|
|
repeating_skill:{field:'name',additional:false,values:['academics','athletics','close combat','culture','empathy','firearms','integrity','leadership','medicine','occult','persuasion','pilot','science','subterfuge','survival','technology']},
|
|
repeating_path:{field:'display_state',values:['master','add-detail'],additional:true},
|
|
repeating_calling:{field:'display_state',values:['master','add-detail'],additional:true},
|
|
repeating_deed:{field:'type',values:['short','long','band'],additional:true},
|
|
'repeating_completed-deed':{field:'type',values:[],additional:true},
|
|
repeating_injury:{field:'type',values:['taken out'],additional:true},
|
|
repeating_purview:{field:'display_state',values:['master','add-detail'],additional:true},
|
|
repeating_birthright:{number:0,additional:true},
|
|
repeating_equipment:{number:0,field:'display_state',values:['equipment'],additional:true},
|
|
repeating_quality:{number:0,field:'name',values:[''],additional:true},
|
|
repeating_flair:{number:0,field:'name',values:[''],additional:true},
|
|
repeating_extra:{number:0,field:'name',values:[''],additional:true},
|
|
'repeating_antagonist-calling':{number:0,field:'name',values:[''],additional:true},
|
|
'repeating_antagonist-purview':{number:0,field:'name',values:[''],additional:true},
|
|
attributes:['intellect','cunning','resolve','might','dexterity','stamina','presence','manipulation','composure'],
|
|
clashStats:['legend','intellect','cunning','resolve','might','dexterity','stamina','presence','manipulation','composure']
|
|
}
|
|
};
|
|
|
|
const systems = ['scion-origin','scion-hero'];
|
|
const repeatMonitor = [];
|
|
/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
const resetOrderStyling = function(attributes,reset=false){//Temporary fix for display issue with reordering section`s via setSectionOrder
|
|
const clearObj = {};
|
|
let updateKeys = Object.keys(attributes.updates);
|
|
let unusedSections = ['repeating_injury','repeating_path','repeating_calling'].filter((sec)=>updateKeys.every((attr)=>!attr.startsWith(sec)));
|
|
|
|
unusedSections.some((section)=>{
|
|
let id = attributes.attributes[`_reporder_${section}`] && attributes.attributes[`_reporder_${section}`].find(i=>Object.keys(attributes.attributes).some((attr)=>attr.startsWith(`${section}_${i}`)));
|
|
if(id){
|
|
attributes[`${section}_${id}_display_state`] = attributes[`${section}_${id}_display_state`];
|
|
clearObj[`${section}_${id}_display_state`] = 'loading';
|
|
return true;
|
|
}
|
|
});
|
|
k.setAttr(clearObj,null,()=>{
|
|
let sections = Object.keys(attributes.repOrders);
|
|
sections.forEach((section)=>{
|
|
k.setSectionOrder(section,attributes.repOrders[section]);
|
|
});
|
|
if(reset){
|
|
k.setAttrs(attributes.attributes);
|
|
}
|
|
});
|
|
};
|
|
|
|
const orderComplex = function({section,attributes,sections}){
|
|
section = section.startsWith('repeating_') ? section : `repeating_${section}`;
|
|
|
|
|
|
const masterIDs = sections[section].filter((id)=>!attributes[`${section}_${id}_master_id`]);
|
|
|
|
sections[section] = sections[section].reduce((memo,id)=>{
|
|
if(attributes[`${section}_${id}_master_id`]){
|
|
|
|
const isDetail = attributes[`${section}_${id}_display_state`] === 'add-detail';
|
|
const lastChildIndex = getChildIndex(memo,section,id,attributes,isDetail);
|
|
if(lastChildIndex < 0){
|
|
k.removeRepeatingRow(`${section}_${id}`,attributes,sections)
|
|
}else{
|
|
memo.splice(lastChildIndex,0,id);
|
|
}
|
|
}
|
|
return memo;
|
|
},masterIDs);
|
|
attributes[section] = sections[section];
|
|
};
|
|
|
|
const getChildIndex = function(memo,section,id,attributes,detailAdd){
|
|
|
|
const lastChild = [...memo].reverse().find((fid)=>{
|
|
|
|
if(attributes[`${section}_${fid}_master_id`] === attributes[`${section}_${id}_master_id`]){
|
|
return detailAdd ?
|
|
true :
|
|
attributes[`${section}_${fid}_display_state`] !== 'add-detail';
|
|
}else{
|
|
return fid.toLowerCase() === attributes[`${section}_${id}_master_id`];
|
|
}
|
|
});
|
|
|
|
let lastIndex = memo.indexOf(lastChild);
|
|
|
|
return lastIndex >= 0 ? lastIndex + 1 : 0;
|
|
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
/*
|
|
Sheet Styling
|
|
*/
|
|
const navigateSheet = function({trigger,attributes}){
|
|
k.debug('navigating sheet');
|
|
let triggerName = trigger ?
|
|
trigger.name :
|
|
attributes.sheet_state;
|
|
let target = triggerName.replace(/clicked:|nav-/g,'');
|
|
k.debug({target});
|
|
$20('.navigable-section,.sheet-nav__tab').removeClass('active');
|
|
$20(`.sheet-nav__tab.${target},.navigable-section--${target}`).addClass('active');
|
|
attributes.sheet_state = target;
|
|
};
|
|
k.registerFuncs({navigateSheet});
|
|
|
|
const setupSystem = function({attributes,sections}){
|
|
let system = attributes.system;
|
|
createSections(system,attributes,sections);
|
|
systems.forEach((sys)=>{
|
|
let action = sys === system ? 'addClass' : 'removeClass';
|
|
$20(`.subsystem-style`)[action](`system-${sys}`);
|
|
$20(`.${sys}${sys===system ? '' : `:not(.${system})`}`)[action]('active');
|
|
});
|
|
setupAttributes(system,attributes);
|
|
};
|
|
k.registerFuncs({setupSystem});
|
|
|
|
const setupAttributes = function(system,attributes){
|
|
let attrArr = systemDefaults[system].attributes;
|
|
attrArr.forEach((attr)=>{
|
|
attributes[attr] = attributes[attr] || 1;
|
|
});
|
|
};
|
|
|
|
const createSections = function(system,attributes,sections){
|
|
let details = systemDefaults[system];
|
|
Object.keys(sections).forEach((section)=>{
|
|
let sectionDetails = details[section];
|
|
if(sectionDetails){
|
|
checkSectionContents(sectionDetails,section,sections,attributes);
|
|
}else{
|
|
sections[section].forEach((id)=>{//clean up unneeded sections
|
|
sections[section].forEach((id)=>{
|
|
k.removeRepeatingRow(`${section}_${id}`,attributes,sections);
|
|
});
|
|
});
|
|
}
|
|
});
|
|
};
|
|
|
|
const checkSectionContents = function(sectionDetails,section,sections,attributes){
|
|
const IDs = [...sections[section]];
|
|
if(sectionDetails.hasOwnProperty('number')){
|
|
let missing = Math.max(sectionDetails.number - sections[section].length,0);
|
|
|
|
_.range(missing).forEach(()=>{
|
|
let row = k.generateRowID(section,sections);
|
|
attributes[`${row}_${sectionDetails.field || 'name'}`] = sectionDetails.values[0];
|
|
});
|
|
}else if(sectionDetails.values){
|
|
let missing = [];//Array to store missing values
|
|
let unusedIDs = {};//Object to store whether IDs are needed (true) or not (false).
|
|
sectionDetails.values.forEach((val)=>{
|
|
let found = IDs.some((id)=>{
|
|
if(attributes[`${section}_${id}_${sectionDetails.field}`]?.endsWith(val)){
|
|
unusedIDs[id] = true;
|
|
return true;
|
|
}else{
|
|
unusedIDs[id] = unusedIDs[id] || false;
|
|
return false;
|
|
}
|
|
},false);
|
|
if(!found){
|
|
missing.push(val);
|
|
}
|
|
return found;
|
|
});
|
|
|
|
if(missing.length){
|
|
const parentChild = {
|
|
parentID:null,
|
|
children:[]
|
|
};
|
|
missing.forEach((val)=>{
|
|
|
|
let newRow = k.generateRowID(section,sections,val === 'add-detail' ? 'ADD' : '');
|
|
|
|
let newID = newRow.replace(/repeating_[^_]+_/,'');
|
|
|
|
if(complexRepeatingSections.indexOf(section) >= 0){
|
|
if(val === 'master'){
|
|
parentChild.parentID = newID.toLowerCase();
|
|
}else{
|
|
parentChild.children.push(newID);
|
|
}
|
|
}
|
|
attributes[`${newRow}_${sectionDetails.field}`] = val;
|
|
if(sectionDetails.additionalFields){
|
|
sectionDetails.additionalFields
|
|
}
|
|
attributes[`${newRow}_display_state`] = section === 'repeating_injury' ?
|
|
`short-${val}` :
|
|
val;
|
|
if(/calling/.test(section)){
|
|
attributes[`${newRow}_rating_max`] = 1;
|
|
}
|
|
});
|
|
if(parentChild.parentID){
|
|
parentChild.children.forEach((id)=>{
|
|
attributes[`${section}_${id}_master_id`] = parentChild.parentID;
|
|
});
|
|
|
|
orderComplex({section,attributes,sections});
|
|
}
|
|
}
|
|
if(!sectionDetails.additional){
|
|
Object.keys(unusedIDs).forEach((id)=>{
|
|
if(!unusedIDs[id]){
|
|
k.removeRepeatingRow(`${section}_${id}`,attributes,sections);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
};
|
|
|
|
const populateInitiativeSkills = (attributes,sections) => {
|
|
const optionsArray = sections['repeating_skill']
|
|
.filter(id => id)
|
|
.reduce((arr,id) => {
|
|
arr.push({value:id.toLowerCase(),label:getTranslationByKey(attributes[`repeating_skill_${id}_name`])});
|
|
return arr;
|
|
},[{value:'',label:getTranslationByKey('select one')}]);
|
|
populateListOptions({elemSelector:'#initiative-skill-select',optionsArray});
|
|
attributes.initiative_skill = optionsArray.some(obj => obj.value === attributes.initiative_skill) ?
|
|
attributes.initiative_skill :
|
|
'';
|
|
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
const styleOnOpen = function({attributes,sections}){
|
|
navigateSheet({attributes});
|
|
setupSystem({attributes,sections});
|
|
styleCharacterType({attributes});
|
|
retrieveHeaders(attributes);
|
|
populateInitiativeSkills(attributes,sections);
|
|
};
|
|
k.registerFuncs({styleOnOpen},{type:['opener']})
|
|
|
|
const retrieveHeaders = function(attributes){
|
|
|
|
let collapsed = attributes.collapsed.split(/\s*,\s*/).filter(c=>!/^\s*$/.test(c) && c !== 'completed deeds');
|
|
collapsed.forEach((c)=>{
|
|
$20(`.${c}.expandable-header`).addClass('collapse');
|
|
});
|
|
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
/*
|
|
Calculation Functions
|
|
These functions must return a value to be applied to an attribute
|
|
*/
|
|
const defenseCalc = function({attributes}){
|
|
return Math.max(attributes.resolve,attributes.stamina,attributes.composure);
|
|
};
|
|
k.registerFuncs({defenseCalc});
|
|
|
|
const calcXP = function({attributes}){
|
|
return attributes.experience_earned - attributes.experience_used;
|
|
};
|
|
k.registerFuncs({calcXP});
|
|
|
|
const movementCalc = function({attributes,sections}){
|
|
const athleticsID = sections.repeating_skill.find((id)=>attributes[`repeating_skill_${id}_name`] === 'athletics');
|
|
return attributes[`repeating_skill_${athleticsID}_rating`] +
|
|
Math.max(
|
|
1,
|
|
attributes.might,
|
|
attributes.dexterity
|
|
);
|
|
};
|
|
k.registerFuncs({movementCalc});/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
//Expands/collapses the sections
|
|
const expandHeader = function(event){
|
|
let [section,rowID,name] = k.parseClickTrigger(event.triggerName);
|
|
const target = `.${name}.expandable-header`;
|
|
k.getAllAttrs({props:['collapsed'],callback:(attributes,sections)=>{
|
|
let collapsed = attributes.collapsed.split(/\s*,\s*/);
|
|
|
|
if(section){
|
|
name = 'completed deeds';
|
|
let hide = 0
|
|
if(collapsed.indexOf(name) < 0){
|
|
collapsed.push(name);
|
|
hide = 1;
|
|
}else{
|
|
collapsed = collapsed.filter(b => b!==name && !/^\s*$/.test(b) );
|
|
}
|
|
sections[section].forEach((id)=>{
|
|
attributes[`${section}_${id}_hide`] = attributes[`${section}_${id}_completed`] ? hide : 0;
|
|
});
|
|
}else{
|
|
if(collapsed.indexOf(name) < 0){
|
|
collapsed.push(name);
|
|
}else{
|
|
collapsed = collapsed.filter(b => b!==name && !/^\s*$/.test(b) );
|
|
}
|
|
$20(target).toggleClass('collapse');
|
|
}
|
|
attributes.collapsed = collapsed.join(',');
|
|
attributes.set();
|
|
}})
|
|
};
|
|
k.registerFuncs({expandHeader});
|
|
|
|
//adds a subsection (e.g. a knack) to the over section (e.g. repeating_calling)
|
|
const addSubsection = async function(event){
|
|
let [section,rowID,button] = k.parseClickTrigger(event.triggerName);
|
|
let type = button.replace(/add-/,'');
|
|
let newID = generateRowID();
|
|
k.getAllAttrs({props:[],callback:(attributes,sections,casc)=>{
|
|
addSystemSubSection({type,newID,section,attributes,sections,casc});
|
|
}})
|
|
};
|
|
k.registerFuncs({addSubsection});
|
|
|
|
const addChildSection = function(attributes,sections,section,rowID,type,newID){
|
|
attributes[`${section}_${newID}_type`]=type;
|
|
attributes[`${section}_${newID}_display_state`]=type;
|
|
attributes[`${section}_${newID}_master_id`]=attributes[`${section}_${rowID}_master_id`];
|
|
if(/path/.test(section)){
|
|
attributes[`${section}_${newID}_rating`] = 1;
|
|
}
|
|
let triggerPos = sections[section].indexOf(rowID);
|
|
sections[section].splice(triggerPos,0,newID);
|
|
attributes[section] = sections[section];
|
|
attributes.set();
|
|
};
|
|
|
|
const sectionInteract = function(event){
|
|
|
|
let [action,targetSection] = extractRepcontrolDetails(event.htmlAttributes.name);
|
|
const interactSwitch = {
|
|
add:addRow,
|
|
edit:editSection
|
|
};
|
|
interactSwitch[action](targetSection);
|
|
};
|
|
k.registerFuncs({sectionInteract});
|
|
|
|
const extractRepcontrolDetails = function(name){
|
|
|
|
let match = name ? name.match(/^act_(.+?)-(.+)/) : [null,null,null];
|
|
match.shift();
|
|
return match;
|
|
};
|
|
|
|
const addRow = function(section){
|
|
k.getAllAttrs({callback:(attributes,sections)=>{
|
|
let IDs = sections[`repeating_${section}`];
|
|
system = attributes.system;
|
|
const defaults = systemDefaults[system][`repeating_${section}`];
|
|
if(!defaults) return;
|
|
let rowID;
|
|
let row;
|
|
const childParent = {
|
|
parent:'',
|
|
children:[]
|
|
}
|
|
if(!defaults.values){
|
|
row = k.generateRowID(section,sections);
|
|
attributes[`${row}_${defaults.field}`]='';
|
|
}else if(section==='deed'){
|
|
addDeed(system,attributes,sections);
|
|
}else if(section === 'injury'){
|
|
addInjury(system,attributes,sections);
|
|
}else{
|
|
defaults.values.forEach((value)=>{
|
|
row = k.generateRowID(section,sections,value === 'add-detail' ? 'ADD' : '');
|
|
rowID = row.replace(/repeating_[^_]+_/,'');
|
|
if(value === 'add-detail'){
|
|
childParent.children.push(rowID);
|
|
}else{
|
|
childParent.parent = rowID.toLowerCase();
|
|
}
|
|
attributes[`${row}_${defaults.field}`] = value;
|
|
attributes[`${row}_display_state`] = value;
|
|
if(/calling/.test(section)){
|
|
attributes[`${row}_rating_max`] = 1;
|
|
}
|
|
});
|
|
childParent.children.forEach((id)=>{
|
|
attributes[`repeating_${section}_${id}_master_id`] = childParent.parent;
|
|
});
|
|
orderComplex({section,attributes,sections});
|
|
}
|
|
attributes.set();
|
|
}});
|
|
};
|
|
|
|
const editSection = function(section){
|
|
let target = `fieldset.repeating_${section} + .repcontainer`;
|
|
$20(target).toggleClass('editmode');
|
|
if(/aspiration|deed/.test(section)){
|
|
$20(target.replace(/(deed|aspiration)/,'completed-$1')).toggleClass('editmode');
|
|
}
|
|
};
|
|
|
|
/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
/*
|
|
Rolls
|
|
*/
|
|
const singleAttributeRoll = function(event){
|
|
debugger;
|
|
let [,,button] = k.parseClickTrigger(event.triggerName);
|
|
let field = button.replace(/-action$/,'').replace(/-/g,'_');
|
|
k.getAllAttrs({
|
|
props:[...k.baseGet,'difficulty_query','target_number'],sectionDetails:[],
|
|
callback:async (attributes)=>{
|
|
let [pool,addDice] = await assemblePool(attributes[field],0);
|
|
let enhancements = 0;
|
|
if(attributes.enhancement_query === 'on'){
|
|
enhancements = await k.extractQueryResult(getTranslationByKey('Do you have any enhancements'));
|
|
enhancements = k.value(enhancements);
|
|
}else{
|
|
await k.pseudoQuery('');
|
|
}
|
|
let [message,reusableMessage] = await assembleMessage(attributes,pool,field.replace(/_/g,' '),null,null,enhancements);
|
|
|
|
let confirm;
|
|
if(attributes.enhancement_query === 'on' || attributes.difficulty_query === 'on'){
|
|
confirm = await confirmRoll(attributes,{skillName:`^{${field.replace(/_/g,' ')}}`,skillDice:attributes[field],enhancements,addDice});
|
|
}else{
|
|
confirm = await k.pseudoQuery(1);
|
|
}
|
|
if(k.value(confirm)){
|
|
executeRoll(attributes,reusableMessage,message);
|
|
}
|
|
}
|
|
});
|
|
};
|
|
k.registerFuncs({singleAttributeRoll});
|
|
|
|
const rollTask = function(event){
|
|
k.getAllAttrs({
|
|
props:[...k.baseGet,'difficulty_query','target_number'],
|
|
callback:async (attributes,sections)=>{
|
|
let [pool,skillName,attributeName,enhancements] = await queryPool(event.triggerName,attributes,sections);
|
|
if(!pool && !skillName && !attributeName){
|
|
return;
|
|
}
|
|
let [message,reusableMessage] = await assembleMessage(attributes,pool,skillName,attributeName,null,enhancements);
|
|
executeRoll(attributes,reusableMessage,message);
|
|
}
|
|
})
|
|
};
|
|
k.registerFuncs({rollTask});
|
|
|
|
const queryPool = async function(clicked,attributes,sections){
|
|
|
|
let [section,rowID,field] = k.parseClickTrigger(clicked);
|
|
field = field.replace(/-action$/,'');
|
|
|
|
let query;
|
|
let queryOptions;
|
|
let queryPrompt;
|
|
let skillDice;
|
|
let attributeDice;
|
|
let attributeName;
|
|
let skillName;
|
|
if(section === 'repeating_skill'){
|
|
let systemDetails = systemDefaults[attributes.system];
|
|
queryOptions = systemDetails.attributes.reduce((m,attr)=>{
|
|
m.push(`${k.capitalize(getTranslationByKey(attr))},${attr}`);
|
|
return m;
|
|
},[]).join('|');
|
|
queryPrompt = getTranslationByKey('attribute query');
|
|
skillDice = attributes[`${section}_${rowID}_rating`];
|
|
skillName = `^{@{${section}_${rowID}_name}}`;
|
|
}else{
|
|
let fieldRef = section ? parseSectionRoll(section,rowID,attributes,sections) : field;
|
|
section = 'repeating_skill';
|
|
const baseOptions = /resolve|stamina|composure/.test(fieldRef) ?
|
|
[k.capitalize(getTranslationByKey('attribute only'))] :
|
|
[];
|
|
queryOptions = sections[section].reduce((m,id)=>{
|
|
m.push(`${k.capitalize(getTranslationByKey(attributes[`${section}_${id}_name`]))},${section}_${id}`);
|
|
return m;
|
|
},baseOptions).join('|')
|
|
queryPrompt = getTranslationByKey('skill query');
|
|
attributeDice = attributes[fieldRef];
|
|
attributeName = `^{${field}}`;
|
|
}
|
|
query = `${queryPrompt}|${queryOptions}`;
|
|
|
|
let queryResult = await k.extractQueryResult(query);
|
|
if(!attributeDice){
|
|
attributeDice = attributes[queryResult];
|
|
attributeName = `^{${queryResult}}`;
|
|
}else{
|
|
skillDice = queryResult === 'Attribute Only' ?
|
|
0 :
|
|
attributes[`${queryResult}_rating`];
|
|
skillName = queryResult === 'Attribute Only' ?
|
|
'' :
|
|
`^{@{${queryResult}_name}}`;
|
|
}
|
|
let [pool,addDice] = await assemblePool(skillDice,attributeDice)
|
|
let enhancements = 0;
|
|
if(attributes.enhancement_query === 'on'){
|
|
enhancements = await k.extractQueryResult(getTranslationByKey('Do you have any enhancements'));
|
|
enhancements = k.value(enhancements);
|
|
}else{
|
|
await k.pseudoQuery('');
|
|
}
|
|
let confirm = await confirmRoll(attributes,{skillName,skillDice,attributeName,attributeDice,enhancements,addDice});
|
|
if(k.value(confirm)){
|
|
return [pool,skillName,attributeName,enhancements];
|
|
}else{
|
|
return [];
|
|
}
|
|
};
|
|
|
|
const assembleMessage = async function(attributes,pool,skillName,attributeName,rollTitle,enhancements){
|
|
let reusableMessage = `{{successes=[[0['computed value']]]}} {{display_dice=true}} {{system=${attributes.system}}} {{finished=[[0]]}} {{enhancements=[[${enhancements}]]}}`;
|
|
if(attributes.difficulty_query === 'on'){
|
|
let difficulty = await k.extractQueryResult(`${getTranslationByKey('difficulty query')}|0`);
|
|
reusableMessage = `{{difficulty=[[0${difficulty}]]}} {{extra_successes=[[0[computed value]]]}} ${reusableMessage}`;
|
|
}else{
|
|
await k.pseudoQuery('');
|
|
}
|
|
return [`@{template_start} ${reusableMessage} ${rollTitle ? `{{title=${rollTitle}}}` : ''} {{skill=${skillName || ''}}} {{attribute=${attributeName || ''}}} ${pool} {{first=true}}`,reusableMessage];
|
|
};
|
|
|
|
const buildQuery = async function(prompt,options,attributes,sections){
|
|
|
|
if(typeof options === 'string'){
|
|
options = options.startsWith('repeating') ? sections[options].map(id=>`${k.capitalize(getTranslationByKey(attributes[`${options}_${id}_name`]))},${options}_${id}_rating`) : '';
|
|
}
|
|
let query = `${getTranslationByKey(prompt)}|${options.join('|')}`;
|
|
return await k.extractQueryResult(query);
|
|
};
|
|
|
|
const assemblePool = async function(skillDice,attributeDice){
|
|
const baseDice = k.value(skillDice)+k.value(attributeDice);
|
|
const additionalDice = await k.extractQueryResult(`${getTranslationByKey('additional dice query')}|${[...Array(Math.max(0,10 - baseDice) + 1).keys()].map(k=>k).join('|')}|`);
|
|
return [[...Array(baseDice + (+additionalDice)).keys()].map((n)=>{
|
|
return `{{roll_${n+1}=[[1d10cs>@{target_number}cf<1cf>@{again}]]}}`;
|
|
}).join(' ').trim() || '{{roll_1=^{no dice available}}}',+additionalDice];
|
|
};
|
|
|
|
const confirmRoll = function(attributes,{skillName,skillDice,attributeName,attributeDice,enhancements,addDice}){
|
|
let promptLookup = 'Roll {{skill}} and {{attribute}} with {{enhancement number}} enhancements and {{addDice}} additional dice?';
|
|
k.debug({addDice});
|
|
if(!skillName && !attributeName){
|
|
return k.pseudoQuery(1);
|
|
}else if(!skillName){
|
|
promptLookup = promptLookup.replace(/\{\{skill\}\} and /,'');
|
|
}else if(!attributeName){
|
|
promptLookup = promptLookup.replace(/ and \{\{attribute\}\}/,'');
|
|
}
|
|
if(!enhancements){
|
|
promptLookup = promptLookup.replace(/ \{\{enhancement number\}\} enhancements and/,'');
|
|
}
|
|
if(!addDice){
|
|
promptLookup = promptLookup.replace(/\s+(?:and|with) \{\{addDice\}\} additional dice/,'');
|
|
}
|
|
k.debug({promptLookup});
|
|
debugger;
|
|
let prompt = getTranslationByKey(promptLookup);
|
|
|
|
const rollDetails = {[skillName]:skillDice,[attributeName]:attributeDice,enhancements,addDice};
|
|
k.debug({rollDetails});
|
|
k.debug({prompt});
|
|
Object.entries(rollDetails).forEach(([name,val],index)=>{
|
|
k.debug({name,val});
|
|
name = /^\^\{/.test(name) ?
|
|
(
|
|
/@{/.test(name) ?
|
|
getTranslationByKey(attributes[name.replace(/[\^@]{|}/g,'')]) :
|
|
getTranslationByKey(name.replace(/^\^{|}$/g,''))
|
|
) :
|
|
name;
|
|
let replaceText = name !== 'enhancements' && name !== 'addDice' ?
|
|
`${k.capitalize(name)} (${val})` :
|
|
val;
|
|
let replaceTarget = `\\{\\{${index}\\}\\}`;
|
|
|
|
|
|
prompt = prompt.replace(new RegExp(replaceTarget,'g'),replaceText);
|
|
});
|
|
k.debug({prompt});
|
|
return k.extractQueryResult(`${prompt}|${getTranslationByKey('Yes')},1|${getTranslationByKey('No')},0`);
|
|
};
|
|
|
|
const executeRoll = async function(attributes,reusableMessage,message,accumulator = {successes:0}){
|
|
const rollNums = [1,2,3,4,5,6,7,8,9,10];
|
|
let roll = await startRoll(message);
|
|
const computeObj = {};
|
|
const tn = attributes.target_number;
|
|
accumulator.successes = Object.keys(roll.results).reduce((total,key)=>{
|
|
return total += (/roll_/.test(key) && roll.results[key].result >= tn) ? 1 : 0;
|
|
},accumulator.successes);
|
|
if(rollNums.some((n)=>roll.results[`roll_${n}`] && roll.results[`roll_${n}`].result >= attributes.again)){
|
|
let pool = rollNums.reduce((m,n)=>{
|
|
if(roll.results[`roll_${n}`] && roll.results[`roll_${n}`].result >= Math.max(attributes.again,5)){
|
|
m+=`{{roll_${n}=[[1d10cs>@{target_number}cf<1cf>@{again}]]}}`;
|
|
}
|
|
return m;
|
|
},'');
|
|
let newMessage = `@{template_start} ${reusableMessage} ${pool} {{continuation=true}}`;
|
|
executeRoll(attributes,reusableMessage,newMessage,accumulator);
|
|
}else{
|
|
computeObj.finished = 1;
|
|
computeObj.successes = accumulator.successes;
|
|
if(accumulator.successes){
|
|
computeObj.successes += (roll.results.enhancements.result || 0);
|
|
}
|
|
if(roll.results.difficulty){
|
|
computeObj.extra_successes = Math.max(computeObj.successes - roll.results.difficulty.result,0);
|
|
}
|
|
}
|
|
finishRoll(roll.rollId,computeObj);
|
|
if(/initiative/.test(message)){
|
|
startRoll(`![[${computeObj.successes}&{tracker}]]`,(r) => finishRoll(r.rollId));
|
|
}
|
|
};
|
|
|
|
const parseSectionRoll = function(section,rowID,attributes){
|
|
let masterID = section === 'repeating_path' ? rowID : (attributes[`${section}_${rowID}_master_id`] || rowID);
|
|
return `${section}_${masterID}_rating`;
|
|
};
|
|
/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
// Triggered Functions
|
|
|
|
const collapseSection = function({trigger,attributes,sections}){
|
|
const [section,rowID,field] = k.parseTriggerName(trigger.name);
|
|
if(attributes[`${section}_${rowID}_type`] === 'add-detail') return;
|
|
let collapse = attributes[trigger.name];
|
|
let rows;
|
|
if(/master/.test(attributes[`${section}_${rowID}_display_state`])){
|
|
|
|
rows = sections[section].filter((id)=>{
|
|
return attributes[`${section}_${id}_master_id`]===rowID && attributes[`${section}_${id}_display_state`] !== 'add-detail';
|
|
});
|
|
if(collapsibleMasters.indexOf(section)>=0){
|
|
|
|
rows.push(rowID);
|
|
}
|
|
}else{
|
|
rows = [rowID];
|
|
}
|
|
rows.forEach((id)=>{
|
|
if(collapse){
|
|
if(!attributes[`${section}_${id}_display_state`].startsWith('short-')){
|
|
attributes[`${section}_${id}_display_state`] = `short-${attributes[`${section}_${id}_display_state`]}`;
|
|
attributes[`${section}_${id}_collapse`] = 1;
|
|
}
|
|
}else{
|
|
attributes[`${section}_${id}_display_state`] = attributes[`${section}_${id}_display_state`].replace(/short-/,'');
|
|
attributes[`${section}_${id}_collapse`] = 0;
|
|
}
|
|
});
|
|
};
|
|
k.registerFuncs({collapseSection});
|
|
|
|
const orderDeeds = function({trigger,attributes,sections}){
|
|
const [section,rowID,field] = k.parseTriggerName(trigger.name);
|
|
const newSection = /completed/.test(section) ?
|
|
deedName :
|
|
`completed-${deedName}`;
|
|
const newRow = k.generateRowID(newSection,sections);
|
|
['type','name','completed'].forEach((attr)=>{
|
|
attributes[`${newRow}_${attr}`] = attributes[`${section}_${rowID}_${attr}`];
|
|
});
|
|
k.removeRepeatingRow(`${section}_${rowID}`,attributes,sections);
|
|
deedDisplay({sections});
|
|
};
|
|
k.registerFuncs({orderDeeds});
|
|
|
|
const deedDisplay = function({sections}){
|
|
k.debug({sections});
|
|
const action = sections[`repeating_completed-${deedName}`].length ?
|
|
'remove' :
|
|
'add';
|
|
$20(`.completed-${deedName}`)[`${action}Class`]('disable');
|
|
$20(`.completed-${deedName} ~ .repcontainer`)[`${action}Class`]('disable');
|
|
};
|
|
k.registerFuncs({deedDisplay},{type:['opener']});
|
|
|
|
const styleCharacterType = function({attributes}){
|
|
let type = attributes.sheet_type.replace(/\s+/g,'_');
|
|
k.debug({type});
|
|
$20('.sheet-nav__tab--possible').addClass('disable');
|
|
$20(`.sheet-nav__tab--possible--${type}`).removeClass('disable');
|
|
};
|
|
k.registerFuncs({styleCharacterType});/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
const clearChildItems = function(event){
|
|
const [section,masterID] = k.parseRepeatName(event.sourceAttribute);
|
|
k.getAllAttrs({
|
|
callback:(attributes,sections,)=>{
|
|
if(/master/.test(event.removedInfo[`${section}_${masterID}_display_state`])){
|
|
|
|
sections[section].forEach((id)=>{
|
|
if(attributes[`${section}_${id}_master_id`]===masterID.toLowerCase()){
|
|
k.removeRepeatingRow(`${section}_${id}`,attributes,sections);
|
|
}
|
|
});
|
|
}else if(/injury|calling|deed/.test(section)){
|
|
//cleanUpSection(attributes,sections,section,masterID);
|
|
}
|
|
//The below is a temporary fix for display issues associated with setSectionOrder
|
|
let clearID = attributes.attributes[`_reporder_${section}`].find(id=>Object.keys(attributes.attributes).some((attr)=>attr.startsWith(`${section}_${id}`)));
|
|
if(clearID){
|
|
|
|
attributes[`${section}_${clearID}_display_state`] = attributes[`${section}_${clearID}_display_state`];
|
|
attributes.set();
|
|
}
|
|
}
|
|
});
|
|
};
|
|
k.registerFuncs({clearChildItems});
|
|
|
|
const cleanUpSection = function(attributes,sections,section,masterID){
|
|
let trigger;
|
|
switch(section){
|
|
case 'repeating_injury':
|
|
//Health handling
|
|
break;
|
|
case 'repeating_calling':
|
|
trigger = {name:`${section}_${masterID}_rating_max`};
|
|
sumActiveCallings(trigger,attributes,sections);
|
|
break;
|
|
case 'repeating_deed':
|
|
//remove completed deeds header if no completed deeds
|
|
//orderDeeds(trigger,attributes,sections);
|
|
break;
|
|
}
|
|
};/**
|
|
* Rolls initiative for pcs.
|
|
* @param {object} trigger - The trigger that caused the function to be called
|
|
* @param {object} attributes - The attribute values of the character
|
|
* @param {object[]} sections - All the repeating section IDs
|
|
* @param {object} casc - Expanded cascade object
|
|
*/
|
|
const rollPCInitiative = async function ({ trigger, attributes, sections, casc }) {
|
|
const skillRow = attributes.initiative_skill ?
|
|
`repeating_skill_${attributes.initiative_skill}` :
|
|
'';
|
|
const skillDice = skillRow ?
|
|
attributes[`${skillRow}_rating`] :
|
|
0;
|
|
const [pool, addDice] = await assemblePool(skillDice, attributes.cunning);
|
|
let enhancements = 0;
|
|
if (attributes.enhancement_query === 'on') {
|
|
enhancements = await k.extractQueryResult(getTranslationByKey('Do you have any enhancements'));
|
|
enhancements = k.value(enhancements);
|
|
} else {
|
|
await k.pseudoQuery('');
|
|
}
|
|
let [message, reusableMessage] = await assembleMessage(attributes, pool, attributes[`${skillRow}_name`], 'cunning', 'initiative', enhancements);
|
|
|
|
let confirm;
|
|
if (attributes.enhancement_query === 'on' || attributes.difficulty_query === 'on') {
|
|
confirm = await confirmRoll(attributes, { skillName: `^{${field.replace(/_/g, ' ')}}`, skillDice: attributes[field], enhancements, addDice });
|
|
} else {
|
|
confirm = await k.pseudoQuery(1);
|
|
}
|
|
if (k.value(confirm)) {
|
|
executeRoll(attributes, reusableMessage, message);
|
|
}
|
|
};
|
|
k.registerFuncs({ rollPCInitiative });/**
|
|
* Does the system specific handling for specialized drop categories.
|
|
* @param {object} data - the data received from the drop
|
|
* @param {AttributesProxy} attributes - The attributes object from the K-scaffold
|
|
* @param {object} sections - The sections object form the k-scaffold
|
|
* @param {object} casc - The cascade object form the k-scaffold
|
|
* @returns {object|[]} - The manipulated data object
|
|
*/
|
|
const processSpecialCategories = (data,attributes,sections,casc) => {
|
|
if(data.Category !== 'Antagonists'){
|
|
let category = data.Category.replace(/\s.+/,'');
|
|
data = {[`data-${category}`]:[data]};
|
|
if(data[`data-${category}`]['data-features']){
|
|
data[category]['data-features'].forEach((feature)=>{
|
|
let cat = k.capitalize(feature.category);
|
|
data[`data-${cat}`] = data[`data-${cat}`] || [];
|
|
data[`data-${cat}`].push({name:feature.name});
|
|
});
|
|
}
|
|
}else if(data.Category === 'Antagonists'){
|
|
npcHandler(data,attributes,sections,casc);
|
|
}
|
|
return data;
|
|
}
|
|
/**
|
|
* Does all the generic handling for NPC type dropped items (e.g. Antagonists in Scion and Threats in TCF)
|
|
* @param {object} data - the data received from the drop
|
|
* @param {AttributesProxy} attributes - The attributes object from the K-scaffold
|
|
* @param {object} sections - The sections object form the k-scaffold
|
|
* @param {object} casc - The cascade object form the k-scaffold
|
|
*/
|
|
const npcHandler = (data,attributes,sections,casc) => {
|
|
clearSheet(attributes,sections,casc);
|
|
attributes.character_name = data['data-cs-name'] || data.Name;
|
|
attributes.sheet_state = 'antagonist';
|
|
attributes.queue.push('sheet_type');
|
|
attributes.queue.push('character_name');
|
|
const tokenObj = {
|
|
width:70,
|
|
height:70,
|
|
};
|
|
setDefaultToken(tokenObj);
|
|
|
|
navigateSheet({attributes});
|
|
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
//Initiate a compendium lookup
|
|
|
|
//Start of the actual compendium lookup functions
|
|
//Function to initiate the lookup. Parses the statblock to figure out what needs to be looked up in the compendium, and what attribute should be filtered for based on the category.
|
|
//ARGUMENTS
|
|
//statblock (object): base object dropped from the compendium
|
|
//callback (function): A function that will use the parsed compendium lookup data to finish the drag and drop of the item
|
|
//The callback function receives the parsed statblock as an argument
|
|
const compendiumLookup = function({queue, callback, origBlock, attributes, sections, casc, pass = 0}) {
|
|
pass++;
|
|
origBlock = origBlock || queue[0];
|
|
queue = queue || [origBlock];
|
|
let searchArray = [];
|
|
queue.forEach((statblock)=>{
|
|
searchArray = itemCategories.reduce((m, type) => {//Construct an array of items to search for.
|
|
let searchType = specialCategories[type] || type;
|
|
if (statblock[`data-${type}`]){
|
|
let searchNames = statblock[`data-${type}`].map((obj) => obj.name || obj.display_name || '')
|
|
.join('|')
|
|
.replace(/\|{2,}/g,'')
|
|
.replace(/\|$/,'');
|
|
if(searchNames.length > 0){
|
|
let searchString = `Category:${searchType} display_name:${searchNames}`;
|
|
m.push(searchString);
|
|
}
|
|
}
|
|
return m;
|
|
}, searchArray);
|
|
k.debug({searchArray});
|
|
if(searchArray.length){
|
|
lookupBurndown(statblock, searchArray, callback, origBlock, attributes, sections, casc,pass);
|
|
}else{
|
|
callback(origBlock);
|
|
}
|
|
});
|
|
};
|
|
|
|
//Actually queries the compendium to get details on the items in each category using the searchArray assembled in compendiumLookup
|
|
//ARGUMENTS
|
|
//statblock (object): the original object dropped from the compendium
|
|
//callback (function): A function that will use the parsed compendium lookup data to finish the drag and drop of the item
|
|
//The callback function receives the parsed statblock as an argument
|
|
const lookupBurndown = function(statblock, searchArray, callback, origBlock, attributes, sections, casc,pass) {
|
|
getCompendiumQuery(searchArray, (dataArr) => {
|
|
k.debug({dataArr});
|
|
const expansionIDs = dataArr
|
|
.reduce( (arr,obj)=>{
|
|
arr.push(k.value(obj.data.Expansion));
|
|
return arr;
|
|
},[])
|
|
.sort((a,b) => b - a);
|
|
itemCategories.forEach((category) => {
|
|
if (statblock[`data-${category}`]) {
|
|
origBlock[`data-${category}`] = statblock[`data-${category}`].map((obj) => {
|
|
const fullItem = getItemDetails(obj, dataArr, expansionIDs);
|
|
fullItem['data-cs-name'] = fullItem['data-cs-name'] || fullItem.name;
|
|
return fullItem;
|
|
});
|
|
}
|
|
});
|
|
const queue = additionalLookups(statblock,origBlock);
|
|
if(queue.length /*&& pass < 2*/){
|
|
compendiumLookup({queue,callback,origBlock, attributes, sections, casc,pass});
|
|
}else{
|
|
callback(origBlock);
|
|
}
|
|
});
|
|
};
|
|
|
|
const additionalLookups = function(statblock,origBlock){
|
|
return Object.entries(statblock).reduce((memo,[prop,arr])=>{
|
|
if(prop.startsWith('data-') && Array.isArray(arr)){
|
|
let nestedData = arr.reduce((m,obj)=>{
|
|
Object.entries(obj).forEach(([nProp,nVal])=>{
|
|
/*commented code shouldn't be needed
|
|
if(
|
|
nProp.startsWith('data-') &&
|
|
typeof nVal === 'string' &&
|
|
nVal.startsWith('[{')
|
|
){
|
|
try{
|
|
let jArr = JSON.parse(nVal);
|
|
if(Array.isArray(jArr)){
|
|
jArr = jArr.map((o)=>{
|
|
o.datasource = obj['cs-name'] || obj.Category;
|
|
if(!o.datasource){
|
|
delete o.datasource;
|
|
}
|
|
return o;
|
|
});
|
|
origBlock[nProp] = origBlock[nProp] ?
|
|
[...origBlock[nProp],...jArr] :
|
|
[...jArr];
|
|
m.data[nProp] = jArr;
|
|
m.nested = true;
|
|
}
|
|
}catch(err){
|
|
//if the parse failed, do nothing
|
|
}
|
|
}else */
|
|
if(nProp === 'data-features'){
|
|
try{
|
|
if(typeof nVal === 'string'){
|
|
k.debug('string data-feature detected');
|
|
nVal = JSON.parse(nVal);
|
|
}
|
|
nVal.forEach((feature)=>{
|
|
if(!origBlock[`data-${feature.category}`] || origBlock[`data-${feature.category}`].every((o)=>o.display_name.toLowerCase() !== feature.name.toLowerCase())){
|
|
m.nested = true;
|
|
m.data[`data-${feature.category}`] = m.data[`data-${feature.category}`] || [];
|
|
m.data[`data-${feature.category}`].push({display_name:feature.name});
|
|
}
|
|
});
|
|
}catch(err){
|
|
k.debug({[`Invalid data-feature on ${obj.display_name}`]:err,'data-feature':nVal},true);
|
|
}
|
|
}
|
|
});
|
|
return m;
|
|
},{data:{},nested:false});
|
|
if(nestedData && nestedData.nested){
|
|
memo.push(nestedData.data);
|
|
}
|
|
}
|
|
return memo;
|
|
},[]);
|
|
};
|
|
|
|
//Finds the compendium item that most precisely matches the needs of the compendium item based on expansion ID and name property.
|
|
//If nothing matches based on expansion ID, simply returns the first item with appropriate name property.
|
|
//ARGUMENTS
|
|
//itemObj (object): the data on the Item to return that is included in the base statblock
|
|
//dataArr (array): The compendium items that were returned from getCompendiumQuery
|
|
const getItemDetails = function(itemObj, dataArr, expansionIDs) {
|
|
let objName = itemObj.display_name || itemObj.name;
|
|
let compendiumObj;
|
|
expansionIDs.find((id) => {
|
|
compendiumObj = dataArr.find((dataObj) => k.value(dataObj.data.Expansion) === id &&
|
|
dataObj.data.display_name === objName);
|
|
if (compendiumObj) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
});
|
|
if (!compendiumObj) { //If we didn't find an object matching the expansion pathways and the object name, just find the first item with a matching name
|
|
compendiumObj = dataArr.find((dataObj) =>
|
|
dataObj.data.display_name === objName);
|
|
if (!compendiumObj) { //If there still isn't a matching compendium object, return the original Item
|
|
return itemObj;
|
|
}
|
|
}
|
|
Object.keys(compendiumObj.data).forEach((key) => {
|
|
itemObj[key] = itemObj[key] || compendiumObj.data[key];
|
|
});
|
|
return itemObj;
|
|
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
const handleCompendiumDrop = function(event){
|
|
k.debug({event});
|
|
k.getAllAttrs({
|
|
callback:(attributes,sections,casc)=>{
|
|
clearDropAttributes();
|
|
let data = parseDropData(attributes.drop_data,attributes,sections,casc);
|
|
if(!data) return;
|
|
k.debug({data});
|
|
compendiumLookup({
|
|
origBlock:data,
|
|
attributes,sections,casc,
|
|
callback:async (lookupObj)=>{
|
|
debugger;
|
|
k.debug({'threat data':data});
|
|
await processDropData({data:lookupObj,attributes,sections,casc});
|
|
k.debug('Drop processing complete');
|
|
attributes.set({attributes,sections,casc});
|
|
}
|
|
});
|
|
}
|
|
});
|
|
};
|
|
k.registerFuncs({handleCompendiumDrop});
|
|
|
|
const parseDropData = function(drop_data,attributes,sections,casc){
|
|
k.debug('parsing drop data');
|
|
k.debug({drop_data:`"${drop_data}"`});
|
|
try{
|
|
let data = JSON.parse(drop_data);
|
|
data = Object.entries(data)
|
|
.reduce((memo,[key,val])=>{
|
|
if(val){
|
|
if(typeof val === 'string' && val.startsWith('[{')){
|
|
val = JSON.parse(val);
|
|
}
|
|
memo[key] = val;
|
|
}
|
|
return memo;
|
|
},{});
|
|
return processSpecialCategories(data,attributes,sections,casc);
|
|
}catch(err){
|
|
k.debug({'Invalid Drop Data! Drop aborted. Error:':err,drop_data},true);
|
|
return false;
|
|
}
|
|
};
|
|
|
|
const clearSheet = function(attributes,sections,casc){
|
|
Object.entries(sections).forEach(([section,idArray])=>{
|
|
idArray.forEach((id)=>{
|
|
k.removeRepeatingRow(`${section}_${id}`,attributes,sections);
|
|
});
|
|
});
|
|
Object.keys(attributes.attributes).forEach((attr)=>{
|
|
if(casc[`attr_${attr}`]){
|
|
attributes[attr] = casc[`attr_${attr}`].hasOwnProperty('defaultValue') ?
|
|
casc[`attr_${attr}`].defaultValue :
|
|
'';
|
|
}
|
|
})
|
|
};
|
|
|
|
const clearDropAttributes = function(){
|
|
k.setAttrs({drop_name:'',drop_data:''});
|
|
};
|
|
|
|
const processDropData = function({data, attributes, sections, casc,section=''}){
|
|
section = section ? `${section}_` : '';
|
|
const worker = async (queue) => {
|
|
let [key,val] = queue.shift();
|
|
try{
|
|
let setKey = key.replace(/^(?:data-)?cs(?:list)?-/,'');
|
|
if(typeof val === 'string' && val.startsWith('[{')){
|
|
val = JSON.parse(val);
|
|
}
|
|
if(!Array.isArray(val) && (key.startsWith('cs-') || key.startsWith('data-cs-'))){
|
|
await k.pseudoQuery();
|
|
attributes[`${section}${setKey}`] = val;
|
|
}else if(Array.isArray(val) && key.startsWith('data-')){
|
|
let lookupKey = key.replace(/data-(?:cs(?:list)?-)?/,'');
|
|
|
|
if(repeatProcessors[lookupKey]){
|
|
k.debug(`processing ${lookupKey}`);
|
|
await repeatProcessors[lookupKey](lookupKey,val,attributes,sections,casc);
|
|
}else if(key.startsWith('data-cslist-')){
|
|
await k.pseudoQuery();
|
|
attributes[`${section}${setKey}`] = val.map((o)=>o.name).join(', ');
|
|
}else if(key === 'data-content'){
|
|
await k.pseudoQuery();
|
|
attributes[`${section}description`] = parseContent(val);
|
|
}
|
|
}
|
|
}catch(err){
|
|
k.debug({[`Invalid JSON entered for ${key} on ${data.display_name}`]:err,JSON:val});
|
|
}
|
|
if(queue.length){
|
|
return worker(queue);
|
|
}else{
|
|
return true;
|
|
}
|
|
};
|
|
return worker(Object.entries(data));
|
|
};
|
|
|
|
const parseContent = (val) =>
|
|
val.reduce((textArr,content)=>{
|
|
if(content.heading){
|
|
textArr.push(content.heading);
|
|
}
|
|
if(content.content){
|
|
let text = /list/.test(content.type) ? `• ${content.content}` : content.content;
|
|
textArr.push(text);
|
|
}
|
|
return textArr;
|
|
},[]).join('\n')
|
|
.replace(/\n{2,}/,'\n')
|
|
.replace(/\n+$/,'');
|
|
|
|
const dropGenericSection = async function(lookupKey,arr,attributes,sections,casc){
|
|
await k.pseudoQuery();
|
|
k.debug(`dropping generic section for ${lookupKey}`);
|
|
if(!Array.isArray(arr)){
|
|
k.debug({'Invalid section details passed. Exiting. Object passed was:':arr},true);
|
|
return;
|
|
}
|
|
let type = (singular[lookupKey] || lookupKey).toLowerCase();
|
|
type = antagonistSpecialSections[type] || type;
|
|
k.debug({arr});
|
|
const worker = async (queue)=>{
|
|
let itemObj = queue.shift();
|
|
let section = k.generateRowID(type,sections);
|
|
itemObj[`cs-display_state`] = sectionDisplayNames[type];
|
|
if(itemObj[`cs-display_state`]){
|
|
if(itemObj[`cs-display_state`].startsWith('short-')){
|
|
itemObj['cs-collapse'] = 1;
|
|
}
|
|
if(/master/.test(itemObj[`cs-display_state`])){
|
|
let controlSection = k.generateRowID(type,sections,'ADD');
|
|
attributes[`${controlSection}_master_id`] = section.toLowerCase().replace(/repeating_[^_]+_/,'');
|
|
attributes[`${controlSection}_display_state`] = 'add-detail';
|
|
}
|
|
itemObj[`cs-rating_max`] = 1;
|
|
orderComplex({section:type,sections,attributes});
|
|
}
|
|
if(itemObj['data-cs-condition']){
|
|
itemObj['data-cs-condition'] = ['data-cs-condition','data-cs-condition_effect','data-cs-condition_momentum']
|
|
.map((attr)=>{
|
|
let c = itemObj[attr];
|
|
delete itemObj[attr];
|
|
return c;
|
|
})
|
|
.filter( c => c)
|
|
.join('\n');
|
|
}
|
|
await processDropData({data:itemObj,attributes,sections,casc,section});
|
|
if(queue.length){
|
|
return worker(queue);
|
|
}else{
|
|
return true;
|
|
}
|
|
};
|
|
return worker([...arr]);
|
|
};
|
|
|
|
const dropChildItem = async function(lookupKey,arr,attributes,sections,casc){
|
|
k.debug(`dropping childItem for ${lookupKey}`);
|
|
await k.pseudoQuery();
|
|
if(!Array.isArray(arr)){
|
|
k.debug({'Invalid section details passed. Exiting. Object passed was:':arr},true);
|
|
return;
|
|
}
|
|
const parentSections = {
|
|
Knacks:'calling',
|
|
Boons:'purview'
|
|
};
|
|
let type = singular[lookupKey].toLowerCase();
|
|
let section = `repeating_${parentSections[lookupKey]}`;
|
|
let queryText = `${getTranslationByKey(`${lookupKey} drop query`)}|`;
|
|
let queryOptions = sections[section]
|
|
.filter((id)=>attributes[`${section}_${id}_display_state`].endsWith('master'))
|
|
.map((id)=>`${attributes[`${section}_${id}_name`]
|
|
|| getTranslationByKey('unnamed')},${id}`);
|
|
let target = queryOptions.length > 1 ? undefined : queryOptions[0].replace(/^.+,([^_]+)$/,'$1');
|
|
let query = target ? undefined : `${queryText}|${queryOptions.join('|')}`;
|
|
const worker = async (queue,t) =>{
|
|
let itemObj = queue.shift();
|
|
target = await (target ? k.pseudoQuery(target) : k.extractQueryResult(query));
|
|
let row = k.generateRowID(parentSections[lookupKey],sections);
|
|
itemObj['cs-master_id'] = target;
|
|
itemObj['cs-collapse'] = 1;
|
|
itemObj[`cs-display_state`] = `short-${type}`;
|
|
await processDropData({data:itemObj,attributes,sections,casc,section:row});
|
|
orderComplex({section,sections,attributes});
|
|
if(queue.length){
|
|
return worker(queue);
|
|
}else{
|
|
return true;
|
|
}
|
|
};
|
|
await worker([...arr],target);
|
|
};
|
|
|
|
const dropEquipment = async function(lookupKey,arr,attributes,sections,casc){
|
|
k.debug(`dropping equipment for ${lookupKey}`);
|
|
await k.pseudoQuery();
|
|
if(!Array.isArray(arr)){
|
|
k.debug({'Invalid section details passed. Exiting. Object passed was:':arr},true);
|
|
return;
|
|
}
|
|
const worker = async (queue) =>{
|
|
let itemObj = queue.shift();
|
|
let type = itemObj['data-cs-type'];
|
|
itemObj['cs-collapse'] = 1;
|
|
itemObj[`cs-display_state`] = itemObj[`cs-display_state`] || `short-${type}`;
|
|
let section = `repeating_${itemObj['data-cs-type']}_${generateRowID()}`;
|
|
await processDropData({data:itemObj,attributes,sections,casc,section});
|
|
if(queue.length){
|
|
return worker(queue);
|
|
}else{
|
|
return true;
|
|
}
|
|
};
|
|
return await worker([...arr]);
|
|
};
|
|
|
|
const dropSkill = async function(lookupKey,arr,attributes,sections,casc){
|
|
k.debug(`dropping skill for ${lookupKey}`);
|
|
await k.pseudoQuery();
|
|
if(!Array.isArray(arr)){
|
|
k.debug({'Invalid section details passed. Exiting. Object passed was:':arr},true);
|
|
return;
|
|
}
|
|
const sectionDetails = systemDefaults['beneath-the-sea'].repeating_skill;
|
|
// Set up the base skill attributes
|
|
checkSectionContents(sectionDetails,'repeating_skill',sections,attributes);
|
|
const worker = async (queue) =>{
|
|
let itemObj = queue.shift();
|
|
itemObj['data-cs-name'] = itemObj['data-cs-name'].toLowerCase();
|
|
const rowID = sections.repeating_skill.find(id => attributes[`repeating_skill_${id}_name`] === itemObj['data-cs-name']) ||
|
|
generateRowID();
|
|
let section = `repeating_skill_${rowID}`;
|
|
await processDropData({data:itemObj,attributes,sections,casc,section});
|
|
if(queue.length){
|
|
return worker(queue);
|
|
}else{
|
|
return true;
|
|
}
|
|
};
|
|
return await worker([...arr]);
|
|
};const dropScionEquipment = async (lookupKey,arr,attributes,sections,casc) => {
|
|
await k.pseudoQuery();
|
|
k.debug(`dropping Equipment or Birthright secton for ${lookupKey}`);
|
|
if(!Array.isArray(arr)){
|
|
k.debug({'Invalid section details passed. Exiting. Object passed was:':arr},true);
|
|
return;
|
|
}
|
|
const birthRightTypes = ['relic','creature','follower','guide'];
|
|
|
|
arr.forEach(itemObj => {
|
|
const sectionName = birthRightTypes.includes(itemObj['data-cs-type']) ?
|
|
'birthright' :
|
|
'equipment';
|
|
|
|
const subType = sectionName === 'birthright' ?
|
|
itemObj['data-cs-type'] :
|
|
sectionName;
|
|
itemObj['cs-display_state'] = `short-${subType}`;
|
|
itemObj['data-cs-type'] = sectionName;
|
|
if(
|
|
itemObj['data-cs-dot_rating'] ||
|
|
itemObj['dot_rating']
|
|
){
|
|
itemObj['data-cs-rating'] = itemObj['data-cs-dot_rating'] ||
|
|
itemObj['dot_rating'];
|
|
delete itemObj['data-cs-dot_rating'];
|
|
delete itemObj['dot_rating'];
|
|
}
|
|
if(sectionName === 'birthright' && itemObj.unique_knack){
|
|
debugger;
|
|
itemObj['data-cs-knack'] = parseContent(itemObj.unique_knack);
|
|
}
|
|
});
|
|
debugger;
|
|
return dropEquipment(lookupKey,arr,attributes,sections,casc);
|
|
};/**
|
|
* Object containing the categories and which drop functions to call for each of them.
|
|
*/
|
|
const repeatProcessors = {
|
|
Paths:dropGenericSection,
|
|
Trademarks:dropGenericSection,
|
|
Stunts:dropGenericSection,
|
|
Tropes:dropGenericSection,
|
|
Qualities: dropGenericSection,
|
|
Flairs: dropGenericSection,
|
|
Extras: dropGenericSection,
|
|
Callings: dropGenericSection,
|
|
Knacks: dropChildItem,
|
|
Purviews: dropGenericSection,
|
|
'special-rules':dropGenericSection,
|
|
skill:dropSkill,
|
|
Equipment:dropScionEquipment
|
|
};/**
|
|
* Logic for adding the system specific subsections
|
|
*/
|
|
const addSystemSubSection = ({type,newID,section,attributes,sections}) => {
|
|
if(/birthright/.test(type)){
|
|
addBirthright(attributes,type,newID);
|
|
}else{
|
|
addChildSection(attributes,sections,section,newID,type,newID)
|
|
}
|
|
}
|
|
|
|
const addBirthright = function(attributes,type,newID){
|
|
type = type.replace(/birthright-/,'');
|
|
attributes[`repeating_birthright_${newID}_type`]=type;
|
|
attributes[`repeating_birthright_${newID}_display_state`]=type;
|
|
attributes[`repeating_birthright_${newID}_rating`]=1;
|
|
attributes.set();
|
|
};
|
|
|
|
const addDeed = function(system,attributes,sections){
|
|
let needed = systemDefaults[system].repeating_deed.values.find((deed)=>{
|
|
|
|
return sections.repeating_deed.every((id)=>{
|
|
return attributes[`repeating_deed_${id}_type`]!==deed || attributes[`repeating_deed_${id}_completed`]
|
|
});
|
|
}) || systemDefaults[system].repeating_deed.values[0];
|
|
let rowID = generateRowID();
|
|
let headIndex = sections.repeating_deed.indexOf('-completeheaderstyle');
|
|
headIndex = headIndex >= 0 ? headIndex : sections.repeating_deed.length;
|
|
sections.repeating_deed.splice(headIndex,0,rowID);
|
|
attributes.repeating_deed = sections.repeating_deed;
|
|
attributes[`repeating_deed_${rowID}_type`] = needed;
|
|
attributes[`repeating_deed_${rowID}_display_state`] = needed;
|
|
attributes.repeating_deed = sections.repeating_deed;
|
|
};
|
|
|
|
const addInjury = function(system,attributes,sections){
|
|
const injuryTracks = {
|
|
'scion-origin':attributes.stamina > 0 ? ['bruised','injured','maimed','taken out'] : ['bruised','maimed','taken out']
|
|
};
|
|
const injuryPositions = {
|
|
bruised:(attributes,sections)=>getBruiseIndex(attributes,sections),
|
|
injured:(attributes,sections)=>getInjuredIndex(attributes,sections),
|
|
maimed:(attributes,sections)=>getMaimedIndex(attributes,sections),
|
|
};
|
|
injuryTracks['scion-hero'] = injuryTracks['scion-origin'];
|
|
let newInjury = injuryTracks[system].find((injury)=>{
|
|
return sections.repeating_injury.every((id)=>{
|
|
|
|
return attributes[`repeating_injury_${id}_type`] !== injury
|
|
});
|
|
}) || 'bruised';
|
|
let newID = generateRowID();
|
|
let newRow = `repeating_injury_${newID}`;
|
|
attributes[`${newRow}_type`] = newInjury;
|
|
attributes[`${newRow}_display_state`] = `short-${newInjury}`;
|
|
attributes[`${newRow}_collapse`] = 1;
|
|
attributes[`${newRow}_name`] = ' ';
|
|
if(newInjury !== 'taken out'){
|
|
let index = injuryPositions[newInjury](attributes,sections);
|
|
sections.repeating_injury.splice(index,0,newID);
|
|
}else{
|
|
sections.repeating_injury.push(newID);
|
|
}
|
|
attributes.repeating_injury = sections.repeating_injury;
|
|
};
|
|
|
|
const getBruiseIndex = function(attributes,sections){
|
|
return _.range(sections.repeating_injury.length).find((index)=>{
|
|
return attributes[`repeating_injury_${sections.repeating_injury[index]}_type`]==='bruised';
|
|
}) || 0;
|
|
};
|
|
|
|
const getInjuredIndex = function(attributes,sections){
|
|
return _.range(sections.repeating_injury.length).find((index)=>{
|
|
return /injured|maimed|taken out/.test(attributes[`repeating_injury_${sections.repeating_injury[index]}_type`]);
|
|
}) || sections.repeating_injury.length - 1;
|
|
};
|
|
|
|
const getMaimedIndex = function(attributes,sections){
|
|
return _.range(sections.repeating_injury.length).find((index)=>{
|
|
return /maimed|taken out/.test(attributes[`repeating_injury_${sections.repeating_injury[index]}_type`]);
|
|
}) || sections.repeating_injury.length - 1;
|
|
};const sumActiveCallings = function({trigger,attributes,sections}){
|
|
const [section,rowID,field] = k.parseTriggerName(trigger.name);
|
|
const masterID = attributes[`${section}_${rowID}_master_id`] || rowID;
|
|
const knackCosts = {
|
|
mortal:1,
|
|
immortal:2
|
|
}
|
|
let knackIDs = sections[section].filter((id)=>attributes[`${section}_${id}_master_id`] === masterID);
|
|
let spent = knackIDs.reduce((m,id)=>{
|
|
return m+= attributes[`${section}_${id}_active`] * knackCosts[attributes[`${section}_${id}_level`]];
|
|
},0);
|
|
if(spent > attributes[`${section}_${masterID}_rating_max`]){
|
|
if(/active|level/.test(field)){
|
|
attributes[`${section}_${rowID}_active`] = 0;
|
|
}else{
|
|
//Clear all knacks if the calling's level has lowered below the currently used
|
|
knackIDs.forEach((id)=>{
|
|
attributes[`${section}_${id}_active`] = 0;
|
|
attributes[`${section}_${masterID}_rating`] = 0;
|
|
});
|
|
}
|
|
}else{
|
|
attributes[`${section}_${masterID}_rating`] = spent;
|
|
}
|
|
};
|
|
k.registerFuncs({sumActiveCallings});
|
|
|
|
const clashBasis = function({trigger,attributes,sections}){
|
|
|
|
let [section,rowID] = k.parseTriggerName(trigger.name);
|
|
let filterState = section ? (str)=>str===rowID : (str)=>str;
|
|
let queue = sections.repeating_calling.filter(id=>filterState(attributes[`repeating_calling_${id}_master_id`]) && /knack/.test(attributes[`repeating_calling_${id}_display_state`]));
|
|
queue.forEach((id)=>{
|
|
let masterID = attributes[`repeating_calling_${id}_master_id`];
|
|
if(attributes.system === 'scion-origin' || attributes[`repeating_calling_${masterID}_rating_max`] >= attributes.legend_max){
|
|
attributes[`repeating_calling_${id}_clash_stat_2`] = 'rating';
|
|
}else{
|
|
attributes[`repeating_calling_${id}_clash_stat_2`] = 'legend';
|
|
}
|
|
})
|
|
};
|
|
k.registerFuncs({clashBasis});
|
|
|
|
/**
|
|
* Shows supplement specific sections
|
|
* @param {object} trigger - The trigger that caused the function to be called
|
|
* @param {object} attributes - The attribute values of the character
|
|
* @param {object[]} sections - All the repeating section IDs
|
|
* @param {object} casc - Expanded cascade object
|
|
*/
|
|
const showSupplements = function({trigger,attributes,sections,casc}){
|
|
const showHide = Object.entries(supplements).reduce((obj,[attr,target]) => {
|
|
const key = attributes[attr] ?
|
|
'show' :
|
|
'hide';
|
|
obj[key].push(`.supplement-${target}`);
|
|
return obj;
|
|
},{show:[],hide:[]});
|
|
$20(showHide.show.join(' ')).removeClass('disable');
|
|
$20(showHide.hide.join(' ')).addClass('disable');
|
|
};
|
|
k.registerFuncs({showSupplements},{type:['opener']});const rollClash = async function(event){
|
|
k.getAllAttrs({
|
|
callback:async (attributes,sections)=>{
|
|
let [section,rowID,] = k.parseClickTrigger(event.triggerName);
|
|
const masterID = attributes[`${section}_${rowID}_master_id`];
|
|
let skillRef;
|
|
let attributeRef;
|
|
let skillName;
|
|
if(attributes[`${section}_${rowID}_clash_stat_2`] === 'select'){
|
|
return;
|
|
}
|
|
switch(attributes[`${section}_${rowID}_clash_stat_1`]){
|
|
case 'query':
|
|
skillRef = await buildQuery('skill query','repeating_skill',attributes,sections)
|
|
break;
|
|
case 'select':
|
|
skillRef = sections.repeating_skill.find((id)=>attributes[`repeating_skill_${id}_name`] === 'integrity');
|
|
skillRef = `repeating_skill_${skillRef}_rating`;
|
|
break;
|
|
default:
|
|
skillRef = sections.repeating_skill.find((id)=>attributes[`repeating_skill_${id}_name`] === attributes[`${section}_${rowID}_clash_stat_1`]);
|
|
if(!skillRef){
|
|
const attributeNames = systemDefaults[attributes.system].attributes;
|
|
k.debug({attributeNames});
|
|
skillRef = [...attributeNames,'legend'].find((attr)=>attr === attributes[`${section}_${rowID}_clash_stat_1`]);
|
|
skillName = `^{${skillRef}}`;
|
|
skillRef = skillRef === 'legend' ?
|
|
'legend_max' :
|
|
skillRef;
|
|
}else{
|
|
skillRef = `repeating_skill_${skillRef}_rating`;
|
|
}
|
|
break;
|
|
}
|
|
if(!skillRef){
|
|
return;
|
|
}
|
|
switch(attributes[`${section}_${rowID}_clash_stat_2`]){
|
|
case 'rating':
|
|
attributeRef = `${section}_${masterID}_rating_max`;
|
|
k.debug({attributeRef});
|
|
break;
|
|
case 'query':
|
|
debugger;
|
|
attributeRef = await buildQuery('attribute query',systemDefaults[attributes.system].clashStats,attributes,sections);
|
|
break;
|
|
default:
|
|
attributeRef = attributes[`${section}_${rowID}_clash_stat_2`]
|
|
break;
|
|
}
|
|
if(!attributeRef){
|
|
return;
|
|
}
|
|
skillName = skillName || `^{${attributes[skillRef.replace(/rating/,'name')]}}`;
|
|
let attributeName = attributeRef.startsWith('repeating') ? '^{rating}' : `^{${attributeRef}}`;
|
|
let skillPool = attributes[skillRef];
|
|
if(attributes[`${section}_${rowID}_clash_stat_2`] === 'rating' && attributes.legend_max > attributes[attributeRef]){
|
|
attributeRef = 'legend';
|
|
attributeName = '^{legend}';
|
|
}
|
|
let attributePool = attributeRef === 'legend' ? attributes[`${attributeRef}_max`] : attributes[attributeRef];
|
|
let [pool,addDice] = await assemblePool(skillPool,attributePool);
|
|
let enhancements = 0;
|
|
if(attributes.enhancement_query === 'on'){
|
|
enhancements = await k.extractQueryResult(getTranslationByKey('Do you have any enhancements'));
|
|
enhancements = k.value(enhancements);
|
|
}else{
|
|
await k.pseudoQuery('');
|
|
}
|
|
let [message,reusableMessage] = await assembleMessage(attributes,pool,skillName,attributeName,attributes[`${section}_${rowID}_name`],enhancements);
|
|
if(section === 'repeating_purview'){
|
|
const vsRef = `${section}_${rowID}_clash_stat`
|
|
let vsMessage = '';
|
|
if(attributes[`${vsRef}_1`] !== 'select'){
|
|
vsMessage += attributes[`${vsRef}_1`];
|
|
}
|
|
if(attributes[`${vsRef}_2`] !== 'select'){
|
|
vsMessage += ` & ${attributes[`${vsRef}_2`]}`
|
|
}
|
|
message += `{{vs=${vsMessage}}}`;
|
|
}
|
|
const confirmObject = {
|
|
skillName:/\^\{/.test(skillRef) ?
|
|
skillRef.replace(/\^\{|\}/g,'') :
|
|
`@{${skillRef}}`,
|
|
skillDice:skillPool,
|
|
attributeName:`@{${attributeRef}}`,
|
|
attributeDice:attributePool,
|
|
enhancements,
|
|
addDice
|
|
};
|
|
let confirm = await confirmRoll(attributes,confirmObject);
|
|
if(k.value(confirm)){
|
|
executeRoll(attributes,reusableMessage,message);
|
|
}
|
|
}
|
|
});
|
|
};
|
|
k.registerFuncs({rollClash});/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
//Update functions. These functions should be added to the updateHandlers object for iteration through by the updateSheet function.
|
|
const update1x01 = function({attributes,sections}){
|
|
attributes.defense = defenseCalc({attributes,sections});
|
|
attributes.movement_dice = movementCalc({attributes,sections});
|
|
};
|
|
k.registerFuncs({'1.01':update1x01},{type:['updater']});
|
|
</script>
|
|
|
|
|
|
|
|
|