mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 19:52:29 +00:00
2062 lines
70 KiB
HTML
2062 lines
70 KiB
HTML
|
|
<input class="section-control" type="hidden" name="attr_sheet_view" title="@{sheet_view}" value="settings"/>
|
|
<input type="hidden" name="attr_template_start" title="@{template_start}" value="@{whisper}&{template:supers} {{character_name=@{character_name}}} {{character_id=@{character_id}}}"/>
|
|
<input type="hidden" name="attr_version"/>
|
|
<input type="hidden" name="attr_initiative_macro" value="@{template_start} {{name=Initiative check}} {{result=[[[[@{initiative}@{modifier_query}]]d6 &{tracker}]]}}"/>
|
|
<div class="main">
|
|
<nav class="sheet-nav toggle">
|
|
<button class="toggle__tab--character toggle__tab" type="action" name="act_nav-character" title="Open the character page" value="character">Character</button>
|
|
<button class="toggle__tab--mook toggle__tab inactive" type="action" name="act_nav-mook" title="Open the mook page" value="mook">Mook/Hazard</button>
|
|
<button class="toggle__tab--vehicle toggle__tab inactive" type="action" name="act_nav-vehicle" title="Open the vehicle page" value="vehicle">Vehicle</button>
|
|
<button class="toggle__tab--headquarters toggle__tab inactive" type="action" name="act_nav-headquarters" title="Open the headquarters page" value="headquarters">Base of Operations</button>
|
|
<button class="toggle__tab--settings toggle__tab active" type="action" name="act_nav-settings" title="Open the settings page" style="font-family:pictos">y</button>
|
|
</nav>
|
|
<div class="section logo"></div>
|
|
<div class="section version">
|
|
<h5>Sheet Version</h5><span name="attr_version"></span>
|
|
</div>
|
|
<div class="sheet-nav automation">
|
|
<label class="input-label">
|
|
<h4>Success Automation</h4>
|
|
<select name="attr_automation">
|
|
<option value="off" selected="">Off</option>
|
|
<option value="non-combat">Non-combat</option>
|
|
<option value="offense">Offense</option>
|
|
<option value="defense">Defense</option>
|
|
<option value="query">Query</option>
|
|
</select>
|
|
</label>
|
|
<label class="input-label">
|
|
<h4>Roll Modifiers</h4>
|
|
<select name="attr_modifier_query">
|
|
<option value="+[[0?{+/- d6 Modifier|0}]]" selected="">On</option>
|
|
<option value=" ">Off</option>
|
|
</select>
|
|
</label>
|
|
</div>
|
|
<section class="section name character active">
|
|
<label class="input-label">
|
|
<h6>Hero Name</h6>
|
|
<input class="bold" type="text" name="attr_character_name" title="@{character_name}"/>
|
|
</label>
|
|
<label class="input-label">
|
|
<h6>Real Name</h6>
|
|
<input class="bold" type="text" name="attr_real_name" title="@{real_name}"/>
|
|
</label>
|
|
</section>
|
|
<section class="section name mook vehicle headquarters">
|
|
<label class="input-label">
|
|
<h6>Name</h6>
|
|
<input class="bold" type="text" name="attr_character_name" title="@{character_name}"/>
|
|
</label>
|
|
<label class="input-label description">
|
|
<h6>Description</h6>
|
|
<input class="bold" type="text" name="attr_character_description" title="@{character_description}"/>
|
|
</label>
|
|
</section>
|
|
<section class="settings active" id="settings">
|
|
<label class="input-label whisper">
|
|
<h6>Whisper to GM</h6>
|
|
<select class="boxed" name="attr_whisper">
|
|
<option value="" selected="">Never</option>
|
|
<option value="/w gm ">Always</option>
|
|
</select>
|
|
<label class="input-label sheet-type">
|
|
<h6>Character is a</h6>
|
|
<select name="attr_sheet_type">
|
|
<option value="character" selected="">Character</option>
|
|
<option value="mook">Mook</option>
|
|
<option value="vehicle">Vehicle</option>
|
|
<option value="headquarters">Headquarters</option>
|
|
</select>
|
|
</label>
|
|
</label>
|
|
</section>
|
|
<section class="character" id="character">
|
|
<div class="section resistances border">
|
|
<div class="flex-row">
|
|
<h2>RESISTANCES</h2>
|
|
</div>
|
|
<div class="res-grid">
|
|
<div></div><span class="bold">MAX</span><span class="bold">Current</span>
|
|
<div></div><span class="small">Notes</span>
|
|
<div><span class="resistance bold"> COMPOSURE </span></div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_composure_max" title="@{composure_max}"/>
|
|
</div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_composure" title="@{composure}"/>
|
|
</div>
|
|
<div>
|
|
<button class="d6" type="action" name="act_compute-composure"></button>
|
|
</div>
|
|
<div>
|
|
<input class="notes" type="text" name="attr_composurenotes" title="@{composurenotes}"/>
|
|
</div>
|
|
<div><span class="resistance bold"> FORTITUDE</span></div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_fortitude_max" title="@{fortitude_max}"/>
|
|
</div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_fortitude" title="@{fortitude}"/>
|
|
</div>
|
|
<div>
|
|
<button class="d6" type="action" name="act_compute-fortitude"></button>
|
|
</div>
|
|
<div>
|
|
<input class="notes" type="text" name="attr_fortitudenotes" title="@{fortitudenotes}"/>
|
|
</div>
|
|
<div><span class="resistance bold"> REACTION</span></div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_reaction_max" title="@{reaction_max}"/>
|
|
</div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_reaction" title="@{reaction}"/>
|
|
</div>
|
|
<div>
|
|
<button class="d6" type="action" name="act_compute-reaction"></button>
|
|
</div>
|
|
<div>
|
|
<input class="notes" type="text" name="attr_reactionnotes" title="@{reactionnotes}"/>
|
|
</div>
|
|
<div><span class="resistance bold"> WILL</span></div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_will_max" title="@{will_max}"/>
|
|
</div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_will" title="@{will}"/>
|
|
</div>
|
|
<div>
|
|
<button class="d6" type="action" name="act_compute-will"></button>
|
|
</div>
|
|
<div>
|
|
<input class="notes" type="text" name="attr_willnotes" title="@{willnotes}"/>
|
|
</div>
|
|
</div>
|
|
<div class="flex-row">
|
|
<h2>INITIATIVE</h2>
|
|
</div>
|
|
<div class="initiative">
|
|
<input class="ref bold" type="number" name="attr_initiative" title="@{initiative}"/>
|
|
<button class="d6" name="roll_init" title="%{init}" type="roll" value="@{initiative_macro}"></button>
|
|
</div>
|
|
</div>
|
|
<div class="section aptitudes border">
|
|
<h2>APTITUDES</h2>
|
|
<label class="aptitudes">
|
|
<fieldset class="repeating_aptitudes">
|
|
<input class="medium bold" type="text" name="attr_aptitudename" title="@{repeating_aptitudes_$X_aptitudename}"/>
|
|
<input class="ref bold" type="number" name="attr_aptitude" title="@{repeating_aptitudes_$X_aptitude}"/>
|
|
<button class="d6" type="action" name="act_compute-aptitude"></button>
|
|
<input class="longap" type="text" name="attr_aptitudenotes" title="@{aptitudenotes}"/>
|
|
</fieldset>
|
|
</label>
|
|
</div>
|
|
<div class="section advantages border">
|
|
<h2>ADVANTAGES</h2>
|
|
<fieldset class="repeating_advantages">
|
|
<input class="mediumadv bold" type="text" name="attr_advantage" title="@{repeating_advantages_$X_advantage}"/>
|
|
<input class="bold ref" name="attr_advantage-rank" title="@{repeating_advantages_$X_advantage-rank}" type="number" value="1"/>
|
|
<input class="notes" type="text" name="attr_advantagenotes" title="@{repeating_advantages_$X_advantagenotes}"/>
|
|
</fieldset>
|
|
</div>
|
|
<div class="section disadvantages border">
|
|
<h2>DISADVANTAGES</h2>
|
|
<fieldset class="repeating_disadvantages">
|
|
<input class="mediumdis bold" type="text" name="attr_disadvantage" title="@{repeating_disadvantages_$X_disadvantage}"/>
|
|
<input class="bold ref" name="attr_disadvantage-rank" title="@{repeating_disadvantages_$X_disadvantage-rank}" type="number" value="1"/>
|
|
<input class="notes" type="text" name="attr_disadvantagenotes" title="@{repeating_disadvantages_$X_disadvantagenotes}"/>
|
|
</fieldset>
|
|
</div>
|
|
<div class="section powers border">
|
|
<h2>POWERS</h2>
|
|
<label class="powers">
|
|
<fieldset class="repeating_powers">
|
|
<input class="mediumpow bold" type="text" name="attr_powername" title="@{repeating_powers_$X_powername}"/>
|
|
<input class="ref bold" type="number" name="attr_power" title="@{repeating_powers_$X_power}"/>
|
|
<button class="d6" type="action" name="act_compute-power"></button>
|
|
<input class="longpow" type="text" name="attr_powernotes" title="@{repeating_powers_$X_powernotes}"/>
|
|
</fieldset>
|
|
</label>
|
|
</div>
|
|
<div class="section tracker"><span>Use Alternative tracker</span>
|
|
<input class="tracker-switch" type="checkbox" name="attr_tracker_switch" title="@{tracker_switch}" value="1"/>
|
|
<table class="def-tracker border">
|
|
<tr>
|
|
<th colspan="10">
|
|
<h5 class="cell-display">Success Track</h5>
|
|
</th>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">1</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">7</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">13</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">19</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">25</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">31</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">37</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">43</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">49</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">55</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">2</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">8</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">14</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">20</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">26</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">32</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">38</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">44</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">50</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">56</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">3</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">9</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">15</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">21</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">27</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">33</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">39</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">45</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">51</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">57</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">4</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">10</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">16</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">22</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">28</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">34</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">40</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">46</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">52</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">58</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">5</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">11</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">17</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">23</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">29</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">35</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">41</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">47</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">53</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">59</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">6</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">12</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">18</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">24</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">30</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">36</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">42</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">48</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">54</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">60</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table class="alt-tracker border">
|
|
<tr>
|
|
<th>
|
|
<h5 class="cell-display">Range of Success</h5>
|
|
</th>
|
|
<th>
|
|
<h5 class="cell-display">Damage/Effect</h5>
|
|
</th>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">0 - 5</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">1d6 / 1</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">6 - 11</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">2d6 / 2</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">12 - 17</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">3d6 / 3</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">18 - 23</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">4d6 / 4</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">24 - 29</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">5d6 / 5</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">30 - 35</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">6d6 / 6</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="section comp-dice flex-down flex-center border">
|
|
<h2>COMPETENCY DICE</h2><br/><br/>
|
|
<div><span class="bold">Competency Dice:</span>
|
|
<input class="bold ref" type="number" name="attr_comp" title="@{comp}"/>/
|
|
<input class="bold ref" type="number" name="attr_comp_max" title="@{comp_max}"/>
|
|
</div>
|
|
<div><span class="bold">Temp Comp Dice:</span>
|
|
<input class="bold ref" type="number" name="attr_temp_comp" title="@{temp_comp}"/>/
|
|
<input class="bold ref" type="number" name="attr_temp_comp_max" title="@{temp_comp_max}"/>
|
|
</div>
|
|
</div>
|
|
<div class="section cost border">
|
|
<label><span class="bold">RESISTANCES</span>
|
|
<input class="bold ref bold" type="number" name="attr_resist-cost" title="@{resist-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">+</span><span class="bold">APTITUDES </span>
|
|
<input class="bold ref bold" type="number" name="attr_apt-cost" title="@{apt-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">+</span><span class="bold">POWERS</span>
|
|
<input class="bold ref bold" type="number" name="attr_power-cost" title="@{power-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">+</span><span class="bold">ADVANTAGES</span>
|
|
<input class="bold ref bold" type="number" name="attr_adv-cost" title="@{adv-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">-</span><span class="bold">DISADVANTAGES</span>
|
|
<input class="bold ref bold" type="number" name="attr_disadv-cost" title="@{disadv-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">=</span><span class="bold total">TOTAL COST</span>
|
|
<input class="bold ref total-value ref bold" type="number" name="attr_cost" title="@{cost}" value="@{resist-cost}+@{apt-cost}+@{power-cost}+@{adv-cost}-@{disadv-cost}" disabled="true"/>
|
|
</label>
|
|
</div>
|
|
</section>
|
|
<section class="mook" id="mook">
|
|
<div class="section rating border">
|
|
<h2>RATING</h2>
|
|
<button class="rating d6" type="action" name="act_compute-rating"></button>
|
|
<label class="input-label stacked over max"><span class="bold">MAX</span>
|
|
<input class="ref bold boxed" type="number" name="attr_rating_max" title="@{rating_max}" value="0"/>
|
|
</label>
|
|
<label class="input-label stacked over current"><span class="bold">CURRENT</span>
|
|
<input class="ref bold boxed" type="number" name="attr_rating" title="@{rating}" value="0"/>
|
|
</label>
|
|
<label class="input-label stacked over initiative">
|
|
<h2>INITIATIVE</h2>
|
|
<input class="ref bold boxed" type="number" name="attr_initiative" title="@{initiative}" value="0"/>
|
|
<button class="initiative-button d6" name="roll_init" title="%{init}" type="roll" value="@{initiative_macro}"></button>
|
|
</label>
|
|
</div>
|
|
<div class="section qualities border">
|
|
<h2>QUALITIES</h2>
|
|
<fieldset class="repeating_quality">
|
|
<input class="bold" type="text" name="attr_name" title="@{name}"/>
|
|
<input class="bold" type="text" name="attr_description" title="@{description}"/>
|
|
</fieldset>
|
|
</div>
|
|
<div class="section exceptional border">
|
|
<h2>EXCEPTIONAL QUALITIES</h2>
|
|
<fieldset class="repeating_exceptional">
|
|
<input class="bold" type="text" name="attr_exceptionalname" title="@{exceptionalname}"/>
|
|
<input class="ref bold" type="number" name="attr_exceptional" title="@{exceptional}" value="0"/>
|
|
<button class="d6" type="action" name="act_compute-exceptional"></button>
|
|
<input class="bold" type="text" name="attr_description" title="@{exceptionalnotes}"/>
|
|
</fieldset>
|
|
</div>
|
|
<div class="section tracker"><span>Use Alternative tracker</span>
|
|
<input class="tracker-switch" type="checkbox" name="attr_tracker_switch" title="@{tracker_switch}" value="1"/>
|
|
<table class="def-tracker border">
|
|
<tr>
|
|
<th colspan="10">
|
|
<h5 class="cell-display">Success Track</h5>
|
|
</th>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">1</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">7</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">13</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">19</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">25</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">31</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">37</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">43</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">49</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">55</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">2</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">8</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">14</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">20</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">26</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">32</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">38</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">44</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">50</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">56</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">3</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">9</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">15</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">21</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">27</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">33</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">39</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">45</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">51</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">57</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">4</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">10</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">16</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">22</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">28</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">34</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">40</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">46</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">52</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">58</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">5</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">11</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">17</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">23</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">29</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">35</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">41</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">47</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">53</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">59</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">6</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">12</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">18</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">24</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">30</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">36</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">42</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">48</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">54</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">60</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table class="alt-tracker border">
|
|
<tr>
|
|
<th>
|
|
<h5 class="cell-display">Range of Success</h5>
|
|
</th>
|
|
<th>
|
|
<h5 class="cell-display">Damage/Effect</h5>
|
|
</th>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">0 - 5</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">1d6 / 1</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">6 - 11</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">2d6 / 2</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">12 - 17</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">3d6 / 3</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">18 - 23</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">4d6 / 4</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">24 - 29</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">5d6 / 5</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">30 - 35</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">6d6 / 6</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
<section class="vehicle" id="vehicle">
|
|
<div class="section resistances border">
|
|
<div class="flex-row">
|
|
<h2>RESISTANCES</h2>
|
|
</div>
|
|
<div class="res-grid">
|
|
<div></div><span class="bold">MAX</span><span class="bold">Current</span>
|
|
<div></div><span class="small">Notes</span>
|
|
<div><span class="resistance bold"> COMPOSURE </span></div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_composure_max" title="@{composure_max}"/>
|
|
</div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_composure" title="@{composure}"/>
|
|
</div>
|
|
<div>
|
|
<button class="d6" type="action" name="act_compute-composure"></button>
|
|
</div>
|
|
<div>
|
|
<input class="notes" type="text" name="attr_composurenotes" title="@{composurenotes}"/>
|
|
</div>
|
|
<div><span class="resistance bold"> FORTITUDE</span></div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_fortitude_max" title="@{fortitude_max}"/>
|
|
</div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_fortitude" title="@{fortitude}"/>
|
|
</div>
|
|
<div>
|
|
<button class="d6" type="action" name="act_compute-fortitude"></button>
|
|
</div>
|
|
<div>
|
|
<input class="notes" type="text" name="attr_fortitudenotes" title="@{fortitudenotes}"/>
|
|
</div>
|
|
<div><span class="resistance bold"> REACTION</span></div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_reaction_max" title="@{reaction_max}"/>
|
|
</div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_reaction" title="@{reaction}"/>
|
|
</div>
|
|
<div>
|
|
<button class="d6" type="action" name="act_compute-reaction"></button>
|
|
</div>
|
|
<div>
|
|
<input class="notes" type="text" name="attr_reactionnotes" title="@{reactionnotes}"/>
|
|
</div>
|
|
<div><span class="resistance bold"> WILL</span></div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_will_max" title="@{will_max}"/>
|
|
</div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_will" title="@{will}"/>
|
|
</div>
|
|
<div>
|
|
<button class="d6" type="action" name="act_compute-will"></button>
|
|
</div>
|
|
<div>
|
|
<input class="notes" type="text" name="attr_willnotes" title="@{willnotes}"/>
|
|
</div>
|
|
</div>
|
|
<div class="flex-row">
|
|
<h2>INITIATIVE</h2>
|
|
</div>
|
|
<div class="initiative">
|
|
<input class="ref bold" type="number" name="attr_initiative" title="@{initiative}"/>
|
|
<button class="d6" name="roll_init" title="%{init}" type="roll" value="@{initiative_macro}"></button>
|
|
</div>
|
|
</div>
|
|
<div class="section aptitudes border">
|
|
<h2>APTITUDES</h2>
|
|
<label class="aptitudes">
|
|
<fieldset class="repeating_aptitudes">
|
|
<input class="medium bold" type="text" name="attr_aptitudename" title="@{repeating_aptitudes_$X_aptitudename}"/>
|
|
<input class="ref bold" type="number" name="attr_aptitude" title="@{repeating_aptitudes_$X_aptitude}"/>
|
|
<button class="d6" type="action" name="act_compute-aptitude"></button>
|
|
<input class="longap" type="text" name="attr_aptitudenotes" title="@{aptitudenotes}"/>
|
|
</fieldset>
|
|
</label>
|
|
</div>
|
|
<div class="section advantages border">
|
|
<h2>ADVANTAGES</h2>
|
|
<fieldset class="repeating_advantages">
|
|
<input class="mediumadv bold" type="text" name="attr_advantage" title="@{repeating_advantages_$X_advantage}"/>
|
|
<input class="bold ref" name="attr_advantage-rank" title="@{repeating_advantages_$X_advantage-rank}" type="number" value="1"/>
|
|
<input class="notes" type="text" name="attr_advantagenotes" title="@{repeating_advantages_$X_advantagenotes}"/>
|
|
</fieldset>
|
|
</div>
|
|
<div class="section disadvantages border">
|
|
<h2>DISADVANTAGES</h2>
|
|
<fieldset class="repeating_disadvantages">
|
|
<input class="mediumdis bold" type="text" name="attr_disadvantage" title="@{repeating_disadvantages_$X_disadvantage}"/>
|
|
<input class="bold ref" name="attr_disadvantage-rank" title="@{repeating_disadvantages_$X_disadvantage-rank}" type="number" value="1"/>
|
|
<input class="notes" type="text" name="attr_disadvantagenotes" title="@{repeating_disadvantages_$X_disadvantagenotes}"/>
|
|
</fieldset>
|
|
</div>
|
|
<div class="section powers border">
|
|
<h2>POWERS</h2>
|
|
<label class="powers">
|
|
<fieldset class="repeating_powers">
|
|
<input class="mediumpow bold" type="text" name="attr_powername" title="@{repeating_powers_$X_powername}"/>
|
|
<input class="ref bold" type="number" name="attr_power" title="@{repeating_powers_$X_power}"/>
|
|
<button class="d6" type="action" name="act_compute-power"></button>
|
|
<input class="longpow" type="text" name="attr_powernotes" title="@{repeating_powers_$X_powernotes}"/>
|
|
</fieldset>
|
|
</label>
|
|
</div>
|
|
<div class="section tracker"><span>Use Alternative tracker</span>
|
|
<input class="tracker-switch" type="checkbox" name="attr_tracker_switch" title="@{tracker_switch}" value="1"/>
|
|
<table class="def-tracker border">
|
|
<tr>
|
|
<th colspan="10">
|
|
<h5 class="cell-display">Success Track</h5>
|
|
</th>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">1</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">7</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">13</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">19</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">25</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">31</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">37</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">43</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">49</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">55</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">2</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">8</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">14</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">20</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">26</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">32</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">38</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">44</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">50</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">56</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">3</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">9</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">15</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">21</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">27</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">33</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">39</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">45</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">51</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">57</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">4</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">10</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">16</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">22</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">28</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">34</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">40</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">46</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">52</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">58</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">5</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">11</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">17</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">23</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">29</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">35</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">41</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">47</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">53</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">59</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">6</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">12</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">18</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">24</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">30</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">36</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">42</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">48</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">54</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">60</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table class="alt-tracker border">
|
|
<tr>
|
|
<th>
|
|
<h5 class="cell-display">Range of Success</h5>
|
|
</th>
|
|
<th>
|
|
<h5 class="cell-display">Damage/Effect</h5>
|
|
</th>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">0 - 5</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">1d6 / 1</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">6 - 11</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">2d6 / 2</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">12 - 17</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">3d6 / 3</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">18 - 23</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">4d6 / 4</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">24 - 29</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">5d6 / 5</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">30 - 35</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">6d6 / 6</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="section cost border">
|
|
<label><span class="bold">RESISTANCES</span>
|
|
<input class="bold ref bold" type="number" name="attr_resist-cost" title="@{resist-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">+</span><span class="bold">APTITUDES </span>
|
|
<input class="bold ref bold" type="number" name="attr_apt-cost" title="@{apt-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">+</span><span class="bold">POWERS</span>
|
|
<input class="bold ref bold" type="number" name="attr_power-cost" title="@{power-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">+</span><span class="bold">ADVANTAGES</span>
|
|
<input class="bold ref bold" type="number" name="attr_adv-cost" title="@{adv-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">-</span><span class="bold">DISADVANTAGES</span>
|
|
<input class="bold ref bold" type="number" name="attr_disadv-cost" title="@{disadv-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">=</span><span class="bold total">TOTAL COST</span>
|
|
<input class="bold ref total-value ref bold" type="number" name="attr_cost" title="@{cost}" value="@{resist-cost}+@{apt-cost}+@{power-cost}+@{adv-cost}-@{disadv-cost}" disabled="true"/>
|
|
</label>
|
|
</div>
|
|
</section>
|
|
<section class="headquarters" id="headquarters">
|
|
<div class="section resistances border">
|
|
<div class="flex-row">
|
|
<h2>BASE STATISTICS</h2>
|
|
</div>
|
|
<div class="res-grid">
|
|
<div></div><span class="bold">MAX</span><span class="bold">Current</span>
|
|
<div></div><span class="small">Notes</span>
|
|
<div><span class="resistance bold"> MATERIAL </span></div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_material_strength_max" title="@{material_strength_max}"/>
|
|
</div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_material_strength" title="@{material_strength}"/>
|
|
</div>
|
|
<div>
|
|
<button class="d6" type="action" name="act_compute-material-strength"></button>
|
|
</div>
|
|
<div>
|
|
<input class="notes" type="text" name="attr_material_strengthnotes" title="@{material_strengthnotes}"/>
|
|
</div>
|
|
<div><span class="resistance bold"> SECURITY</span></div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_security_max" title="@{security_max}"/>
|
|
</div>
|
|
<div>
|
|
<input class="ref bold" type="number" name="attr_security" title="@{security}"/>
|
|
</div>
|
|
<div>
|
|
<button class="d6" type="action" name="act_compute-security"></button>
|
|
</div>
|
|
<div>
|
|
<input class="notes" type="text" name="attr_securitynotes" title="@{securitynotes}"/>
|
|
</div>
|
|
</div>
|
|
<div class="flex-row">
|
|
<h2>INITIATIVE</h2>
|
|
</div>
|
|
<div class="initiative">
|
|
<input class="ref bold" type="number" name="attr_initiative" title="@{initiative}"/>
|
|
<button class="d6" name="roll_init" title="%{init}" type="roll" value="@{initiative_macro}"></button>
|
|
</div>
|
|
</div>
|
|
<div class="section aptitudes border">
|
|
<h2>APTITUDES</h2>
|
|
<label class="aptitudes">
|
|
<fieldset class="repeating_aptitudes">
|
|
<input class="medium bold" type="text" name="attr_aptitudename" title="@{repeating_aptitudes_$X_aptitudename}"/>
|
|
<input class="ref bold" type="number" name="attr_aptitude" title="@{repeating_aptitudes_$X_aptitude}"/>
|
|
<button class="d6" type="action" name="act_compute-aptitude"></button>
|
|
<input class="longap" type="text" name="attr_aptitudenotes" title="@{aptitudenotes}"/>
|
|
</fieldset>
|
|
</label>
|
|
</div>
|
|
<div class="section advantages border">
|
|
<h2>ADVANTAGES</h2>
|
|
<fieldset class="repeating_advantages">
|
|
<input class="mediumadv bold" type="text" name="attr_advantage" title="@{repeating_advantages_$X_advantage}"/>
|
|
<input class="bold ref" name="attr_advantage-rank" title="@{repeating_advantages_$X_advantage-rank}" type="number" value="1"/>
|
|
<input class="notes" type="text" name="attr_advantagenotes" title="@{repeating_advantages_$X_advantagenotes}"/>
|
|
</fieldset>
|
|
</div>
|
|
<div class="section disadvantages border">
|
|
<h2>DISADVANTAGES</h2>
|
|
<fieldset class="repeating_disadvantages">
|
|
<input class="mediumdis bold" type="text" name="attr_disadvantage" title="@{repeating_disadvantages_$X_disadvantage}"/>
|
|
<input class="bold ref" name="attr_disadvantage-rank" title="@{repeating_disadvantages_$X_disadvantage-rank}" type="number" value="1"/>
|
|
<input class="notes" type="text" name="attr_disadvantagenotes" title="@{repeating_disadvantages_$X_disadvantagenotes}"/>
|
|
</fieldset>
|
|
</div>
|
|
<div class="section powers border">
|
|
<h2>POWERS</h2>
|
|
<label class="powers">
|
|
<fieldset class="repeating_powers">
|
|
<input class="mediumpow bold" type="text" name="attr_powername" title="@{repeating_powers_$X_powername}"/>
|
|
<input class="ref bold" type="number" name="attr_power" title="@{repeating_powers_$X_power}"/>
|
|
<button class="d6" type="action" name="act_compute-power"></button>
|
|
<input class="longpow" type="text" name="attr_powernotes" title="@{repeating_powers_$X_powernotes}"/>
|
|
</fieldset>
|
|
</label>
|
|
</div>
|
|
<div class="section tracker"><span>Use Alternative tracker</span>
|
|
<input class="tracker-switch" type="checkbox" name="attr_tracker_switch" title="@{tracker_switch}" value="1"/>
|
|
<table class="def-tracker border">
|
|
<tr>
|
|
<th colspan="10">
|
|
<h5 class="cell-display">Success Track</h5>
|
|
</th>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">1</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">7</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">13</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">19</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">25</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">31</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">37</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">43</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">49</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">55</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">2</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">8</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">14</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">20</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">26</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">32</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">38</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">44</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">50</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">56</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">3</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">9</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">15</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">21</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">27</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">33</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">39</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">45</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">51</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">57</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">4</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">10</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">16</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">22</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">28</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">34</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">40</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">46</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">52</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">58</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">5</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">11</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">17</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">23</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">29</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">35</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">41</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">47</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">53</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">59</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">6</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">12</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">18</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">24</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">30</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">36</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">42</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">48</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">54</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">60</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table class="alt-tracker border">
|
|
<tr>
|
|
<th>
|
|
<h5 class="cell-display">Range of Success</h5>
|
|
</th>
|
|
<th>
|
|
<h5 class="cell-display">Damage/Effect</h5>
|
|
</th>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">0 - 5</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">1d6 / 1</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">6 - 11</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">2d6 / 2</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">12 - 17</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">3d6 / 3</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">18 - 23</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">4d6 / 4</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">24 - 29</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">5d6 / 5</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="track-row">
|
|
<td>
|
|
<div class="cell-display">30 - 35</div>
|
|
</td>
|
|
<td>
|
|
<div class="cell-display">6d6 / 6</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="section cost border">
|
|
<label><span class="bold">RESISTANCES</span>
|
|
<input class="bold ref bold" type="number" name="attr_resist-cost" title="@{resist-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">+</span><span class="bold">APTITUDES </span>
|
|
<input class="bold ref bold" type="number" name="attr_apt-cost" title="@{apt-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">+</span><span class="bold">POWERS</span>
|
|
<input class="bold ref bold" type="number" name="attr_power-cost" title="@{power-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">+</span><span class="bold">ADVANTAGES</span>
|
|
<input class="bold ref bold" type="number" name="attr_adv-cost" title="@{adv-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">-</span><span class="bold">DISADVANTAGES</span>
|
|
<input class="bold ref bold" type="number" name="attr_disadv-cost" title="@{disadv-cost}" value="0"/>
|
|
</label>
|
|
<label><span class="arithmetic bold">=</span><span class="bold total">TOTAL COST</span>
|
|
<input class="bold ref total-value ref bold" type="number" name="attr_cost" title="@{cost}" value="@{resist-cost}+@{apt-cost}+@{power-cost}+@{adv-cost}-@{disadv-cost}" disabled="true"/>
|
|
</label>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
<rolltemplate class="sheet-rolltemplate-supers">
|
|
<div class="template-container">
|
|
<div class="header">{{#name}}
|
|
<h4>{{name}}</h4>{{/name}}
|
|
{{#character_name}}
|
|
{{#character_id}}
|
|
[{{character_name}}](http://-journal.roll20.net/character/{{character_id}})
|
|
{{/character_id}}{{^character_id}}
|
|
{{character_name}}
|
|
{{/character_id}}
|
|
{{/character_name}}
|
|
</div>{{#target}}
|
|
<div>
|
|
<h5>Result</h5>{{#target_label}}
|
|
<h5>{{target_label}}</h5>{{/target_label}}
|
|
{{^target_label}}
|
|
<h5>Target Number</h5>{{/target_label}}
|
|
</div>
|
|
<div><span>{{result}}</span><span>{{target}}</span></div>
|
|
<div><span class="successes">{{computed::result}}</span></div>{{/target}}
|
|
{{^target}}
|
|
{{#result}}
|
|
<div>
|
|
<h5>Result</h5><span>{{result}}</span>
|
|
</div>{{/result}}
|
|
{{/target}}
|
|
{{#allprops() result target character_name character_id damageRoll target_label}}
|
|
<div><span>{{key}}</span><span>{{value}}</span></div>{{/allprops() result target character_name character_id damageRoll target_label}}
|
|
</div>
|
|
</rolltemplate>
|
|
<script type="text/worker">
|
|
/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
// Variables
|
|
const sheetName = 'Supers! Revised Edition';
|
|
const version = 1.4;
|
|
let debugMode = false;
|
|
const rollButtons = [
|
|
//PC Buttons
|
|
'repeating_aptitudes:compute-aptitude','repeating_powers:compute-power','compute-composure','compute-fortitude','compute-reaction','compute-will','compute-aptitude','compute-power',
|
|
|
|
//Mook Buttons
|
|
'compute-rating','repeating_exceptional:compute-exceptional',
|
|
|
|
//HQ Buttons
|
|
'compute-material-strength','compute-security',
|
|
];
|
|
const sheetSections = ['character','mook','vehicle','headquarters','settings'];
|
|
const repeatingSectionDetails = [
|
|
{section:'repeating_aptitudes',fields:['compute-aptitude','aptitudename']},
|
|
{section:'repeating_powers',fields:['powernamename','power','powername','compute-power']},
|
|
{section:'repeating_exceptional',fields:['name','dice','compute-exceptional']},
|
|
{section:'repeating_hq-aptitudes',fields:['compute-aptitude','aptitudename']},
|
|
{section:'repeating_hq-powers',fields:['power','powername','compute-power']},
|
|
{section:'repeating_vehicle-aptitudes',fields:['compute-aptitude','aptitudename']},
|
|
{section:'repeating_vehicle-powers',fields:['power','powername','compute-power']},
|
|
];
|
|
const baseGet = [];/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
//# Attribute Obj Proxy handler
|
|
const createAttrProxy = function(attributes){
|
|
//creates a proxy for the attributes object so that values can be worked with more easily.
|
|
const attrTarget = {
|
|
updates:{},
|
|
attributes:{...attributes},
|
|
repOrders:{}
|
|
};
|
|
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 === 'set'){
|
|
return function(){
|
|
set(obj.updates,...arguments);
|
|
}
|
|
}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 = prop.replace(/(repeating_[^_]+_)[^_]+/,'$1\$x');
|
|
let numRetVal = +retValue;
|
|
if(!Number.isNaN(numRetVal)){
|
|
retValue = numRetVal;
|
|
}/*else if(cascades[cascRef] && (cascades[cascRef].type === 'number')){
|
|
retValue = cascades[cascRef].defaultValue || 0;
|
|
}*/
|
|
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{
|
|
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()];
|
|
});
|
|
}
|
|
};
|
|
return new Proxy(attrTarget,attrHandler);
|
|
};
|
|
|
|
const _setSectionOrder = function(section,order){
|
|
let trueSection = section.replace(/repeating_/,'');
|
|
setSectionOrder(trueSection,order);
|
|
};
|
|
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);
|
|
};
|
|
const _getAttrs = function({callback,props=baseGet}){
|
|
getAttrs(props,(values)=>{
|
|
const attributes = createAttrProxy(values);
|
|
callback(attributes);
|
|
});
|
|
};
|
|
const getAllAttrs = function({callback,props=baseGet,sectionDetails=repeatingSectionDetails}){
|
|
getSections(sectionDetails,(repeats,sections)=>{
|
|
getAttrs([...props,...repeats],(values)=>{
|
|
const attributes = createAttrProxy(values);
|
|
orderSections(attributes,sections);
|
|
//const casc = expandCascade(cascades,sections,attributes);
|
|
callback(attributes,sections/*,casc*/);
|
|
})
|
|
});
|
|
};
|
|
const getSections = function(section_details,callback){
|
|
let queueClone = _.clone(section_details);
|
|
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([],{});
|
|
}
|
|
worker(queueClone);
|
|
};
|
|
// Sets the attributes while always calling with {silent:true}
|
|
// Can be awaited to get the values returned from _setAttrs
|
|
const set = function(obj,vocal=false){
|
|
debug({'Setting Attributes':obj});
|
|
setAttrs(obj,{silent:!vocal});
|
|
};
|
|
//sanitizes text for use as a regex
|
|
sanitizeForRegex = function(text){
|
|
return text.replace(/\.|\||\(|\)|\[|\]|\-|\+|\?|\/|\{|\}|\^|\$|\*/g,'\\$&');
|
|
};
|
|
//converts a value to a number, it's default value, or 0
|
|
const value = function(val,def){
|
|
return (+val||def||0);
|
|
};
|
|
//extracts the section, rowID, and field name from a repeating attribute name
|
|
/*
|
|
e.g. repeating_equipment_-09Jhu89z_bulk would give:
|
|
section: equipment
|
|
rowID: -09Jhu89z
|
|
field: bulk
|
|
*/
|
|
const parseRepeatName = function(string){
|
|
let match = string.match(/(repeating_[^_]+)_([^_]+)(?:_(.+))?/);
|
|
match.shift();
|
|
return match;
|
|
};
|
|
|
|
const parseTriggerName = function(string){
|
|
let match = string.match(/(?:(repeating_[^_]+)_([^_]+)_)?(.+)/);
|
|
match.shift();
|
|
return match;
|
|
};
|
|
|
|
const parseClickTrigger = function(string){
|
|
let match = string.match(/clicked:(?:(repeating_[^_]+)_([^_]+)_)?(.+)/);
|
|
match.shift();
|
|
return match;
|
|
};
|
|
|
|
const parseHTMLName = function(string){
|
|
let match = string.match(/(?:attr|act|roll)_(.+)/);
|
|
match.shift();
|
|
return match[0];
|
|
};
|
|
|
|
const capitalize = function(string){
|
|
return string.replace(/(?:^|\s+|\/)[a-z]/ig,(letter)=>letter.toUpperCase());
|
|
};
|
|
|
|
const extractQueryResult = async function(query){
|
|
debug('entering extractQueryResult');
|
|
let queryRoll = await startRoll(`!{{query=[[0[response=?{${query}}]]]}}`);
|
|
finishRoll(queryRoll.rollId);
|
|
debug({queryRoll});
|
|
return queryRoll.results.query.expression.replace(/^.+?response=|\]$/g,'');
|
|
};
|
|
|
|
const pseudoQuery = async function(value){
|
|
debug('entering pseudoQuery');
|
|
let queryRoll = await startRoll(`!{{query=[[0[response=${value}]]]}}`);
|
|
finishRoll(queryRoll.rollId);
|
|
return queryRoll.results.query.expression.replace(/^.+?response=|\]$/g,'');
|
|
};
|
|
|
|
//# Utility Functions #
|
|
const log = function(msg){
|
|
if(typeof msg === 'string'){
|
|
console.log(`%c${sheetName} log| ${msg}`,"background-color:#159ccf");
|
|
}else if(typeof msg === 'object'){
|
|
Object.keys(msg).forEach((m)=>{
|
|
if(typeof msg[m] === 'string'){
|
|
console.log(`%c${sheetName} log| ${m}: ${msg[m]}`,"background-color:#159ccf");
|
|
}else{
|
|
console.log(`%c${sheetName} log| ${typeof msg[m]} ${m}`,"background-color:#159ccf");
|
|
console.table(msg[m]);
|
|
}
|
|
});
|
|
}
|
|
};
|
|
const debug = function(msg,force){
|
|
if(!debugMode && !force && version > 0) return;
|
|
if(typeof msg === 'string'){
|
|
console.log(`%c${sheetName} DEBUG| ${msg}`,"background-color:tan;color:red;");
|
|
}else if(typeof msg === 'object'){
|
|
Object.keys(msg).forEach((m)=>{
|
|
if(typeof msg[m] === 'string'){
|
|
console.log(`%c${sheetName} DEBUG| ${m}: ${msg[m]}`,"background-color:tan;color:red;");
|
|
}else{
|
|
console.log(`%c${sheetName} DEBUG| ${typeof msg[m]} ${m}`,"background-color:tan;color:red;font-weight:bold;");
|
|
console.table(msg[m]);
|
|
}
|
|
});
|
|
}
|
|
};
|
|
//Section ordering
|
|
//orders the section id arrays to match the repOrder attribute
|
|
const orderSections = function(attributes,sections){
|
|
Object.keys(sections).forEach((section)=>{
|
|
attributes.attributes[`_reporder_${section}`] = commaArray(attributes[`_reporder_${section}`]);
|
|
orderSection(attributes.attributes[`_reporder_${section}`],sections[section]);
|
|
});
|
|
};
|
|
//orders a single ID array
|
|
const orderSection = function(repOrder,IDs=[]){
|
|
IDs.sort((a,b)=>{
|
|
return repOrder.indexOf(a.toLowerCase()) - repOrder.indexOf(b.toLowerCase());
|
|
});
|
|
};
|
|
//splits a comma delimited string into an array
|
|
const commaArray = function(string=''){
|
|
return string.toLowerCase().split(/\s*,\s*/);
|
|
};
|
|
//Creates a row ID specific for an add section for pseudo nested repeating sections
|
|
const generateCustomID = function(string,rowID){
|
|
rowID = rowID || generateRowID();
|
|
let re = new RegExp(`^.{${string.length}}`);
|
|
return `${string}${rowID.replace(re,'')}`;
|
|
};
|
|
|
|
//Sheet Updaters and styling functions
|
|
const updateSheet = function(){
|
|
debug('updating sheet');
|
|
getAllAttrs({props:['sheet_version','debug_mode','collapsed',...baseGet],callback:(attributes,sections,casc)=>{
|
|
debugMode = !!attributes.debug_mode;
|
|
attributes.sheet_version = version;
|
|
if(!attributes.sheet_version){
|
|
initialSetup(attributes,sections);
|
|
}
|
|
log(`Sheet Update applied. Current Sheet Version ${version}`);
|
|
styleOnOpen(attributes,sections);
|
|
setActionCalls({},attributes,sections);
|
|
attributes.set();
|
|
log('Sheet ready for use');
|
|
}})
|
|
};
|
|
const initialSetup = function(attributes,sections){
|
|
debug('Initial sheet setup');
|
|
};
|
|
const styleOnOpen = function(attributes,sections){
|
|
navigateSheet({triggerName:`clicked:${attributes.sheet_state}`});
|
|
setupSystem({},attributes,sections);
|
|
};
|
|
|
|
/*
|
|
Cascade Expansion functions
|
|
*/
|
|
//Expands the repeating section templates in cascades to reflect the rows actually available
|
|
const expandCascade = function(cascade,sections,attributes){
|
|
return _.keys(cascade).reduce((memo,key)=>{//iterate through cascades and replace references to repeating attributes with correct row ids.
|
|
if(/^repeating/.test(key)){//If the attribute is a repeating attribute, do special logic
|
|
expandRepeating(memo,key,cascade,sections,attributes);
|
|
}else{//for non repeating attributes do this logic
|
|
expandNormal(memo,key,cascade,sections);
|
|
}
|
|
return memo;
|
|
},{});
|
|
};
|
|
|
|
const expandRepeating = function(memo,key,cascade,sections,attributes){
|
|
key.replace(/(repeating_[^_]+)_[^_]+?_(.+)/,(match,section,field)=>{
|
|
(sections[section]||[]).forEach((id)=>{
|
|
memo[`${section}_${id}_${field}`]=_.clone(cascade[key]);//clone the details so that each row's attributes have correct ids
|
|
memo[`${section}_${id}_${field}`].name = `${section}_${id}_${field}`;
|
|
memo[`${section}_${id}_${field}`].affects = memo[`${section}_${id}_${field}`].affects.reduce((m,affected)=>{
|
|
if(section === affected){//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]);
|
|
memo[key].affects = memo[key].affects.reduce((m,a)=>{
|
|
if(/^repeating/.test(a)){
|
|
addAllRows(a,m,sections);
|
|
}else{
|
|
m.push(a);
|
|
}
|
|
return m;
|
|
},[]);
|
|
};
|
|
|
|
const triggerFunctions = function(obj,attributes,sections){
|
|
debug(`triggering functions for ${obj.name}`);
|
|
obj.triggeredFuncs && obj.triggeredFuncs.forEach(func=>func(obj,attributes,sections));
|
|
};
|
|
|
|
const initialFunction = function(obj,attributes,sections){
|
|
debug(`initial functions for ${obj.name}`);
|
|
obj.initialFunc && obj.initialFunc(obj,attributes,sections);
|
|
};
|
|
|
|
const addAllRows = function(affected,memo,sections){
|
|
affected.replace(/(repeating_[^_]+?)_[^_]+?_(.+)/,(match,section,field)=>{
|
|
sections[section].forEach(id=>memo.push(`${section}_${id}_${field}`));
|
|
});
|
|
};
|
|
|
|
let clickDelay = 500;
|
|
const defaultThrottle = callback => _.throttle(callback,clickDelay,{trailing:false});
|
|
const isDieRoll = function(field){
|
|
return /(?:d(?:8|10|12)(?:Crit)?|exertion)/.test(field);
|
|
};/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
//Sheet navigation
|
|
const navigateSheet = function(event){
|
|
debug({event});
|
|
let [,target] = event.triggerName.match(/nav-([^\s]+)/);
|
|
setActiveSections(target);
|
|
set({sheet_view:target});
|
|
};
|
|
|
|
const setActiveSections = function(target){
|
|
debug({target});
|
|
sheetSections.forEach((section)=>{
|
|
let action = section === target ? 'addClass' : 'removeClass';
|
|
$20(`.toggle__tab--${section}`).removeClass('active');
|
|
$20(`section.${section}`).removeClass('active');
|
|
});
|
|
$20(`.toggle__tab--${target}`).addClass('active');
|
|
$20(`section.${target}`).addClass('active');
|
|
};
|
|
|
|
const displayButtons = function(event){
|
|
getAttrs(['sheet_type'],(attributes)=>{
|
|
let target = attributes.sheet_type;
|
|
debug({target});
|
|
sheetSections.forEach((section)=>{
|
|
if(section !== target && section !== 'settings'){
|
|
$20(`.toggle__tab--${section}`).addClass('inactive');
|
|
}
|
|
})
|
|
$20(`.toggle__tab--${target}`).removeClass('inactive') ;
|
|
});
|
|
};
|
|
|
|
const repNameDictionary = {
|
|
repeating_aptitudes:'aptitudename',
|
|
repeating_advantages:'advantages',
|
|
repeating_disadvantages:'disadvantages',
|
|
repeating_powers:'powername',
|
|
repeating_quality:'name',
|
|
repeating_exceptional:'exceptionalname',
|
|
};
|
|
|
|
const calculateSuccess = function(event){
|
|
let [section,rowID,attrName] = parseClickTrigger(event.triggerName);
|
|
attrName = attrName
|
|
.replace(/-/g,'_')
|
|
.replace(/compute_/,'')
|
|
let row = section ? `${section}_${rowID}` : undefined;
|
|
getAttrs(['automation'],async (attributes)=>{
|
|
let name;
|
|
let capName;
|
|
if(row){
|
|
name = `${row}_${attrName}`;
|
|
capName = `@{${row}_${repNameDictionary[section]}}`;
|
|
}else{
|
|
name = attrName;
|
|
capName = capitalize(name);
|
|
}
|
|
const computed = {};
|
|
let automateType = attributes.automation === 'query' ?
|
|
await extractQueryResult('What kind of roll|Non-combat,non-combat|Offense,offense|Defense,defense') :
|
|
await pseudoQuery(attributes.automation);
|
|
let automate = parseAutomation(automateType,capName);
|
|
capName = specifyActionType(automateType,capName);
|
|
let roll = `@{template_start} {{name=${capName} check}} {{result=[[ [[0@{${name}}@{modifier_query}]]d6${/aptitude/.test(row) ? 'kh3' : ''}]]}}${automate}`;
|
|
debug({roll});
|
|
const intermediate = await startRoll(roll);
|
|
let rollID = intermediate.rollId;
|
|
if(!/off/.test(automateType)){
|
|
computed.result = computeSuccess(automateType,intermediate.results);
|
|
let typeWord = automateType === 'defense' ? `d6 Damage` : ` Success${computed.result !== 1 ? 'es':''}`;
|
|
|
|
computed.result = `${computed.result}${typeWord}`;
|
|
}
|
|
finishRoll(rollID,computed);
|
|
});
|
|
};
|
|
|
|
const specifyActionType = function(automateType,capName){
|
|
return /(?:of|de)fense/.test(automateType) ? `${capitalize(automateType).replace(/e$/,'ive')} ${capName}` : capName;
|
|
};
|
|
|
|
const computeSuccess = function(automateType,results){
|
|
let result = automateType === 'defense' ? results.target.result - results.result.result : results.result.result - results.target.result;
|
|
debug({results,result})
|
|
if(result >= 0){
|
|
result = 1 + Math.floor((result)/6);
|
|
}else{
|
|
result = 0;
|
|
}
|
|
return result;
|
|
};
|
|
|
|
const parseAutomation = function(automate,capName){
|
|
let retValue = /off/.test(automate) ?
|
|
'' :
|
|
automate === 'defense' ?
|
|
` {{target_label=Attack Result}} {{target=[[0?{Attack Result|10}]]}}` :
|
|
` {{target=[[0?{${capName} Target Number|10}]]}}`;
|
|
return retValue;
|
|
};
|
|
|
|
const update1x3 = function(attributes,sections,setObj){
|
|
sections.repeating_powers.forEach((id)=>{
|
|
if(attributes[`repeating_powers_${id}_powernamename`]){
|
|
setObj[`repeating_powers_${id}_powername`] = attributes[`repeating_powers_${id}_powernamename`];
|
|
attributes[`repeating_powers_${id}_powername`] = setObj[`repeating_powers_${id}_powername`];
|
|
setObj[`repeating_powers_${id}_powernamename`] = '';
|
|
}
|
|
});
|
|
};
|
|
|
|
const update1x4 = function(attributes,setObj){
|
|
debug({modifier_query:attributes.modifier_query});
|
|
setObj.modifier_query = attributes.modifier_query.replace(/\}d6\]\]/,'}\]\]');
|
|
};
|
|
log('Sheet Booted Successfully');/*jshint esversion: 11, laxcomma:true, eqeqeq:true*/
|
|
/*jshint -W014,-W084,-W030,-W033*/
|
|
//Sheet listeners
|
|
rollButtons.forEach((button)=>{
|
|
on(`clicked:${button}`,calculateSuccess);
|
|
});
|
|
|
|
sheetSections.forEach((type)=>{
|
|
on(`clicked:nav-${type}`,navigateSheet);
|
|
});
|
|
|
|
on('change:sheet_type',displayButtons);
|
|
|
|
on('sheet:opened',()=>{
|
|
log('sheet opened');
|
|
getAllAttrs({props:['character_name','debug_mode','sheet_view','sheet_type','modifier_query','version'],callback:(attributes,sections)=>{
|
|
log(`Starting Sheet Version: ${attributes.version}`);
|
|
debugMode = value(attributes.debug_mode);
|
|
const setObj = {};
|
|
update1x3(attributes,sections,setObj);
|
|
if(+attributes.version < 1.4){
|
|
log('updating to 1.4');
|
|
update1x4(attributes,setObj);
|
|
}
|
|
setObj.version = version;
|
|
displayButtons(attributes.sheet_type);
|
|
setActiveSections(attributes.sheet_view);
|
|
set(setObj);
|
|
}});
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
|