Files
roll20-character-sheets/ButterflyAspect/ButterflyAspect.html
T
2024-07-01 18:38:59 +02:00

1668 lines
67 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div class="container">
<div class="float quarter head-logo">
<div class="logo">
<img class="logo" src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ButterflyAspect/logo.png" alt="ButterflyAspect" />
</div>
<div class="settings">
<select name="attr_gmroll">
<option value="0" selected disabled>Auswahl treffen</option>
<option value="nogm">Für alle sichtbar würfeln</option>
<option value="gm">Für GM würfeln</option>
</select>
<input type="hidden" name="attr_abilityroll" />
</div>
</div>
<div class="float threequarters head-info">
<div class="header">
<span>Allgemeines</span>
</div>
<div class="float head-info-boxes">
<div class="formular">
<label for="attr_character_name">Charaktername</label>
<input type="text" id="attr_character_name" name="attr_character_name" />
</div>
<div class="formular">
<label for="attr_character_description">Beschreibung</label>
<textarea id="attr_character_description" name="attr_character_description" style="height: 102px"></textarea>
</div>
</div>
</div>
<div class="break"></div>
<div class="float half status">
<div class="header">
<input class="options-flag" name="attr_options-flag-status" type="checkbox" title="Show/hide options" /><span>y</span>
<span>Status</span>
</div>
<input class="options-flag hidden" type="checkbox" name="attr_options-flag-status" />
<div class="hiddenBox">
<div class="settings">
<input type="checkbox" id="statusstress" name="attr_status_stress" value="1" />
<label for="statusstress">Stress</label>
<input type="checkbox" id="statusmana" name="attr_status_mana" value="1" />
<label for="statusmana">Mana</label>
</div>
</div>
<section class="repeat-wounds">
<div class="sheet-status-header">
Wunden
</div>
<div class="sheet-status-row wounds">
<input type="hidden" id="attr_usable_wounds" name="attr_Vi" value="2" />
<div class="statusbox wounds">
<input type="checkbox" value="None" id="attr_status_wounds_1" name="attr_status_wounds_1" />
<label for="attr_status_wounds_1" title="1"></label>
<label class="value" for="attr_status_wounds_1" title="1">1</label>
</div>
<div class="statusbox wounds">
<input type="checkbox" value="None" id="attr_status_wounds_2" name="attr_status_wounds_2" />
<label for="attr_status_wounds_2" title="2"></label>
<label class="value" for="attr_status_wounds_2" title="2">2</label>
</div>
<div class="statusbox wounds">
<input type="checkbox" value="None" id="attr_status_wounds_3" name="attr_status_wounds_3" />
<label for="attr_status_wounds_3" title="3"></label>
<label class="value" for="attr_status_wounds_3" title="3">3</label>
</div>
<div class="statusbox wounds">
<input type="checkbox" value="None" id="attr_status_wounds_4" name="attr_status_wounds_4" />
<label for="attr_status_wounds_4" title="4"></label>
<label class="value" for="attr_status_wounds_4" title="4">4</label>
</div>
<div class="statusbox wounds">
<input type="checkbox" value="None" id="attr_status_wounds_5" name="attr_status_wounds_5" />
<label for="attr_status_wounds_5" title="5"></label>
<label class="value" for="attr_status_wounds_5" title="5">5</label>
</div>
<div class="statusbox wounds">
<input type="checkbox" value="None" id="attr_status_wounds_6" name="attr_status_wounds_6" />
<label for="attr_status_wounds_6" title="6"></label>
<label class="value" for="attr_status_wounds_6" title="6">6</label>
</div>
<div class="statusbox wounds">
<input type="checkbox" value="None" id="attr_status_wounds_7" name="attr_status_wounds_7" />
<label for="attr_status_wounds_7" title="7"></label>
<label class="value" for="attr_status_wounds_7" title="7">7</label>
</div>
<div class="statusbox wounds">
<input type="checkbox" value="None" id="attr_status_wounds_8" name="attr_status_wounds_8" />
<label for="attr_status_wounds_8" title="8"></label>
<label class="value" for="attr_status_wounds_8" title="8">8</label>
</div>
<div class="statusbox wounds">
<input type="checkbox" value="None" id="attr_status_wounds_9" name="attr_status_wounds_9" />
<label for="attr_status_wounds_9" title="9"></label>
<label class="value" for="attr_status_wounds_9" title="9">9</label>
</div>
<div class="statusbox wounds">
<input type="checkbox" value="None" id="attr_status_wounds_10" name="attr_status_wounds_10" />
<label for="attr_status_wounds_10" title="10"></label>
<label class="value" for="attr_status_wounds_10" title="10">10</label>
</div>
</div>
</section>
<input type="hidden" id="checkbox-stress" name="attr_status_stress" />
<section class="repeat-stress">
<div class="sheet-status-header">
Stress
</div>
<div class="sheet-status-row stress">
<input type="hidden" id="attr_usable_stress" name="attr_Em" value="2" />
<div class="statusbox stress">
<input type="checkbox" value="None" id="attr_status_stress_1" name="attr_status_stress_1" />
<label for="attr_status_stress_1" title="1"></label>
<label class="value" for="attr_status_stress_1" title="1">1</label>
</div>
<div class="statusbox stress">
<input type="checkbox" value="None" id="attr_status_stress_2" name="attr_status_stress_2" />
<label for="attr_status_stress_2" title="2"></label>
<label class="value" for="attr_status_stress_2" title="2">2</label>
</div>
<div class="statusbox stress">
<input type="checkbox" value="None" id="attr_status_stress_3" name="attr_status_stress_3" />
<label for="attr_status_stress_3" title="3"></label>
<label class="value" for="attr_status_stress_3" title="3">3</label>
</div>
<div class="statusbox stress">
<input type="checkbox" value="None" id="attr_status_stress_4" name="attr_status_stress_4" />
<label for="attr_status_stress_4" title="4"></label>
<label class="value" for="attr_status_stress_4" title="4">4</label>
</div>
<div class="statusbox stress">
<input type="checkbox" value="None" id="attr_status_stress_5" name="attr_status_stress_5" />
<label for="attr_status_stress_5" title="5"></label>
<label class="value" for="attr_status_stress_5" title="5">5</label>
</div>
<div class="statusbox stress">
<input type="checkbox" value="None" id="attr_status_stress_6" name="attr_status_stress_6" />
<label for="attr_status_stress_6" title="6"></label>
<label class="value" for="attr_status_stress_6" title="6">6</label>
</div>
<div class="statusbox stress">
<input type="checkbox" value="None" id="attr_status_stress_7" name="attr_status_stress_7" />
<label for="attr_status_stress_7" title="7"></label>
<label class="value" for="attr_status_stress_7" title="7">7</label>
</div>
<div class="statusbox stress">
<input type="checkbox" value="None" id="attr_status_stress_8" name="attr_status_stress_8" />
<label for="attr_status_stress_8" title="8"></label>
<label class="value" for="attr_status_stress_8" title="8">8</label>
</div>
<div class="statusbox stress">
<input type="checkbox" value="None" id="attr_status_stress_9" name="attr_status_stress_9" />
<label for="attr_status_stress_9" title="9"></label>
<label class="value" for="attr_status_stress_9" title="9">9</label>
</div>
<div class="statusbox stress">
<input type="checkbox" value="None" id="attr_status_stress_10" name="attr_status_stress_10" />
<label for="attr_status_stress_10" title="10"></label>
<label class="value" for="attr_status_stress_10" title="10">10</label>
</div>
</div>
</section>
<input type="hidden" id="checkbox-mana" name="attr_status_mana" />
<section class="repeat-mana">
<input class="options-flag" name="attr_options-flag-mana" type="checkbox" title="Show/hide options" /><span>y</span>
<div class="sheet-mana-header">
Mana
<select class="hiddenBox" name="attr_usable_mana">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
</select>
</div>
<div class="sheet-status-row mana">
<input type="hidden" id="attr_usable_mana" name="attr_usable_mana" value="1" />
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_1" name="attr_status_mana_1" />
<label for="attr_status_mana_1" title="1"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_2" name="attr_status_mana_2" />
<label for="attr_status_mana_2" title="2"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_3" name="attr_status_mana_3" />
<label for="attr_status_mana_3" title="3"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_4" name="attr_status_mana_4" />
<label for="attr_status_mana_4" title="4"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_5" name="attr_status_mana_5" />
<label for="attr_status_mana_5" title="5"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_6" name="attr_status_mana_6" />
<label for="attr_status_mana_6" title="6"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_7" name="attr_status_mana_7" />
<label for="attr_status_mana_7" title="7"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_8" name="attr_status_mana_8" />
<label for="attr_status_mana_8" title="8"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_9" name="attr_status_mana_9" />
<label for="attr_status_mana_9" title="9"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_10" name="attr_status_mana_10" />
<label for="attr_status_mana_10" title="10"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_11" name="attr_status_mana_11" />
<label for="attr_status_mana_11" title="11"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_12" name="attr_status_mana_12" />
<label for="attr_status_mana_12" title="12"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_13" name="attr_status_mana_13" />
<label for="attr_status_mana_13" title="13"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_14" name="attr_status_mana_14" />
<label for="attr_status_mana_14" title="14"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_15" name="attr_status_mana_15" />
<label for="attr_status_mana_15" title="15"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_16" name="attr_status_mana_16" />
<label for="attr_status_mana_16" title="16"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_17" name="attr_status_mana_17" />
<label for="attr_status_mana_17" title="17"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_18" name="attr_status_mana_18" />
<label for="attr_status_mana_18" title="18"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_19" name="attr_status_mana_19" />
<label for="attr_status_mana_19" title="19"></label>
</div>
<div class="statusbox mana">
<input type="checkbox" value="None" id="attr_status_mana_20" name="attr_status_mana_20" />
<label for="attr_status_mana_20" title="20"></label>
</div>
</div>
</section>
</div>
<div class="float half consequences">
<div class="header">
<span>Konsequenzen</span>
</div>
<div class="grid">
<div class="repeat-consequences">
<input type="text" name="attr_consequenceType1" value="Leichte (4)" readonly />
<input type="text" name="attr_consequencesName1" />
</div>
<div class="repeat-consequences">
<input type="text" name="attr_consequenceType2" value="Mittlere (6)" readonly />
<input type="text" name="attr_consequencesName2" />
</div>
<div class="repeat-consequences">
<input type="text" name="attr_consequenceType3" value="Schwere (8)" readonly />
<input type="text" name="attr_consequencesName3" />
</div>
</div>
<div class="gridplace">
<fieldset class="repeating_consequences">
<div class="repeat-consequences">
<select name="attr_consequenceType">
<option value="4">Leichte (4)</option>
<option value="6">Mittlere (6)</option>
<option value="8">Schwere (8)</option>
<option value="t">Traumata</option>
</select>
<input type="text" name="attr_consequencesName" />
</div>
</fieldset>
</div>
</div>
<div class="break"></div>
<input type="hidden" class="sheet-tabstoggle" name="attr_sheetTab" value="attribute_skills" />
<div class="navigation">
<button type="action" name="act_attribute_skills" >Attribute & Fertigkeiten</button>
<button type="action" name="act_weapons_mage" >Waffen & Magie</button>
<button type="action" name="act_asects_inventory" >Aspekte, Stunts, Inventar & Notizen</button>
<button type="action" name="act_xp" >Erfahrungspunkte</button>
</div>
<div class="sheet-attribute_skills">
<div class="float threequarters attribute">
<div class="header">
<span>Attribute</span>
</div>
<div class="float attribute-stats">
<div class="float formular">
<label>Stärke</label>
<input type="number" name="attr_St" value="2" min="1" max="10" class="number-20" />
</div>
<div class="float formular">
<button
type="roll"
class="small-button"
name="roll_GeRoll"
value="@{abilityroll} &{template:butterfly} {{name=Reaktion}} {{rolling=[[@{Ge}d10>9cs>19]]}} {{rolling2=[[@{Ge}d10>9cs>19]]}}"
title="Reaktion"
>
Geschick
</button>
<input type="number" name="attr_Ge" value="2" min="1" max="10" class="number-20" />
</div>
<div class="float formular">
<button
type="roll"
class="small-button"
name="roll_InRoll"
value="@{abilityroll} &{template:butterfly} {{name=Willenskraft}} {{rolling=[[@{In}d10>9cs>19]]}} {{rolling2=[[@{In}d10>9cs>19]]}}"
title="Willenskraft"
>
Intelligenz
</button>
<input type="number" name="attr_In" value="2" min="1" max="10" class="number-20" />
</div>
<div class="float formular">
<label>Intuition</label>
<input type="number" name="attr_It" value="2" min="1" max="10" class="number-20" />
</div>
<div class="float formular">
<button
type="roll"
class="small-button"
name="roll_KoRoll"
value="@{abilityroll} &{template:butterfly} {{name=Zähigkeit}} {{rolling=[[@{Vi}d10>9cs>19]]}} {{rolling2=[[@{Vi}d10>9cs>19]]}}"
title="Zähigkeit"
>
Vitalität
</button>
<input type="number" name="attr_Vi" value="2" min="1" max="10" class="number-20" />
</div>
<div class="float formular">
<label>Empathie</label>
<input type="number" name="attr_Em" value="2" min="1" max="10" class="number-20" />
</div>
</div>
</div>
<div class="float quarter extra">
<div class="header">
<span>Extras</span>
</div>
<div class="float extra-stats">
<div class="float formular">
<label for="attr_ressourcen">Ressourcen</label>
<input type="number" id="attr_ressourcen" name="attr_ressourcen" value="10" class="number-20" />
</div>
<div class="float formular">
<input type="number" class="number-20 max" name="attr_schicksal_max" title="Erholungsrate" value="3" min="1" />
<button type="roll" class="small-button" name="roll_schicksalRoll" value="/me hat jetzt noch [[@{schicksal}]] Schicksalspunkte">Schicksal</button>
<input type="number" name="attr_schicksal" value="3" class="number-20" />
</div>
</div>
</div>
<div class="float full skills">
<div class="header">
<span>Fertigkeiten</span>
</div>
<div class="grid">
<div>Fertigkeit</div>
<div>Attr.</div>
<div>Wert</div>
<div>PP</div>
<div>Roll</div>
</div>
<div class="gridplace">
<div class="basicskills">
<div class="items">
<div>Nahkampf</div>
<div>
<select name="attr_meleeAttribute" title="Attribut">
<option value="@{St}" selected>Stärke</option>
<option value="@{Ge}">Geschick</option>
<option value="@{In}">Intelligenz</option>
<option value="@{It}">Intuition</option>
<option value="@{Vi}">Vitalität</option>
<option value="@{Em}">Empathie</option>
</select>
</div>
<div><input type="number" name="attr_meleeValue" title="Fertigkeitswert" value="0" /></div>
<div><input type="number" name="attr_meleePP" title="Praxispunkte" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=Nahkampf}} {{rolling=[[{(@{meleeAttribute}+@{meleeValue})d10!!10>9cs>19}kh@{meleeAttribute}]]}} {{rolling2=[[{(@{meleeAttribute}+@{meleeValue})d10!!10>9cs>19}kh@{meleeAttribute}]]}}"
></button>
</div>
</div>
<div class="items">
<div>Fernkampf</div>
<div>
<select name="attr_rangedAttribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}" selected>Geschick</option>
<option value="@{In}">Intelligenz</option>
<option value="@{It}">Intuition</option>
<option value="@{Vi}">Vitalität</option>
<option value="@{Em}">Empathie</option>
</select>
</div>
<div><input type="number" name="attr_rangedValue" title="rangedValue" value="0" /></div>
<div><input type="number" name="attr_rangedPP" title="rangedPP" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=Fernkampf}} {{rolling=[[{(@{rangedAttribute}+@{rangedValue})d10!!10>9cs>19}kh@{rangedAttribute}]]}} {{rolling2=[[{(@{rangedAttribute}+@{rangedValue})d10!!10>9cs>19}kh@{rangedAttribute}]]}}"
></button>
</div>
</div>
<div class="items">
<div>Bewegung</div>
<div>
<select name="attr_movementAttribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}" selected>Geschick</option>
<option value="@{In}">Intelligenz</option>
<option value="@{It}">Intuition</option>
<option value="@{Vi}">Vitalität</option>
<option value="@{Em}">Empathie</option>
</select>
</div>
<div><input type="number" name="attr_movementValue" title="movementValue" value="0" /></div>
<div><input type="number" name="attr_movementPP" title="movementPP" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=Bewegung}} {{rolling=[[{(@{movementAttribute}+@{movementValue})d10!!10>9cs>19}kh@{movementAttribute}]]}} {{rolling2=[[{(@{movementAttribute}+@{movementValue})d10!!10>9cs>19}kh@{movementAttribute}]]}}"
></button>
</div>
</div>
<div class="items">
<div>List</div>
<div>
<select name="attr_lunningAttribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}" selected>Geschick</option>
<option value="@{In}">Intelligenz</option>
<option value="@{It}">Intuition</option>
<option value="@{Vi}">Vitalität</option>
<option value="@{Em}">Empathie</option>
</select>
</div>
<div><input type="number" name="attr_lunningValue" title="lunningValue" value="0" /></div>
<div><input type="number" name="attr_lunningPP" title="lunningPP" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=List}} {{rolling=[[{(@{lunningAttribute}+@{lunningValue})d10!!10>9cs>19}kh@{lunningAttribute}]]}} {{rolling2=[[{(@{lunningAttribute}+@{lunningValue})d10!!10>9cs>19}kh@{lunningAttribute}]]}}"
></button>
</div>
</div>
<div class="items">
<div>Sagen</div>
<div>
<select name="attr_sageAttribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}">Geschick</option>
<option value="@{In}" selected>Intelligenz</option>
<option value="@{It}">Intuition</option>
<option value="@{Vi}">Vitalität</option>
<option value="@{Em}">Empathie</option>
</select>
</div>
<div><input type="number" name="attr_sageValue" title="sageValue" value="0" /></div>
<div><input type="number" name="attr_sagePP" title="sagePP" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=Sagen}} {{rolling=[[{(@{sageAttribute}+@{sageValue})d10!!10>9cs>19}kh@{sageAttribute}]]}} {{rolling2=[[{(@{sageAttribute}+@{sageValue})d10!!10>9cs>19}kh@{sageAttribute}]]}}"
></button>
</div>
</div>
<div class="items">
<div>Fachkenntnis</div>
<div>
<select name="attr_knowledgeAttribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}">Geschick</option>
<option value="@{In}" selected>Intelligenz</option>
<option value="@{It}">Intuition</option>
<option value="@{Vi}">Vitalität</option>
<option value="@{Em}">Empathie</option>
</select>
</div>
<div><input type="number" name="attr_knowledgeValue" title="knowledgeValue" value="0" /></div>
<div><input type="number" name="attr_knowledgePP" title="knowledgePP" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=Fachkenntniss}} {{rolling=[[{(@{knowledgeAttribute}+@{knowledgeValue})d10!!10>9cs>19}kh@{knowledgeAttribute}]]}} {{rolling2=[[{(@{knowledgeAttribute}+@{knowledgeValue})d10!!10>9cs>19}kh@{knowledgeAttribute}]]}}"
></button>
</div>
</div>
<div class="items">
<div>Medizin</div>
<div>
<select name="attr_medicineAttribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}">Geschick</option>
<option value="@{In}" selected>Intelligenz</option>
<option value="@{It}">Intuition</option>
<option value="@{Vi}">Vitalität</option>
<option value="@{Em}">Empathie</option>
</select>
</div>
<div><input type="number" name="attr_medicineValue" title="medicineValue" value="0" /></div>
<div><input type="number" name="attr_medicinePP" title="medicinePP" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=Medizin}} {{rolling=[[{(@{medicineAttribute}+@{medicineValue})d10!!10>9cs>19}kh@{medicineAttribute}]]}} {{rolling2=[[{(@{medicineAttribute}+@{medicineValue})d10!!10>9cs>19}kh@{medicineAttribute}]]}}"
></button>
</div>
</div>
<div class="items">
<div>Mysterien</div>
<div>
<select name="attr_mysteriesAttribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}">Geschick</option>
<option value="@{In}">Intelligenz</option>
<option value="@{It}" selected>Intuition</option>
<option value="@{Vi}">Vitalität</option>
<option value="@{Em}">Empathie</option>
</select>
</div>
<div><input type="number" name="attr_mysteriesValue" title="mysteriesValue" value="0" /></div>
<div><input type="number" name="attr_mysteriesPP" title="mysteriesPP" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=Mysterien}} {{rolling=[[{(@{mysteriesAttribute}+@{mysteriesValue})d10!!10>9cs>19}kh@{mysteriesAttribute}]]}} {{rolling2=[[{(@{mysteriesAttribute}+@{mysteriesValue})d10!!10>9cs>19}kh@{mysteriesAttribute}]]}}"
></button>
</div>
</div>
<div class="items">
<div>Wahrnehmung</div>
<div>
<select name="attr_perceptionAttribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}">Geschick</option>
<option value="@{In}">Intelligenz</option>
<option value="@{It}" selected>Intuition</option>
<option value="@{Vi}">Vitalität</option>
<option value="@{Em}">Empathie</option>
</select>
</div>
<div><input type="number" name="attr_perceptionValue" title="perceptionValue" value="0" /></div>
<div><input type="number" name="attr_perceptionPP" title="perceptionPP" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=Wahrnehmung}} {{rolling=[[{(@{perceptionAttribute}+@{perceptionValue})d10!!10>9cs>19}kh@{perceptionAttribute}]]}} {{rolling2=[[{(@{perceptionAttribute}+@{perceptionValue})d10!!10>9cs>19}kh@{perceptionAttribute}]]}}"
></button>
</div>
</div>
<div class="items">
<div>Körperkraft</div>
<div>
<select name="attr_bodyAttribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}">Geschick</option>
<option value="@{In}">Intelligenz</option>
<option value="@{It}">Intuition</option>
<option value="@{Vi}" selected>Vitalität</option>
<option value="@{Em}">Empathie</option>
</select>
</div>
<div><input type="number" name="attr_bodyValue" title="bodyValue" value="0" /></div>
<div><input type="number" name="attr_bodyPP" title="bodyPP" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=Körperkraft}} {{rolling=[[{(@{bodyAttribute}+@{bodyValue})d10!!10>9cs>19}kh@{bodyAttribute}]]}} {{rolling2=[[{(@{bodyAttribute}+@{bodyValue})d10!!10>9cs>19}kh@{bodyAttribute}]]}}"
></button>
</div>
</div>
<div class="items">
<div>Diplomatie</div>
<div>
<select name="attr_diplomacyAttribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}">Geschick</option>
<option value="@{In}">Intelligenz</option>
<option value="@{It}">Intuition</option>
<option value="@{Vi}">Vitalität</option>
<option value="@{Em}" selected>Empathie</option>
</select>
</div>
<div><input type="number" name="attr_diplomacyValue" title="diplomacyValue" value="0" /></div>
<div><input type="number" name="attr_diplomacyPP" title="diplomacyPP" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=Diplomatie}} {{rolling=[[{(@{diplomacyAttribute}+@{diplomacyValue})d10!!10>9cs>19}kh@{diplomacyAttribute}]]}} {{rolling2=[[{(@{diplomacyAttribute}+@{diplomacyValue})d10!!10>9cs>19}kh@{diplomacyAttribute}]]}}"
></button>
</div>
</div>
<div class="items">
<div>Umgang mit Tieren</div>
<div>
<select name="attr_animalsAttribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}">Geschick</option>
<option value="@{In}">Intelligenz</option>
<option value="@{It}">Intuition</option>
<option value="@{Vi}">Vitalität</option>
<option value="@{Em}" selected>Empathie</option>
</select>
</div>
<div><input type="number" name="attr_animalsValue" title="animalsValue" value="0" /></div>
<div><input type="number" name="attr_animalsPP" title="animalsPP" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=Umgang mit Tieren}} {{rolling=[[{(@{animalsAttribute}+@{animalsValue})d10!!10>9cs>19}kh@{animalsAttribute}]]}} {{rolling2=[[{(@{animalsAttribute}+@{animalsValue})d10!!10>9cs>19}kh@{animalsAttribute}]]}}"
></button>
</div>
</div>
</div>
<fieldset class="repeating_basicskills">
<div><input class="textcenter" type="text" name="attr_skillname" title="Fertigkeit" /></div>
<div>
<select name="attr_attribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}">Geschick</option>
<option value="@{In}">Intelligenz</option>
<option value="@{It}">Intuition</option>
<option value="@{Vi}">Vitalität</option>
<option value="@{Em}">Empathie</option>
</select>
</div>
<div><input type="number" name="attr_skill" title="Fertigkeitswert" value="0" /></div>
<div><input type="number" name="attr_pp" title="Praxispunkt" value="0" /></div>
<div>
<button
type="roll"
name="roll_skill"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=@{skillname}}} {{rolling=[[{(@{attribute}+@{skill})d10!!10>9cs>19}kh@{attribute}]]}} {{rolling2=[[{(@{attribute}+@{skill})d10!!10>9cs>19}kh@{attribute}]]}}"
></button>
</div>
</fieldset>
</div>
</div>
</div>
<div class="sheet-weapons_mage">
<div class="float full weapons">
<div class="header">
<span>Waffen</span>
<button type="roll" class="small-button right dice" name="roll_ini" title="Initiative WÜrfeln" value="/w GM @{character_name} hat eine Initiative von [[@{Ge}d10 &{tracker}]]">
Initiative
</button>
</div>
<div class="grid">
<div>Waffe</div>
<div>Attribut</div>
<div>Fertigkeit</div>
<div title="Schadensbonus">Waffenschaden</div>
<div>Roll</div>
</div>
<div class="gridplace">
<fieldset class="repeating_waponskills">
<div id="weapondiv" class="repeat-weapon">
<input class="options-flag" id="weaponcheck" name="attr_options-flag" title="Show/hide options" type="checkbox" /><span>y</span>
<div><input class="textcenter" type="text" name="attr_weaponname" title="Waffenname" /></div>
<div>
<select name="attr_attribute" title="Attribut">
<option value="@{St}">Stärke</option>
<option value="@{Ge}">Geschick</option>
</select>
</div>
<div><input type="number" name="attr_weaponskill" title="Fertigkeitswert" value="0" /></div>
<div><input type="number" name="attr_weapondamage" title="Schadenswürfel" value="0" /></div>
<div>
<button
type="roll"
name="roll_weapon"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=@{weaponname}}} {{rolling=[[{(@{attribute}+@{weaponskill}+@{weapondamage})d10!!10>9cs>19}kh@{attribute}]]}} {{rolling2=[[{(@{attribute}+@{weaponskill}+@{weapondamage})d10!!10>9cs>19}kh@{attribute}]]}} {{desc=@{weaponeffekt}}}"
></button>
</div>
<input class="liketextarea hiddenBox" type="text" name="attr_weaponeffekt" placeholder="Spezialeffekt" />
</div>
</fieldset>
</div>
</div>
<div class="break"></div>
<div class="float full mage">
<div class="header">
<span>Magie</span>
</div>
<div class="grid">
<div>Zauber</div>
<div>Attribut</div>
<div>Fertigkeit</div>
<div>Stärke</div>
<div>Roll</div>
</div>
<div class="gridplace">
<fieldset class="repeating_spells">
<div id="magediv" class="repeat-mage">
<input class="options-flag" id="magecheck" name="attr_options-flag" type="checkbox" title="Show/hide options" /><span>y</span>
<div><input class="textcenter" type="text" name="attr_spellname" title="Zaubername" placeholder="Name" /></div>
<div>
<select name="attr_attribute" title="Attribut">
<option value="@{In}">Intelligenz</option>
<option value="@{It}">Intuition</option>
</select>
</div>
<div><input type="number" name="attr_spellskill" title="Fertigkeitswert" value="0" /></div>
<div><input type="number" name="attr_staerke" title="Stärke" value="0" /></div>
<div>
<button
type="roll"
name="roll_spell"
title="Würfeln"
value="@{abilityroll} &{template:butterfly} {{name=@{spellname}}} {{rolling=[[{(@{attribute}+@{spellskill}+@{staerke})d10!!10>9cs>19}kh@{attribute}]]}} {{rolling2=[[{(@{attribute}+@{spellskill}+@{staerke})d10!!10>9cs>19}kh@{attribute}]]}} {{effect=[[1d100]]}} {{manakosten=[[@{manakosten}]]}} {{reichweite=[[@{reichweite}]]}} {{wirkungsbereich=@{wirkungsbereich}}} {{aktionen=[[@{aktionen}]]}} {{desc=@{spelldescription}}}"
></button>
</div>
<div class="hiddenBox">
<div class="formular">
<label title="Zauberpunkte">Zauberpunkte</label>
<input type="number" name="attr_magiepunkte" value="0" title="z.B. 1" />
</div>
<div class="formular">
<label title="Manakosten">Manakosten</label>
<input type="number" name="attr_manakosten" value="0" title="z.B. 1" />
</div>
<div class="formular">
<label title="Reichweite">Reichweite</label>
<input type="number" name="attr_reichweite" value="0" title="in Metern z.B. 5" />
</div>
<div class="formular">
<label title="Wirkungsbereich">Wirkungsbereich</label>
<input class="center" type="text" name="attr_wirkungsbereich" value="0" title="z.B. Kreis" />
</div>
<div class="formular">
<label title="Aktionen">Aktionen</label>
<input type="number" name="attr_aktionen" value="0" title="z.B. 1" />
</div>
<div id="textarea">
<textarea name="attr_spelldescription" placeholder="Inhalt"></textarea>
</div>
</div>
</div>
</fieldset>
</div>
</div>
</div>
<div class="sheet-asects_inventory">
<div class="float half aspects">
<div class="header">
<span>Aspekte</span>
</div>
<fieldset class="repeating_aspekte">
<input type="text" name="attr_aspekt" placeholder="Name" />
</fieldset>
</div>
<div class="float half stunts">
<div class="header">
<span>Stunts</span>
</div>
<fieldset class="repeating_stunts">
<div class="repeat-stunt">
<input class="options-flag" name="attr_options-flag" type="checkbox" title="Show/hide options" /><span>y</span>
<input type="text" name="attr_stunt" placeholder="Name" />
<textarea class="hiddenBox" name="attr_description" placeholder="Beschreibung"></textarea>
</div>
</fieldset>
</div>
<div class="break"></div>
<div class="float half inventar">
<div class="header">
<span>Inventar</span>
</div>
<div class="grid">
<input type="text" name="attr_ruestungName" placeholder="Rüstung" />
<input type="number" name="attr_ruestung" placeholder="Rüstungswert" />
</div>
<fieldset class="repeating_extras">
<div class="repeat-inv">
<input class="options-flag" name="attr_options-flag" type="checkbox" title="Show/hide options" /><span>y</span>
<input type="text" name="attr_name" placeholder="Gegenstand" />
<input type="text" name="attr_wight" placeholder="Info" />
<input type="number" name="attr_costs" placeholder="Anzahl" />
<textarea class="hiddenBox" name="attr_description" placeholder="Beschreibung"></textarea>
</div>
</fieldset>
</div>
<div class="float half notes">
<div class="header">
<span>Notizen</span>
</div>
<fieldset class="repeating_notes">
<div class="repeat-notes notes-row">
<input class="options-flag" name="attr_options-flag" type="checkbox" title="Show/hide options" /><span>y</span>
<input type="text" name="attr_title" placeholder="Titel" />
<textarea class="hiddenBox" name="attr_body" placeholder="Inhalt"></textarea>
</div>
</fieldset>
</div>
</div>
<div class="sheet-xp">
<div class="float full xp">
<div class="header">
<span>Erfahrungspunkte und Steigerung</span>
</div>
<div class="totalxp">
<div class="formular">
<label for="attr_XPtoSpend">Verfügbare EP</label>
<input type="number" id="attr_XPtoSpend" name="attr_XPtoSpend" class="number-20" value="@{XPTotal} - @{XPSpent}" disabled />
</div>
<div class="formular">
<label for="attr_XPSpent">Ausgegebene EP</label>
<input type="number" id="attr_XPSpent" name="attr_XPSpent" class="number-20" readonly />
</div>
<div class="formular">
<label for="attr_XPTotal">Gesamte EP</label>
<input type="number" id="attr_XPTotal" name="attr_XPTotal" class="number-20" />
</div>
</div>
<fieldset class="repeating_advancements">
<div class="item">
<input type="text" name="attr_advancement1" title="Beschreibung" />
</div>
<div class="brackets">
<input type="number" name="attr_advancement1xp" title="Kosten" />
</div>
<div class="placeholder"></div>
<div class="item">
<input type="text" name="attr_advancement2" title="Beschreibung" />
</div>
<div class="brackets">
<input type="number" name="attr_advancement2xp" title="Kosten" />
</div>
<div class="placeholder"></div>
<div class="item">
<input type="text" name="attr_advancement3" title="Beschreibung" />
</div>
<div class="brackets">
<input type="number" name="attr_advancement3xp" title="Kosten" />
</div>
</fieldset>
</div>
</div>
<div class="break"></div>
<div class="float full version">v2023-09-27</div>
</div>
<!-- rolltemplate -->
<rolltemplate class="sheet-rolltemplate-butterfly">
<div class="container">
<div class="header">
<span>{{name}}</span>
</div>
<div class="content">
<div><span>Ergebnis:</span>{{#rolling2}}{{rolling2}}<span class="spacer">|</span>{{/rolling2}}{{rolling}}</div>
{{#manakosten}}
<div><span>Mana: </span>{{manakosten}}</div>
{{/manakosten}}
{{#reichweite}}
<div><span>Reichweite: </span>{{reichweite}}</div>
{{/reichweite}}
{{#wirkungsbereich}}
<div><span>Wirkungsbereich: </span><span class="fakeroll">{{wirkungsbereich}}</span></div>
{{/wirkungsbereich}}
{{#aktionen}}
<div><span>Aktionen: </span>{{aktionen}}</div>
{{/aktionen}}
{{#effect}}
{{#rollTotal() rolling 0}}{{#^rollTotal() rolling2 0}}
<div><span>Effekt:</span>{{effect}}</div>
{{/^rollTotal() rolling2 0}}{{/rollTotal() rolling 0}}
{{#rollTotal() rolling2 0}}
<div><span>Effekt:</span>{{effect}}</div>
{{/rollTotal() rolling2 0}}
{{/effect}}
{{#desc}}
<div><span>Beschreibung:</span><br/>
<span class="text">{{desc}}</span></div>
{{/desc}}
</div>
</div>
</rolltemplate>
<!-- worker scripts -->
<script type="text/worker">
/* ---- BEGIN: TheAaronSheet.js ---- */
// Github: https://github.com/shdwjk/TheAaronSheet/blob/master/TheAaronSheet.js
// By: The Aaron, Arcane Scriptomancer
// Contact: https://app.roll20.net/users/104025/the-aaron
var TAS = TAS || (function(){
'use strict';
var version = '0.2.5',
lastUpdate = 1504710542,
loggingSettings = {
debug: {
key: 'debug',
title: 'DEBUG',
color: {
bgLabel: '#7732A2',
label: '#F2EF40',
bgText: '#FFFEB7',
text: '#7732A2'
}
},
error: {
key: 'error',
title: 'Error',
color: {
bgLabel: '#C11713',
label: 'white',
bgText: '#C11713',
text: 'white'
}
},
warn: {
key: 'warn',
title: 'Warning',
color: {
bgLabel: '#F29140',
label: 'white',
bgText: '#FFD8B7',
text: 'black'
}
},
info: {
key: 'info',
title: 'Info',
color: {
bgLabel: '#413FA9',
label: 'white',
bgText: '#B3B2EB',
text: 'black'
}
},
notice: {
key: 'notice',
title: 'Notice',
color: {
bgLabel: '#33C133',
label: 'white',
bgText: '#ADF1AD',
text: 'black'
}
},
log: {
key: 'log',
title: 'Log',
color: {
bgLabel: '#f2f240',
label: 'black',
bgText: '#ffff90',
text: 'black'
}
},
callstack: {
key: 'TAS',
title: 'function',
color: {
bgLabel: '#413FA9',
label: 'white',
bgText: '#B3B2EB',
text: 'black'
}
},
callstack_async: {
key: 'TAS',
title: 'ASYNC CALL',
color: {
bgLabel: '#413FA9',
label: 'white',
bgText: '#413FA9',
text: 'white'
}
},
TAS: {
key: 'TAS',
title: 'TAS',
color: {
bgLabel: 'grey',
label: 'black;background:linear-gradient(#304352,#d7d2cc,#d7d2cc,#d7d2cc,#304352)',
bgText: 'grey',
text: 'black;background:linear-gradient(#304352,#d7d2cc,#d7d2cc,#d7d2cc,#304352)'
}
}
},
config = {
debugMode: false,
logging: {
log: true,
notice: true,
info: true,
warn: true,
error: true,
debug: false
}
},
callstackRegistry = [],
queuedUpdates = {}, //< Used for delaying saves till the last moment.
complexType = function(o){
switch(typeof o){
case 'string':
return 'string';
case 'boolean':
return 'boolean';
case 'number':
return (_.isNaN(o) ? 'NaN' : (o.toString().match(/\./) ? 'decimal' : 'integer'));
case 'function':
return 'function: '+(o.name ? o.name+'()' : '(anonymous)');
case 'object':
return (_.isArray(o) ? 'array' : (_.isArguments(o) ? 'arguments' : ( _.isNull(o) ? 'null' : 'object')));
default:
return typeof o;
}
},
dataLogger = function(primaryLogger,secondaryLogger,data){
_.each(data,function(m){
var type = complexType(m);
switch(type){
case 'string':
primaryLogger(m);
break;
case 'undefined':
case 'null':
case 'NaN':
primaryLogger('['+type+']');
break;
case 'number':
case 'not a number':
case 'integer':
case 'decimal':
case 'boolean':
primaryLogger('['+type+']: '+m);
break;
default:
primaryLogger('['+type+']:=========================================');
secondaryLogger(m);
primaryLogger('=========================================================');
break;
}
});
},
colorLog = function(options){
var coloredLoggerFunction,
key = options.key,
label = options.title || 'TAS',
lBGColor = (options.color && options.color.bgLabel) || 'blue',
lTxtColor = (options.color && options.color.label) || 'white',
mBGColor = (options.color && options.color.bgText) || 'blue',
mTxtColor = (options.color && options.color.text) || 'white';
coloredLoggerFunction = function(message){
/* eslint-disable no-console */
console.log(
'%c '+label+': %c '+message + ' ',
'background-color: '+lBGColor+';color: '+lTxtColor+'; font-weight:bold;',
'background-color: '+mBGColor+';color: '+mTxtColor+';'
);
/* eslint-enable no-console */
};
return function(){
if('TAS'===key || config.logging[key]){
/* eslint-disable no-console */
dataLogger(coloredLoggerFunction,function(m){console.log(m);},_.toArray(arguments));
/* eslint-enable no-console */
}
};
},
logDebug = colorLog(loggingSettings.debug),
logError = colorLog(loggingSettings.error),
logWarn = colorLog(loggingSettings.warn),
logInfo = colorLog(loggingSettings.info),
logNotice = colorLog(loggingSettings.notice),
logLog = colorLog(loggingSettings.log),
log = colorLog(loggingSettings.TAS),
logCS = colorLog(loggingSettings.callstack),
logCSA = colorLog(loggingSettings.callstack_async),
registerCallstack = function(callstack,label){
var idx=_.findIndex(callstackRegistry,function(o){
return (_.difference(o.stack,callstack).length === _.difference(callstack,o.stack).length) &&
_.difference(o.stack,callstack).length === 0 &&
o.label === label;
});
if(-1 === idx){
idx=callstackRegistry.length;
callstackRegistry.push({
stack: callstack,
label: label
});
}
return idx;
},
setConfigOption = function(options){
var newconf =_.defaults(options,config);
newconf.logging=_.defaults(
(options && options.logging)||{},
config.logging
);
config=newconf;
},
isDebugMode = function(){
return config.debugMode;
},
debugMode = function(){
config.logging.debug=true;
config.debugMode = true;
},
getCallstack = function(){
var e = new Error('dummy'),
stack = _.map(_.rest(e.stack.replace(/^[^(]+?[\n$]/gm, '')
.replace(/^\s+at\s+/gm, '')
.replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@')
.split('\n')),function(l){
return l.replace(/\s+.*$/,'');
});
return stack;
},
logCallstackSub = function(cs){
var matches, csa;
_.find(cs,function(line){
matches = line.match(/TAS_CALLSTACK_(\d+)/);
if(matches){
csa=callstackRegistry[matches[1]];
logCSA( '===================='+(csa.label ? '> '+csa.label+' <' : '')+'====================');
logCallstackSub(csa.stack);
return true;
}
logCS(line);
return false;
});
},
logCallstack = function(){
var cs;
if(config.debugMode){
cs = getCallstack();
cs.shift();
log('==============================> CALLSTACK <==============================');
logCallstackSub(cs);
log('=========================================================================');
}
},
wrapCallback = function (label, callback, context){
var callstack;
if('function' === typeof label){
context=callback;
callback=label;
label=undefined;
}
if(!config.debugMode){
return (function(cb,ctx){
return function(){
cb.apply(ctx||{},arguments);
};
}(callback,context));
}
callstack = getCallstack();
callstack.shift();
return (function(cb,ctx,cs,lbl){
var ctxref=registerCallstack(cs,lbl);
/*jshint -W054 */
return new Function('cb','ctx','TASlog',
"return function TAS_CALLSTACK_"+ctxref+"(){"+
"var start,end;"+
"TASlog('Entering: '+(cb.name||'(anonymous function)'));"+
"start=_.now();"+
"cb.apply(ctx||{},arguments);"+
"end=_.now();"+
"TASlog('Exiting: '+(cb.name||'(anonymous function)')+' :: '+(end-start)+'ms elapsed');"+
"};")(cb,ctx,log);
/*jshint +W054 */
}(callback,context,callstack,label));
},
prepareUpdate = function( attribute, value ){
queuedUpdates[attribute]=value;
},
applyQueuedUpdates = function() {
setAttrs(queuedUpdates);
queuedUpdates = {};
},
namesFromArgs = function(args,base){
return _.chain(args)
.reduce(function(memo,attr){
if('string' === typeof attr) {
memo.push(attr);
} else if(_.isArray(args) || _.isArguments(args)){
memo = namesFromArgs(attr,memo);
}
return memo;
},(_.isArray(base) && base) || [])
.uniq()
.value();
},
addId = function(obj,value){
Object.defineProperty(obj,'id',{
value: value,
writable: false,
enumerable: false
});
},
addProp = function(obj,prop,value,fullname){
(function(){
var pname=(_.contains(['S','F','I','D'],prop) ? '_'+prop : prop),
full_pname = fullname || prop,
pvalue=value;
_.each(['S','I','F'],function(p){
if( !_.has(obj,p)){
Object.defineProperty(obj, p, {
value: {},
enumerable: false,
readonly: true
});
}
});
if( !_.has(obj,'D')){
Object.defineProperty(obj, 'D', {
value: _.reduce(_.range(10),function(m,d){
Object.defineProperty(m, d, {
value: {},
enumerable: true,
readonly: true
});
return m;
},{}),
enumerable: false,
readonly: true
});
}
// Raw value
Object.defineProperty(obj, pname, {
enumerable: true,
set: function(v){
if(v!==pvalue) {
pvalue=v;
prepareUpdate(full_pname,v);
}
},
get: function(){
return pvalue;
}
});
// string value
Object.defineProperty(obj.S, pname, {
enumerable: true,
set: function(v){
var val=v.toString();
if(val !== pvalue) {
pvalue=val;
prepareUpdate(full_pname,val);
}
},
get: function(){
return pvalue.toString();
}
});
// int value
Object.defineProperty(obj.I, pname, {
enumerable: true,
set: function(v){
var val=parseInt(v,10) || 0;
if(val !== pvalue){
pvalue=val;
prepareUpdate(full_pname,val);
}
},
get: function(){
return parseInt(pvalue,10) || 0;
}
});
// float value
Object.defineProperty(obj.F, pname, {
enumerable: true,
set: function(v){
var val=parseFloat(v) || 0;
if(val !== pvalue) {
pvalue=val;
prepareUpdate(full_pname,val);
}
},
get: function(){
return parseFloat(pvalue) || 0;
}
});
_.each(_.range(10),function(d){
Object.defineProperty(obj.D[d], pname, {
enumerable: true,
set: function(v){
var val=(parseFloat(v) || 0).toFixed(d);
if(val !== pvalue){
pvalue=val;
prepareUpdate(full_pname,val);
}
},
get: function(){
return (parseFloat(pvalue) || 0).toFixed(d);
}
});
});
}());
},
repeating = function( section ) {
return (function(s){
var sectionName = s,
attrNames = [],
fieldNames = [],
operations = [],
after = [],
repAttrs = function TAS_Repeating_Attrs(){
attrNames = namesFromArgs(arguments,attrNames);
return this;
},
repFields = function TAS_Repeating_Fields(){
fieldNames = namesFromArgs(arguments,fieldNames);
return this;
},
repReduce = function TAS_Repeating_Reduce(func, initial, final, context) {
operations.push({
type: 'reduce',
func: (func && _.isFunction(func) && func) || _.noop,
memo: (_.isUndefined(initial) && 0) || initial,
final: (final && _.isFunction(final) && final) || _.noop,
context: context || {}
});
return this;
},
repMap = function TAS_Repeating_Map(func, final, context) {
operations.push({
type: 'map',
func: (func && _.isFunction(func) && func) || _.noop,
final: (final && _.isFunction(final) && final) || _.noop,
context: context || {}
});
return this;
},
repEach = function TAS_Repeating_Each(func, final, context) {
operations.push({
type: 'each',
func: (func && _.isFunction(func) && func) || _.noop,
final: (final && _.isFunction(final) && final) || _.noop,
context: context || {}
});
return this;
},
repTap = function TAS_Repeating_Tap(final, context) {
operations.push({
type: 'tap',
final: (final && _.isFunction(final) && final) || _.noop,
context: context || {}
});
return this;
},
repAfter = function TAS_Repeating_After(callback,context) {
after.push({
callback: (callback && _.isFunction(callback) && callback) || _.noop,
context: context || {}
});
return this;
},
repExecute = function TAS_Repeating_Execute(callback,context){
var rowSet = {},
attrSet = {},
fieldIds = [],
fullFieldNames = [];
repAfter(callback,context);
// call each operation per row.
// call each operation's final
getSectionIDs("repeating_"+sectionName,function(ids){
fieldIds = ids;
fullFieldNames = _.reduce(fieldIds,function(memo,id){
return memo.concat(_.map(fieldNames,function(name){
return 'repeating_'+sectionName+'_'+id+'_'+name;
}));
},[]);
getAttrs( _.uniq(attrNames.concat(fullFieldNames)), function(values){
_.each(attrNames,function(aname){
if(values.hasOwnProperty(aname)){
addProp(attrSet,aname,values[aname]);
}
});
rowSet = _.reduce(fieldIds,function(memo,id){
var r={};
addId(r,id);
_.each(fieldNames,function(name){
var fn = 'repeating_'+sectionName+'_'+id+'_'+name;
addProp(r,name,values[fn],fn);
});
memo[id]=r;
return memo;
},{});
_.each(operations,function(op){
var res;
switch(op.type){
case 'tap':
_.bind(op.final,op.context,rowSet,attrSet)();
break;
case 'each':
_.each(rowSet,function(r){
_.bind(op.func,op.context,r,attrSet,r.id,rowSet)();
});
_.bind(op.final,op.context,rowSet,attrSet)();
break;
case 'map':
res = _.map(rowSet,function(r){
return _.bind(op.func,op.context,r,attrSet,r.id,rowSet)();
});
_.bind(op.final,op.context,res,rowSet,attrSet)();
break;
case 'reduce':
res = op.memo;
_.each(rowSet,function(r){
res = _.bind(op.func,op.context,res,r,attrSet,r.id,rowSet)();
});
_.bind(op.final,op.context,res,rowSet,attrSet)();
break;
}
});
// finalize attrs
applyQueuedUpdates();
_.each(after,function(op){
_.bind(op.callback,op.context)();
});
});
});
};
return {
attrs: repAttrs,
attr: repAttrs,
column: repFields,
columns: repFields,
field: repFields,
fields: repFields,
reduce: repReduce,
inject: repReduce,
foldl: repReduce,
map: repMap,
collect: repMap,
each: repEach,
forEach: repEach,
tap: repTap,
'do': repTap,
after: repAfter,
last: repAfter,
done: repAfter,
execute: repExecute,
go: repExecute,
run: repExecute
};
}(section));
},
repeatingSimpleSum = function(section, field, destination){
repeating(section)
.attr(destination)
.field(field)
.reduce(function(m,r){
return m + (r.F[field]);
},0,function(t,r,a){
a.S[destination]=t;
})
.execute();
};
/* eslint-disable no-console */
console.log('%c•.¸¸.•*´¨`*•.¸¸.•*´¨`*•.¸ The Aaron Sheet v'+version+' ¸.•*´¨`*•.¸¸.•*´¨`*•.¸¸.•','background: linear-gradient(to right,green,white,white,green); color:black;text-shadow: 0 0 8px white;');
console.log('%c•.¸¸.•*´¨`*•.¸¸.•*´¨`*•.¸ Last update: '+(new Date(lastUpdate*1000))+' ¸.•*´¨`*•.¸¸.•*´¨`*•.¸¸.•','background: linear-gradient(to right,green,white,white,green); color:black;text-shadow: 0 0 8px white;');
/* eslint-enable no-console */
return {
/* Repeating Sections */
repeatingSimpleSum: repeatingSimpleSum,
repeating: repeating,
/* Configuration */
config: setConfigOption,
/* Debugging */
callback: wrapCallback,
callstack: logCallstack,
debugMode: debugMode,
isDebugMode: isDebugMode,
_fn: wrapCallback,
/* Logging */
debug: logDebug,
error: logError,
warn: logWarn,
info: logInfo,
notice: logNotice,
log: logLog
};
}());
/* ---- END: TheAaronSheet.js ---- */
const buttonlist = ["attribute_skills","weapons_mage","asects_inventory","xp"];
buttonlist.forEach(button => {
on(`clicked:${button}`, function() {
setAttrs({
sheetTab: button
});
});
});
on("change:gmroll", function () {
getAttrs(["gmroll"], function (values) {
let gmroll = values.gmroll || "";
switch (gmroll) {
case "nogm":
setAttrs({ abilityroll: "/me" });
break;
case "gm":
setAttrs({ abilityroll: "/w GM **@{character_name}**" });
break;
}
});
});
on('change:repeating_advancements', function () {
TAS.repeating('advancements')
.attrs('XPSpent')
.fields('advancement1xp', 'advancement2xp', 'advancement3xp')
.reduce(function (memo, row, attrSet, id, rowSet) {
memo.total += row.I.advancement1xp;
memo.total += row.I.advancement2xp;
memo.total += row.I.advancement3xp;
return memo;
}, { total: 0 }, function (memo, rowSet, attrSet) {
attrSet.I.XPSpent = memo.total;
})
.execute();
});
</script>