mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-09-02 13:12:31 +00:00
8631 lines
532 KiB
HTML
8631 lines
532 KiB
HTML
<input name="attr_version" type="hidden" value="3.0"/><input class="monster_confirm_flag" name="attr_monster_confirm_flag" type="hidden"/><input class="mancer_confirm_flag" name="attr_mancer_confirm_flag" type="hidden"/><input class="licensedsheet" name="attr_licensedsheet" type="hidden"/><div class="licensecontainer compendium-drop-target monsters" data-licensedsheet="attr_licensedsheet"><input class="npc_toggle" name="attr_npc" type="hidden" value="0"/><input class="npcspellcastingflag" name="attr_npcspellcastingflag" type="hidden"/><input class="toggleflag" name="attr_rtype" type="hidden"/><div class="advantagetoggle">
|
|
<input type="radio" class="toggle-left" name="attr_advantagetoggle" value="{{query=1}} {{advantage=1}} {{r2=[[@{d20}"><span data-i18n="adv-u">ADVANTAGE</span>
|
|
<input type="radio" class="toggle-center" name="attr_advantagetoggle" value="{{query=1}} {{normal=1}} {{r2=[[0d20" checked="checked"><span data-i18n="norm-u">NORMAL</span>
|
|
<input type="radio" class="toggle-right" name="attr_advantagetoggle" value="{{query=1}} {{disadvantage=1}} {{r2=[[@{d20}"><span data-i18n="disadv-u">DISADVANTAGE</span></div><input class="toggleflag" name="attr_wtype" type="hidden"/><div class="advantagetoggle whispertoggle"><input class="toggle-left" name="attr_whispertoggle" type="radio" value="" checked="checked"/><span data-i18n="public:-u">PUBLIC</span><input class="toggle-right" name="attr_whispertoggle" type="radio" value="/w gm "/><span data-i18n="to-gm:-u">TO<span class="togm">GM</span></span></div><div class="container npc">
|
|
<input class="npc_options-flag" type="checkbox" name="attr_npc_options-flag" checked="checked"><span>y</span>
|
|
<div class="npc_options">
|
|
<div class="row title">
|
|
<span data-i18n="npc-options-u">NPC OPTIONS</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="name-u">NAME</span>
|
|
<input type="text" name="attr_npc_name">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="npc-type-u">NPC TYPE</span>
|
|
<input type="text" name="attr_npc_type" placeholder="Medium beast, no alignment" data-i18n-placeholder="npc-type-place">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="armor-class-u">ARMOR CLASS</span>
|
|
<input class="num" type="text" name="attr_npc_ac" placeholder="10">
|
|
<span data-i18n="touch-ac-u">TOUCH AC</span>
|
|
<input class="num" type="text" name="attr_npc_tac" placeholder="10">
|
|
<span data-i18n="type-u">TYPE</span>
|
|
<input type="text" name="attr_npc_actype" placeholder="scale mail" data-i18n-placeholder="npc-armor-place" value="">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="hit-points-u">HIT POINTS</span>
|
|
<input class="num" type="text" name="attr_hp_max" placeholder="82">
|
|
<span data-i18n="formula-u">FORMULA</span>
|
|
<input type="text" name="attr_npc_hpformula" placeholder="11d8 + 33">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="speed-u">SPEED</span>
|
|
<input type="text" name="attr_npc_speed" placeholder="30 ft., fly 60ft." data-i18n-placeholder="npc-speed-place">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="social-u">SOCIAL SCORE</span>
|
|
<input type="text" name="attr_npc_social" placeholder="0">
|
|
</div>
|
|
<div class="spacer"></div>
|
|
<div class="row">
|
|
<span data-i18n="attributes-u">ATTRIBUTES</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="str-u">STR</span>
|
|
<input class="num" type="text" name="attr_strength_base" value="10">
|
|
<span data-i18n="dex-u">DEX</span>
|
|
<input class="num" type="text" name="attr_dexterity_base" value="10">
|
|
<span data-i18n="con-u">CON</span>
|
|
<input class="num" type="text" name="attr_constitution_base" value="10">
|
|
<span data-i18n="int-u">INT</span>
|
|
<input class="num" type="text" name="attr_intelligence_base" value="10">
|
|
<span data-i18n="wis-u">WIS</span>
|
|
<input class="num" type="text" name="attr_wisdom_base" value="10">
|
|
<span data-i18n="cha-u">CHA</span>
|
|
<input class="num" type="text" name="attr_charisma_base" value="10">
|
|
</div>
|
|
<div class="spacer"></div>
|
|
<div class="row">
|
|
<span data-i18n="saves-u">SAVES</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="str-u">STR</span>
|
|
<input class="num" type="text" name="attr_npc_str_save_base" placeholder="0">
|
|
<span data-i18n="dex-u">DEX</span>
|
|
<input class="num" type="text" name="attr_npc_dex_save_base" placeholder="0">
|
|
<span data-i18n="con-u">CON</span>
|
|
<input class="num" type="text" name="attr_npc_con_save_base" placeholder="0">
|
|
<span data-i18n="int-u">INT</span>
|
|
<input class="num" type="text" name="attr_npc_int_save_base" placeholder="0">
|
|
<span data-i18n="wis-u">WIS</span>
|
|
<input class="num" type="text" name="attr_npc_wis_save_base" placeholder="0">
|
|
<span data-i18n="cha-u">CHA</span>
|
|
<input class="num" type="text" name="attr_npc_cha_save_base" placeholder="0">
|
|
<input type="hidden" name="attr_npc_str_save" value="@{strength_mod}">
|
|
<input type="hidden" name="attr_npc_dex_save" value="@{dexterity_mod}">
|
|
<input type="hidden" name="attr_npc_con_save" value="@{constitution_mod}">
|
|
<input type="hidden" name="attr_npc_int_save" value="@{intelligence_mod}">
|
|
<input type="hidden" name="attr_npc_wis_save" value="@{wisdom_mod}">
|
|
<input type="hidden" name="attr_npc_cha_save" value="@{charisma_mod}">
|
|
</div>
|
|
<div class="spacer"></div>
|
|
<div class="row">
|
|
<span data-i18n="skills-u">SKILLS</span>
|
|
</div>
|
|
<div class="row skills-list" data-i18n-list="skills-list">
|
|
<div class="col">
|
|
<div class="row" data-i18n-list-item="acrobatics">
|
|
<span data-i18n="acrobatics-u">ACROBATICS</span>
|
|
<input class="num" type="text" name="attr_npc_acrobatics_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="animal_handling">
|
|
<span data-i18n="animal_handling-u">ANIMAL HANDLING</span>
|
|
<input class="num" type="text" name="attr_npc_animal_handling_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="athletics">
|
|
<span data-i18n="athletics-u">ATHLETICS</span>
|
|
<input class="num" type="text" name="attr_npc_athletics_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="deception">
|
|
<span data-i18n="deception-u">DECEPTION</span>
|
|
<input class="num" type="text" name="attr_npc_deception_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="eldertech">
|
|
<span data-i18n="eldertech-u">ELDERTECH</span>
|
|
<input class="num" type="text" name="attr_npc_eldertech_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="history">
|
|
<span data-i18n="history-u">HISTORY</span>
|
|
<input class="num" type="text" name="attr_npc_history_base" placeholder="0">
|
|
</div>
|
|
</div>
|
|
<div class="col" data-i18n-list-sublist>
|
|
<div class="row" data-i18n-list-item="insight">
|
|
<span data-i18n="insight-u">INSIGHT</span>
|
|
<input class="num" type="text" name="attr_npc_insight_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="intimidation">
|
|
<span data-i18n="intimidation-u">INTIMIDATION</span>
|
|
<input class="num" type="text" name="attr_npc_intimidation_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="investigation">
|
|
<span data-i18n="investigation-u">INVESTIGATION</span>
|
|
<input class="num" type="text" name="attr_npc_investigation_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="materials">
|
|
<span data-i18n="materials-u">MATERIALS</span>
|
|
<input class="num" type="text" name="attr_npc_materials_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="medicine">
|
|
<span data-i18n="medicine-u">MEDICINE</span>
|
|
<input class="num" type="text" name="attr_npc_medicine_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="nature">
|
|
<span data-i18n="nature-u">NATURE</span>
|
|
<input class="num" type="text" name="attr_npc_nature_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="perception">
|
|
<span data-i18n="perception-u">PERCEPTION</span>
|
|
<input class="num" type="text" name="attr_npc_perception_base" placeholder="0">
|
|
</div>
|
|
</div>
|
|
<div class="col" data-i18n-list-sublist>
|
|
<div class="row" data-i18n-list-item="performance">
|
|
<span data-i18n="performance-u">PERFORMANCE</span>
|
|
<input class="num" type="text" name="attr_npc_performance_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="persuasion">
|
|
<span data-i18n="persuasion-u">PERSUASION</span>
|
|
<input class="num" type="text" name="attr_npc_persuasion_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="politics">
|
|
<span data-i18n="politics-u">POLITICS</span>
|
|
<input class="num" type="text" name="attr_npc_politics_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="religion">
|
|
<span data-i18n="religion-u">RELIGION</span>
|
|
<input class="num" type="text" name="attr_npc_religion_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="sleight_of_hand">
|
|
<span data-i18n="sleight_of_hand-u">SLEIGHT OF HAND</span>
|
|
<input class="num" type="text" name="attr_npc_sleight_of_hand_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="stealth">
|
|
<span data-i18n="stealth-u">STEALTH</span>
|
|
<input class="num" type="text" name="attr_npc_stealth_base" placeholder="0">
|
|
</div>
|
|
<div class="row" data-i18n-list-item="survival">
|
|
<span data-i18n="survival-u">SURVIVAL</span>
|
|
<input class="num" type="text" name="attr_npc_survival_base" placeholder="0">
|
|
</div>
|
|
</div>
|
|
<input type="hidden" name="attr_npc_acrobatics" value="@{dexterity_mod}">
|
|
<input type="hidden" name="attr_npc_animal_handling" value="@{wisdom_mod}">
|
|
<input type="hidden" name="attr_npc_athletics" value="@{strength_mod}">
|
|
<input type="hidden" name="attr_npc_deception" value="@{charisma_mod}">
|
|
<input type="hidden" name="attr_npc_eldertech" value="@{intelligence_mod}">
|
|
<input type="hidden" name="attr_npc_history" value="@{intelligence_mod}">
|
|
<input type="hidden" name="attr_npc_insight" value="@{wisdom_mod}">
|
|
<input type="hidden" name="attr_npc_intimidation" value="@{charisma_mod}">
|
|
<input type="hidden" name="attr_npc_investigation" value="@{intelligence_mod}">
|
|
<input type="hidden" name="attr_npc_materials" value="@{intelligence_mod}">
|
|
<input type="hidden" name="attr_npc_medicine" value="@{intelligence_mod}">
|
|
<input type="hidden" name="attr_npc_nature" value="@{intelligence_mod}">
|
|
<input type="hidden" name="attr_npc_perception" value="@{wisdom_mod}">
|
|
<input type="hidden" name="attr_npc_performance" value="@{charisma_mod}">
|
|
<input type="hidden" name="attr_npc_persuasion" value="@{charisma_mod}">
|
|
<input type="hidden" name="attr_npc_politics" value="@{intelligence_mod}">
|
|
<input type="hidden" name="attr_npc_religion" value="@{intelligence_mod}">
|
|
<input type="hidden" name="attr_npc_sleight_of_hand" value="@{dexterity_mod}">
|
|
<input type="hidden" name="attr_npc_stealth" value="@{dexterity_mod}">
|
|
<input type="hidden" name="attr_npc_survival" value="@{wisdom_mod}">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="damage-vuln-u">DAMAGE VULNERABILITIES</span>
|
|
<input type="text" name="attr_npc_vulnerabilities" placeholder="fire" data-i18n-placeholder="npc-dmg-vuln-place">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="damage-res-u">DAMAGE RESISTANCES</span>
|
|
<input type="text" name="attr_npc_resistances" placeholder="cold" data-i18n-placeholder="npc-dmg-res-place">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="damage-imm-u">DAMAGE IMMUNITIES</span>
|
|
<input type="text" name="attr_npc_immunities" placeholder="lighting, thunder" data-i18n-placeholder="npc-dmg-imm-place">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="cond-imm-u">CONDITION IMMUNITIES</span>
|
|
<input type="text" name="attr_npc_condition_immunities" placeholder="charmed" data-i18n-placeholder="npc-cond-imm-place">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="arm-prot-u">ARMOR PROTECTIONS</span>
|
|
<input type="text" name="attr_npc_armor_protections" placeholder="bludgeoning" data-i18n-placeholder="npc-arm-prot-place">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="arm-weak-u">ARMOR WEAKNESSES</span>
|
|
<input type="text" name="attr_npc_armor_weaknesses" placeholder="piercing" data-i18n-placeholder="npc-arm-weak-place">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="senses-u">SENSES</span>
|
|
<input type="text" name="attr_npc_senses" placeholder="darkvision 120ft., passive Perception 16" data-i18n-placeholder="npc-senses-place">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="langs-u">LANGUAGES</span>
|
|
<input type="text" name="attr_npc_languages" placeholder="Abyssal, Common, Infernal" value="—" data-i18n-placeholder="npc-langs-place">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="challenge-u">CHALLENGE</span>
|
|
<input class="num" type="text" name="attr_npc_challenge" placeholder="1">
|
|
<span data-i18n="xp-u">XP</span>
|
|
<input type="text" name="attr_npc_xp" placeholder="250">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="token_size-u">TOKEN SIZE</span>
|
|
<input class="text" name="attr_token_size" value="1" placeholder="1">
|
|
</div>
|
|
<!--<div class="row">
|
|
<input class="npcspellcastingflag" type="checkbox" name="attr_npcspellcastingflag" value="1">
|
|
<span data-i18n="spellcast-npc-u">SPELLCASTING NPC</span>
|
|
<div class="npcspelloptions">
|
|
<span data-i18n="spell-ability-u">SPELLCASTING ABILITY</span>
|
|
<select name="attr_spellcasting_ability" style="margin: 0px; width: auto; padding: 0px; height: 15px;">
|
|
<option value="0*" data-i18n="none-u">NONE</option>
|
|
<option value="@{strength_mod}+" data-i18n="strength-u">STRENGTH</option>
|
|
<option value="@{dexterity_mod}+" data-i18n="dexterity-u">DEXTERITY</option>
|
|
<option value="@{constitution_mod}+" data-i18n="constitution-u">CONSTITUTION</option>
|
|
<option value="@{intelligence_mod}+" data-i18n="intelligence-u">INTELLIGENCE</option>
|
|
<option value="@{wisdom_mod}+" data-i18n="wisdom-u">WISDOM</option>
|
|
<option value="@{charisma_mod}+" data-i18n="charisma-u">CHARISMA</option>
|
|
</select>
|
|
</div>
|
|
<div class="npcspelloptions">
|
|
<div class="row">
|
|
<span data-i18n="glob-atk-mod:-u">GLOBAL MAGIC ATTACK MODIFIER:</span>
|
|
<input type="text" class="num" name="attr_globalmagicmod" placeholder="0" value="0">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="magic-caster-lvl:-u">MAGIC CASTER LEVEL:</span>
|
|
<input type="text" class="num" name="attr_caster_level">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="spell_dc_mod:-u">SPELL SAVE DC MOD:</span>
|
|
<input type="text" class="num" name="attr_spell_dc_mod" placeholder="0" value="0">
|
|
</div>
|
|
</div>
|
|
</div>-->
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_npcreactionsflag" value="1">
|
|
<span data-i18n="has-reaction-u">HAS REACTIONS</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="leg-actions:-u">LEGENDARY ACTIONS:</span>
|
|
<input class="num" type="text" name="attr_npc_legendary_actions" value="0" placeholder="0">
|
|
</div>
|
|
<div class="row title">
|
|
<span data-i18n="gen-opts-u">GENERAL OPTIONS</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_npc" value="1">
|
|
<span data-i18n="npc-u">NPC</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="roll-queries:-u">ROLL QUERIES:</span>
|
|
<select name="attr_rtype">
|
|
<option value="{{always=1}} {{r2=[[@{d20}" data-i18n="always-adv">Always Roll Advantage</option>
|
|
<option value="@{advantagetoggle}" data-i18n="adv-toggle">Advantage Toggle</option>
|
|
<option value="{{query=1}} ?{Advantage?|Normal Roll,{{normal=1}} {{r2=[[0d20|Advantage,{{advantage=1}} {{r2=[[@{d20}|Disadvantage,{{disadvantage=1}} {{r2=[[@{d20}}" data-i18n="query-adv">Query Advantage</option>
|
|
<option value="{{normal=1}} {{r2=[[0d20" data-i18n="never-adv">Never Roll Advantage</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="whisp-rolls-gm:-u">WHISPER ROLLS TO GM:</span>
|
|
<select name="attr_wtype">
|
|
<option value="" data-i18n="never-whisper-roll">Never Whisper Rolls</option>
|
|
<option value="@{whispertoggle}" data-i18n="toggle-roll-whisper">Whisper Toggle</option>
|
|
<option value="?{Whisper?|Public Roll,|Whisper Roll,/w gm }" data-i18n="query-whisper-roll">Query Whisper</option>
|
|
<option value="/w gm " data-i18n="always-whisper-roll">Always Whisper Rolls</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="auto-dmg-roll:-u">AUTO DAMAGE ROLL:</span>
|
|
<select class="dtype" name="attr_dtype">
|
|
<option value="pick" data-i18n="never-dmg">Don't Auto Roll Damage</option>
|
|
<option value="full" data-i18n="always-dmg">Auto Roll Damage & Crit</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="npc-name-in-rolls:-u">NPC NAME IN ROLLS:</span>
|
|
<select name="attr_npc_name_flag">
|
|
<option value="{{name=@{npc_name}}}" data-i18n="show">Show</option>
|
|
<option value="0" data-i18n="hide">Hide</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_init_tiebreaker" value="@{dexterity}/100">
|
|
<span data-i18n="add-dex-tiebreaker-u">ADD DEX TIEBREAKER TO INITIATIVE</span>
|
|
</div>
|
|
<!--<div class="row">
|
|
<input type="checkbox" name="attr_licensedsheet" value="1">
|
|
<span data-i18n="use-licensed-sheet-styling">USE OFFICIAL D&D STYLING</span>
|
|
</div>-->
|
|
</div>
|
|
<div class="display stat-block">
|
|
<div class="row title red">
|
|
<button type="roll" name="roll_npc_init" style="width: 100%;" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{init}}} {{mod=[[[[@{initiative_bonus}]][DEX]]]}} {{r1=[[@{d20}+[[@{initiative_bonus}]][DEX] &{tracker}]]}} {{normal=1}} {{type=Initiative}}">
|
|
<span name="attr_npc_name"></span>
|
|
</button>
|
|
</div>
|
|
<div class="row subtitle" style="margin-top: -5px;">
|
|
<span class="italics" name="attr_npc_type"></span>
|
|
</div>
|
|
<div class="triangle"></div>
|
|
<div class="row red" style="position:relative;">
|
|
<span data-i18n="ac" class="bold">Armor Class</span>
|
|
<span class="num" name="attr_npc_ac"></span>
|
|
<input class="actype" type="hidden" name="attr_npc_actype" value="">
|
|
<span class="parens" name="attr_npc_actype"></span>
|
|
<span data-i18n="tac" class="bold">Touch AC</span>
|
|
<span class="num" name="attr_npc_tac"></span>
|
|
<button type="roll" name="roll_npc_init" style="position: absolute; right: 5px; height: 30px; width: 20px;" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{init}}} {{mod=[[[[@{initiative_bonus}]][DEX]]]}} {{r1=[[@{d20}+[[@{initiative_bonus}]][DEX] &{tracker}]]}} {{normal=1}} {{type=Initiative}}">
|
|
<span class="npc-init-die">t</span>
|
|
<span style="display: block;">INIT</span>
|
|
</button>
|
|
</div>
|
|
<div class="row red">
|
|
<span data-i18n="hp" class="bold">Hit Points</span>
|
|
<span class="num3" name="attr_hp_max"></span>
|
|
<button type="roll" name="roll_npc_hpformula" value="@{wtype}&{template:npc} {{type=Hit Points}} {{normal=1}} @{npc_name_flag} {{rname=^{hp}}} {{mod=@{npc_hpformula}}} {{r1=[[@{npc_hpformula}]]}} charname=@{character_name}">
|
|
<span class="parens" name="attr_npc_hpformula" style="font-size: 12px; font-weight: normal;"></span>
|
|
</button>
|
|
</div>
|
|
<div class="row red">
|
|
<span data-i18n="speed" class="bold">Speed</span>
|
|
<span name="attr_npc_speed"></span>
|
|
</div>
|
|
<div class="row red">
|
|
<span data-i18n="social" class="bold">Social score</span>
|
|
<span name="attr_npc_social"></span>
|
|
</div>
|
|
<div class="triangle"></div>
|
|
<div class="row red">
|
|
<div class="attr-container">
|
|
<button type="roll" name="roll_npc_str" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{strength}}} {{mod=[[[[@{strength_mod}]][STR]]]}} {{r1=[[@{d20}+[[@{strength_mod}]][STR]]]}} @{rtype}+[[@{strength_mod}]][STR]]]}} {{type=Ability}}">
|
|
<span class="bold" data-i18n="str-u">STR</span>
|
|
<span name="attr_strength"></span>
|
|
<input class="negativeflag" type="hidden" name="attr_npc_str_negative" value="0">
|
|
<span class="npcattr" name="attr_strength_mod"></span>
|
|
</button>
|
|
</div>
|
|
<div class="attr-container">
|
|
<button type="roll" name="roll_npc_dex" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{dexterity}}} {{mod=[[[[@{dexterity_mod}]][DEX]]]}} {{r1=[[@{d20}+[[@{dexterity_mod}]][DEX]]]}} @{rtype}+[[@{dexterity_mod}]][DEX]]]}} {{type=Ability}}">
|
|
<span class="bold" data-i18n="dex-u">DEX</span>
|
|
<span name="attr_dexterity"></span>
|
|
<input class="negativeflag" type="hidden" name="attr_npc_dex_negative" value="0">
|
|
<span class="npcattr" name="attr_dexterity_mod"></span>
|
|
</button>
|
|
</div>
|
|
<div class="attr-container">
|
|
<button type="roll" name="roll_npc_con" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{constitution}}} {{mod=[[[[@{constitution_mod}]][CON]]]}} {{r1=[[@{d20}+[[@{constitution_mod}]][CON]]]}} @{rtype}+[[@{constitution_mod}]][CON]]]}} {{type=Ability}}">
|
|
<span class="bold" data-i18n="con-u">CON</span>
|
|
<span name="attr_constitution"></span>
|
|
<input class="negativeflag" type="hidden" name="attr_npc_con_negative" value="0">
|
|
<span class="npcattr" name="attr_constitution_mod"></span>
|
|
</button>
|
|
</div>
|
|
<div class="attr-container">
|
|
<button type="roll" name="roll_npc_int" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{intelligence}}} {{mod=[[[[@{intelligence_mod}]][INT]]]}} {{r1=[[@{d20}+[[@{intelligence_mod}]][INT]]]}} @{rtype}+[[@{intelligence_mod}]][INT]]]}} {{type=Ability}}">
|
|
<span class="bold" data-i18n="int-u">INT</span>
|
|
<span name="attr_intelligence"></span>
|
|
<input class="negativeflag" type="hidden" name="attr_npc_int_negative" value="0">
|
|
<span class="npcattr" name="attr_intelligence_mod"></span>
|
|
</button>
|
|
</div>
|
|
<div class="attr-container">
|
|
<button type="roll" name="roll_npc_wis" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{wisdom}}} {{mod=[[[[@{wisdom_mod}]][WIS]]]}} {{r1=[[@{d20}+[[@{wisdom_mod}]][WIS]]]}} @{rtype}+[[@{wisdom_mod}]][WIS]]]}} {{type=Ability}}">
|
|
<span class="bold" data-i18n="wis-u">WIS</span>
|
|
<span name="attr_wisdom"></span>
|
|
<input class="negativeflag" type="hidden" name="attr_npc_wis_negative" value="0">
|
|
<span class="npcattr" name="attr_wisdom_mod"></span>
|
|
</button>
|
|
</div>
|
|
<div class="attr-container">
|
|
<button type="roll" name="roll_npc_cha" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{charisma}}} {{mod=[[[[@{charisma_mod}]][CHA]]]}} {{r1=[[@{d20}+[[@{charisma_mod}]][CHA]]]}} @{rtype}+[[@{charisma_mod}]][CHA]]]}} {{type=Ability}}">
|
|
<span class="bold" data-i18n="cha-u">CHA</span>
|
|
<span name="attr_charisma"></span>
|
|
<input class="negativeflag" type="hidden" name="attr_npc_cha_negative" value="0">
|
|
<span class="npcattr" name="attr_charisma_mod"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="triangle"></div>
|
|
<input class="flag" type="hidden" name="attr_npc_saving_flag" value="">
|
|
<div class="row saving red">
|
|
<span class="bold" data-i18n="saving-throw">Saving Throws</span>
|
|
<input class="flag" type="hidden" name="attr_npc_str_save_flag" value="0">
|
|
<button type="roll" name="roll_npc_str_save" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{strength-save}}} {{mod=[[[[@{npc_str_save}]][STR SAVE]]]}} {{r1=[[@{d20}+[[@{npc_str_save}]][STR SAVE]]]}} @{rtype}+[[@{npc_str_save}]][STR SAVE]]]}} {{type=Save}}">
|
|
<span data-i18n="str">Str</span>
|
|
<span class="stat" name="attr_npc_str_save"></span>
|
|
</button>
|
|
<input class="flag" type="hidden" name="attr_npc_dex_save_flag" value="0">
|
|
<button type="roll" name="roll_npc_dex_save" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{dexterity-save}}} {{mod=[[[[@{npc_dex_save}]][DEX SAVE]]]}} {{r1=[[@{d20}+[[@{npc_dex_save}]][DEX SAVE]]]}} @{rtype}+[[@{npc_dex_save}]][DEX SAVE]]]}} {{type=Save}}">
|
|
<span data-i18n="dex">Dex</span>
|
|
<span class="stat" name="attr_npc_dex_save"></span>
|
|
</button>
|
|
<input class="flag" type="hidden" name="attr_npc_con_save_flag" value="0">
|
|
<button type="roll" name="roll_npc_con_save" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{constitution-save}}} {{mod=[[[[@{npc_con_save}]][CON SAVE]]]}} {{r1=[[@{d20}+[[@{npc_con_save}]][CON SAVE]]]}} @{rtype}+[[@{npc_con_save}]][CON SAVE]]]}} {{type=Save}}">
|
|
<span data-i18n="con">Con</span>
|
|
<span class="stat" name="attr_npc_con_save"></span>
|
|
</button>
|
|
<input class="flag" type="hidden" name="attr_npc_int_save_flag" value="0">
|
|
<button type="roll" name="roll_npc_int_save" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{intelligence-save}}} {{mod=[[[[@{npc_int_save}]][INT SAVE]]]}} {{r1=[[@{d20}+[[@{npc_int_save}]][INT SAVE]]]}} @{rtype}+[[@{npc_int_save}]][INT SAVE]]]}} {{type=Save}}">
|
|
<span data-i18n="int">Int</span>
|
|
<span class="stat" name="attr_npc_int_save"></span>
|
|
</button>
|
|
<input class="flag" type="hidden" name="attr_npc_wis_save_flag" value="0">
|
|
<button type="roll" name="roll_npc_wis_save" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{wisdom-save}}} {{mod=[[[[@{npc_wis_save}]][WIS SAVE]]]}} {{r1=[[@{d20}+[[@{npc_wis_save}]][WIS SAVE]]]}} @{rtype}+[[@{npc_wis_save}]][WIS SAVE]]]}} {{type=Save}}">
|
|
<span data-i18n="wis">Wis</span>
|
|
<span class="stat" name="attr_npc_wis_save"></span>
|
|
</button>
|
|
<input class="flag" type="hidden" name="attr_npc_cha_save_flag" value="0">
|
|
<button type="roll" name="roll_npc_cha_save" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{charisma-save}}} {{mod=[[[[@{npc_cha_save}]][CHA SAVE]]]}} {{r1=[[@{d20}+[[@{npc_cha_save}]][CHA SAVE]]]}} @{rtype}+[[@{npc_cha_save}]][CHA SAVE]]]}} {{type=Save}}">
|
|
<span data-i18n="cha">Cha</span>
|
|
<span class="stat" name="attr_npc_cha_save"></span>
|
|
</button>
|
|
</div>
|
|
<input class="flag" type="hidden" name="attr_npc_skills_flag" value="">
|
|
<div class="row skills skills-list red" data-i18n-list="skills-list">
|
|
<span class="bold" data-i18n="skills">Skills</span>
|
|
<span data-i18n-list-item="acrobatics">
|
|
<input class="flag" type="hidden" name="attr_npc_acrobatics_flag" value="0">
|
|
<button type="roll" name="roll_npc_acrobatics" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{acrobatics}}} {{mod=@{npc_acrobatics}}} {{r1=[[@{d20}+@{npc_acrobatics}]]}} @{rtype}+@{npc_acrobatics}]]}} {{type=Skill}}">
|
|
<span data-i18n="acrobatics">Acrobatics</span>
|
|
<span class="stat" name="attr_npc_acrobatics"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="animal_handling">
|
|
<input class="flag" type="hidden" name="attr_npc_animal_handling_flag" value="0">
|
|
<button type="roll" name="roll_npc_animal_handling" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{animal_handling}}} {{mod=@{npc_animal_handling}}} {{r1=[[@{d20}+@{npc_animal_handling}]]}} @{rtype}+@{npc_animal_handling}]]}} {{type=Skill}}">
|
|
<span data-i18n="animal_handling">Animal Handling</span>
|
|
<span class="stat" name="attr_npc_animal_handling"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="athletics">
|
|
<input class="flag" type="hidden" name="attr_npc_athletics_flag" value="0">
|
|
<button type="roll" name="roll_npc_athletics" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{athletics}}} {{mod=@{npc_athletics}}} {{r1=[[@{d20}+@{npc_athletics}]]}} @{rtype}+@{npc_athletics}]]}} {{type=Skill}}">
|
|
<span data-i18n="athletics">Athletics</span>
|
|
<span class="stat" name="attr_npc_athletics"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="deception">
|
|
<input class="flag" type="hidden" name="attr_npc_deception_flag" value="0">
|
|
<button type="roll" name="roll_npc_deception" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{deception}}} {{mod=@{npc_deception}}} {{r1=[[@{d20}+@{npc_deception}]]}} @{rtype}+@{npc_deception}]]}} {{type=Skill}}">
|
|
<span data-i18n="deception">Deception</span>
|
|
<span class="stat" name="attr_npc_deception"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="eldertech">
|
|
<input class="flag" type="hidden" name="attr_npc_eldertech_flag" value="0">
|
|
<button type="roll" name="roll_npc_eldertech" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{eldertech}}} {{mod=@{npc_eldertech}}} {{r1=[[@{d20}+@{npc_eldertech}]]}} @{rtype}+@{npc_eldertech}]]}} {{type=Skill}}">
|
|
<span data-i18n="eldertech">Eldertech</span>
|
|
<span class="stat" name="attr_npc_eldertech"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="history">
|
|
<input class="flag" type="hidden" name="attr_npc_history_flag" value="0">
|
|
<button type="roll" name="roll_npc_history" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{history}}} {{mod=@{npc_history}}} {{r1=[[@{d20}+@{npc_history}]]}} @{rtype}+@{npc_history}]]}} {{type=Skill}}">
|
|
<span data-i18n="history">History</span>
|
|
<span class="stat" name="attr_npc_history"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="insight">
|
|
<input class="flag" type="hidden" name="attr_npc_insight_flag" value="0">
|
|
<button type="roll" name="roll_npc_insight" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{insight}}} {{mod=@{npc_insight}}} {{r1=[[@{d20}+@{npc_insight}]]}} @{rtype}+@{npc_insight}]]}} {{type=Skill}}">
|
|
<span data-i18n="insight">Insight</span>
|
|
<span class="stat" name="attr_npc_insight"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="intimidation">
|
|
<input class="flag" type="hidden" name="attr_npc_intimidation_flag" value="0">
|
|
<button type="roll" name="roll_npc_intimidation" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{intimidation}}} {{mod=@{npc_intimidation}}} {{r1=[[@{d20}+@{npc_intimidation}]]}} @{rtype}+@{npc_intimidation}]]}} {{type=Skill}}">
|
|
<span data-i18n="intimidation">Intimidation</span>
|
|
<span class="stat" name="attr_npc_intimidation"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="investigation">
|
|
<input class="flag" type="hidden" name="attr_npc_investigation_flag" value="0">
|
|
<button type="roll" name="roll_npc_investigation" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{investigation}}} {{mod=@{npc_investigation}}} {{r1=[[@{d20}+@{npc_investigation}]]}} @{rtype}+@{npc_investigation}]]}} {{type=Skill}}">
|
|
<span data-i18n="investigation">Investigation</span>
|
|
<span class="stat" name="attr_npc_investigation"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="materials">
|
|
<input class="flag" type="hidden" name="attr_npc_materials_flag" value="0">
|
|
<button type="roll" name="roll_npc_materials" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{materials}}} {{mod=@{npc_materials}}} {{r1=[[@{d20}+@{npc_materials}]]}} @{rtype}+@{npc_materials}]]}} {{type=Skill}}">
|
|
<span data-i18n="materials">Materials</span>
|
|
<span class="stat" name="attr_npc_materials"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="medicine">
|
|
<input class="flag" type="hidden" name="attr_npc_medicine_flag" value="0">
|
|
<button type="roll" name="roll_npc_medicine" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{medicine}}} {{mod=@{npc_medicine}}} {{r1=[[@{d20}+@{npc_medicine}]]}} @{rtype}+@{npc_medicine}]]}} {{type=Skill}}">
|
|
<span data-i18n="medicine">Medicine</span>
|
|
<span class="stat" name="attr_npc_medicine"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="nature">
|
|
<input class="flag" type="hidden" name="attr_npc_nature_flag" value="0">
|
|
<button type="roll" name="roll_npc_nature" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{nature}}} {{mod=@{npc_nature}}} {{r1=[[@{d20}+@{npc_nature}]]}} @{rtype}+@{npc_nature}]]}} {{type=Skill}}">
|
|
<span data-i18n="nature">Nature</span>
|
|
<span class="stat" name="attr_npc_nature"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="perception">
|
|
<input class="flag" type="hidden" name="attr_npc_perception_flag" value="0">
|
|
<button type="roll" name="roll_npc_perception" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{perception}}} {{mod=@{npc_perception}}} {{r1=[[@{d20}+@{npc_perception}]]}} @{rtype}+@{npc_perception}]]}} {{type=Skill}}">
|
|
<span data-i18n="perception">Perception</span>
|
|
<span class="stat" name="attr_npc_perception"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="performance">
|
|
<input class="flag" type="hidden" name="attr_npc_performance_flag" value="0">
|
|
<button type="roll" name="roll_npc_performance" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{performance}}} {{mod=@{npc_performance}}} {{r1=[[@{d20}+@{npc_performance}]]}} @{rtype}+@{npc_performance}]]}} {{type=Skill}}">
|
|
<span data-i18n="performance">Performance</span>
|
|
<span class="stat" name="attr_npc_performance"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="persuasion">
|
|
<input class="flag" type="hidden" name="attr_npc_persuasion_flag" value="0">
|
|
<button type="roll" name="roll_npc_persuasion" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{persuasion}}} {{mod=@{npc_persuasion}}} {{r1=[[@{d20}+@{npc_persuasion}]]}} @{rtype}+@{npc_persuasion}]]}} {{type=Skill}}">
|
|
<span data-i18n="persuasion">Persuasion</span>
|
|
<span class="stat" name="attr_npc_persuasion"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="politics">
|
|
<input class="flag" type="hidden" name="attr_npc_politics_flag" value="0">
|
|
<button type="roll" name="roll_npc_politics" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{politics}}} {{mod=@{npc_politics}}} {{r1=[[@{d20}+@{npc_politics}]]}} @{rtype}+@{npc_politics}]]}} {{type=Skill}}">
|
|
<span data-i18n="politics">Politics</span>
|
|
<span class="stat" name="attr_npc_politics"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="religion">
|
|
<input class="flag" type="hidden" name="attr_npc_religion_flag" value="0">
|
|
<button type="roll" name="roll_npc_religion" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{religion}}} {{mod=@{npc_religion}}} {{r1=[[@{d20}+@{npc_religion}]]}} @{rtype}+@{npc_religion}]]}} {{type=Skill}}">
|
|
<span data-i18n="religion">Religion</span>
|
|
<span class="stat" name="attr_npc_religion"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="sleight_of_hand">
|
|
<input class="flag" type="hidden" name="attr_npc_sleight_of_hand_flag" value="0">
|
|
<button type="roll" name="roll_npc_sleight_of_hand" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{sleight_of_hand}}} {{mod=@{npc_sleight_of_hand}}} {{r1=[[@{d20}+@{npc_sleight_of_hand}]]}} @{rtype}+@{npc_sleight_of_hand}]]}} {{type=Skill}}">
|
|
<span data-i18n="sleight_of_hand">Sleight of Hand</span>
|
|
<span class="stat" name="attr_npc_sleight_of_hand"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="stealth">
|
|
<input class="flag" type="hidden" name="attr_npc_stealth_flag" value="0">
|
|
<button type="roll" name="roll_npc_stealth" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{stealth}}} {{mod=@{npc_stealth}}} {{r1=[[@{d20}+@{npc_stealth}]]}} @{rtype}+@{npc_stealth}]]}} {{type=Skill}}">
|
|
<span data-i18n="stealth">Stealth</span>
|
|
<span class="stat" name="attr_npc_stealth"></span>
|
|
</button>
|
|
</span>
|
|
<span data-i18n-list-item="survival">
|
|
<input class="flag" type="hidden" name="attr_npc_survival_flag" value="0">
|
|
<button type="roll" name="roll_npc_survival" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{survival}}} {{mod=@{npc_survival}}} {{r1=[[@{d20}+@{npc_survival}]]}} @{rtype}+@{npc_survival}]]}} {{type=Skill}}">
|
|
<span data-i18n="survival">Survival</span>
|
|
<span class="stat" name="attr_npc_survival"></span>
|
|
</button>
|
|
</span>
|
|
</div>
|
|
<input class="flag" type="hidden" name="attr_npc_vulnerabilities">
|
|
<div class="row status vulnerabilities red">
|
|
<span class="bold" data-i18n="dmg-vuln">Damage Vulnerabilities</span>
|
|
<span class="info" name="attr_npc_vulnerabilities"></span>
|
|
</div>
|
|
<input class="flag" type="hidden" name="attr_npc_resistances">
|
|
<div class="row status resistances red">
|
|
<span class="bold" data-i18n="dmg-res">Damage Resistances</span>
|
|
<span class="info" name="attr_npc_resistances"></span>
|
|
</div>
|
|
<input class="flag" type="hidden" name="attr_npc_immunities">
|
|
<div class="row status immunities red">
|
|
<span class="bold" data-i18n="dmg-imm">Damage Immunities</span>
|
|
<span class="info" name="attr_npc_immunities"></span>
|
|
</div>
|
|
<input class="flag" type="hidden" name="attr_npc_condition_immunities">
|
|
<div class="row status condition_immunities red">
|
|
<span class="bold" data-i18n="cond-imm">Condition Immunities</span>
|
|
<span class="info" name="attr_npc_condition_immunities"></span>
|
|
</div>
|
|
<input class="flag" type="hidden" name="attr_npc_armor_protections">
|
|
<div class="row status protections red">
|
|
<span class="bold" data-i18n="arm-prot">Armor Protections</span>
|
|
<span class="info" name="attr_npc_armor_protections"></span>
|
|
</div>
|
|
<input class="flag" type="hidden" name="attr_npc_armor_weaknesses">
|
|
<div class="row status weaknesses red">
|
|
<span class="bold" data-i18n="arm-weak">Armor Weaknesses</span>
|
|
<span class="info" name="attr_npc_armor_weaknesses"></span>
|
|
</div>
|
|
<div class="row senses red">
|
|
<span class="bold" data-i18n="senses">Senses</span>
|
|
<span class="info" name="attr_npc_senses"></span>
|
|
</div>
|
|
<div class="row languages red">
|
|
<span class="bold" data-i18n="langs">Languages</span>
|
|
<span class="info languages" name="attr_npc_languages" value="—"></span>
|
|
</div>
|
|
<div class="row red">
|
|
<span class="bold" data-i18n="challenge">Challenge</span>
|
|
<span class="num" name="attr_npc_challenge"></span>
|
|
<span class="parens xp" name="attr_npc_xp"></span>
|
|
</div>
|
|
<div class="triangle"></div>
|
|
<div class="row traits">
|
|
<fieldset class="repeating_npctrait">
|
|
<div class="trait">
|
|
<input type="text" name="attr_name" placeholder="False Appearance." data-i18n-placeholder="npc-trait-name-place">
|
|
<textarea name="attr_desc" placeholder="If the dragon fails..." data-i18n-placeholder="npc-trait-desc-place"></textarea>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
<div class="actions_container"></div>
|
|
<input class="dflag" type="hidden" name="attr_dflag" value="pick">
|
|
<div class="row actions">
|
|
<div class="row actiontitle" style="position: relative;">
|
|
<span class="title red" data-i18n="actions">Actions</span>
|
|
</div>
|
|
<fieldset class="repeating_npcaction">
|
|
<div class="action">
|
|
<input class="npc_options-flag" type="checkbox" name="attr_npc_options-flag" checked="checked"><span>y</span>
|
|
<div class="npc_options">
|
|
<div class="row">
|
|
<span data-i18n="name:-u">NAME:</span>
|
|
<input type="text" name="attr_name">
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_attack_flag" value="on">
|
|
<span data-i18n="attack-u">ATTACK</span>
|
|
</div>
|
|
<input type="hidden" class="attack_options" name="attr_attack_flag" value="0">
|
|
<div class="row attack_option">
|
|
<span data-i18n="type:-u">TYPE:</span>
|
|
<select name="attr_attack_type">
|
|
<option value="Melee" data-i18n="melee">Melee</option>
|
|
<option value="Ranged" data-i18n="ranged">Ranged</option>
|
|
</select>
|
|
<span style="margin-left: 15px;" data-i18n="range-reach:-u">RANGE/REACH:</span>
|
|
<input type="text" name="attr_attack_range" placeholder="5 ft." style="width: 100px;" data-i18n-placeholder="range-reach-place">
|
|
</div>
|
|
<div class="row attack_option">
|
|
<span data-i18n="to-hit:-u">TO HIT:</span>
|
|
<input type="text" name="attr_attack_tohit" value="0" placeholder="5" style="width: 30px;">
|
|
<span style="margin-left: 15px;" data-i18n="target:-u">TARGET:</span>
|
|
<input type="text" name="attr_attack_target" placeholder="One target" style="width: 100px;" data-i18n-placeholder="to-hit-place">
|
|
</div>
|
|
<input type="hidden" name="attr_damage_flag">
|
|
<div class="row attack_option">
|
|
<span data-i18n="on-hit:-u">ON HIT:</span>
|
|
<input type="text" name="attr_attack_damage" placeholder="1d10" style="width: 65px;">
|
|
<input type="text" name="attr_attack_damagetype" placeholder="slashing" style="width: 100px;" data-i18n-placeholder="on-hit-place">
|
|
<input type="hidden" name="attr_attack_crit">
|
|
</div>
|
|
<div class="row attack_option">
|
|
<span data-i18n="on-hit2:-u">ON HIT 2:</span>
|
|
<input type="text" name="attr_attack_damage2" placeholder="2d6+5" style="width: 65px;">
|
|
<input type="text" name="attr_attack_damagetype2" placeholder="fire" style="width: 100px;" data-i18n-placeholder="on-hit-2-place">
|
|
<input type="hidden" name="attr_attack_crit2">
|
|
</div>
|
|
<div class="row attack_option">
|
|
<span data-i18n="desc:-u">DESCRIPTION:</span>
|
|
<select name="attr_show_desc">
|
|
<option value="@{description}" data-i18n="show">Show</option>
|
|
<option value=" " data-i18n="hide">Hide</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<textarea name="attr_description"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="display">
|
|
<button class="pick" type="roll" name="roll_npc_action" value="@{rollbase}">
|
|
<div class="row wide">
|
|
<span class="bold wide" name="attr_name"></span>
|
|
</div>
|
|
<input class="attack_options" type="hidden" name="attr_attack_flag">
|
|
<div class="row attack attack_option">
|
|
<span class="italics" name="attr_attack_type"></span><span class="italics"> Weapon Attack: </span><span name="attr_attack_tohitrange"></span>
|
|
</div>
|
|
<div class="row attack attack_option">
|
|
<span class="italics" style="font-size: 13px; font-weight: normal; vertical-align: middle;" data-i18n="hit:">Hit: </span><span name="attr_attack_onhit" style="vertical-align: middle;"></span>
|
|
</div>
|
|
<span class="description" name="attr_description"></span>
|
|
</button>
|
|
</div>
|
|
<input type="hidden" name="attr_rollbase">
|
|
<button type="roll" style="display: none;" name="roll_npc_dmg" value="@{wtype}&{template:npcdmg} @{damage_flag} {{dmg1=[[@{attack_damage}+0]]}} {{dmg1type=@{attack_damagetype}}} {{dmg2=[[@{attack_damage2}+0]]}} {{dmg2type=@{attack_damagetype2}}}"></button>
|
|
<button type="roll" style="display: none;" name="roll_npc_crit" value="@{wtype}&{template:npcdmg} @{damage_flag} {{crit=1}} {{dmg1=[[@{attack_damage}+0]]}} {{dmg1type=@{attack_damagetype}}} {{dmg2=[[@{attack_damage2}+0]]}} {{dmg2type=@{attack_damagetype2}}} {{crit1=[[@{attack_crit}+0]]}} {{crit2=[[@{attack_crit2}+0]]}}"></button>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<input class="reaction_flag" type="hidden" name="attr_npcreactionsflag">
|
|
<div class="row actions reaction">
|
|
<div class="row actiontitle">
|
|
<span class="title red" data-i18n="reactions">Reactions</span>
|
|
</div>
|
|
<fieldset class="repeating_npcreaction">
|
|
<div class="trait">
|
|
<input type="text" name="attr_name" placeholder="Parry." data-i18n-placeholder="npc-repeating-name-place">
|
|
<textarea name="attr_desc" placeholder="The creature adds 2 to its AC against..." data-i18n-placeholder="npc-repeating-desc-place"></textarea>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<input class="legendary_flag" type="hidden" name="attr_npc_legendary_actions" value="0">
|
|
<div class="row actions legendary">
|
|
<div class="row actiontitle">
|
|
<span class="title red" data-i18n="leg-actions">Legendary Actions</span>
|
|
</div>
|
|
<div class="row">
|
|
<div class="legendaryactions" data-i18n="leg-actions-desc"><span name="attr_npc_legendary_actions_desc"></span></div>
|
|
</div>
|
|
<fieldset class="repeating_npcaction-l">
|
|
<div class="action">
|
|
<input class="npc_options-flag" type="checkbox" name="attr_npc_options-flag" checked="checked"><span>y</span>
|
|
<div class="npc_options">
|
|
<div class="row">
|
|
<span data-i18n="name:-u">NAME:</span>
|
|
<input type="text" name="attr_name">
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_attack_flag" value="on">
|
|
<span data-i18n="attack-u">ATTACK</span>
|
|
</div>
|
|
<input type="hidden" class="attack_options" name="attr_attack_flag" value="0">
|
|
<div class="row attack_option">
|
|
<span data-i18n="type:-u">TYPE:</span>
|
|
<select name="attr_attack_type">
|
|
<option value="Melee" data-i18n="melee">Melee</option>
|
|
<option value="Ranged" data-i18n="ranged">Ranged</option>
|
|
</select>
|
|
<span style="margin-left: 15px;" data-i18n="range-reach:-u">RANGE/REACH:</span>
|
|
<input type="text" name="attr_attack_range" placeholder="5 ft." style="width: 100px;" data-i18n-placeholder="range-reach-place">
|
|
</div>
|
|
<div class="row attack_option">
|
|
<span data-i18n="to-hit:-u">TO HIT:</span>
|
|
<input type="text" name="attr_attack_tohit" value="0" placeholder="5" style="width: 30px;">
|
|
<span style="margin-left: 15px;" data-i18n="target:-u">TARGET:</span>
|
|
<input type="text" name="attr_attack_target" placeholder="One target" style="width: 100px;" data-i18n-placeholder="to-hit-place">
|
|
</div>
|
|
<input type="hidden" name="attr_damage_flag">
|
|
<div class="row attack_option">
|
|
<span data-i18n="on-hit:-u">ON HIT:</span>
|
|
<input type="text" name="attr_attack_damage" placeholder="1d10" style="width: 65px;">
|
|
<input type="text" name="attr_attack_damagetype" placeholder="slashing" style="width: 100px;" data-i18n-placeholder="on-hit-place">
|
|
<input type="hidden" name="attr_attack_crit">
|
|
</div>
|
|
<div class="row attack_option">
|
|
<span data-i18n="on-hit2:-u">ON HIT 2:</span>
|
|
<input type="text" name="attr_attack_damage2" placeholder="2d6+5" style="width: 65px;">
|
|
<input type="text" name="attr_attack_damagetype2" placeholder="fire" style="width: 100px;" data-i18n-placeholder="on-hit-2-place">
|
|
<input type="hidden" name="attr_attack_crit2">
|
|
</div>
|
|
<div class="row attack_option">
|
|
<span data-i18n="desc:-u">DESCRIPTION:</span>
|
|
<select name="attr_show_desc">
|
|
<option value="@{description}" data-i18n="show">Show</option>
|
|
<option value=" " data-i18n="hide">Hide</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<textarea name="attr_description"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="display">
|
|
<button class="pick" type="roll" name="roll_npc_action" value="@{rollbase}">
|
|
<div class="row wide">
|
|
<span class="bold wide" name="attr_name"></span>
|
|
</div>
|
|
<input class="attack_options" type="hidden" name="attr_attack_flag">
|
|
<div class="row attack attack_option">
|
|
<span class="italics" name="attr_attack_type"></span><span class="italics"> Weapon Attack: </span><span name="attr_attack_tohitrange"></span>
|
|
</div>
|
|
<div class="row attack attack_option">
|
|
<span class="italics" style="font-size: 13px; font-weight: normal; vertical-align: middle;" data-i18n="hit:">Hit: </span><span name="attr_attack_onhit" style="vertical-align: middle;"></span>
|
|
</div>
|
|
<span class="description" name="attr_description"></span>
|
|
</button>
|
|
</div>
|
|
<input type="hidden" name="attr_rollbase">
|
|
<button type="roll" style="display: none;" name="roll_npc_dmg" value="@{wtype}&{template:npcdmg} @{damage_flag} {{dmg1=[[@{attack_damage}+0]]}} {{dmg1type=@{attack_damagetype}}} {{dmg2=[[@{attack_damage2}+0]]}} {{dmg2type=@{attack_damagetype2}}}"></button>
|
|
<button type="roll" style="display: none;" name="roll_npc_crit" value="@{wtype}&{template:npcdmg} @{damage_flag} {{crit=1}} {{dmg1=[[@{attack_damage}+0]]}} {{dmg1type=@{attack_damagetype}}} {{dmg2=[[@{attack_damage2}+0]]}} {{dmg2type=@{attack_damagetype2}}} {{crit1=[[@{attack_crit}+0]]}} {{crit2=[[@{attack_crit2}+0]]}}"></button>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<input class="npcspell_flag" type="hidden" name="attr_npcspell_flag">
|
|
<div class="row actions npcspell spells">
|
|
<div class="row actiontitle">
|
|
<span class="title red" style="font-weight: normal; text-align: left;" data-i18n="spells">Spells</span>
|
|
</div>
|
|
<div class="warning"><span style="color:#d06300;">THIS SECTION IS DEPRECATED. PLEASE TRANSFER ANY SPELLS LISTED HERE INTO THE NEW SPELLS BY LEVEL SECTION, AVAILABLE AFTER SELECTING THE 'SPELLCASTING NPC' OPTION FROM THE NPC OPTIONS ABOVE.</span></div>
|
|
<div class="spell-container">
|
|
<fieldset class="repeating_spell-npc">
|
|
<div class="spell">
|
|
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
|
|
<div class="options">
|
|
<div class="row">
|
|
<span data-i18n="name:-u">NAME:</span>
|
|
<input type="text" name="attr_spellname">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="school:-u">SCHOOL:</span>
|
|
<select name="attr_spellschool">
|
|
<option value="abjuration" data-i18n="abjuration">Abjuration</option>
|
|
<option value="conjuration" data-i18n="conjuration">Conjuration</option>
|
|
<option value="divination" data-i18n="divination">Divination</option>
|
|
<option value="enchantment" data-i18n="enchantment">Enchantment</option>
|
|
<option value="evocation" data-i18n="evocation">Evocation</option>
|
|
<option value="illusion" data-i18n="illusion">Illusion</option>
|
|
<option value="necromancy" data-i18n="necromancy">Necromancy</option>
|
|
<option value="transmutation" data-i18n="transmutation">Transmutation</option>
|
|
</select>
|
|
<input type="checkbox" name="attr_spellritual" value="{{ritual=1}}">
|
|
<span data-i18n="ritual-u">RITUAL</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="casting-time:-u">CASTING TIME:</span>
|
|
<input type="text" name="attr_spellcastingtime">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="range:-u">RANGE:</span>
|
|
<input type="text" name="attr_spellrange">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="target:-u">TARGET:</span>
|
|
<input type="text" name="attr_spelltarget">
|
|
</div>
|
|
<input type="hidden" name="attr_spellcomp">
|
|
<div class="row">
|
|
<span data-i18n="components:-u">COMPONENTS:</span>
|
|
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked">
|
|
<span data-i18n="spell-component-verbal">V</span>
|
|
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked">
|
|
<span data-i18n="spell-component-somatic">S</span>
|
|
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked">
|
|
<span data-i18n="spell-component-material">M</span>
|
|
<input type="text" name="attr_spellcomp_materials" style="margin-left: 17px;" placeholder="ruby dust worth 50gp" data-i18n-placeholder="ruby-dust-place">
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_spellconcentration" value="{{concentration=1}}">
|
|
<span data-i18n="concentration-u">CONCENTRATION</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="duration:-u">DURATION:</span>
|
|
<input type="text" name="attr_spellduration">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="innate:-u">INNATE:</span>
|
|
<input type="text" name="attr_innate" placeholder="1/day" value="">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="output:-u">OUTPUT:</span>
|
|
<select name="attr_spelloutput">
|
|
<option value="SPELLCARD" data-i18n="spellcard-u">SPELLCARD</option>
|
|
<option value="ATTACK" data-i18n="attack-u">ATTACK</option>
|
|
</select>
|
|
</div>
|
|
<input type="hidden" class="spellattackinfoflag" name="attr_spelloutput">
|
|
<div class="spellattackinfo">
|
|
<div class="row">
|
|
<span data-i18n="spell-atk:-u">SPELL ATTACK:</span>
|
|
<select name="attr_spellattack">
|
|
<option value="None" data-i18n="none">None</option>
|
|
<option value="Melee" data-i18n="melee">Melee</option>
|
|
<option value="Melee" data-i18n="ranged">Ranged</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="dmg:-u">DAMAGE:</span>
|
|
<input type="text" name="attr_spelldamage" style="width: 50px;">
|
|
<span data-i18n="type:-u">TYPE:</span>
|
|
<input type="text" name="attr_spelldamagetype" style="width: 103px;">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="dmg2:-u">DAMAGE2:</span>
|
|
<input type="text" name="attr_spelldamage2" style="width: 45px;">
|
|
<span data-i18n="type:-u">TYPE:</span>
|
|
<input type="text" name="attr_spelldamagetype2" style="width: 103px;">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="healing:-u">HEALING:</span>
|
|
<input type="text" name="attr_spellhealing" style="width: 45px;">
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_spelldmgmod" value="Yes">
|
|
<span data-i18n="add-ability-mod-u">ADD ABILITY MOD TO DAMAGE OR HEALING</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
|
|
<select name="attr_spellsave">
|
|
<option value="" selected="selected" data-i18n="none-u">NONE</option>
|
|
<option value="Strength" data-i18n="str-u">STR</option>
|
|
<option value="Dexterity" data-i18n="dex-u">DEX</option>
|
|
<option value="Constitution" data-i18n="con-u">CON</option>
|
|
<option value="Intelligence" data-i18n="int-u">INT</option>
|
|
<option value="Wisdom" data-i18n="wis-u">WIS</option>
|
|
<option value="Charisma" data-i18n="cha-u">CHA</option>
|
|
</select>
|
|
<span data-i18n="effect:-u">EFFECT:</span>
|
|
<input type="text" name="attr_spellsavesuccess" style="width: 78px;" placeholder="Half damage" data-i18n-placeholder="npc-atk-effect-place">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="at-higher-lvl-dmg:-u">HIGHER LVL CAST DMG:</span>
|
|
<input type="text" name="attr_spellhldie" placeholder="1" style="width: 15px; text-align: right;">
|
|
<select name="attr_spellhldietype">
|
|
<option value="" selected="selected" data-i18n="none-u">NONE</option>
|
|
<option value="d4">d4</option>
|
|
<option value="d6">d6</option>
|
|
<option value="d8">d8</option>
|
|
<option value="d10">d10</option>
|
|
<option value="d12">d12</option>
|
|
<option value="d20">d20</option>
|
|
</select>
|
|
<span>+</span>
|
|
<input type="text" name="attr_spellhlbonus" placeholder="0" style="width: 15px; text-align: center;">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="include_spell_desc:-u">INCLUDE SPELL DESCRIPTION IN ATTACK:</span>
|
|
<select name="attr_includedesc">
|
|
<option value="on" data-i18n="on">On</option>
|
|
<option value="off" selected="selected" data-i18n="off">Off</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="desc:-u">DESCRIPTION:</span>
|
|
</div>
|
|
<div class="row">
|
|
<textarea name="attr_spelldescription"></textarea>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="at-higher-lvl:-u">AT HIGHER LEVELS:</span>
|
|
</div>
|
|
<div class="row">
|
|
<textarea name="attr_spellathigherlevels" style="height: 36px; min-height: 36px;"></textarea>
|
|
</div>
|
|
<input type="hidden" name="attr_spellattackid">
|
|
<input type="hidden" name="attr_spelllevel">
|
|
<input type="hidden" name="attr_rollbase">
|
|
</div>
|
|
<div class="display">
|
|
<input type="hidden" name="attr_rollcontent" value="@{wtype}&{template:spell} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} {{innate=@{innate}}} @{spellconcentration} @{charname_output}">
|
|
<button class="spellcard" type="roll" name="roll_spell" value="@{rollcontent}">
|
|
<input type="hidden" name="attr_spellprepared"><span class="prep"></span>
|
|
<span class="spellname" name="attr_spellname"></span>
|
|
</button>
|
|
<input type="hidden" class="spellritual" name="attr_spellritual" value="0">
|
|
<input type="hidden" class="spellconcentration" name="attr_spellconcentration" value="0">
|
|
<span class="spellritual">R</span>
|
|
<span class="spellconcentration">C</span>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
</div><div class="container pc"><input class="tab-button core" name="attr_tab" type="radio" value="core" checked="checked"/><span data-i18n="core-u">CORE</span><input class="tab-button bio" name="attr_tab" type="radio" value="bio"/><span data-i18n="bio-u">BIO</span><input class="tab-button options" name="attr_tab" type="radio" value="options"/><span style="font-family: pictos">y</span><div class="page core">
|
|
<div class="header">
|
|
<div class="name-container">
|
|
<img src="https://raw.githubusercontent.com/solar-studios/Roll20Redsky/main/images/Redsky_logo_small_no_spikes.png" style="padding-bottom: 5px;" alt="Redsky by Solar Studios">
|
|
<input type="text" name="attr_character_name" style="width: 100%;">
|
|
<span class="label" data-i18n="char-name-u">CHARACTER NAME</span>
|
|
</div>
|
|
<input class="options-flag" type="checkbox" name="attr_options-class-selection" checked="checked"><span>y</span>
|
|
<div class="header-info sheet-options">
|
|
<div class="sheet-row" style="border-top: 2px dashed gold;">
|
|
<span data-i18n="class:-u">CLASS:</span>
|
|
<input type="hidden" name="attr_custom_class" class="sheet-flag">
|
|
<select class="hiding class" name="attr_class">
|
|
<option value="" data-i18n="choose">Choose</option>
|
|
<option value="Emissary" data-i18n="emissary">Emissary</option>
|
|
<option value="Fighter" data-i18n="fighter">Fighter</option>
|
|
<option value="Hunter" data-i18n="hunter">Hunter</option>
|
|
<option value="Rogue" data-i18n="rogue">Rogue</option>
|
|
<option value="Sage" data-i18n="sage">Sage</option>
|
|
<option value="Wordsmith" data-i18n="wordsmith">Wordsmith</option>
|
|
</select>
|
|
<input type="text" class="showing" name="attr_cust_classname" style="width: 90px;">
|
|
<span data-i18n="subclass:-u">SUBCLASS:</span>
|
|
<input type="text" name="attr_subclass">
|
|
<span data-i18n="lvl:-u">LEVEL:</span>
|
|
<input type="number" class="class-level" style="width: 40px" name="attr_base_level" value="1">
|
|
</div>
|
|
<div class="sheet-row">
|
|
<span data-i18n="race:-u">SPECIES:</span>
|
|
<input type="text" name="attr_race">
|
|
<span data-i18n="subrace:-u">SUBSPECIES:</span>
|
|
<input type="text" name="attr_subrace">
|
|
</div>
|
|
</div>
|
|
<div class="header-info sheet-display">
|
|
<div class="top">
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_class_display" class="sheet-class-display sheet-no_events">
|
|
<span class="label" data-i18n="class-level-u">CLASS & LEVEL</span>
|
|
</div>
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_background" style="width: 182px;">
|
|
<span class="label" data-i18n="background-u">BACKGROUND</span>
|
|
</div>
|
|
</div>
|
|
<div class="bottom">
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_race_display" class="sheet-no_events">
|
|
<span class="label" data-i18n="race-u">SPECIES</span>
|
|
</div>
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_alignment">
|
|
<span class="label" data-i18n="elements-u">ELEMENTS</span>
|
|
</div>
|
|
<div class="hlabel-container" style="position: relative;">
|
|
<input type="text" name="attr_experience">
|
|
<span class="label" data-i18n="exp-pts-u">EXPERIENCE POINTS</span>
|
|
<input class="sheet-showleveler" type="hidden" name="attr_showleveler" value="0">
|
|
<button class="sheet-levelerbutton" type="action" name="act_launch_lvl+mancer" style="padding: 0px; position: absolute; top: -10px; right: 0px;" title="Charactermancer Level Up"><img src="https://raw.githubusercontent.com/solar-studios/Roll20Redsky/main/images/CharactermancerIcon200px.png" style="height: 18px; width: 18px; max-width: inherit;" alt="Wand & Hammer logo of Charactermancer"></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="body">
|
|
<div class="col col1">
|
|
<div class="attributes-container" style="margin-top: 10px;">
|
|
<div class="attr-container">
|
|
<button type="roll" name="roll_strength" value="@{wtype}&{template:simple} {{rname=^{strength-u}}} {{mod=@{strength_mod}@{jack_bonus}}} {{r1=[[@{d20}+@{strength_mod}@{jack_attr}[STR]]]}} @{rtype}+@{strength_mod}@{jack_attr}[STR]]]}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="strength-u">STRENGTH</button>
|
|
<span class="attr" name="attr_strength_mod" title="@{strength_mod}">0</span>
|
|
<div class="attr-mod">
|
|
<input class="baseattr" type="text" name="attr_strength_base" title="@{strength}" value="10">
|
|
<input type="hidden" name="attr_strength" value="10">
|
|
<input class="attr-flag" type="hidden" name="attr_strength_flag" value="0">
|
|
<span class="finalattr" name="attr_strength"></span>
|
|
</div>
|
|
</div>
|
|
<div class="attr-container">
|
|
<button type="roll" name="roll_dexterity" value="@{wtype}&{template:simple} {{rname=^{dexterity-u}}} {{mod=@{dexterity_mod}@{jack_bonus}}} {{r1=[[@{d20}+@{dexterity_mod}@{jack_attr}[DEX]]]}} @{rtype}+@{dexterity_mod}@{jack_attr}[DEX]]]}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="dexterity-u">DEXTERITY</button>
|
|
<span class="attr" name="attr_dexterity_mod" title="@{dexterity_mod}">0</span>
|
|
<div class="attr-mod">
|
|
<input class="baseattr" type="text" name="attr_dexterity_base" title="@{dexterity}" value="10">
|
|
<input type="hidden" name="attr_dexterity" value="10">
|
|
<input class="attr-flag" type="hidden" name="attr_dexterity_flag" value="0">
|
|
<span class="finalattr" name="attr_dexterity"></span>
|
|
</div>
|
|
</div>
|
|
<div class="attr-container">
|
|
<button type="roll" name="roll_constitution" value="@{wtype}&{template:simple} {{rname=^{constitution-u}}} {{mod=@{constitution_mod}@{jack_bonus}}} {{r1=[[@{d20}+@{constitution_mod}@{jack_attr}[CON]]]}} @{rtype}+@{constitution_mod}@{jack_attr}[CON]]]}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="constitution-u">CONSTITUTION</button>
|
|
<span class="attr" name="attr_constitution_mod" title="@{constitution_mod}">0</span>
|
|
<div class="attr-mod">
|
|
<input class="baseattr" type="text" name="attr_constitution_base" title="@{constitution}" value="10">
|
|
<input type="hidden" name="attr_constitution" value="10">
|
|
<input class="attr-flag" type="hidden" name="attr_constitution_flag" value="0">
|
|
<span class="finalattr" name="attr_constitution"></span>
|
|
</div>
|
|
</div>
|
|
<div class="attr-container">
|
|
<button type="roll" name="roll_intelligence" value="@{wtype}&{template:simple} {{rname=^{intelligence-u}}} {{mod=@{intelligence_mod}@{jack_bonus}}} {{r1=[[@{d20}+@{intelligence_mod}@{jack_attr}[INT]]]}} @{rtype}+@{intelligence_mod}@{jack_attr}[INT]]]}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="intelligence-u">INTELLIGENCE</button>
|
|
<span class="attr" name="attr_intelligence_mod" title="@{intelligence_mod}">0</span>
|
|
<div class="attr-mod">
|
|
<input class="baseattr" type="text" name="attr_intelligence_base" title="@{intelligence}" value="10">
|
|
<input type="hidden" name="attr_intelligence" value="10">
|
|
<input class="attr-flag" type="hidden" name="attr_intelligence_flag" value="0">
|
|
<span class="finalattr" name="attr_intelligence"></span>
|
|
</div>
|
|
</div>
|
|
<div class="attr-container">
|
|
<button type="roll" name="roll_wisdom" value="@{wtype}&{template:simple} {{rname=^{wisdom-u}}} {{mod=@{wisdom_mod}@{jack_bonus}}} {{r1=[[@{d20}+@{wisdom_mod}@{jack_attr}[WIS]]]}} @{rtype}+@{wisdom_mod}@{jack_attr}[WIS]]]}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="wisdom-u">WISDOM</button>
|
|
<span class="attr" name="attr_wisdom_mod" title="@{wisdom_mod}">0</span>
|
|
<div class="attr-mod">
|
|
<input class="baseattr" type="text" name="attr_wisdom_base" title="@{wisdom}" value="10">
|
|
<input type="hidden" name="attr_wisdom" value="10">
|
|
<input class="attr-flag" type="hidden" name="attr_wisdom_flag" value="0">
|
|
<span class="finalattr" name="attr_wisdom"></span>
|
|
</div>
|
|
</div>
|
|
<div class="attr-container">
|
|
<button type="roll" name="roll_charisma" value="@{wtype}&{template:simple} {{rname=^{charisma-u}}} {{mod=@{charisma_mod}@{jack_bonus}}} {{r1=[[@{d20}+@{charisma_mod}@{jack_attr}[CHA]]]}} @{rtype}+@{charisma_mod}@{jack_attr}[CHA]]]}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="charisma-u">CHARISMA</button>
|
|
<span class="attr" name="attr_charisma_mod" title="@{charisma_mod}">0</span>
|
|
<div class="attr-mod">
|
|
<input class="baseattr" type="text" name="attr_charisma_base" title="@{charisma}" value="10">
|
|
<input type="hidden" name="attr_charisma" value="10">
|
|
<input class="attr-flag" type="hidden" name="attr_charisma_flag" value="0">
|
|
<span class="finalattr" name="attr_charisma"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="skills-saves-container">
|
|
<div class="insp-prof-container">
|
|
<div class="value">
|
|
<input type="checkbox" name="attr_inspiration"><span></span>
|
|
</div>
|
|
<div class="label">
|
|
<span data-i18n="inspiration-u">INSPIRATION</span>
|
|
</div>
|
|
</div>
|
|
<div class="insp-prof-container">
|
|
<div class="value">
|
|
<span name="attr_pb" title="@{pb}"></span>
|
|
</div>
|
|
<div class="label">
|
|
<span data-i18n="prof-bonus-u">PROFICIENCY BONUS</span>
|
|
</div>
|
|
</div>
|
|
<div class="saving-throw-container">
|
|
<div class="saving-throw">
|
|
<input type="checkbox" name="attr_strength_save_prof" title="@{strength_save_prof}" value="(@{pb})">
|
|
<span name="attr_strength_save_bonus" title="@{strength_save_bonus}">0</span>
|
|
<button type="roll" name="roll_strength_save" value="@{wtype}&{template:simple} {{rname=^{strength-save-u}}} {{mod=@{strength_save_bonus}}} {{r1=[[@{d20}+@{strength_save_bonus}@{pbd_safe}]]}} @{rtype}+@{strength_save_bonus}@{pbd_safe}]]}} {{global=@{global_save_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="strength">Strength</button>
|
|
</div>
|
|
<div class="saving-throw">
|
|
<input type="checkbox" name="attr_dexterity_save_prof" title="@{dexterity_save_prof}" value="(@{pb})">
|
|
<span name="attr_dexterity_save_bonus" title="@{dexterity_save_bonus}">0</span>
|
|
<button type="roll" name="roll_dexterity_save" value="@{wtype}&{template:simple} {{rname=^{dexterity-save-u}}} {{mod=@{dexterity_save_bonus}}} {{r1=[[@{d20}+@{dexterity_save_bonus}@{pbd_safe}]]}} @{rtype}+@{dexterity_save_bonus}@{pbd_safe}]]}} {{global=@{global_save_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="dexterity">Dexterity</button>
|
|
</div>
|
|
<div class="saving-throw">
|
|
<input type="checkbox" name="attr_constitution_save_prof" title="@{constitution_save_prof}" value="(@{pb})">
|
|
<span name="attr_constitution_save_bonus" title="@{constitution_save_bonus}">0</span>
|
|
<button type="roll" name="roll_constitution_save" value="@{wtype}&{template:simple} {{rname=^{constitution-save-u}}} {{mod=@{constitution_save_bonus}}} {{r1=[[@{d20}+@{constitution_save_bonus}@{pbd_safe}]]}} @{rtype}+@{constitution_save_bonus}@{pbd_safe}]]}} {{global=@{global_save_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="constitution">Constitution</button>
|
|
</div>
|
|
<div class="saving-throw">
|
|
<input type="checkbox" name="attr_intelligence_save_prof" title="@{intelligence_save_prof}" value="(@{pb})">
|
|
<span name="attr_intelligence_save_bonus" title="@{intelligence_save_bonus}">0</span>
|
|
<button type="roll" name="roll_intelligence_save" value="@{wtype}&{template:simple} {{rname=^{intelligence-save-u}}} {{mod=@{intelligence_save_bonus}}} {{r1=[[@{d20}+@{intelligence_save_bonus}@{pbd_safe}]]}} @{rtype}+@{intelligence_save_bonus}@{pbd_safe}]]}} {{global=@{global_save_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="intelligence">Intelligence</button>
|
|
</div>
|
|
<div class="saving-throw">
|
|
<input type="checkbox" name="attr_wisdom_save_prof" title="@{wisdom_save_prof}" value="(@{pb})">
|
|
<span name="attr_wisdom_save_bonus" title="@{wisdom_save_bonus}">0</span>
|
|
<button type="roll" name="roll_wisdom_save" value="@{wtype}&{template:simple} {{rname=^{wisdom-save-u}}} {{mod=@{wisdom_save_bonus}}} {{r1=[[@{d20}+@{wisdom_save_bonus}@{pbd_safe}]]}} @{rtype}+@{wisdom_save_bonus}@{pbd_safe}]]}} {{global=@{global_save_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="wisdom">Wisdom</button>
|
|
</div>
|
|
<div class="saving-throw">
|
|
<input type="checkbox" name="attr_charisma_save_prof" title="@{charisma_save_prof}" value="(@{pb})">
|
|
<span name="attr_charisma_save_bonus" title="@{charisma_save_bonus}">0</span>
|
|
<button type="roll" name="roll_charisma_save" value="@{wtype}&{template:simple} {{rname=^{charisma-save-u}}} {{mod=@{charisma_save_bonus}}} {{r1=[[@{d20}+@{charisma_save_bonus}@{pbd_safe}]]}} @{rtype}+@{charisma_save_bonus}@{pbd_safe}]]}} {{global=@{global_save_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="charisma">Charisma</button>
|
|
</div>
|
|
<input type="hidden" class="toggleflag" name="attr_global_save_mod_flag">
|
|
<div class="hidden textarea globalattack">
|
|
<span class="label" data-i18n="global-save-u" style="position: relative; padding-bottom: 5px;">GLOBAL SAVE MODIFIER</span>
|
|
<fieldset class="repeating_savemod">
|
|
<div class="global-mod">
|
|
<input type="checkbox" name="attr_options-flag" class="options-flag" checked="checked" style="top: -15px;"><span>y</span>
|
|
<input type="checkbox" name="attr_global_save_active_flag" value="1" class="active-flag">
|
|
<div class="options">
|
|
<div class="row">
|
|
<span data-i18n="name:-u">NAME:</span>
|
|
<input type="text" name="attr_global_save_name" value="" placeholder="Bless" style="width:75px">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="roll:-u">ROLL:</span>
|
|
<input type="text" name="attr_global_save_roll" value="" placeholder="1d4" style="width:75px">
|
|
</div>
|
|
</div>
|
|
<div class="globaldisplay" style="width: 75%">
|
|
<span name="attr_global_save_roll"></span>
|
|
[<span name="attr_global_save_name"></span>]
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<div class="label">
|
|
<span data-i18n="saving-throws-u">SAVING THROWS</span>
|
|
</div>
|
|
</div>
|
|
<div class="skills-container skills-list">
|
|
<div data-i18n-list="skills-list">
|
|
<div class="skill" data-i18n-list-item="acrobatics">
|
|
<input type="checkbox" name="attr_acrobatics_prof" title="@{acrobatics_prof}" value="(@{pb}*@{acrobatics_type})">
|
|
<span name="attr_acrobatics_bonus" title="@{acrobatics_bonus}">0</span>
|
|
<button type="roll" name="roll_acrobatics" value="@{wtype}&{template:simple} {{rname=^{acrobatics-u}}} {{mod=@{acrobatics_bonus}}} {{r1=[[@{d20}+@{acrobatics_bonus}@{pbd_safe}]]}} @{rtype}+@{acrobatics_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="acrobatics-core">Acrobatics <span>(Dex)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="animal_handling">
|
|
<input type="checkbox" name="attr_animal_handling_prof" title="@{animal_handling_prof}" value="(@{pb}*@{animal_handling_type})">
|
|
<span name='attr_animal_handling_bonus' title='@{animal_handling_bonus}'>0</span>
|
|
<button type='roll' name='roll_animal_handling' value='@{wtype}&{template:simple} {{rname=^{animal_handling-u}}} {{mod=@{animal_handling_bonus}}} {{r1=[[@{d20}+@{animal_handling_bonus}@{pbd_safe}]]}} @{rtype}+@{animal_handling_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='animal_handling-core'>Animal Handling <span>(Wis)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="athletics">
|
|
<input type="checkbox" name="attr_athletics_prof" title="@{athletics_prof}" value="(@{pb}*@{athletics_type})">
|
|
<span name='attr_athletics_bonus' title='@{athletics_bonus}'>0</span>
|
|
<button type='roll' name='roll_athletics' value='@{wtype}&{template:simple} {{rname=^{athletics-u}}} {{mod=@{athletics_bonus}}} {{r1=[[@{d20}+@{athletics_bonus}@{pbd_safe}]]}} @{rtype}+@{athletics_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='athletics-core'>Athletics <span>(Str)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="deception">
|
|
<input type="checkbox" name="attr_deception_prof" title="@{deception_prof}" value="(@{pb}*@{deception_type})">
|
|
<span name='attr_deception_bonus' title='@{deception_bonus}'>0</span>
|
|
<button type='roll' name='roll_deception' value='@{wtype}&{template:simple} {{rname=^{deception-u}}} {{mod=@{deception_bonus}}} {{r1=[[@{d20}+@{deception_bonus}@{pbd_safe}]]}} @{rtype}+@{deception_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='deception-core'>Deception <span>(Cha)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="eldertech">
|
|
<input type="checkbox" name="attr_eldertech_prof" title="@{eldertech_prof}" value="(@{pb}*@{eldertech_type})">
|
|
<span name='attr_eldertech_bonus' title='@{eldertech_bonus}'>0</span>
|
|
<button type='roll' name='roll_eldertech' value='@{wtype}&{template:simple} {{rname=^{eldertech-u}}} {{mod=@{eldertech_bonus}}} {{r1=[[@{d20}+@{eldertech_bonus}@{pbd_safe}]]}} @{rtype}+@{eldertech_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='eldertech-core'>Eldertech <span>(Int)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="history">
|
|
<input type="checkbox" name="attr_history_prof" title="@{history_prof}" value="(@{pb}*@{history_type})">
|
|
<span name='attr_history_bonus' title='@{history_bonus}'>0</span>
|
|
<button type='roll' name='roll_history' value='@{wtype}&{template:simple} {{rname=^{history-u}}} {{mod=@{history_bonus}}} {{r1=[[@{d20}+@{history_bonus}@{pbd_safe}]]}} @{rtype}+@{history_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='history-core'>History <span>(Int)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="insight">
|
|
<input type="checkbox" name="attr_insight_prof" title="@{insight_prof}" value="(@{pb}*@{insight_type})">
|
|
<span name='attr_insight_bonus' title='@{insight_bonus}'>0</span>
|
|
<button type='roll' name='roll_insight' value='@{wtype}&{template:simple} {{rname=^{insight-u}}} {{mod=@{insight_bonus}}} {{r1=[[@{d20}+@{insight_bonus}@{pbd_safe}]]}} @{rtype}+@{insight_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='insight-core'>Insight <span>(Wis)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="intimidation">
|
|
<input type="checkbox" name="attr_intimidation_prof" title="@{intimidation_prof}" value="(@{pb}*@{intimidation_type})">
|
|
<span name='attr_intimidation_bonus' title='@{intimidation_bonus}'>0</span>
|
|
<button type='roll' name='roll_intimidation' value='@{wtype}&{template:simple} {{rname=^{intimidation-u}}} {{mod=@{intimidation_bonus}}} {{r1=[[@{d20}+@{intimidation_bonus}@{pbd_safe}]]}} @{rtype}+@{intimidation_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='intimidation-core'>Intimidation <span>(Cha)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="investigation">
|
|
<input type="checkbox" name="attr_investigation_prof" title="@{investigation_prof}" value="(@{pb}*@{investigation_type})">
|
|
<span name='attr_investigation_bonus' title='@{investigation_bonus}'>0</span>
|
|
<button type='roll' name='roll_investigation' value='@{wtype}&{template:simple} {{rname=^{investigation-u}}} {{mod=@{investigation_bonus}}} {{r1=[[@{d20}+@{investigation_bonus}@{pbd_safe}]]}} @{rtype}+@{investigation_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='investigation-core'>Investigation <span>(Int)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="materials">
|
|
<input type="checkbox" name="attr_materials_prof" title="@{materials_prof}" value="(@{pb}*@{materials_type})">
|
|
<span name='attr_materials_bonus' title='@{materials_bonus}'>0</span>
|
|
<button type='roll' name='roll_materials' value='@{wtype}&{template:simple} {{rname=^{materials-u}}} {{mod=@{materials_bonus}}} {{r1=[[@{d20}+@{materials_bonus}@{pbd_safe}]]}} @{rtype}+@{materials_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='materials-core'>Materials <span>(Int)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="medicine">
|
|
<input type="checkbox" name="attr_medicine_prof" title="@{medicine_prof}" value="(@{pb}*@{medicine_type})">
|
|
<span name='attr_medicine_bonus' title='@{medicine_bonus}'>0</span>
|
|
<button type='roll' name='roll_medicine' value='@{wtype}&{template:simple} {{rname=^{medicine-u}}} {{mod=@{medicine_bonus}}} {{r1=[[@{d20}+@{medicine_bonus}@{pbd_safe}]]}} @{rtype}+@{medicine_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='medicine-core'>Medicine <span>(Int)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="nature">
|
|
<input type="checkbox" name="attr_nature_prof" title="@{nature_prof}" value="(@{pb}*@{nature_type})">
|
|
<span name='attr_nature_bonus' title='@{nature_bonus}'>0</span>
|
|
<button type='roll' name='roll_nature' value='@{wtype}&{template:simple} {{rname=^{nature-u}}} {{mod=@{nature_bonus}}} {{r1=[[@{d20}+@{nature_bonus}@{pbd_safe}]]}} @{rtype}+@{nature_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='nature-core'>Nature <span>(Int)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="perception">
|
|
<input type="checkbox" name="attr_perception_prof" title="@{perception_prof}" value="(@{pb}*@{perception_type})">
|
|
<span name='attr_perception_bonus' title='@{perception_bonus}'>0</span>
|
|
<button type='roll' name='roll_perception' value='@{wtype}&{template:simple} {{rname=^{perception-u}}} {{mod=@{perception_bonus}}} {{r1=[[@{d20}+@{perception_bonus}@{pbd_safe}]]}} @{rtype}+@{perception_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='perception-core'>Perception <span>(Wis)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="performance">
|
|
<input type="checkbox" name="attr_performance_prof" title="@{performance_prof}" value="(@{pb}*@{performance_type})">
|
|
<span name='attr_performance_bonus' title='@{performance_bonus}'>0</span>
|
|
<button type='roll' name='roll_performance' value='@{wtype}&{template:simple} {{rname=^{performance-u}}} {{mod=@{performance_bonus}}} {{r1=[[@{d20}+@{performance_bonus}@{pbd_safe}]]}} @{rtype}+@{performance_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='performance-core'>Performance <span>(Cha)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="persuasion">
|
|
<input type="checkbox" name="attr_persuasion_prof" title="@{persuasion_prof}" value="(@{pb}*@{persuasion_type})">
|
|
<span name='attr_persuasion_bonus' title='@{persuasion_bonus}'>0</span>
|
|
<button type='roll' name='roll_persuasion' value='@{wtype}&{template:simple} {{rname=^{persuasion-u}}} {{mod=@{persuasion_bonus}}} {{r1=[[@{d20}+@{persuasion_bonus}@{pbd_safe}]]}} @{rtype}+@{persuasion_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='persuasion-core'>Persuasion <span>(Wis)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="politics">
|
|
<input type="checkbox" name="attr_politics_prof" title="@{politics_prof}" value="(@{pb}*@{politics_type})">
|
|
<span name='attr_politics_bonus' title='@{politics_bonus}'>0</span>
|
|
<button type='roll' name='roll_politics' value='@{wtype}&{template:simple} {{rname=^{politics-u}}} {{mod=@{politics_bonus}}} {{r1=[[@{d20}+@{politics_bonus}@{pbd_safe}]]}} @{rtype}+@{politics_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='politics-core'>Politics <span>(Int)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="religion">
|
|
<input type="checkbox" name="attr_religion_prof" title="@{religion_prof}" value="(@{pb}*@{religion_type})">
|
|
<span name='attr_religion_bonus' title='@{religion_bonus}'>0</span>
|
|
<button type='roll' name='roll_religion' value='@{wtype}&{template:simple} {{rname=^{religion-u}}} {{mod=@{religion_bonus}}} {{r1=[[@{d20}+@{religion_bonus}@{pbd_safe}]]}} @{rtype}+@{religion_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='religion-core'>Religion <span>(Int)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="sleight_of_hand">
|
|
<input type="checkbox" name="attr_sleight_of_hand_prof" title="@{sleight_of_hand_prof}" value="(@{pb}*@{sleight_of_hand_type})">
|
|
<span name='attr_sleight_of_hand_bonus' title='@{sleight_of_hand_bonus}'>0</span>
|
|
<button type='roll' name='roll_sleight_of_hand' value='@{wtype}&{template:simple} {{rname=^{sleight_of_hand-u}}} {{mod=@{sleight_of_hand_bonus}}} {{r1=[[@{d20}+@{sleight_of_hand_bonus}@{pbd_safe}]]}} @{rtype}+@{sleight_of_hand_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='sleight_of_hand-core'>Sleight of Hand <span>(Dex)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="stealth">
|
|
<input type="checkbox" name="attr_stealth_prof" title="@{stealth_prof}" value="(@{pb}*@{stealth_type})">
|
|
<span name='attr_stealth_bonus' title='@{stealth_bonus}'>0</span>
|
|
<button type='roll' name='roll_stealth' value='@{wtype}&{template:simple} {{rname=^{stealth-u}}} {{mod=@{stealth_bonus}}} {{r1=[[@{d20}+@{stealth_bonus}@{pbd_safe}]]}} @{rtype}+@{stealth_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='stealth-core'>Stealth <span>(Dex)</span></button>
|
|
</div>
|
|
<div class="skill" data-i18n-list-item="survival">
|
|
<input type="checkbox" name="attr_survival_prof" title="@{survival_prof}" value="(@{pb}*@{survival_type})">
|
|
<span name='attr_survival_bonus' title='@{survival_bonus}'>0</span>
|
|
<button type='roll' name='roll_survival' value='@{wtype}&{template:simple} {{rname=^{survival-u}}} {{mod=@{survival_bonus}}} {{r1=[[@{d20}+@{survival_bonus}@{pbd_safe}]]}} @{rtype}+@{survival_bonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}' data-i18n='survival-core'>Survival <span>(Wis)</span></button>
|
|
</div>
|
|
</div>
|
|
<div class="label">
|
|
<span data-i18n="skills-u">SKILLS</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="insp-prof-container" style="width: 100%; margin-top: 2px;">
|
|
<div class="value">
|
|
<!-- <input type="text" name="attr_passive_wisdom" title="@{passive_wisdom}" value="(10+@{perception_bonus}+@{passiveperceptionmod})" disabled="true" ><span></span> -->
|
|
<span name="attr_passive_wisdom"></span>
|
|
</div>
|
|
<div class="label" style="width: 217px;">
|
|
<span data-i18n="pass-wis-u">PASSIVE WISDOM (PERCEPTION)</span>
|
|
</div>
|
|
</div>
|
|
<div class="tool_proficiencies" style="margin-bottom: 10px; min-height: 100px; position: relative;">
|
|
<div class="top">
|
|
<span class="label" style="width: 106px;" data-i18n="tool-u">TOOL</span>
|
|
<span class="label" style="width: 35px;" data-i18n="pro-u">PRO</span>
|
|
<span class="label" style="width: 50px;" data-i18n="attr-u">ATTRIBUTE</span>
|
|
</div>
|
|
<fieldset class="repeating_tool">
|
|
<div class="tool">
|
|
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
|
|
<div class="options">
|
|
<div class="row">
|
|
<span data-i18n="name:-u">NAME:</span>
|
|
<input type="text" name="attr_toolname" style="width: 120px;">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="prof-bonus:-u">PROFICIENCY BONUS:</span>
|
|
<select name="attr_toolbonus_base">
|
|
<option value="(@{pb})" selected="selected" data-i18n="prof-u">PROFICIENT</option>
|
|
<option value="(@{pb}*2)" data-i18n="expertise-u">EXPERTISE</option>
|
|
<option value="(floor(@{pb}/2))" data-i18n="jack-of-all-u">JACK OF ALL TRADES</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="attr:-u">ATTRIBUTE:</span>
|
|
<select name="attr_toolattr_base">
|
|
<option value="@{strength_mod}" selected="selected" data-i18n="strength-u">STRENGTH</option>
|
|
<option value="@{dexterity_mod}" data-i18n="dexterity-u">DEXTERITY</option>
|
|
<option value="@{constitution_mod}" data-i18n="constitution-u">CONSTITUTION</option>
|
|
<option value="@{intelligence_mod}" data-i18n="intelligence-u">INTELLIGENCE</option>
|
|
<option value="@{wisdom_mod}" data-i18n="wisdom-u">WISDOM</option>
|
|
<option value="@{charisma_mod}" data-i18n="charisma-u">CHARISMA</option>
|
|
<option value="?{Attribute?|Strength,@{strength_mod}|Dexterity,@{dexterity_mod}|Constitution,@{constitution_mod}|Intelligence,@{intelligence_mod}|Wisdom,@{wisdom_mod}|Charisma,@{charisma_mod}}" data-i18n="query-attr-u">QUERY ATTRIBUTE</option>
|
|
</select>
|
|
<span data-i18n="mods:-u">MODS:</span>
|
|
<input type="text" class="num" name="attr_tool_mod" title="@{tool_mod}" value="0">
|
|
</div>
|
|
</div>
|
|
<div class="display">
|
|
<button type="roll" name="roll_tool" value="@{wtype}&{template:simple} {{rname=@{toolname}}} {{mod=@{toolbonus}}} {{r1=[[@{d20}+@{toolbonus}@{pbd_safe}]]}} @{rtype}+@{toolbonus}@{pbd_safe}]]}} {{global=@{global_skill_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}">
|
|
<span name="attr_toolname" style="width: 100px;"></span>
|
|
<input type="text" name="attr_toolbonus_display" style="width: 40px; text-align: center;">
|
|
<input type="hidden" name="attr_toolbonus">
|
|
<input type="text" name="attr_toolattr" style="width: 80px;">
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<input type="hidden" class="toggleflag" name="attr_global_skill_mod_flag">
|
|
<div class="hidden textarea globalattack">
|
|
<span class="label" data-i18n="global-skill-u">GLOBAL SKILL MODIFIER</span>
|
|
<fieldset class="repeating_skillmod">
|
|
<div class="global-mod">
|
|
<input type="checkbox" name="attr_options-flag" class="options-flag" checked="checked" style="top: -15px;"><span>y</span>
|
|
<input type="checkbox" name="attr_global_skill_active_flag" value="1" class="active-flag">
|
|
<div class="options">
|
|
<div class="row">
|
|
<span data-i18n="name:-u">NAME:</span>
|
|
<input type="text" name="attr_global_skill_name" value="" placeholder="Guidance">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="roll:-u">ROLL:</span>
|
|
<input type="text" name="attr_global_skill_roll" value="" placeholder="1d4">
|
|
</div>
|
|
</div>
|
|
<div class="globaldisplay">
|
|
<span name="attr_global_skill_roll"></span>
|
|
[<span name="attr_global_skill_name"></span>]
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<div class="label" style="position: absolute; bottom: 0px; width: 100%; text-align: center;">
|
|
<span data-i18n="tool-prof-u" style="display: inline;">TOOL PROFICIENCIES</span><span style="display: inline;"> & </span><span data-i18n="custom-skills-u" style="display: inline;">CUSTOM SKILLS</span>
|
|
</div>
|
|
</div>
|
|
<div class="textbox-container proficiencies">
|
|
<input type="hidden" class="inventoryflag" name="attr_simpleproficencies" value="complex">
|
|
<textarea class="sheet-simple" name="attr_other_proficiencies_and_languages" style="min-height: 91px; height: 91px;"></textarea>
|
|
<div class="complex">
|
|
<div class="top">
|
|
<span class="label" style="width: 60px;" data-i18n="type-u">TYPE</span>
|
|
<span class="label" style="width: 135px;" data-i18n="proficency-u">PROFICIENCY</span>
|
|
</div>
|
|
<fieldset class="repeating_proficiencies">
|
|
<div class="proficiency">
|
|
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
|
|
<div class="options">
|
|
<div class="row">
|
|
<span data-i18n="type:-u">TYPE:</span>
|
|
<select name="attr_prof_type">
|
|
<option selected="selected" data-i18n="lang-u">LANGUAGE</option>
|
|
<option data-i18n="weapon-u">WEAPON</option>
|
|
<option data-i18n="armor-u">ARMOR</option>
|
|
<option data-i18n="other-u">OTHER</option>
|
|
</select>
|
|
</div>
|
|
<div class="row" style="margin-bottom: 3px;">
|
|
<span data-i18n="proficency-u">PROFICIENCY</span><span>:</span>
|
|
<input type="text" name="attr_name" style="width: 165px;" placeholder="Elven, Dwarven, and Common">
|
|
</div>
|
|
</div>
|
|
<div class="display" style="margin-bottom: 2px;">
|
|
<button type="roll" name="roll_output" value="@{wtype}&{template:traits} @{charname_output} {{name=@{prof_type} PROFICIENCY}} {{description=@{name}}} {{licensedsheet=@{licensedsheet}}}">
|
|
<span name="attr_prof_type" style="width: 55px;"></span>
|
|
<span name="attr_name" style="width: 159px;"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<div class="label">
|
|
<span style="margin-top: -10px;" data-i18n="other-prof-langs-u">OTHER PROFICIENCIES & LANGUAGES</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col col2">
|
|
<div class="ac-init-speed-container">
|
|
<div class="ac">
|
|
<input type="text" name="attr_ac" title="@{ac}">
|
|
<span class="label pc-ac" data-i18n="armor-class-u">ARMOR CLASS</span>
|
|
</div>
|
|
<div class="init">
|
|
<span name="attr_initiative_bonus" title="@{initiative_bonus}"></span>
|
|
<button type="roll" name="roll_initiative" value="@{wtype}&{template:simple} {{rname=^{init-u}}} {{mod=@{initiative_bonus}}} {{r1=[[@{initiative_style}+@{initiative_bonus}@{pbd_safe}[INIT] &{tracker}]]}} {{normal=1}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="init-u">INITIATIVE</button>
|
|
</div>
|
|
<div class="speed">
|
|
<input type="text" name="attr_speed" title="@{speed}">
|
|
<span class="label" data-i18n="speed-u">SPEED</span>
|
|
</div>
|
|
</div>
|
|
<div class="touch-social-container">
|
|
<div class="ac">
|
|
<input type="text" name="attr_tac" title="@{tac}">
|
|
<span class="label pc-ac" data-i18n="touch-ac-u">TOUCH AC</span>
|
|
</div>
|
|
<div class="ac">
|
|
<input type="text" name="attr_social" title="@{social}">
|
|
<span class="label" data-i18n="social-u">SOCIAL SCORE</span>
|
|
</div>
|
|
</div>
|
|
<div class="hp">
|
|
<div class="top">
|
|
<span data-i18n="hp-max-u">Hit Point Maximum</span>
|
|
<input type="text" name="attr_hp_max" title="@{hp_max}">
|
|
</div>
|
|
<input type="number" name="attr_hp" title="@{hp}">
|
|
<span class="label" data-i18n="hp-current-u">CURRENT HIT POINTS</span>
|
|
</div>
|
|
<div class="hp" style="height: 56px;">
|
|
<input type="number" name="attr_hp_temp" title="@{hp_temp}">
|
|
<span class="label" data-i18n="hp-temp-u">TEMPORARY HIT POINTS</span>
|
|
</div>
|
|
<div class="hdice-dsaves-container" style="width: 242px;">
|
|
<div class="subcontainer">
|
|
<div class="top">
|
|
<span data-i18n="total">Total</span>
|
|
<input type="text" name="attr_hit_dice_max" title="@{hit_dice_max}">
|
|
</div>
|
|
<input type="number" name="attr_hit_dice" title="@{hit_dice}" style="margin-bottom: -6px;">
|
|
<button type="roll" name="roll_hit_dice" value="@{wtype}&{template:simple} {{rname=^{hit-dice-u}}} {{mod=D@{hitdie_final}+[[@{constitution_mod}[CON]]]}} {{r1=[[1d@{hitdie_final}+[[@{constitution_mod}]][CON]]]}} {{normal=1}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="hit-dice-u">HIT DICE</button>
|
|
</div>
|
|
<div class="subcontainer" style="float: right;">
|
|
<div class="row-container">
|
|
<span class="label" data-i18n="successes-u">SUCCESSES</span>
|
|
<input type="checkbox" name="attr_deathsave_succ1">
|
|
<input type="checkbox" name="attr_deathsave_succ2">
|
|
<input type="checkbox" name="attr_deathsave_succ3">
|
|
</div>
|
|
<div class="row-container">
|
|
<span class="label" data-i18n="failures-u">FAILURES</span>
|
|
<input type="checkbox" name="attr_deathsave_fail1">
|
|
<input type="checkbox" name="attr_deathsave_fail2">
|
|
<input type="checkbox" name="attr_deathsave_fail3">
|
|
</div>
|
|
<button type="roll" name="roll_death_save" value="@{wtype}&{template:simple} {{rname=^{death-save-u}}} {{mod=@{death_save_bonus}}} {{r1=[[@{d20}+@{death_save_bonus}[MOD]@{globalsavingthrowbonus}]]}} {{normal=1}} {{global=@{global_save_mod}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}" data-i18n="death-saves-u">DEATH SAVES</button>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" class="exhaustion-toggle" name="attr_exhaustion_toggle" value="0">
|
|
<div class="exhaustion" style="position: relative;">
|
|
<input type="number" name="attr_exhaustion_level" step="1" min="0" max="6">
|
|
<div class="ex-descriptions">
|
|
<span class="ex-description" name="attr_exhaustion_1"></span>
|
|
<span class="ex-description" name="attr_exhaustion_2"></span>
|
|
<span class="ex-description" name="attr_exhaustion_3"></span>
|
|
<span class="ex-description" name="attr_exhaustion_4"></span>
|
|
<span class="ex-description" name="attr_exhaustion_5"></span>
|
|
<span class="ex-description" name="attr_exhaustion_6"></span>
|
|
</div>
|
|
<span class="label" data-i18n="exhaustion-u">EXHAUSTION LEVEL</span>
|
|
</div>
|
|
<input type="hidden" class="ammoflag" name="attr_ammotracking">
|
|
<div class="attacks" style="position: relative;">
|
|
<div class="top">
|
|
<span class="label" style="width: 95px;" data-i18n="name-u">NAME</span>
|
|
<span class="label" style="width: 35px;" data-i18n="atk-u">ATK</span>
|
|
<span class="label" style="width: 65px;" data-i18n="dmg-type-u">DAMAGE/TYPE</span>
|
|
</div>
|
|
<fieldset class="repeating_attack">
|
|
<div class="attack">
|
|
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
|
|
<div class="options">
|
|
<div class="row">
|
|
<span data-i18n="name:-u">NAME:</span>
|
|
<input type="text" name="attr_atkname">
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_atkflag" value="{{attack=1}}" checked="checked">
|
|
<span data-i18n="attack:-u">ATTACK:</span>
|
|
<select name="attr_atkattr_base">
|
|
<option value="@{strength_mod}" selected="selected" data-i18n="str-u">STR</option>
|
|
<option value="@{dexterity_mod}" data-i18n="dex-u">DEX</option>
|
|
<option value="@{constitution_mod}" data-i18n="con-u">CON</option>
|
|
<option value="@{intelligence_mod}" data-i18n="int-u">INT</option>
|
|
<option value="@{wisdom_mod}" data-i18n="wis-u">WIS</option>
|
|
<option value="@{charisma_mod}" data-i18n="cha-u">CHA</option>
|
|
<option value="spell" data-i18n="spell-u">SPELL</option>
|
|
<option value="0">-</option>
|
|
</select>
|
|
<span>+</span>
|
|
<input type="text" class="num" name="attr_atkmod" placeholder="0">
|
|
<span>+</span>
|
|
<input type="checkbox" name="attr_atkprofflag" value="(@{pb})" checked="checked" style="margin-left: 3px;">
|
|
<span data-i18n="proficient-u">PROFICIENT</span>
|
|
</div>
|
|
<div class="row">
|
|
<span style="margin-left: 17px;" data-i18n="range:-u">RANGE:</span>
|
|
<input type="text" name="attr_atkrange" placeholder="Self (60-foot cone)" style="width: 170px;" data-i18n-placeholder="range-place">
|
|
</div>
|
|
<div class="row">
|
|
<span style="margin-left: 17px;" data-i18n="magic-bonus:-u">MAGIC BONUS:</span>
|
|
<input type="text" class="num" name="attr_atkmagic" placeholder="0">
|
|
<span data-i18n="crit-range-u">CRIT RANGE:</span>
|
|
<input type="text" class="num" name="attr_atkcritrange" value="20" placeholder="20">
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_dmgflag" value="{{damage=1}} {{dmg1flag=1}}" checked="checked">
|
|
<span data-i18n="damage:-u">DAMAGE:</span>
|
|
<input type="text" name="attr_dmgbase" placeholder="1d6" style="width: 50px;">
|
|
<span>+</span>
|
|
<select name="attr_dmgattr">
|
|
<option value="@{strength_mod}" selected="selected" data-i18n="str-u">STR</option>
|
|
<option value="@{dexterity_mod}" data-i18n="dex-u">DEX</option>
|
|
<option value="@{constitution_mod}" data-i18n="con-u">CON</option>
|
|
<option value="@{intelligence_mod}" data-i18n="int-u">INT</option>
|
|
<option value="@{wisdom_mod}" data-i18n="wis-u">WIS</option>
|
|
<option value="@{charisma_mod}" data-i18n="cha-u">CHA</option>
|
|
<option value="spell" data-i18n="spell-u">SPELL</option>
|
|
<option value="0">-</option>
|
|
</select>
|
|
<span>+</span>
|
|
<input type="text" class="num" name="attr_dmgmod" placeholder="0">
|
|
</div>
|
|
<div class="row">
|
|
<span style="margin-left: 17px;" data-i18n="type:-u">TYPE:</span>
|
|
<input type="text" name="attr_dmgtype" placeholder="Slashing" style="width: 50px;" data-i18n-placeholder="dmg-type-place">
|
|
<span data-i18n="crit:-u">CRIT:</span>
|
|
<input type="text" name="attr_dmgcustcrit" placeholder="1d6" style="width: 80px;">
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_dmg2flag" value="{{damage=1}} {{dmg2flag=1}}">
|
|
<span data-i18n="damage2:-u">DAMAGE2:</span>
|
|
<input type="text" name="attr_dmg2base" placeholder="1d6" style="width: 50px;">
|
|
<span>+</span>
|
|
<select name="attr_dmg2attr">
|
|
<option value="@{strength_mod}" data-i18n="str-u">STR</option>
|
|
<option value="@{dexterity_mod}" data-i18n="dex-u">DEX</option>
|
|
<option value="@{constitution_mod}" data-i18n="con-u">CON</option>
|
|
<option value="@{intelligence_mod}" data-i18n="int-u">INT</option>
|
|
<option value="@{wisdom_mod}" data-i18n="wis-u">WIS</option>
|
|
<option value="@{charisma_mod}" data-i18n="cha-u">CHA</option>
|
|
<option value="spell" data-i18n="spell-u">SPELL</option>
|
|
<option value="0" selected="selected">-</option>
|
|
</select>
|
|
<span>+</span>
|
|
<input type="text" class="num" name="attr_dmg2mod" placeholder="0">
|
|
</div>
|
|
<div class="row">
|
|
<span style="margin-left: 17px;" data-i18n="type:-u">TYPE:</span>
|
|
<input type="text" name="attr_dmg2type" placeholder="Slashing" style="width: 50px;" data-i18n-placeholder="dmg-type-place">
|
|
<span data-i18n="crit:-u">CRIT:</span>
|
|
<input type="text" name="attr_dmg2custcrit" placeholder="1d6" style="width: 80px;">
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_saveflag" value="{{save=1}} {{saveattr=@{saveattr}}} {{savedesc=@{saveeffect}}} {{savedc=[[[[@{savedc}]][SAVE]]]}}">
|
|
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
|
|
<select name="attr_saveattr">
|
|
<option value="Strength" selected="selected" data-i18n="str-u">STR</option>
|
|
<option value="Dexterity" data-i18n="dex-u">DEX</option>
|
|
<option value="Constitution" data-i18n="con-u">CON</option>
|
|
<option value="Intelligence" data-i18n="int-u">INT</option>
|
|
<option value="Wisdom" data-i18n="wis-u">WIS</option>
|
|
<option value="Charisma" data-i18n="cha-u">CHA</option>
|
|
</select>
|
|
<span data-i18n="vs-dc:-u">VS DC:</span>
|
|
<select name="attr_savedc">
|
|
<option value="(@{spell_save_dc})" selected="selected" data-i18n="spell-u">SPELL</option>
|
|
<option value="(@{strength_mod}+8+@{spell_dc_mod}+@{pb})" data-i18n="str-u">STR</option>
|
|
<option value="(@{dexterity_mod}+8+@{spell_dc_mod}+@{pb})" data-i18n="dex-u">DEX</option>
|
|
<option value="(@{constitution_mod}+8+@{spell_dc_mod}+@{pb})" data-i18n="con-u">CON</option>
|
|
<option value="(@{intelligence_mod}+8+@{spell_dc_mod}+@{pb})" data-i18n="int-u">INT</option>
|
|
<option value="(@{wisdom_mod}+8+@{spell_dc_mod}+@{pb})" data-i18n="wis-u">WIS</option>
|
|
<option value="(@{charisma_mod}+8+@{spell_dc_mod}+@{pb})" data-i18n="cha-u">CHA</option>
|
|
<option value="(@{saveflat})" data-i18n="flat-u">FLAT</option>
|
|
</select>
|
|
<input class="flatflag" type="hidden" name="attr_savedc">
|
|
<input class="num flat" type="text" name="attr_saveflat" placeholder="10" value="10">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="save-effect:-u">SAVE EFFECT:</span>
|
|
<input type="text" name="attr_saveeffect" placeholder="half damage" style="width: 160px;" data-i18n-placeholder="save-effect-place">
|
|
</div>
|
|
<div class="row ammo">
|
|
<span data-i18n="ammunition:-u">AMMUNITION:</span>
|
|
<input type="text" name="attr_ammo" placeholder="Arrows" style="width: 160px;" data-i18n-placeholder="ammunition-place">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="description:-u">DESCRIPTION:</span>
|
|
<textarea name="attr_atk_desc" placeholder="Up to 2 creatures within 5 feet" data-i18n-placeholder="description-place"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="display">
|
|
<button type="roll" name="roll_attack" value="@{rollbase}">
|
|
<span name="attr_atkname" style="width: 85px;"></span>
|
|
<input type="text" name="attr_atkbonus" style="width: 40px; text-align: center;" value="">
|
|
<input type="text" name="attr_atkdmgtype" style="width: 90px;" value="">
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" name="attr_rollbase">
|
|
<input type="hidden" name="attr_rollbase_dmg">
|
|
<input type="hidden" name="attr_rollbase_crit">
|
|
<input type="hidden" name="attr_hldmg">
|
|
<input type="hidden" name="attr_spelllevel">
|
|
<input type="hidden" name="attr_itemid">
|
|
<input type="hidden" name="attr_spellid">
|
|
<input type="hidden" name="attr_spell_innate">
|
|
<input type="hidden" name="attr_versatile_alt">
|
|
<button type="roll" name="roll_attack_dmg" style="display: none;" value="@{rollbase_dmg}"></button>
|
|
<button type="roll" name="roll_attack_crit" style="display: none;" value="@{rollbase_crit}"></button>
|
|
</fieldset>
|
|
<input type="hidden" class="toggleflag" name="attr_global_attack_mod_flag">
|
|
<div class="hidden textbox globalattack">
|
|
<span class="label" data-i18n="global-attack-u">GLOBAL ATTACK MODIFIER</span>
|
|
<fieldset class="repeating_tohitmod">
|
|
<div class="global-mod">
|
|
<input type="checkbox" name="attr_options-flag" class="options-flag" checked="checked" style="top: -15px;"><span>y</span>
|
|
<input type="checkbox" name="attr_global_attack_active_flag" value="1" class="active-flag">
|
|
<div class="options">
|
|
<div class="row">
|
|
<span data-i18n="name:-u">NAME:</span>
|
|
<input type="text" name="attr_global_attack_name" value="" placeholder="Bless">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="roll:-u">ROLL:</span>
|
|
<input type="text" name="attr_global_attack_roll" value="" placeholder="1d4">
|
|
</div>
|
|
</div>
|
|
<div class="globaldisplay">
|
|
<span name="attr_global_attack_roll"></span>
|
|
[<span name="attr_global_attack_name"></span>]
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<input type="hidden" class="toggleflag" name="attr_global_damage_mod_flag">
|
|
<div class="hidden globalattack global-dmg">
|
|
<span class="label" data-i18n="global-damage-u">GLOBAL DAMAGE MODIFIER</span>
|
|
<fieldset class="repeating_damagemod">
|
|
<div class="global-mod">
|
|
<input type="checkbox" name="attr_options-flag" class="options-flag" checked="checked" style="top: -15px;"><span>y</span>
|
|
<input type="checkbox" name="attr_global_damage_active_flag" value="1" class="active-flag">
|
|
<div class="options">
|
|
<div class="row">
|
|
<span data-i18n="name:-u">NAME:</span>
|
|
<input type="text" name="attr_global_damage_name" value="" placeholder="Sneak Attack">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="dmg:-u">DAMAGE:</span>
|
|
<input type="text" name="attr_global_damage_damage" value="" placeholder="1d6">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="type:-u">TYPE:</span>
|
|
<input type="text" name="attr_global_damage_type" value="" placeholder="Sneak">
|
|
</div>
|
|
</div>
|
|
<div class="display">
|
|
<span class="title" name="attr_global_damage_name"></span>
|
|
<span class="subheader">
|
|
<span name="attr_global_damage_damage"></span>
|
|
<span name="attr_global_damage_type"></span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<span class="label" style="margin-top: 0px; position: absolute; bottom: 0px;" data-i18n="atk-spellcasting-u">ATTACKS</span>
|
|
</div>
|
|
<input type="hidden" class="toggleflag" name="attr_global_ac_mod_flag">
|
|
<div class="equipment hidden">
|
|
<div class="textarea globalattack acmod">
|
|
<fieldset class="repeating_acmod">
|
|
<div class="global-mod">
|
|
<input type="checkbox" name="attr_options-flag" class="options-flag" checked="checked" style="top: -15px;"><span>y</span>
|
|
<input type="checkbox" name="attr_global_ac_active_flag" value="1" class="active-flag">
|
|
<div class="options">
|
|
<label>Value: <input type="number" name="attr_global_ac_val" placeholder="1"></label>
|
|
<label>Name: <input type="text" name="attr_global_ac_name" placeholder="Defense"></label>
|
|
</div>
|
|
<div class="display">
|
|
<span class="title"><span name="attr_global_ac_val"></span> [<span name="attr_global_ac_name"></span>]</span>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<span class="label" data-i18n="global-ac-u">GLOBAL AC MODIFIER</span>
|
|
</div>
|
|
<div class="equipment">
|
|
<div class="money">
|
|
<div class="coin">
|
|
<span class="label" data-i18n="copper-piece-u">CP</span>
|
|
<input type="text" name="attr_cp" title="@{cp}">
|
|
</div>
|
|
<div class="coin">
|
|
<span class="label" data-i18n="silver-piece-u">SP</span>
|
|
<input type="text" name="attr_sp" title="@{sp}">
|
|
</div>
|
|
<div class="coin">
|
|
<span class="label" data-i18n="electrum-piece-u">EP</span>
|
|
<input type="text" name="attr_ep" title="@{ep}">
|
|
</div>
|
|
<div class="coin">
|
|
<span class="label" data-i18n="gold-piece-u">GP</span>
|
|
<input type="text" name="attr_gp" title="@{gp}">
|
|
</div>
|
|
<div class="coin">
|
|
<span class="label" data-i18n="platinum-piece-u">PP</span>
|
|
<input type="text" name="attr_pp" title="@{pp}">
|
|
</div>
|
|
</div>
|
|
<input type="hidden" class="inventoryflag" name="attr_simpleinventory" value="complex">
|
|
<textarea class="simple" name="attr_equipment"></textarea>
|
|
<div class="complex">
|
|
<input type="hidden" class="warningflag" name="attr_armorwarningflag">
|
|
<div class="warning">
|
|
<span>
|
|
<label><input type="checkbox" name="attr_armorwarningflag" value="hide">*</label>
|
|
<span data-i18n="warning-armor-sets-u">
|
|
WARNING - MULTIPLE SETS OF ARMOR OR SHIELDS HAVE BEEN ADDED AND AC IS NOT CORRECTLY CALCULATED. UNEQUIP THE ARMOR PIECE FROM THE ITEM DETAILS.
|
|
</span>
|
|
</span>
|
|
</div>
|
|
<input type="hidden" class="warningflag" name="attr_customacwarningflag">
|
|
<div class="warning">
|
|
<span>
|
|
<label><input type="checkbox" name="attr_customacwarningflag" value="hide">*</label>
|
|
<span data-i18n="warning-customac-u">
|
|
ATTENTION - YOUR CUSTOM AC CALCULATION IS NOT BEING USED AS YOU HAVE ARMOR EQUIPPED. IF YOU WANT TO USE YOUR CUSTOM AC, UNEQUIP THE ARMOR PIECE FROM THE ITEM DETAILS.
|
|
</span>
|
|
</span>
|
|
</div>
|
|
<div class="header" style="height: auto;">
|
|
<span class="pictos" style="width: 25px; font-size: 15px;">*</span>
|
|
<span style="width: 100px; text-align: left;" data-i18n="item-name-u">ITEM NAME</SPAN>
|
|
<span style="width: 25px;"><img src="https://raw.githubusercontent.com/solar-studios/Roll20Redsky/main/images/weight_lbs.png" style="width: 15px; margin-bottom: -3px;" alt="Weight symbol"></span>
|
|
</div>
|
|
<fieldset class="repeating_inventory">
|
|
<input type="hidden" class="equippedflag" name="attr_equipped">
|
|
<div class="item">
|
|
<input class="weight" type="text" name="attr_itemcount" value="1">
|
|
<input class="name" type="text" name="attr_itemname">
|
|
<input class="weight" type="text" name="attr_itemweight">
|
|
<input class="inventorysubflag" type="checkbox" name="attr_inventorysubflag"><span>i</span>
|
|
<div class="subitem">
|
|
<input class="equipped" type="checkbox" name="attr_equipped" value="1" checked="checked">
|
|
<span class="equippedlabel" data-i18n="equipped-u">EQUIPPED</span>
|
|
<input class="equipped" type="checkbox" name="attr_useasresource" value="1">
|
|
<span class="equippedlabel" data-i18n="use-as-resource-u">USE AS A RESOURCE</span>
|
|
<input class="equipped" type="checkbox" name="attr_hasattack" value="1">
|
|
<span class="equippedlabel" data-i18n="has-attack-u">HAS AN ATTACK</span>
|
|
<span class="label" data-i18n="prop:-u">PROP:</span>
|
|
<input class="subfield" type="text" name="attr_itemproperties">
|
|
<span class="label" data-i18n="mods:-u">MODS:</span>
|
|
<input class="subfield" type="text" name="attr_itemmodifiers">
|
|
<textarea class="subtextarea" name="attr_itemcontent"></textarea>
|
|
</div>
|
|
<input type="hidden" name="attr_itemattackid">
|
|
<input type="hidden" name="attr_itemresourceid">
|
|
</div>
|
|
</fieldset>
|
|
<div class="weighttotal">
|
|
<span class="label" data-i18n="total-weight-u">TOTAL WEIGHT</span>
|
|
<input type="text" name="attr_weighttotal" value="0">
|
|
<input type="hidden" class="encumberance" name="attr_encumberance">
|
|
<span class="encumb immobile" data-i18n="immobile-u">IMMOBILE</span>
|
|
<span class="encumb heavily" data-i18n="heavily-encumbered-u">HEAVILY ENCUMBERED</span>
|
|
<span class="encumb encumbered" data-i18n="encumbered-u">ENCUMBERED</span>
|
|
<span class="encumb over" data-i18n="over-carrying-cap-u">OVER CARRYING CAPACITY</span>
|
|
</div>
|
|
</div>
|
|
<span class="label" style="margin-top: 0px; position: absolute; bottom: 0px;" data-i18n="equipment-u">EQUIPMENT</span>
|
|
</div>
|
|
</div>
|
|
<div class="col col3">
|
|
<div class="textbox pibf">
|
|
<input class="options-flag" type="checkbox" name="attr_options-flag-personality" checked="checked"><span>y</span>
|
|
<div class="options">
|
|
<textarea name="attr_personality_traits" style="min-height: 50px; height: 50px;"></textarea>
|
|
</div>
|
|
<div class="display">
|
|
<span name="attr_personality_traits"></span>
|
|
</div>
|
|
<span class="label" data-i18n="personality-traits-u">PERSONALITY TRAITS</span>
|
|
</div>
|
|
<div class="textbox pibf">
|
|
<input class="options-flag" type="checkbox" name="attr_options-flag-ideals" checked="checked"><span>y</span>
|
|
<div class="options">
|
|
<textarea name="attr_ideals"></textarea>
|
|
</div>
|
|
<div class="display">
|
|
<span name="attr_ideals"></span>
|
|
</div>
|
|
<span class="label" data-i18n="ideals-u">VIRTUES</span>
|
|
</div>
|
|
<!--<div class="textbox pibf">
|
|
<input class="options-flag" type="checkbox" name="attr_options-flag-bonds" checked="checked"><span>y</span>
|
|
<div class="options">
|
|
<textarea name="attr_bonds"></textarea>
|
|
</div>
|
|
<div class="display">
|
|
<span name="attr_bonds"></span>
|
|
</div>
|
|
<span class="label" data-i18n="bonds-u">BONDS</span>
|
|
</div>-->
|
|
<div class="textbox pibf">
|
|
<input class="options-flag" type="checkbox" name="attr_options-flag-flaws" checked="checked"><span>y</span>
|
|
<div class="options">
|
|
<textarea name="attr_flaws" style="min-height: 46px; height: 46px;"></textarea>
|
|
</div>
|
|
<div class="display">
|
|
<span name="attr_flaws"></span>
|
|
</div>
|
|
<span class="label" data-i18n="flaws-u">VICES</span>
|
|
</div>
|
|
<div class="resources">
|
|
<div class="hdice-dsaves-container" style="width: 246px; margin-top: 10px;">
|
|
<div class="subcontainer" style="height: 64px; width: 119px;">
|
|
<div class="top">
|
|
<span data-i18n="total">Total</span>
|
|
<input type="text" name="attr_class_resource_max" title="@{class_resource_max}">
|
|
</div>
|
|
<input type="number" name="attr_class_resource" title="@{class_resource}" style="margin-bottom: -6px;">
|
|
<input type="text" class="label" name="attr_class_resource_name" title="@{class_resource_name}" placeholder="CLASS RESOURCE" data-i18n-placeholder="class-resource-u">
|
|
</div>
|
|
<div class="subcontainer" style="height: 64px; width: 119px; float: right;">
|
|
<div class="top">
|
|
<span data-i18n="total">Total</span>
|
|
<input type="text" name="attr_other_resource_max" title="@{other_resource_max}">
|
|
</div>
|
|
<input type="number" name="attr_other_resource" title="@{other_resource}" style="margin-bottom: -6px;">
|
|
<input type="text" class="label" name="attr_other_resource_name" title="@{other_resource_name}" placeholder="OTHER RESOURCE" data-i18n-placeholder="other-resource-u">
|
|
<input type="hidden" name="attr_other_resource_itemid">
|
|
</div>
|
|
</div>
|
|
<fieldset class="repeating_resource">
|
|
<div class="hdice-dsaves-container" style="width: 246px;">
|
|
<div class="subcontainer" style="height: 64px; width: 119px;">
|
|
<div class="top">
|
|
<span data-i18n="total">Total</span>
|
|
<input type="text" name="attr_resource_left_max" title="@{repeating_resource_left_max}">
|
|
</div>
|
|
<input type="number" name="attr_resource_left" title="@{repeating_resource_left}" style="margin-bottom: -6px;">
|
|
<input type="text" class="label" name="attr_resource_left_name" title="@{repeating_resource_left_name}" placeholder="OTHER RESOURCE" data-i18n-placeholder="other-resource-u">
|
|
<input type="hidden" name="attr_resource_left_itemid">
|
|
</div>
|
|
<div class="subcontainer" style="height: 64px; width: 119px;">
|
|
<div class="top">
|
|
<span data-i18n="total">Total</span>
|
|
<input type="text" name="attr_resource_right_max" title="@{repeating_resource_right_max}">
|
|
</div>
|
|
<input type="number" name="attr_resource_right" title="@{repeating_resource_right}" style="margin-bottom: -6px;">
|
|
<input type="text" class="label" name="attr_resource_right_name" title="@{repeating_resource_right_name}" placeholder="OTHER RESOURCE" data-i18n-placeholder="other-resource-u">
|
|
<input type="hidden" name="attr_resource_right_itemid">
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<div class="textbox traits" style="min-height: 480px;">
|
|
<input type="hidden" class="inventoryflag" name="attr_simpletraits" value="complex">
|
|
<textarea class="sheet-simple" name="attr_features_and_traits" style="min-height: 461px; height: 461px;"></textarea>
|
|
<div class="complex">
|
|
<fieldset class="repeating_traits">
|
|
<div class="trait">
|
|
<button type="roll" name="roll_output" class="output" value="@{wtype}&{template:traits} @{charname_output} {{name=@{name}}} {{source=@{source}: @{source_type}}} {{description=@{description}}} {{licensedsheet=@{licensedsheet}}}">w</button>
|
|
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
|
|
<input class="display-flag" type="checkbox" name="attr_display_flag">
|
|
<div class="options">
|
|
<div class="row">
|
|
<span data-i18n="name:-u">NAME:</span>
|
|
<input type="text" name="attr_name" style="width: 120px;">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="source:-u">SOURCE:</span>
|
|
<select name="attr_source">
|
|
<option selected="selected" data-i18n="racial">Species</option>
|
|
<option data-i18n="class">Class</option>
|
|
<option data-i18n="feat">Feat</option>
|
|
<option data-i18n="background">Background</option>
|
|
<option data-i18n="other">Other</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="source-type:-u">SOURCE TYPE:</span>
|
|
<input type="text" name="attr_source_type" style="width: 160px;" placeholder="Archivist/Fighter/4th Level">
|
|
</div>
|
|
<div class="row">
|
|
<textarea name="attr_description" style="min-height: 200px; height: 200px;"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="display" style="margin-bottom: 2px;">
|
|
<span class="title" name="attr_name"></span>
|
|
<span class="subheader">
|
|
<span name="attr_source"></span><span>: </span><span name="attr_source_type"></span>
|
|
</span>
|
|
<span class="desc" name="attr_description"></span>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<span class="label" data-i18n="feats-traits-u" style="margin-top: 0px; position: absolute; bottom: 0px;">FEATURES & TRAITS</span>
|
|
</div>
|
|
<input type="hidden" class="missing-info-flag" name="attr_missing_info">
|
|
<div class="missing-info">
|
|
<span><span class="info-popup pictos">i</span> Looking for missing data?</span>
|
|
<span class="missing-info-desc">Your data is in the simple version that can be re-enabled from the Settings(gear) tab of the character sheet. Under GENERAL OPTIONS and then FEATS & TRAITS. Set the section to be 'Simple'.</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div><div class="page bio"> <div class="header">
|
|
<div class="name-container">
|
|
<img src="https://raw.githubusercontent.com/solar-studios/Roll20Redsky/main/images/Redsky_logo_small_no_spikes.png" style="padding-bottom: 5px;" alt="SRD5 by Roll20">
|
|
<input type="text" name="attr_character_name" style="width: 100%;">
|
|
<span class="label" data-i18n="char-name-u">CHARACTER NAME</span>
|
|
</div>
|
|
<div class="header-info">
|
|
<div class="top" style="position: relative; top: 10px;">
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_age" style="width: 120px;">
|
|
<span class="label" data-i18n="age-u">AGE</span>
|
|
</div>
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_size" style="width: 120px;">
|
|
<span class="label" data-i18n="size-u">SIZE</span>
|
|
</div>
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_height" style="width: 120px;">
|
|
<span class="label" data-i18n="height-u">HEIGHT</span>
|
|
</div>
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_weight" style="width: 120px;">
|
|
<span class="label" data-i18n="weight-u">WEIGHT</span>
|
|
</div>
|
|
</div>
|
|
<div class="bottom">
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_eyes" style="width: 160px;">
|
|
<span class="label" data-i18n="eye-u">EYES</span>
|
|
</div>
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_skin" style="width: 160px;">
|
|
<span class="label" data-i18n="skin-u">SKIN</span>
|
|
</div>
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_hair" style="width: 160px;">
|
|
<span class="label" data-i18n="hair-u">HAIR</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="body">
|
|
<div class="col col1">
|
|
<div class="textbox">
|
|
<textarea name="attr_character_appearance" style="min-height: 300px; height: 300px;"></textarea>
|
|
<span class="label" data-i18n="char-appearance-u">CHARACTER APPEARANCE</span>
|
|
</div>
|
|
<div class="textbox">
|
|
<textarea name="attr_character_backstory" style="min-height: 623px; height: 623px;"></textarea>
|
|
<span class="label" data-i18n="char-backstory-u">CHARACTER BACKSTORY</span>
|
|
</div>
|
|
</div>
|
|
<div class="col2-3">
|
|
<div class="textbox">
|
|
<textarea name="attr_allies_and_organizations" style="min-height: 288px; height: 300px;"></textarea>
|
|
<span class="label" data-i18n="allies-orgs-u">ALLIES & ORGANIZATIONS</span>
|
|
</div>
|
|
<div class="textbox">
|
|
<textarea name="attr_additional_feature_and_traits" style="min-height: 289px; height: 300px;"></textarea>
|
|
<span class="label" data-i18n="add-feats-traits-u">ADDITIONAL FEATURES & TRAITS</span>
|
|
</div>
|
|
<div class="textbox">
|
|
<textarea name="attr_treasure" style="min-height: 300px; height: 300px;"></textarea>
|
|
<span class="label" data-i18n="treasure-u">TREASURE</span>
|
|
</div>
|
|
</div>
|
|
</div></div><div class="page options"> <div class="header">
|
|
<div class="name-container">
|
|
<img src="https://raw.githubusercontent.com/solar-studios/Roll20Redsky/main/images/Redsky_logo_small_no_spikes.png" style="padding-bottom: 5px;" alt="SRD5e by Roll20">
|
|
<input type="text" name="attr_character_name" style="width: 100%;">
|
|
<span class="label" data-i18n="char-name-u">CHARACTER NAME</span>
|
|
</div>
|
|
<input class="options-flag" type="checkbox" name="attr_options-class-selection" checked="checked"><span>y</span>
|
|
<div class="header-info sheet-options">
|
|
<div class="sheet-row" style="border-top: 2px dashed gold;">
|
|
<span data-i18n="class:-u">CLASS:</span>
|
|
<input type="hidden" name="attr_custom_class" class="sheet-flag">
|
|
<select class="hiding class" name="attr_class">
|
|
<option value="" data-i18n="choose">Choose</option>
|
|
<option value="Emissary" data-i18n="emissary">Emissary</option>
|
|
<option value="Fighter" data-i18n="fighter">Fighter</option>
|
|
<option value="Hunter" data-i18n="hunter">Hunter</option>
|
|
<option value="Rogue" data-i18n="rogue">Rogue</option>
|
|
<option value="Sage" data-i18n="sage">Sage</option>
|
|
<option value="Wordsmith" data-i18n="wordsmith">Wordsmith</option>
|
|
</select>
|
|
<input type="text" class="showing" name="attr_cust_classname" style="width: 90px;">
|
|
<span data-i18n="subclass:-u">SUBCLASS:</span>
|
|
<input type="text" name="attr_subclass">
|
|
<span data-i18n="lvl:-u">LEVEL:</span>
|
|
<input type="number" class="class-level" style="width: 40px" name="attr_base_level" value="1">
|
|
</div>
|
|
<div class="sheet-row">
|
|
<span data-i18n="race:-u">RACE:</span>
|
|
<input type="text" name="attr_race">
|
|
<span data-i18n="subrace:-u">SUBRACE:</span>
|
|
<input type="text" name="attr_subrace">
|
|
</div>
|
|
</div>
|
|
<div class="header-info sheet-display">
|
|
<div class="top">
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_class_display" class="sheet-class-display sheet-no_events">
|
|
<span class="label" data-i18n="class-level-u">CLASS & LEVEL</span>
|
|
</div>
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_background" style="width: 182px;">
|
|
<span class="label" data-i18n="background-u">BACKGROUND</span>
|
|
</div>
|
|
</div>
|
|
<div class="bottom">
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_race_display" class="sheet-no_events">
|
|
<span class="label" data-i18n="race-u">RACE</span>
|
|
</div>
|
|
<div class="hlabel-container">
|
|
<input type="text" name="attr_alignment">
|
|
<span class="label" data-i18n="alignment-u">ALIGNMENT</span>
|
|
</div>
|
|
<div class="hlabel-container" style="position: relative;">
|
|
<input type="text" name="attr_experience">
|
|
<span class="label" data-i18n="exp-pts-u">EXPERIENCE POINTS</span>
|
|
<input class="sheet-showleveler" type="hidden" name="attr_showleveler" value="0">
|
|
<button class="sheet-levelerbutton" type="action" name="act_launch_lvl+mancer" style="padding: 0px; position: absolute; top: -10px; right: 0px;" title="Charactermancer Level Up"><img src="https://raw.githubusercontent.com/solar-studios/Roll20Redsky/main/images/CharactermancerIcon200px.png" style="height: 18px; width: 18px; max-width: inherit;" alt="Wand & Hammer of Charactermancer"></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="body">
|
|
<div class="col col1">
|
|
<div class="class_options">
|
|
<div class="row">
|
|
<span data-i18n="hit-die:-u">HIT DIE:</span>
|
|
<select name="attr_hitdietype">
|
|
<option value="4">D4</option>
|
|
<option value="6">D6</option>
|
|
<option value="8">D8</option>
|
|
<option value="10">D10</option>
|
|
<option value="12">D12</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="carrying-capacity-mod:-u">CARRYING CAPACITY MODIFIER:</span>
|
|
<input type="text" class="num" name="attr_carrying_capacity_mod" placeholder="*2">
|
|
</div>
|
|
<!--<div class="row">
|
|
<span data-i18n="glob-atk-mod:-u">GLOBAL MAGIC ATTACK MODIFIER:</span>
|
|
<input type="text" class="num" name="attr_globalmagicmod" placeholder="0" value="0">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="magic-caster-lvl:-u">MAGIC CASTER LEVEL:</span>
|
|
<input type="text" class="num" name="attr_caster_level">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="spell_dc_mod:-u">SPELL SAVE DC MOD:</span>
|
|
<input type="text" class="num" name="attr_spell_dc_mod" placeholder="0" value="0">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="spell-icons:-u">SPELL ICONS:</span>
|
|
<select name="attr_spellicon_flag">
|
|
<option value="all" data-i18n="show_all">Show All</option>
|
|
<option value="cp" data-i18n="cr_only">C&R Only</option>
|
|
<option value="none" data-i18n="none">None</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_halflingluck_flag" value="1">
|
|
<span data-i18n="halfling-luck-u">HALFLING LUCK</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_arcane_fighter" value="1">
|
|
<span data-i18n="arcane-fighter-u">ARCANE FIGHTER</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_arcane_rogue" value="1">
|
|
<span data-i18n="arcane-rogue-u">ARCANE ROGUE</span>
|
|
</div>-->
|
|
<div class="row title">
|
|
<span data-i18n="class-options-u">CLASS OPTIONS (<span name="attr_class" data-i18n-dynamic></span>)</span>
|
|
</div>
|
|
</div>
|
|
<div class="class_options">
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_multiclass1_flag" value="1">
|
|
<span data-i18n="2nd-class:-u">2ND CLASS:</span>
|
|
<select name="attr_multiclass1" style="width: 64px;">
|
|
<option value="" data-i18n="choose">Choose</option>
|
|
<option value="Emissary" data-i18n="emissary">Emissary</option>
|
|
<option value="Fighter" data-i18n="fighter">Fighter</option>
|
|
<option value="Hunter" data-i18n="hunter">Hunter</option>
|
|
<option value="Rogue" data-i18n="rogue">Rogue</option>
|
|
<option value="Sage" data-i18n="sage">Sage</option>
|
|
<option value="Wordsmith" data-i18n="wordsmith">Wordsmith</option>
|
|
</select>
|
|
<span data-i18n="lvl:-u">LEVEL:</span>
|
|
<input type="text" name="attr_multiclass1_lvl" value="1" style="width: 28px; text-align: center;">
|
|
<span data-i18n="subclass:-u" class="sheet-subclass">SUBCLASS:</span>
|
|
<input type="text" name="attr_multiclass1_subclass">
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_multiclass2_flag" value="1">
|
|
<span data-i18n="3rd-class:-u">3RD CLASS:</span>
|
|
<select name="attr_multiclass2" style="width: 64px;">
|
|
<option value="" data-i18n="choose">Choose</option>
|
|
<option value="Emissary" data-i18n="emissary">Emissary</option>
|
|
<option value="Fighter" data-i18n="fighter">Fighter</option>
|
|
<option value="Hunter" data-i18n="hunter">Hunter</option>
|
|
<option value="Rogue" data-i18n="rogue">Rogue</option>
|
|
<option value="Sage" data-i18n="sage">Sage</option>
|
|
<option value="Wordsmith" data-i18n="wordsmith">Wordsmith</option>
|
|
</select>
|
|
<span data-i18n="lvl:-u">LEVEL:</span>
|
|
<input type="text" name="attr_multiclass2_lvl" value="1" style="width: 28px; text-align: center;">
|
|
<span data-i18n="subclass:-u" class="sheet-subclass">SUBCLASS:</span>
|
|
<input type="text" name="attr_multiclass2_subclass">
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_multiclass3_flag" value="1">
|
|
<span data-i18n="4th-class:-u">4TH CLASS:</span>
|
|
<select name="attr_multiclass3" style="width: 64px;">
|
|
<option value="" data-i18n="choose">Choose</option>
|
|
<option value="Emissary" data-i18n="emissary">Emissary</option>
|
|
<option value="Fighter" data-i18n="fighter">Fighter</option>
|
|
<option value="Hunter" data-i18n="hunter">Hunter</option>
|
|
<option value="Rogue" data-i18n="rogue">Rogue</option>
|
|
<option value="Sage" data-i18n="sage">Sage</option>
|
|
<option value="Wordsmith" data-i18n="wordsmith">Wordsmith</option>
|
|
</select>
|
|
<span data-i18n="lvl:-u">LEVEL:</span>
|
|
<input type="text" name="attr_multiclass3_lvl" value="1" style="width: 28px; text-align: center;">
|
|
<span data-i18n="subclass:-u" class="sheet-subclass">SUBCLASS:</span>
|
|
<input type="text" name="attr_multiclass3_subclass">
|
|
</div>
|
|
<div class="row title">
|
|
<span data-i18n="mutliclass-opts-u">MULTICLASS OPTIONS</span>
|
|
</div>
|
|
</div>
|
|
<div class="class_options">
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_custom_class" value="1">
|
|
<span data-i18n="use-cust-class-u">USE CUSTOM CLASS</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="class-name:-u">CLASS NAME:</span>
|
|
<input type="text" name="attr_cust_classname">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="hit-die:-u">HIT DIE:</span>
|
|
<select name="attr_cust_hitdietype">
|
|
<option value="4">D4</option>
|
|
<option value="6">D6</option>
|
|
<option value="8">D8</option>
|
|
<option value="10">D10</option>
|
|
<option value="12">D12</option>
|
|
</select>
|
|
</div>
|
|
<!--<div class="row">
|
|
<span data-i18n="spellcasting-ability:-u">SPELLCASTING ABILITY:</span>
|
|
<select name="attr_cust_spellcasting_ability">
|
|
<option value="0*" data-i18n="none-u">NONE</option>
|
|
<option value="@{strength_mod}+" data-i18n="strength-u">STRENGTH</option>
|
|
<option value="@{dexterity_mod}+" data-i18n="dexterity-u">DEXTERITY</option>
|
|
<option value="@{constitution_mod}+" data-i18n="constitution-u">CONSTITUTION</option>
|
|
<option value="@{intelligence_mod}+" data-i18n="intelligence-u">INTELLIGENCE</option>
|
|
<option value="@{wisdom_mod}+" data-i18n="wisdom-u">WISDOM</option>
|
|
<option value="@{charisma_mod}+" data-i18n="charisma-u">CHARISMA</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="spell-slots:-u">SPELL SLOTS:</span>
|
|
<select name="attr_cust_spellslots">
|
|
<option value="none" data-i18n="none-u">NONE</option>
|
|
<option value="full" data-i18n="spell-full-u">FULL (Cleric, Druid, Wizard)</option>
|
|
<option value="half" data-i18n="spell-half-u">HALF (Artificer, Paladin, Ranger)</option>
|
|
<option value="third" data-i18n="spell-third-u">THIRD (Arcane Fighter/Rogue)</option>
|
|
</select>
|
|
</div>-->
|
|
<div class="row">
|
|
<span data-i18n="saves-u">SAVES</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_cust_strength_save_prof" value="(@{pb})">
|
|
<span data-i18n="strength">Strength</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_cust_dexterity_save_prof" value="(@{pb})">
|
|
<span data-i18n="dexterity">Dexterity</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_cust_constitution_save_prof" value="(@{pb})">
|
|
<span data-i18n="constitution">Constitution</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_cust_intelligence_save_prof" value="(@{pb})">
|
|
<span data-i18n="intelligence">Intelligence</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_cust_wisdom_save_prof" value="(@{pb})">
|
|
<span data-i18n="wisdom">Wisdom</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_cust_charisma_save_prof" value="(@{pb})">
|
|
<span data-i18n="charisma">Charisma</span>
|
|
</div>
|
|
<div class="row title">
|
|
<span data-i18n="cust-class-opts">CUSTOM CLASS OPTIONS</span>
|
|
</div>
|
|
</div>
|
|
<!--<div class="class_options spell_slot_mods">
|
|
<div class="column">
|
|
<div class="row">
|
|
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">1 +</span>
|
|
<input type="text" class="num" name="attr_lvl1_slots_mod" value="0" placeholder="0" title="@{lvl1_slots_mod}">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">2 +</span>
|
|
<input type="text" class="num" name="attr_lvl2_slots_mod" value="0" placeholder="0" title="@{lvl2_slots_mod}">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">3 +</span>
|
|
<input type="text" class="num" name="attr_lvl3_slots_mod" value="0" placeholder="0" title="@{lvl3_slots_mod}">
|
|
</div>
|
|
</div>
|
|
<div class="column">
|
|
<div class="row">
|
|
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">4 +</span>
|
|
<input type="text" class="num" name="attr_lvl4_slots_mod" value="0" placeholder="0" title="@{lvl4_slots_mod}">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">5 +</span>
|
|
<input type="text" class="num" name="attr_lvl5_slots_mod" value="0" placeholder="0" title="@{lvl5_slots_mod}">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">6 +</span>
|
|
<input type="text" class="num" name="attr_lvl6_slots_mod" value="0" placeholder="0" title="@{lvl6_slots_mod}">
|
|
</div>
|
|
</div>
|
|
<div class="column">
|
|
<div class="row">
|
|
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">7 +</span>
|
|
<input type="text" class="num" name="attr_lvl7_slots_mod" value="0" placeholder="0" title="@{lvl7_slots_mod}">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">8 +</span>
|
|
<input type="text" class="num" name="attr_lvl8_slots_mod" value="0" placeholder="0" title="@{lvl8_slots_mod}">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">9 +</span>
|
|
<input type="text" class="num" name="attr_lvl9_slots_mod" value="0" placeholder="0" title="@{lvl9_slots_mod}">
|
|
</div>
|
|
</div>
|
|
<div class="row title">
|
|
<span data-i18n="spell_slot_modifiers-u">SPELL SLOT MODIFIERS</span>
|
|
</div>
|
|
</div>-->
|
|
</div>
|
|
<div class="col col2">
|
|
<div class="attribute_options" style="width: 234px;">
|
|
<div class="row skill">
|
|
<span data-i18n="strength-u">STRENGTH</span>
|
|
<span>+</span><input type="text" class="num" name="attr_strength_bonus" value="0" placeholder="0" title="@{strength_bonus}">
|
|
</div>
|
|
<div class="row skill">
|
|
<span data-i18n="dexterity-u">DEXTERITY</span>
|
|
<span>+</span><input type="text" class="num" name="attr_dexterity_bonus" value="0" placeholder="0" title="@{dexterity_bonus}">
|
|
</div>
|
|
<div class="row skill">
|
|
<span data-i18n="constitution-u">CONSTITUTION</span>
|
|
<span>+</span><input type="text" class="num" name="attr_constitution_bonus" value="0" placeholder="0" title="@{constitution_bonus}">
|
|
</div>
|
|
<div class="row skill">
|
|
<span data-i18n="intelligence-u">INTELLIGENCE</span>
|
|
<span>+</span><input type="text" class="num" name="attr_intelligence_bonus" value="0" placeholder="0" title="@{intelligence_bonus}">
|
|
</div>
|
|
<div class="row skill">
|
|
<span data-i18n="wisdom-u">WISDOM</span>
|
|
<span>+</span><input type="text" class="num" name="attr_wisdom_bonus" value="0" placeholder="0" title="@{wisdom_bonus}">
|
|
</div>
|
|
<div class="row skill">
|
|
<span data-i18n="charisma-u">CHARISMA</span>
|
|
<span>+</span><input type="text" class="num" name="attr_charisma_bonus" value="0" placeholder="0" title="@{charisma_bonus}">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="initiative-mod:-u">INITIATIVE MODIFIER:</span>
|
|
<input type="text" class="num" name="attr_initmod" placeholder="0" value="0">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="initiative-style:-u">INITIATIVE STYLE:</span>
|
|
<select name="attr_initiative_style">
|
|
<option value="@{d20}" selected="selected" data-i18n="norm">Normal</option>
|
|
<option value="{@{d20},@{d20}}kh1" data-i18n="adv">Advantage</option>
|
|
<option value="{@{d20},@{d20}}kl1" data-i18n="disadv">Disadvantage</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_init_tiebreaker" value="@{dexterity}/100">
|
|
<span data-i18n="add-dex-tiebreaker-u">ADD DEX TIEBREAKER TO INITIATIVE</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="armor-class-tracking:-u">ARMOR CLASS TRACKING:</span>
|
|
<select name="attr_custom_ac_flag">
|
|
<option value="0" selected="selected" data-i18n="automatic">Automatic</option>
|
|
<option value="1" data-i18n="custom">Custom</option>
|
|
<option value="2" data-i18n="off">Off</option>
|
|
</select>
|
|
</div>
|
|
<input class="toggleflag" type="hidden" name="attr_custom_ac_flag">
|
|
<div class="row hidden">
|
|
<span data-i18n="custom_ac:-u">CUSTOM AC:</span>
|
|
<input type="text" class="num" name="attr_custom_ac_base" placeholder="10" value="10">
|
|
<span>+</span>
|
|
<select name="attr_custom_ac_part1">
|
|
<option value="none" selected="selected" data-i18n="none-u">NONE</option>
|
|
<option value="Strength" data-i18n="str-u">STR</option>
|
|
<option value="Dexterity" data-i18n="dex-u">DEX</option>
|
|
<option value="Constitution" data-i18n="con-u">CON</option>
|
|
<option value="Intelligence" data-i18n="int-u">INT</option>
|
|
<option value="Wisdom" data-i18n="wis-u">WIS</option>
|
|
<option value="Charisma" data-i18n="cha-u">CHA</option>
|
|
</select>
|
|
<span>+</span>
|
|
<select name="attr_custom_ac_part2">
|
|
<option value="none" selected="selected" data-i18n="none-u">NONE</option>
|
|
<option value="Strength" data-i18n="str-u">STR</option>
|
|
<option value="Dexterity" data-i18n="dex-u">DEX</option>
|
|
<option value="Constitution" data-i18n="con-u">CON</option>
|
|
<option value="Intelligence" data-i18n="int-u">INT</option>
|
|
<option value="Wisdom" data-i18n="wis-u">WIS</option>
|
|
<option value="Charisma" data-i18n="cha-u">CHA</option>
|
|
</select><br>
|
|
<input type="checkbox" name="attr_custom_ac_shield" value="yes" checked>
|
|
<span data-i18n="allow-shields-u">ALLOW SHIELDS?</span>
|
|
<hr style="margin: 2px">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="hpmods:-u">HP MODIFIERS:</span>
|
|
</div>
|
|
<fieldset class="repeating_hpmod">
|
|
<div style="padding-left: 15px; padding-bottom: 10px;">
|
|
<span data-i18n="levels:-u">LEVELS:</span>
|
|
<select name="attr_levels">
|
|
<option value="total" selected="selected" data-i18n="total-level-u">TOTAL LEVEL</option>
|
|
<option value="base" data-i18n="main-class-level-u">MAIN CLASS LEVEL</option>
|
|
<option value="multiclass1" data-i18n="class-2-level-u">CLASS 2 LEVEL</option>
|
|
<option value="multiclass2" data-i18n="class-3-level-u">CLASS 3 LEVEL</option>
|
|
<option value="multiclass3" data-i18n="class-4-level-u">CLASS 4 LEVEL</option>
|
|
</select><br>
|
|
<span data-i18n="source:-u">SOURCE:</span>
|
|
<input type="text" name="attr_source">
|
|
<span data-i18n="mod:-u">MOD:</span>
|
|
<input type="text" name="attr_mod" class="num">
|
|
</div>
|
|
</fieldset>
|
|
<div class="row title">
|
|
<span data-i18n="attribute-opts-u">ATTRIBUTE OPTIONS</span>
|
|
</div>
|
|
</div>
|
|
<div class="save_options" style="width: 234px;">
|
|
<div class="row skill">
|
|
<span data-i18n="strength-save-u">Strength Save</span>
|
|
<span>+</span><input type="text" class="num" name="attr_strength_save_mod" value="0" placeholder="0" title="@{strength_save_mod}">
|
|
</div>
|
|
<div class="row skill">
|
|
<span data-i18n="dexterity-save-u">Dexterity Save</span>
|
|
<span>+</span><input type="text" class="num" name="attr_dexterity_save_mod" value="0" placeholder="0" title="@{dexterity_save_mod}">
|
|
</div>
|
|
<div class="row skill">
|
|
<span data-i18n="constitution-save-u">Constitution Save</span>
|
|
<span>+</span><input type="text" class="num" name="attr_constitution_save_mod" value="0" placeholder="0" title="@{constitution_save_mod}">
|
|
</div>
|
|
<div class="row skill">
|
|
<span data-i18n="intelligence-save-u">Intelligence Save</span>
|
|
<span>+</span><input type="text" class="num" name="attr_intelligence_save_mod" value="0" placeholder="0" title="@{intelligence_save_mod}">
|
|
</div>
|
|
<div class="row skill">
|
|
<span data-i18n="wisdom-save-u">Wisdom Save</span>
|
|
<span>+</span><input type="text" class="num" name="attr_wisdom_save_mod" value="0" placeholder="0" title="@{wisdom_save_mod}">
|
|
</div>
|
|
<div class="row skill">
|
|
<span data-i18n="charisma-save-u">Charisma Save</span>
|
|
<span>+</span><input type="text" class="num" name="attr_charisma_save_mod" value="0" placeholder="0" title="@{charisma_save_mod}">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="death-save-mod:-u">DEATH SAVE MODIFIER:</span>
|
|
<input type="text" class="num" name="attr_death_save_mod" placeholder="0" value="0">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="glob-saving-mod:-u">GLOBAL SAVING THROW MODIFIER:</span>
|
|
<input type="text" class="num" name="attr_globalsavemod" placeholder="0" value="0">
|
|
</div>
|
|
<div class="row title">
|
|
<span data-i18n="save-opts-u">SAVE OPTIONS</span>
|
|
</div>
|
|
</div>
|
|
<div class="skill_options" style="width: 234px;">
|
|
<div data-i18n-list="skills-list">
|
|
<div class="row skill" data-i18n-list-item="acrobatics">
|
|
<select name="attr_acrobatics_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="acrobatics-core">Acrobatics <span>(Dex)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_acrobatics_flat" value="0" placeholder="0" title="@{acrobatics_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="animal_handling">
|
|
<select name="attr_animal_handling_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="animal_handling-core">Animal Handling <span>(Wis)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_animal_handling_flat" value="0" placeholder="0" title="@{animal_handling_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="athletics">
|
|
<select name="attr_athletics_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="athletics-core">Athletics <span>(Str)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_athletics_flat" value="0" placeholder="0" title="@{athletics_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="deception">
|
|
<select name="attr_deception_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="deception-core">Deception <span>(Cha)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_deception_flat" value="0" placeholder="0" title="@{deception_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="eldertech">
|
|
<select name="attr_eldertech_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="eldertech-core">Eldertech <span>(Int)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_eldertech_flat" value="0" placeholder="0" title="@{eldertech_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="history">
|
|
<select name="attr_history_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="history-core">History <span>(Int)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_history_flat" value="0" placeholder="0" title="@{history_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="insight">
|
|
<select name="attr_insight_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="insight-core">Insight <span>(Wis)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_insight_flat" value="0" placeholder="0" title="@{insight_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="intimidation">
|
|
<select name="attr_intimidation_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="intimidation-core">Intimidation <span>(Cha)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_intimidation_flat" value="0" placeholder="0" title="@{intimidation_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="investigation">
|
|
<select name="attr_investigation_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="investigation-core">Investigation <span>(Int)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_investigation_flat" value="0" placeholder="0" title="@{investigation_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="materials">
|
|
<select name="attr_materials_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="materials-core">Materials <span>(Int)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_materials_flat" value="0" placeholder="0" title="@{materials_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="medicine">
|
|
<select name="attr_medicine_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="medicine-core">Medicine <span>(Int)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_medicine_flat" value="0" placeholder="0" title="@{medicine_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="nature">
|
|
<select name="attr_nature_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="nature-core">Nature <span>(Int)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_nature_flat" value="0" placeholder="0" title="@{nature_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="perception">
|
|
<select name="attr_perception_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="perception-core">Perception <span>(Wis)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_perception_flat" value="0" placeholder="0" title="@{perception_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="performance">
|
|
<select name="attr_performance_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="performance-core">Performance <span>(Cha)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_performance_flat" value="0" placeholder="0" title="@{performance_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="persuasion">
|
|
<select name="attr_persuasion_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="persuasion-core">Persuasion <span>(Cha)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_persuasion_flat" value="0" placeholder="0" title="@{persuasion_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="politics">
|
|
<select name="attr_politics_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="politics-core">Politics <span>(Int)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_politics_flat" value="0" placeholder="0" title="@{politics_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="religion">
|
|
<select name="attr_religion_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="religion-core">Religion <span>(Int)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_religion_flat" value="0" placeholder="0" title="@{religion_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="sleight_of_hand">
|
|
<select name="attr_sleight_of_hand_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="sleight_of_hand-core">Sleight of Hand <span>(Dex)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_sleight_of_hand_flat" value="0" placeholder="0" title="@{sleight_of_hand_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="stealth">
|
|
<select name="attr_stealth_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="stealth-core">Stealth <span>(Dex)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_stealth_flat" value="0" placeholder="0" title="@{stealth_flat}">
|
|
</div>
|
|
<div class="row skill" data-i18n-list-item="survival">
|
|
<select name="attr_survival_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
|
|
<span data-i18n="survival-core">Survival <span>(Wis)</span></span>
|
|
<span>+</span><input type="text" class="num" name="attr_survival_flat" value="0" placeholder="0" title="@{survival_flat}">
|
|
</div>
|
|
</div>
|
|
<div class="row" style="margin-top:10px;">
|
|
<input type="checkbox" name="attr_jack_of_all_trades" value="@{jack}">
|
|
<span data-i18n="jack-of-all-u">JACK OF ALL TRADES</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="pass-perc-mod:-u">PASSIVE PERCEPTION MODIFIER:</span>
|
|
<input type="text" class="num" name="attr_passiveperceptionmod" placeholder="0" value="0">
|
|
</div>
|
|
<div class="row title">
|
|
<span data-i18n="skill-opts-u">SKILL OPTIONS</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col col3">
|
|
<div class="general_options">
|
|
<div class="version">
|
|
<span data-i18n="version">v</span>
|
|
<span name="attr_version"></span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_npc" value="1">
|
|
<span data-i18n="npc-u">NPC</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="roll-queries:-u">ROLL QUERIES:</span>
|
|
<select name="attr_rtype">
|
|
<option value="{{always=1}} {{r2=[[@{d20}" data-i18n="always-roll-adv">Always Roll Advantage</option>
|
|
<option value="@{advantagetoggle}" data-i18n="toggle-roll-adv">Advantage Toggle</option>
|
|
<option value="{{query=1}} ?{Advantage?|Normal Roll,{{normal=1}} {{r2=[[0d20|Advantage,{{advantage=1}} {{r2=[[@{d20}|Disadvantage,{{disadvantage=1}} {{r2=[[@{d20}}" data-i18n="query-roll-adv">Query Advantage</option>
|
|
<option value="{{normal=1}} {{r2=[[0d20" data-i18n="never-roll-adv">Never Roll Advantage</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="whisp-rolls-gm:-u">WHISPER ROLLS TO GM:</span>
|
|
<select name="attr_wtype">
|
|
<option value="" data-i18n="never-whisper-roll">Never Whisper Rolls</option>
|
|
<option value="@{whispertoggle}" data-i18n="toggle-roll-whisper">Whisper Toggle</option>
|
|
<option value="?{Whisper?|Public Roll,|Whisper Roll,/w gm }" data-i18n="query-whisper-roll">Query Whisper</option>
|
|
<option value="/w gm " data-i18n="always-whisper-roll">Always Whisper Rolls</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="auto-dmg-roll:-u">AUTO DAMAGE ROLL:</span>
|
|
<select class="dtype" name="attr_dtype">
|
|
<option value="pick" data-i18n="never-roll-dmg">Don't Auto Roll Damage</option>
|
|
<option value="full" data-i18n="always-roll-dmg">Auto Roll Damage & Crit</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="core-die-roll:-u">CORE DIE ROLL:</span>
|
|
<input type="text" name="attr_core_die" value="1d20" placeholder="1d20" title="@{core_die}">
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="prof-bonus:-u">PROFICIENCY BONUS:</span>
|
|
<select class="dtype" name="attr_pb_type">
|
|
<option value="level" data-i18n="by-level">By Level (Default)</option>
|
|
<option value="die" data-i18n="prof-die">Proficency Die (DMG)</option>
|
|
<option value="custom" data-i18n="custom">Custom</option>
|
|
</select>
|
|
<input type="hidden" name="attr_pb_type">
|
|
<input class="pb_custom" type="text" style="float:right;" name="attr_pb_custom" placeholder="2d10">
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_global_save_mod_flag" value="1">
|
|
<span data-i18n="show-global-save-field-u">SHOW GLOBAL SAVE MODIFIER FIELD</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_global_skill_mod_flag" value="1">
|
|
<span data-i18n="show-global-skill-field-u">SHOW GLOBAL SKILL MODIFIER FIELD</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_global_attack_mod_flag" value="1">
|
|
<span data-i18n="show-global-attack-field-u">SHOW GLOBAL ATTACK MODIFIER FIELD</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_global_damage_mod_flag" value="1">
|
|
<span data-i18n="show-global-damage-field-u">SHOW GLOBAL DAMAGE MODIFIER FIELD</span>
|
|
</div>
|
|
<div class="row">
|
|
<input type="checkbox" name="attr_global_ac_mod_flag" value="1">
|
|
<span data-i18n="show-global-ac-field-u">SHOW GLOBAL AC MODIFIER FIELD</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="add-char-to-templates:-u">ADD CHARACTER NAME TO TEMPLATES:</span>
|
|
<select class="dtype" name="attr_charname_output">
|
|
<option value="{{charname=@{character_name}}}" data-i18n="on">On</option>
|
|
<option value="charname=@{character_name}" selected="selected" data-i18n="off">Off</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="level-calculations:-u">LEVEL CALCULATIONS:</span>
|
|
<select class="dtype" name="attr_level_calculations">
|
|
<option value="on" selected="selected" data-i18n="on">On</option>
|
|
<option value="off" data-i18n="off">Off</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="encumbrance:-u">ENCUMBRANCE:</span>
|
|
<select name="attr_encumberance_setting">
|
|
<option value="off" data-i18n="simple">Simple</option>
|
|
<option value="on" data-i18n="variant-phb">Variant (PHB p176)</option>
|
|
<option value="disabled" data-i18n="off">Off</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="inventory:-u">INVENTORY:</span>
|
|
<select name="attr_simpleinventory">
|
|
<option value="complex" data-i18n="compendium-compatible">Compendium Compatible</option>
|
|
<option value="simple" data-i18n="simple">Simple</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="feats-traits-u">FEATURES AND TRAITS</span><span>:</span>
|
|
<select name="attr_simpletraits">
|
|
<option value="complex" data-i18n="compendium-compatible">Compendium Compatible</option>
|
|
<option value="simple" data-i18n="simple">Simple</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="prof-langs-u">PROFICENCIES AND LANGUAGES</span><span>:</span>
|
|
<select name="attr_simpleproficencies">
|
|
<option value="complex" data-i18n="compendium-compatible">Compendium Compatible</option>
|
|
<option value="simple" data-i18n="simple">Simple</option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="ammo-tracking:-u">AMMO TRACKING:</span>
|
|
<select name="attr_ammotracking">
|
|
<option value="on" data-i18n="on">On</option>
|
|
<option value="off" selected="selected" data-i18n="off">Off</option>
|
|
</select>
|
|
<span data-i18n-title="api-required-title" data-i18n="api-required-u" title="Try it now with easy one click API installation available with your Pro subscription." style="color:#666; cursor:help;">(API REQUIRED)</span>
|
|
</div>
|
|
<div class="row">
|
|
<span data-i18n="exhaustion-setting-u">SHOW EXHAUSTION TRACKING:</span>
|
|
<select name="attr_exhaustion_toggle">
|
|
<option value="1" data-i18n="on">On</option>
|
|
<option value="0" data-i18n="off" selected="selected">Off</option>
|
|
</select>
|
|
</div>
|
|
<!--<div class="row">
|
|
<input type="checkbox" name="attr_licensedsheet" value="1">
|
|
<span data-i18n="use-licensed-sheet-styling">USE OFFICIAL D&D STYLING</span>
|
|
</div>-->
|
|
<div class="row title">
|
|
<span data-i18n="general-opts-u">GENERAL OPTIONS</span>
|
|
</div>
|
|
</div>
|
|
<!--<div class="general_options charactermancer_options">
|
|
<input type="hidden" class="warningflag" name="attr_leveler_warningflag">
|
|
<div class="warning">
|
|
<span>
|
|
<label><input type="checkbox" name="attr_leveler_warningflag" value="hide">*</label>
|
|
<span data-i18n="warning-leveler_start-u">
|
|
ATTENTION - YOU CANNOT LAUNCH THE CHARACTERMANCER LEVEL UP UNTIL YOU HAVE A CLASS, LEVEL, AND HP SET FOR LEVEL ONE. PLEASE RUN THE CHARACTERMANCER CREATOR FIRST. THE LEVEL UP TOOL DOESN'T WORK WITH CUSTOM CLASSES OR IF THE MULTICLASS OPTIONS ARE SET UP INCORRECTLY.
|
|
</span>
|
|
</span>
|
|
</div>
|
|
<div class="row">
|
|
<button type="action" name="act_relaunch_lvl1mancer" style="padding: 0px;"><img src="https://raw.githubusercontent.com/solar-studios/Roll20Redsky/main/images/CharactermancerIcon200px.png" style="height: 32px; width: 32px" alt="Wand & Hammer of Charactermancer"></button><span style="width: 180px; margin-left: 10px; display: inline-block;" data-i18n="relaunch-lvl1mancer-u">LAUNCH LEVEL 1 CHARACTERMANCER (CANNOT BE UNDONE)</span>
|
|
</div>
|
|
<div class="row">
|
|
<button type="action" name="act_launch_lvl+mancer" style="padding: 0px;"><img src="https://raw.githubusercontent.com/solar-studios/Roll20Redsky/main/images/CharactermancerIcon200px.png" style="height: 32px; width: 32px" alt="Wand & Hammer of Charactermancer"></button><span style="width: 180px; margin-left: 10px; display: inline-block;">LAUNCH LEVEL+ CHARACTERMANCER</span>
|
|
</div>
|
|
<div class="row title">
|
|
<span data-i18n="mancer-opts-u">CHARACTERMANCER OPTIONS</span>
|
|
</div>
|
|
</div>-->
|
|
</div>
|
|
</div></div><div class="footer">
|
|
<div style="margin-right: 50px; margin-left: 10px;">
|
|
<span data-i18n="portions-sheet-utilize">
|
|
Portions of this sheet utilize content from the System Reference Document 5.0 under the OGL License. View OGL License and Copyright Notice. https://wiki.roll20.net/SRD_5.0_OGL_License
|
|
</span>
|
|
</div>
|
|
<div>
|
|
<span data-i18n="footer-wiki-link">
|
|
For more information about this character sheet, its functionality, or uses, please check out the Roll20 Wiki for official documentation. https://wiki.roll20.net/5th_Edition_OGL_by_Roll20
|
|
</span>
|
|
</div></div></div><input accept="Category" name="attr_drop_category" type="hidden"/><input accept="Name" name="attr_drop_name" type="hidden"/><input accept="data" name="attr_drop_data" type="hidden"/><input accept="Content" name="attr_drop_content" type="hidden"/></div><input type="hidden" name="attr_d20" value="1d20">
|
|
<input type="hidden" name="attr_level" value="1">
|
|
<input type="hidden" name="attr_pb" value="2">
|
|
<input type="hidden" name="attr_pbd_safe" value="">
|
|
<input type="hidden" name="attr_jack" value="1">
|
|
<input type="hidden" name="attr_jack_attr" value="">
|
|
<input type="hidden" name="attr_jack_bonus" value="">
|
|
<input type="hidden" name="attr_passive_wisdom" value="10">
|
|
<input type="hidden" name="attr_hitdie_final" value="">
|
|
<input type="hidden" name="attr_globalsavingthrowbonus" value="">
|
|
<input type="hidden" name="attr_death_save_bonus" value="0">
|
|
<input type="hidden" name="attr_initiative_bonus" value="0">
|
|
<input type="hidden" name="attr_spell_save_dc" value="0">
|
|
<input type="hidden" name="attr_spell_attack_bonus" value="0">
|
|
<input type="hidden" name="attr_spell_attack_mod" value="0">
|
|
<input type="hidden" name="attr_npc_legendary_actions_desc" value="">
|
|
<input type="hidden" name="attr_global_damage_mod_crit" value="0">
|
|
<input type="hidden" name="attr_global_damage_mod_roll" value="0">
|
|
<input type="hidden" name="attr_global_damage_mod_type" value="">
|
|
<input type="hidden" name="attr_global_attack_mod" value="">
|
|
<input type="hidden" name="attr_global_save_mod" value="">
|
|
<input type="hidden" name="attr_global_skill_mod" value="">
|
|
|
|
<input type="hidden" name="attr_exhaustion_1" value="">
|
|
<input type="hidden" name="attr_exhaustion_2" value="">
|
|
<input type="hidden" name="attr_exhaustion_3" value="">
|
|
<input type="hidden" name="attr_exhaustion_4" value="">
|
|
<input type="hidden" name="attr_exhaustion_5" value="">
|
|
<input type="hidden" name="attr_exhaustion_6" value="">
|
|
|
|
<input type="hidden" name="attr_strength_mod" value="0">
|
|
<input type="hidden" name="attr_dexterity_mod" value="0">
|
|
<input type="hidden" name="attr_constitution_mod" value="0">
|
|
<input type="hidden" name="attr_intelligence_mod" value="0">
|
|
<input type="hidden" name="attr_wisdom_mod" value="0">
|
|
<input type="hidden" name="attr_charisma_mod" value="0">
|
|
|
|
<input type="hidden" name="attr_strength_save_bonus" value="0">
|
|
<input type="hidden" name="attr_dexterity_save_bonus" value="0">
|
|
<input type="hidden" name="attr_constitution_save_bonus" value="0">
|
|
<input type="hidden" name="attr_intelligence_save_bonus" value="0">
|
|
<input type="hidden" name="attr_wisdom_save_bonus" value="0">
|
|
<input type="hidden" name="attr_charisma_save_bonus" value="0">
|
|
|
|
<input type="hidden" name="attr_strength_maximum" value="20">
|
|
<input type="hidden" name="attr_dexterity_maximum" value="20">
|
|
<input type="hidden" name="attr_constitution_maximum" value="20">
|
|
<input type="hidden" name="attr_intelligence_maximum" value="20">
|
|
<input type="hidden" name="attr_wisdom_maximum" value="20">
|
|
<input type="hidden" name="attr_charisma_maximum" value="20">
|
|
|
|
<input type='hidden' name='attr_acrobatics_bonus' value='0'>
|
|
<input type='hidden' name='attr_animal_handling_bonus' value='0'>
|
|
<input type='hidden' name='attr_athletics_bonus' value='0'>
|
|
<input type='hidden' name='attr_deception_bonus' value='0'>
|
|
<input type='hidden' name='attr_eldertech_bonus' value='0'>
|
|
<input type='hidden' name='attr_history_bonus' value='0'>
|
|
<input type='hidden' name='attr_insight_bonus' value='0'>
|
|
<input type='hidden' name='attr_intimidation_bonus' value='0'>
|
|
<input type='hidden' name='attr_investigation_bonus' value='0'>
|
|
<input type='hidden' name='attr_materials_bonus' value='0'>
|
|
<input type='hidden' name='attr_medicine_bonus' value='0'>
|
|
<input type='hidden' name='attr_nature_bonus' value='0'>
|
|
<input type='hidden' name='attr_perception_bonus' value='0'>
|
|
<input type='hidden' name='attr_performance_bonus' value='0'>
|
|
<input type='hidden' name='attr_persuasion_bonus' value='0'>
|
|
<input type='hidden' name='attr_politics_bonus' value='0'>
|
|
<input type='hidden' name='attr_religion_bonus' value='0'>
|
|
<input type='hidden' name='attr_sleight_of_hand_bonus' value='0'>
|
|
<input type='hidden' name='attr_stealth_bonus' value='0'>
|
|
<input type='hidden' name='attr_survival_bonus' value='0'>
|
|
|
|
<input type='hidden' name='attr_lvl1_slots_total' value='0'>
|
|
<input type='hidden' name='attr_lvl2_slots_total' value='0'>
|
|
<input type='hidden' name='attr_lvl3_slots_total' value='0'>
|
|
<input type='hidden' name='attr_lvl4_slots_total' value='0'>
|
|
<input type='hidden' name='attr_lvl5_slots_total' value='0'>
|
|
<input type='hidden' name='attr_lvl6_slots_total' value='0'>
|
|
<input type='hidden' name='attr_lvl7_slots_total' value='0'>
|
|
<input type='hidden' name='attr_lvl8_slots_total' value='0'>
|
|
<input type='hidden' name='attr_lvl9_slots_total' value='0'>
|
|
|
|
<input type='hidden' name='attr_l1mancer_status' value=''>
|
|
<input type='hidden' name='attr_lpmancer_status' value=''><div class="compendium_warning"><span data-i18n="accepting-drop-u">ACCEPTING DROP FROM COMPENDIUM</span></div>
|
|
|
|
<div class="monster_confirm">
|
|
<span data-i18n="are_you_sure">Are you sure you want to turn this character into a </span><span name="attr_drop_name"></span><span>?</span>
|
|
<div style="margin-top: 20px;">
|
|
<div style="position: relative; display: inline-block; margin-right: 25px;">
|
|
<input class="yes" type="checkbox" name="attr_confirm"><span class="yes" data-i18n="yes">Yes</span>
|
|
</div>
|
|
<div style="position: relative; display: inline-block;">
|
|
<input class="cancel" type="checkbox" name="attr_cancel"><span class="cancel" data-i18n="cancel">Cancel</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mancer_confirm">
|
|
<span style="line-height: 25px" data-i18n="do_you_want_mancer">How do you want to create this character?</span>
|
|
<div style="margin-top: 20px;">
|
|
<!--<div style="position: relative; display: inline-block; width:130px;">
|
|
<input class="yes" type="checkbox" style="width:130px;" name="attr_mancer_confirm"><span class="yes" style="width:130px;" data-i18n="mancer-confirm-yes">Use the Charactermancer</span>
|
|
</div>-->
|
|
<div style="position: relative; display: inline-block; width:80px;">
|
|
<input class="yes" style="width:80px;" type="checkbox" name="attr_mancer_npc"><span class="yes" style="width:80px;" data-i18n="npc-new">Create an NPC</span>
|
|
</div>
|
|
<div style="position: relative; display: inline-block; width:90px;">
|
|
<input class="yes" type="checkbox" style="width:90px;" name="attr_mancer_cancel"><span class="yes" style="width:90px;" data-i18n="manual">Edit sheet directly</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="rolltemplates"> <rolltemplate class="sheet-rolltemplate-simple">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
<div class="container">
|
|
<div class="result">
|
|
{{#always}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
{{/always}}
|
|
{{#normal}}
|
|
<div class="solo">
|
|
<span>{{r1}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
{{/normal}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}
|
|
<div class="adv">
|
|
<span class="grey">{{r1}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span class="grey">{{r2}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollLess() r1 r2}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span class="grey">{{r2}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}
|
|
<div class="adv">
|
|
<span class="grey">{{r1}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#global}} + {{global}}{{/global}}</span>
|
|
</div>
|
|
{{/rollGreater() r1 r2}}
|
|
{{/disadvantage}}
|
|
</div>
|
|
<div class="label">
|
|
<span>{{rname}}{{#mod}} <span>({{mod}})</span>{{/mod}}</span>
|
|
</div>
|
|
{{#charname}}
|
|
<div class="charname">
|
|
<span>{{charname}}</span>
|
|
</div>
|
|
{{/charname}}
|
|
</div>
|
|
</rolltemplate>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-atk">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
<div class="container">
|
|
<div class="result">
|
|
{{#always}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/always}}
|
|
{{#normal}}
|
|
<div class="solo">
|
|
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/normal}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}
|
|
<div class="adv">
|
|
<span class="grey">{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span class="grey">{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollLess() r1 r2}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span class="grey">{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}
|
|
<div class="adv">
|
|
<span class="grey">{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/rollGreater() r1 r2}}
|
|
{{/disadvantage}}
|
|
</div>
|
|
{{#range}}
|
|
<div class="sublabel">
|
|
<span>{{range}}</span>
|
|
</div>
|
|
{{/range}}
|
|
<div class="label">
|
|
{{#normal}}
|
|
{{#rollWasCrit() r1}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r1}}
|
|
{{#^rollWasCrit() r1}}<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/^rollWasCrit() r1}}
|
|
{{/normal}}
|
|
{{#always}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{#^rollWasCrit() r1}}{{#^rollWasCrit() r2}}<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/^rollWasCrit() r2}}{{/^rollWasCrit() r1}}
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{#^rollWasCrit() r1}}{{#^rollWasCrit() r2}}<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/^rollWasCrit() r2}}{{/^rollWasCrit() r1}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#^rollWasCrit() r1}}<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/^rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollLess() r1 r2}}<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollLess() r1 r2}}
|
|
{{#rollGreater() r1 r2}}<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollGreater() r1 r2}}
|
|
{{/disadvantage}}
|
|
</div>
|
|
{{#charname}}
|
|
<div class="charname">
|
|
<span>{{charname}}</span>
|
|
</div>
|
|
{{/charname}}
|
|
</div>
|
|
{{#desc}}
|
|
<div class="desc info">
|
|
<span>
|
|
<span class="top"></span><span class="middle">{{desc}}</span><span class="bottom"></span>
|
|
</span>
|
|
</div>
|
|
{{/desc}}
|
|
</rolltemplate>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-dmg">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
{{#save}}
|
|
{{#attack}}
|
|
<div class="desc save">
|
|
{{/attack}}
|
|
{{^attack}}
|
|
<div class="atk save">
|
|
{{/attack}}
|
|
<div class="savedc">
|
|
<span class="rolltemplate-inline" data-i18n="difficulty-class-abv">DC</span><span class="rolltemplate-inline">{{savedc}}</span>
|
|
</div>
|
|
{{#savedesc}}
|
|
<div class="sublabel">
|
|
<span>{{savedesc}}</span>
|
|
</div>
|
|
{{/savedesc}}
|
|
<div class="label">
|
|
<span class="rolltemplate-inline">{{saveattr}}</span> <span class="rolltemplate-inline" data-i18n="save">Save</span>
|
|
</div>
|
|
</div>
|
|
{{/save}}
|
|
{{^attack}}
|
|
{{#desc}}
|
|
<div class="desc info">
|
|
<span>
|
|
<span class="top"></span><span class="middle">{{desc}}</span><span class="bottom"></span>
|
|
</span>
|
|
</div>
|
|
{{/desc}}
|
|
{{/attack}}
|
|
{{#globaldamage}}
|
|
{{#^rollTotal() globaldamage 0}}
|
|
<div class="desc">
|
|
<span>{{globaldamage}}{{#globaldamagecrit}}<span class="plus"> + </span>{{globaldamagecrit}}{{/globaldamagecrit}}</span>
|
|
<span class="sublabel">{{globaldamagetype}}</span>
|
|
</div>
|
|
{{/^rollTotal() globaldamage 0}}
|
|
{{/globaldamage}}
|
|
{{#hldmg}}
|
|
{{#^rollTotal() hldmg 0}}
|
|
<div class="desc">
|
|
<span>{{hldmg}}{{#hldmgcrit}}<span class="plus"> + </span>{{hldmgcrit}}{{/hldmgcrit}}</span>
|
|
<span class="sublabel">{{dmg1type}}</span>
|
|
<div class="label">
|
|
<span data-i18n="higher-lvl-cast">Higher Level Cast</span>
|
|
</div>
|
|
</div>
|
|
{{/^rollTotal() hldmg 0}}
|
|
{{/hldmg}}
|
|
<div class="container damagetemplate">
|
|
<div class="result">
|
|
{{#dmg1flag}}
|
|
{{^dmg2flag}}
|
|
<div class="solo">
|
|
<span class="damage">{{dmg1}}{{#crit}} + {{crit1}}{{/crit}}</span>
|
|
<span class="sublabel">{{dmg1type}}</span>
|
|
</div>
|
|
{{/dmg2flag}}
|
|
{{/dmg1flag}}
|
|
{{#dmg2flag}}
|
|
{{^dmg1flag}}
|
|
<div class="solo">
|
|
<span class="damage">{{dmg2}}{{#crit}} + {{crit2}}{{/crit}}</span>
|
|
<span class="sublabel">{{dmg2type}}</span>
|
|
</div>
|
|
{{/dmg1flag}}
|
|
{{/dmg2flag}}
|
|
{{#dmg1flag}}
|
|
{{#dmg2flag}}
|
|
<div class="adv">
|
|
<span class="damage">{{dmg1}}{{#crit}} + {{crit1}}{{/crit}}</span>
|
|
<span class="sublabel">{{dmg1type}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span class="damage">{{dmg2}}{{#crit}} + {{crit2}}{{/crit}}</span>
|
|
<span class="sublabel">{{dmg2type}}</span>
|
|
</div>
|
|
{{/dmg2flag}}
|
|
{{/dmg1flag}}
|
|
</div>
|
|
{{^attack}}
|
|
{{#range}}
|
|
<div class="sublabel" style="color: black;">
|
|
<span>{{range}}</span>
|
|
</div>
|
|
{{/range}}
|
|
<div class="label">
|
|
<span>{{rname}}</span>{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}}
|
|
</div>
|
|
{{#charname}}
|
|
<div class="charname">
|
|
<span>{{charname}}</span>
|
|
</div>
|
|
{{/charname}}
|
|
{{/attack}}
|
|
</div>
|
|
</rolltemplate>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-atkdmg">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
{{#attack}}
|
|
<div class="container atk">
|
|
<div class="result">
|
|
{{#always}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/always}}
|
|
{{#normal}}
|
|
<div class="solo">
|
|
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/normal}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}
|
|
<div class="adv">
|
|
<span class="grey">{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span class="grey">{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollLess() r1 r2}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span class="grey">{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}
|
|
<div class="adv">
|
|
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}
|
|
<div class="adv">
|
|
<span class="grey">{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
|
|
</div>
|
|
{{/rollGreater() r1 r2}}
|
|
{{/disadvantage}}
|
|
</div>
|
|
{{#range}}
|
|
<div class="sublabel">
|
|
<span>{{range}}</span>
|
|
</div>
|
|
{{/range}}
|
|
<div class="label">
|
|
<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}}{{#attack}} <span>({{mod}})</span>{{/attack}}</span>
|
|
</div>
|
|
{{#charname}}
|
|
<div class="charname">
|
|
<span>{{charname}}</span>
|
|
</div>
|
|
{{/charname}}
|
|
</div>
|
|
{{/attack}}
|
|
{{#save}}
|
|
{{#attack}}
|
|
<div class="container desc save">
|
|
{{/attack}}
|
|
{{^attack}}
|
|
<div class="container atk save">
|
|
{{/attack}}
|
|
<div class="savedc">
|
|
<span class="rolltemplate-inline" data-i18n="difficulty-class-abv">DC</span><span class="rolltemplate-inline">{{savedc}}</span>
|
|
</div>
|
|
{{#savedesc}}
|
|
<div class="sublabel">
|
|
<span>{{savedesc}}</span>
|
|
</div>
|
|
{{/savedesc}}
|
|
<div class="label">
|
|
<span class="rolltemplate-inline">{{saveattr}}</span> <span class="rolltemplate-inline" data-i18n="save">Save</span>
|
|
</div>
|
|
</div>
|
|
{{/save}}
|
|
{{#desc}}
|
|
<div class="desc info">
|
|
<span>
|
|
<span class="top"></span><span class="middle">{{desc}}</span><span class="bottom"></span>
|
|
</span>
|
|
</div>
|
|
{{/desc}}
|
|
{{#globaldamage}}
|
|
{{#^rollTotal() globaldamage 0}}
|
|
<div class="desc">
|
|
<span>
|
|
{{globaldamage}}
|
|
{{#attack}}
|
|
{{#normal}}
|
|
{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}
|
|
{{/normal}}
|
|
{{#always}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{/disadvantage}}
|
|
{{/attack}}
|
|
</span>
|
|
<span class="sublabel">{{globaldamagetype}}</span>
|
|
</div>
|
|
{{/^rollTotal() globaldamage 0}}
|
|
{{/globaldamage}}
|
|
{{#hldmg}}
|
|
{{#^rollTotal() hldmg 0}}
|
|
<div class="desc">
|
|
<span>
|
|
{{hldmg}}
|
|
<!-- {{#hldmgcrit}} + {{hldmgcrit}}{{/hldmgcrit}} -->
|
|
{{#attack}}
|
|
{{#normal}}
|
|
{{#rollWasCrit() r1}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r1}}
|
|
{{/normal}}
|
|
{{#always}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{/disadvantage}}
|
|
{{/attack}}
|
|
</span>
|
|
<span class="sublabel">{{dmg1type}}</span>
|
|
<div class="label">
|
|
<span data-i18n="higher-lvl-cast">Higher Level Cast</span>
|
|
</div>
|
|
</div>
|
|
{{/^rollTotal() hldmg 0}}
|
|
{{/hldmg}}
|
|
{{#damage}}
|
|
<div class="container damagetemplate">
|
|
<div class="result">
|
|
{{#dmg1flag}}
|
|
{{^dmg2flag}}
|
|
<div class="solo">
|
|
<span class="damage">
|
|
{{dmg1}}
|
|
{{#attack}}
|
|
{{#normal}}
|
|
{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}
|
|
{{/normal}}
|
|
{{#always}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit1}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit1}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{/disadvantage}}
|
|
{{/attack}}
|
|
</span>
|
|
<span class="sublabel">{{dmg1type}}</span>
|
|
</div>
|
|
{{/dmg2flag}}
|
|
{{/dmg1flag}}
|
|
{{#dmg2flag}}
|
|
{{^dmg1flag}}
|
|
<div class="solo">
|
|
<span class="damage">
|
|
{{dmg2}}
|
|
{{#attack}}
|
|
{{#normal}}
|
|
{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}
|
|
{{/normal}}
|
|
{{#always}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit2}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit2}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{/disadvantage}}
|
|
{{/attack}}
|
|
</span>
|
|
<span class="sublabel">{{dmg2type}}</span>
|
|
</div>
|
|
{{/dmg1flag}}
|
|
{{/dmg2flag}}
|
|
{{#dmg1flag}}
|
|
{{#dmg2flag}}
|
|
<div class="adv">
|
|
<span class="damage">
|
|
{{dmg1}}
|
|
{{#attack}}
|
|
{{#normal}}
|
|
{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}
|
|
{{/normal}}
|
|
{{#always}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit1}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit1}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{/disadvantage}}
|
|
{{/attack}}
|
|
</span>
|
|
<span class="sublabel">{{dmg1type}}</span>
|
|
</div>
|
|
<div class="advspacer"></div>
|
|
<div class="adv">
|
|
<span>
|
|
{{dmg2}}
|
|
{{#attack}}
|
|
{{#normal}}
|
|
{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}
|
|
{{/normal}}
|
|
{{#always}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit2}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit2}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{/disadvantage}}
|
|
{{/attack}}
|
|
</span>
|
|
<span class="sublabel">{{dmg2type}}</span>
|
|
</div>
|
|
{{/dmg2flag}}
|
|
{{/dmg1flag}}
|
|
</div>
|
|
{{^attack}}
|
|
{{#range}}
|
|
<div class="sublabel">
|
|
<span>{{range}}</span>
|
|
</div>
|
|
{{/range}}
|
|
<div class="label">
|
|
<span>{{rname}}</span>{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}}
|
|
</div>
|
|
{{#charname}}
|
|
<div class="charname">
|
|
<span>{{charname}}</span>
|
|
</div>
|
|
{{/charname}}
|
|
{{/attack}}
|
|
</div>
|
|
{{/damage}}
|
|
</rolltemplate>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-desc">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
<div class="desc info">
|
|
<span>
|
|
<span class="top"></span><span class="middle">{{desc}}</span><span class="bottom"></span>
|
|
</span>
|
|
</div>
|
|
</rolltemplate>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-spell">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
<div class="container">
|
|
<div class="title row">
|
|
<span>{{name}}</span>{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}}
|
|
</div>
|
|
<div class="italics row">
|
|
<span>{{level}}{{#ritual}} (<span data-i18n="ritual-l"></span>){{/ritual}}</span>
|
|
</div>
|
|
<div class="spacer"></div>
|
|
{{#castingtime}}
|
|
<div class="row">
|
|
<span class="bold" data-i18n="casting-time:">Casting Time:</span> <span>{{castingtime}}</span>
|
|
</div>
|
|
{{/castingtime}}
|
|
{{#range}}
|
|
<div class="row">
|
|
<span class="bold" data-i18n="range:">Range:</span> <span>{{range}}</span>
|
|
</div>
|
|
{{/range}}
|
|
{{#target}}
|
|
<div class="row">
|
|
<span class="bold" data-i18n="target:">Target:</span> <span>{{target}}</span>
|
|
</div>
|
|
{{/target}}
|
|
<div class="row">
|
|
<span class="bold" data-i18n="components:">Components:</span>
|
|
<span>
|
|
{{#v}}V{{#s}}, {{/s}}{{^s}}{{#m}}, {{/m}}{{/s}}{{/v}}
|
|
{{#s}}S{{#m}}, {{/m}}{{/s}}
|
|
{{#m}}M {{#material}}({{material}}){{/material}}{{/m}}
|
|
</span>
|
|
</div>
|
|
{{#duration}}
|
|
<div class="row">
|
|
<span class="bold" data-i18n="duration:">Duration:</span> <span>{{#concentration}}<span data-i18n="concentration">Concentration</span> {{/concentration}}{{duration}}</span>
|
|
</div>
|
|
{{/duration}}
|
|
<div class="spacer"></div>
|
|
{{#description}}
|
|
<div class="row">
|
|
<span class="description">{{description}}</span>
|
|
</div>
|
|
{{/description}}
|
|
{{#athigherlevels}}
|
|
<div class="row">
|
|
<span class="bold italics" data-i18n="at-higher-lvl">At Higher Levels</span>. <span class="description">{{athigherlevels}}</span>
|
|
</div>
|
|
{{/athigherlevels}}
|
|
</div>
|
|
</rolltemplate>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-traits">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
<div class="row header">
|
|
<span>{{name}}</span>
|
|
</div>
|
|
{{#source}}
|
|
<div class="row subheader">
|
|
<span class="italics">{{#charname}}{{charname}} {{/charname}}{{source}}</span>
|
|
</div>
|
|
{{/source}}
|
|
{{#description}}
|
|
<div class="row">
|
|
<span class="desc">{{description}}</span>
|
|
</div>
|
|
{{/description}}
|
|
</rolltemplate>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-npc">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
<div class="row header">
|
|
<span>{{rname}}</span>
|
|
</div>
|
|
{{#name}}
|
|
<div class="row subheader">
|
|
<span class="italics">{{name}}</span>
|
|
</div>
|
|
{{/name}}
|
|
<div class="arrow-right"></div>
|
|
<div class="row">
|
|
{{#normal}}
|
|
<span class="italics">{{type}}: </span><span>{{r1}}</span>
|
|
{{/normal}}
|
|
{{#always}}
|
|
<span class="italics">{{type}}: </span><span>{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}
|
|
<span class="italics">{{type}}: </span><span class="grey">{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}
|
|
<span class="italics">{{type}}: </span><span>{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}
|
|
<span class="italics">{{type}}: </span><span>{{r1}}</span><span> | </span><span class="grey">{{r2}}</span>
|
|
{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollLess() r1 r2}}
|
|
<span class="italics">{{type}}: </span><span>{{r1}}</span><span> | </span><span class="grey">{{r2}}</span>
|
|
{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}
|
|
<span class="italics">{{type}}: </span><span>{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}
|
|
<span class="italics">{{type}}: </span><span class="grey">{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/rollGreater() r1 r2}}
|
|
{{/disadvantage}}
|
|
</div>
|
|
</rolltemplate>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-npcatk">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
<div class="row header">
|
|
{{#normal}}
|
|
{{#rollWasCrit() r1}}{{rnamec}}{{/rollWasCrit() r1}}
|
|
{{#^rollWasCrit() r1}}{{rname}}{{/^rollWasCrit() r1}}
|
|
{{/normal}}
|
|
{{#always}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}{{rnamec}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}{{rnamec}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}{{rnamec}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{#^rollWasCrit() r1}}{{#^rollWasCrit() r2}}{{rname}}{{/^rollWasCrit() r2}}{{/^rollWasCrit() r1}}
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}{{rnamec}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}{{rnamec}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}{{rnamec}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{#^rollWasCrit() r1}}{{#^rollWasCrit() r2}}{{rname}}{{/^rollWasCrit() r2}}{{/^rollWasCrit() r1}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}{{rnamec}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#^rollWasCrit() r1}}{{rname}}{{/^rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollLess() r1 r2}}{{rname}}{{/rollLess() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{rnamec}}{{/rollGreater() r1 r2}}
|
|
{{/disadvantage}}
|
|
</div>
|
|
{{#name}}
|
|
<div class="row subheader">
|
|
<span class="italics">{{name}}</span>
|
|
</div>
|
|
{{/name}}
|
|
<div class="arrow-right"></div>
|
|
<div class="row">
|
|
{{#normal}}
|
|
{{#rollWasCrit() r1}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r1}}
|
|
{{#^rollWasCrit() r1}}<span class="italics">{{type}}: </span>{{/^rollWasCrit() r1}}
|
|
{{/normal}}
|
|
{{#always}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{#^rollWasCrit() r1}}{{#^rollWasCrit() r2}}<span class="italics">{{type}}: </span>{{/^rollWasCrit() r2}}{{/^rollWasCrit() r1}}
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span class="italics">[{{typec}}: </span>{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{#^rollWasCrit() r1}}{{#^rollWasCrit() r2}}<span class="italics">{{type}}: </span>{{/^rollWasCrit() r2}}{{/^rollWasCrit() r1}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#^rollWasCrit() r1}}<span class="italics">{{type}}: </span>{{/^rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollLess() r1 r2}}<span class="italics">{{type}}: </span>{{/rollLess() r1 r2}}
|
|
{{#rollGreater() r1 r2}}<span class="italics">{{typec}}: </span>{{/rollGreater() r1 r2}}
|
|
{{/disadvantage}}
|
|
{{#normal}}
|
|
<span>{{r1}}</span>
|
|
{{/normal}}
|
|
{{#always}}
|
|
<span>{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}
|
|
<span class="grey">{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}
|
|
<span>{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}
|
|
<span>{{r1}}</span><span> | </span><span class="grey">{{r2}}</span>
|
|
{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollLess() r1 r2}}
|
|
<span>{{r1}}</span><span> | </span><span class="grey">{{r2}}</span>
|
|
{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}
|
|
<span>{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}
|
|
<span class="grey">{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/rollGreater() r1 r2}}
|
|
{{/disadvantage}}
|
|
</div>
|
|
{{#description}}
|
|
<div class="row">
|
|
<span class="desc">{{description}}</span>
|
|
</div>
|
|
{{/description}}
|
|
</rolltemplate>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-npcdmg">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
<div class="container dmgcontainer damagetemplate">
|
|
<span class="italics">Damage: </span>
|
|
<span>
|
|
{{#dmg1flag}}
|
|
{{dmg1}}{{#crit}} + {{crit1}}{{/crit}}{{dmg1type}}
|
|
{{/dmg1flag}}
|
|
{{#dmg1flag}}{{#dmg2flag}}+{{/dmg2flag}}{{/dmg1flag}}
|
|
{{#dmg2flag}}
|
|
{{dmg2}}{{#crit}} + {{crit2}}{{/crit}}{{dmg2type}}
|
|
{{/dmg2flag}}
|
|
</span>
|
|
</div>
|
|
</rolltemplate>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-npcaction">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
<div class="container">
|
|
<div class="row header">
|
|
<span>{{rname}}</span>
|
|
</div>
|
|
{{#name}}
|
|
<div class="row subheader">
|
|
<span class="italics">{{name}}</span>
|
|
</div>
|
|
{{/name}}
|
|
<div class="arrow-right"></div>
|
|
{{#attack}}
|
|
<div class="row">
|
|
{{#normal}}
|
|
<span class="italics">Attack: </span><span>{{r1}}</span>
|
|
{{/normal}}
|
|
{{#always}}
|
|
<span class="italics">Attack: </span><span>{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}
|
|
<span class="italics">Attack: </span><span class="grey">{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}
|
|
<span class="italics">Attack: </span><span>{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}
|
|
<span class="italics">Attack: </span><span>{{r1}}</span><span> | </span><span class="grey">{{r2}}</span>
|
|
{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollLess() r1 r2}}
|
|
<span class="italics">Attack: </span><span>{{r1}}</span><span> | </span><span class="grey">{{r2}}</span>
|
|
{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}
|
|
<span class="italics">Attack: </span><span>{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}
|
|
<span class="italics">Attack: </span><span class="grey">{{r1}}</span><span> | </span><span>{{r2}}</span>
|
|
{{/rollGreater() r1 r2}}
|
|
{{/disadvantage}}
|
|
</div>
|
|
{{/attack}}
|
|
{{#description}}
|
|
<span class="desc">{{description}}</span>
|
|
{{/description}}
|
|
</div>
|
|
{{#damage}}
|
|
<div class="container dmgcontainer damagetemplate">
|
|
<span class="italics">Damage: </span>
|
|
<span>
|
|
{{#dmg1flag}}
|
|
{{dmg1}}
|
|
{{#normal}}
|
|
{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}
|
|
{{/normal}}
|
|
{{#always}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}} + {{crit1}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}} + {{crit1}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{/disadvantage}}
|
|
{{dmg1type}}
|
|
{{/dmg1flag}}
|
|
{{#dmg1flag}}{{#dmg2flag}}+{{/dmg2flag}}{{/dmg1flag}}
|
|
{{#dmg2flag}}
|
|
{{dmg2}}
|
|
{{#normal}}
|
|
{{#rollWasCrit() r1}} + {{crit2}}{{/rollWasCrit() r1}}
|
|
{{/normal}}
|
|
{{#always}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}} + {{crit2}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}} + {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}} + {{crit2}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/always}}
|
|
{{#advantage}}
|
|
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}} + {{crit2}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}} + {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}} + {{crit2}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
|
|
{{/advantage}}
|
|
{{#disadvantage}}
|
|
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}} + {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
|
|
{{/disadvantage}}
|
|
{{dmg2type}}
|
|
{{/dmg2flag}}
|
|
</span>
|
|
</div>
|
|
{{/damage}}
|
|
</rolltemplate>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-mancerroll">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
<div class="container">
|
|
<div class="row header">
|
|
<span>
|
|
{{title}}
|
|
{{#c1}}
|
|
<span>{{c1}}</span>
|
|
{{/c1}}
|
|
</span>
|
|
</div>
|
|
{{#r1}}
|
|
<div class="row">
|
|
<span class="desc">Roll 1: </span>
|
|
<span class="result">{{r1}}</span>
|
|
</div>
|
|
{{/r1}}
|
|
{{#r2}}
|
|
<div class="row">
|
|
<span class="desc">Roll 2: </span>
|
|
<span class="result">{{r2}}</span>
|
|
</div>
|
|
{{/r2}}
|
|
{{#r3}}
|
|
<div class="row">
|
|
<span class="desc">Roll 3: </span>
|
|
<span class="result">{{r3}}</span>
|
|
</div>
|
|
{{/r3}}
|
|
{{#r4}}
|
|
<div class="row">
|
|
<span class="desc">Roll 4: </span>
|
|
<span class="result">{{r4}}</span>
|
|
</div>
|
|
{{/r4}}
|
|
{{#r5}}
|
|
<div class="row">
|
|
<span class="desc">Roll 5: </span>
|
|
<span class="result">{{r5}}</span>
|
|
</div>
|
|
{{/r5}}
|
|
{{#r6}}
|
|
<div class="row">
|
|
<span class="desc">Roll 6: </span>
|
|
<span class="result">{{r6}}</span>
|
|
</div>
|
|
{{/r6}}
|
|
<div class="row">
|
|
<span class="desc">
|
|
{{#rollTotal() c1 1}}{{option1}}{{/rollTotal() c1 1}}
|
|
{{#rollTotal() c1 2}}{{option2}}{{/rollTotal() c1 2}}
|
|
{{#rollTotal() c1 3}}{{option3}}{{/rollTotal() c1 3}}
|
|
{{#rollTotal() c1 4}}{{option4}}{{/rollTotal() c1 4}}
|
|
{{#rollTotal() c1 5}}{{option5}}{{/rollTotal() c1 5}}
|
|
{{#rollTotal() c1 6}}{{option6}}{{/rollTotal() c1 6}}
|
|
{{#rollTotal() c1 7}}{{option7}}{{/rollTotal() c1 7}}
|
|
{{#rollTotal() c1 8}}{{option8}}{{/rollTotal() c1 8}}
|
|
{{#rollTotal() c1 9}}{{option9}}{{/rollTotal() c1 9}}
|
|
{{#rollTotal() c1 10}}{{option10}}{{/rollTotal() c1 10}}
|
|
{{#rollTotal() c1 11}}{{option11}}{{/rollTotal() c1 11}}
|
|
{{#rollTotal() c1 12}}{{option12}}{{/rollTotal() c1 12}}
|
|
{{#rollTotal() c1 13}}{{option13}}{{/rollTotal() c1 13}}
|
|
{{#rollTotal() c1 14}}{{option14}}{{/rollTotal() c1 14}}
|
|
{{#rollTotal() c1 15}}{{option15}}{{/rollTotal() c1 15}}
|
|
{{#rollTotal() c1 16}}{{option16}}{{/rollTotal() c1 16}}
|
|
{{#rollTotal() c1 17}}{{option17}}{{/rollTotal() c1 17}}
|
|
{{#rollTotal() c1 18}}{{option18}}{{/rollTotal() c1 18}}
|
|
{{#rollTotal() c1 19}}{{option19}}{{/rollTotal() c1 19}}
|
|
{{#rollTotal() c1 20}}{{option20}}{{/rollTotal() c1 20}}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</rolltemplate>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-mancerhproll">
|
|
<div class="licensedsheet-flag-{{licensedsheet}}"></div>
|
|
<div class="container">
|
|
<div class="row header">
|
|
<span>
|
|
{{title}}
|
|
{{#c1}}
|
|
<span>{{c1}}</span>
|
|
{{/c1}}
|
|
</span>
|
|
</div>
|
|
{{#a1}}
|
|
<div class="row">
|
|
<span class="desc">Average: </span><span class="result">{{a1}}</span>
|
|
</div>
|
|
{{/a1}}
|
|
{{#r1}}
|
|
<div class="row">
|
|
<span class="desc">Roll 1: </span><span class="result">{{r1}}</span>
|
|
</div>
|
|
{{/r1}}
|
|
{{#r2}}
|
|
<div class="row">
|
|
<span class="desc">Roll 2: </span><span class="result">{{r2}}</span>
|
|
</div>
|
|
{{/r2}}
|
|
{{#r3}}
|
|
<div class="row">
|
|
<span class="desc">Roll 3: </span><span class="result">{{r3}}</span>
|
|
</div>
|
|
{{/r3}}
|
|
{{#r4}}
|
|
<div class="row">
|
|
<span class="desc">Roll 4: </span><span class="result">{{r4}}</span>
|
|
</div>
|
|
{{/r4}}
|
|
{{#r5}}
|
|
<div class="row">
|
|
<span class="desc">Roll 5: </span><span class="result">{{r5}}</span>
|
|
</div>
|
|
{{/r5}}
|
|
{{#r6}}
|
|
<div class="row">
|
|
<span class="desc">Roll 6: </span><span class="result">{{r6}}</span>
|
|
</div>
|
|
{{/r6}}
|
|
{{#r7}}
|
|
<div class="row">
|
|
<span class="desc">Roll 7: </span><span class="result">{{r7}}</span>
|
|
</div>
|
|
{{/r7}}
|
|
{{#r8}}
|
|
<div class="row">
|
|
<span class="desc">Roll 8: </span><span class="result">{{r8}}</span>
|
|
</div>
|
|
{{/r8}}
|
|
{{#r9}}
|
|
<div class="row">
|
|
<span class="desc">Roll 9: </span><span class="result">{{r9}}</span>
|
|
</div>
|
|
{{/r9}}
|
|
{{#r10}}
|
|
<div class="row">
|
|
<span class="desc">Roll 10: </span><span class="result">{{r10}}</span>
|
|
</div>
|
|
{{/r10}}
|
|
{{#r11}}
|
|
<div class="row">
|
|
<span class="desc">Roll 11: </span><span class="result">{{r11}}</span>
|
|
</div>
|
|
{{/r11}}
|
|
{{#r12}}
|
|
<div class="row">
|
|
<span class="desc">Roll 12: </span><span class="result">{{r12}}</span>
|
|
</div>
|
|
{{/r12}}
|
|
{{#r13}}
|
|
<div class="row">
|
|
<span class="desc">Roll 13: </span><span class="result">{{r13}}</span>
|
|
</div>
|
|
{{/r13}}
|
|
{{#r14}}
|
|
<div class="row">
|
|
<span class="desc">Roll 14: </span><span class="result">{{r14}}</span>
|
|
</div>
|
|
{{/r14}}
|
|
{{#r15}}
|
|
<div class="row">
|
|
<span class="desc">Roll 15: </span><span class="result">{{r15}}</span>
|
|
</div>
|
|
{{/r15}}
|
|
{{#r16}}
|
|
<div class="row">
|
|
<span class="desc">Roll 16: </span><span class="result">{{r16}}</span>
|
|
</div>
|
|
{{/r16}}
|
|
{{#r17}}
|
|
<div class="row">
|
|
<span class="desc">Roll 17: </span><span class="result">{{r17}}</span>
|
|
</div>
|
|
{{/r17}}
|
|
{{#r18}}
|
|
<div class="row">
|
|
<span class="desc">Roll 18: </span><span class="result">{{r18}}</span>
|
|
</div>
|
|
{{/r18}}
|
|
{{#r19}}
|
|
<div class="row">
|
|
<span class="desc">Roll 19: </span><span class="result">{{r19}}</span>
|
|
</div>
|
|
{{/r19}}
|
|
{{#r20}}
|
|
<div class="row">
|
|
<span class="desc">Roll 20: </span><span class="result">{{r20}}</span>
|
|
</div>
|
|
{{/r20}}
|
|
</div>
|
|
</rolltemplate></div><script type="text/worker"> on("sheet:opened", function(eventinfo) {
|
|
versioning(function() {
|
|
var getInfo = function(sections, callback, results) {
|
|
results = results || {};
|
|
if(sections.length > 0) {
|
|
var section = sections.pop();
|
|
getSectionIDs(section, function(ids) {
|
|
results[section] = ids;
|
|
getInfo(sections, callback, results);
|
|
});
|
|
} else {
|
|
callback(results);
|
|
}
|
|
}
|
|
var spellSections = ["spell-cantrip"];
|
|
for(var x=1; x<=9; x++) {
|
|
spellSections.push("spell-" + x);
|
|
}
|
|
|
|
getInfo(spellSections, function(results) {
|
|
var getList = ["character_id"];
|
|
_.each(results, function(sectionids, sectionname) {
|
|
_.each(sectionids, function(spellid) {
|
|
getList.push("repeating_" + sectionname + "_" + spellid + "_rollcontent");
|
|
});
|
|
});
|
|
getAttrs(getList, function(attrs) {
|
|
var set = {};
|
|
_.each(attrs, function(data, name) {
|
|
if(data.length === 68 && data.split("|")[0].substr(2) !== attrs["character_id"]) {
|
|
set[name] = "%{" + attrs["character_id"] + data.substr(22);
|
|
}
|
|
});
|
|
setAttrs(set, function() {
|
|
if(eventinfo.sourceType === "sheetworker") {
|
|
setAttrs({l1mancer_status: "completed"})
|
|
}
|
|
else {
|
|
check_l1_mancer();
|
|
check_lp_mancer();
|
|
};
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
//Start of Compendium Drops
|
|
on("sheet:compendium-drop", function() {
|
|
getAttrs(["hp_max","npc_senses","token_size","cd_bar1_v","cd_bar1_m","cd_bar1_l","cd_bar2_v","cd_bar2_m","cd_bar2_l","cd_bar3_v","cd_bar3_m","cd_bar3_l"], function(v) {
|
|
|
|
var default_attr = {};
|
|
default_attr["width"] = 70;
|
|
default_attr["height"] = 70;
|
|
if(v["npc_senses"].toLowerCase().match(/(darkvision|blindsight|tremorsense|truesight)/)) {
|
|
default_attr["light_radius"] = Math.max.apply(Math, v["npc_senses"].match(/\d+/g));
|
|
}
|
|
if(v["token_size"]) {
|
|
var squarelength = 70;
|
|
if(v["token_size"].toString().indexOf(",") > -1) {
|
|
var setwidth = !isNaN(v["token_size"].split(",")[0]) ? v["token_size"].split(",")[0] : 1;
|
|
var setheight = !isNaN(v["token_size"].split(",")[1]) ? v["token_size"].split(",")[1] : 1;
|
|
default_attr["width"] = setwidth * squarelength;
|
|
default_attr["height"] = setheight * squarelength;
|
|
}
|
|
else {
|
|
default_attr["width"] = squarelength * v["token_size"]
|
|
default_attr["height"] = squarelength * v["token_size"]
|
|
};
|
|
}
|
|
|
|
var getList = {};
|
|
for(x = 1; x<=3; x++) {
|
|
_.each(["v", "m"], function(letter) {
|
|
var keyname = "cd_bar" + x + "_" + letter;
|
|
if(v[keyname] != undefined && isNaN(v[keyname])) {
|
|
getList[keyname] = v[keyname];
|
|
}
|
|
});
|
|
}
|
|
|
|
getAttrs(_.values(getList), function(values) {
|
|
_.each(_.keys(getList), function(keyname) {
|
|
v[keyname] = values[getList[keyname]] == undefined ? "" : values[getList[keyname]];
|
|
});
|
|
|
|
if(v["cd_bar1_l"]) {
|
|
default_attr["bar1_link"] = v["cd_bar1_l"];
|
|
}
|
|
else if(v["cd_bar1_v"] || v["cd_bar1_m"]) {
|
|
if(v["cd_bar1_v"]) {
|
|
default_attr["bar1_value"] = v["cd_bar1_v"];
|
|
}
|
|
if(v["cd_bar1_m"]) {
|
|
default_attr["bar1_max"] = v["cd_bar1_m"];
|
|
}
|
|
}
|
|
else {
|
|
default_attr["bar1_value"] = v["hp_max"];
|
|
default_attr["bar1_max"] = v["hp_max"];
|
|
}
|
|
|
|
if(v["cd_bar2_l"]) {
|
|
default_attr["bar2_link"] = v["cd_bar2_l"];
|
|
}
|
|
else if(v["cd_bar2_v"] || v["cd_bar2_m"]) {
|
|
if(v["cd_bar2_v"]) {
|
|
default_attr["bar2_value"] = v["cd_bar2_v"];
|
|
}
|
|
if(v["cd_bar2_m"]) {
|
|
default_attr["bar2_max"] = v["cd_bar2_m"];
|
|
}
|
|
}
|
|
else {
|
|
default_attr["bar2_link"] = "npc_ac";
|
|
}
|
|
|
|
if(v["cd_bar3_l"]) {
|
|
default_attr["bar3_link"] = v["cd_bar3_l"];
|
|
}
|
|
else if(v["cd_bar3_v"] || v["cd_bar3_m"]) {
|
|
if(v["cd_bar3_v"]) {
|
|
default_attr["bar3_value"] = v["cd_bar3_v"];
|
|
}
|
|
if(v["cd_bar3_m"]) {
|
|
default_attr["bar3_max"] = v["cd_bar3_m"];
|
|
}
|
|
}
|
|
|
|
setDefaultToken(default_attr);
|
|
});
|
|
});
|
|
});
|
|
|
|
['strength','dexterity','constitution','intelligence','wisdom','charisma'].forEach(attr => {
|
|
on(`change:${attr}_base change:${attr}_bonus`, function() {
|
|
update_attr(`${attr}`);
|
|
|
|
});
|
|
});
|
|
|
|
['strength','dexterity','constitution','intelligence','wisdom','charisma'].forEach(attr => {
|
|
on(`change:${attr}`, function() {
|
|
update_mod(`${attr}`);
|
|
|
|
const cap = attr.charAt(0).toUpperCase() + attr.slice(1);
|
|
check_customac(cap);
|
|
|
|
(attr === "strength") ? update_weight() : false;
|
|
(attr === "dexterity") ? update_initiative() : false;
|
|
});
|
|
});
|
|
|
|
['strength','dexterity','constitution','intelligence','wisdom','charisma'].forEach(attr => {
|
|
on(`change:${attr}_mod`, function() {
|
|
update_save(`${attr}`);
|
|
update_attacks(`${attr}`);
|
|
update_tool(`${attr}`);
|
|
update_spell_info(`${attr}`);
|
|
|
|
switch(`${attr}`) {
|
|
case "strength":
|
|
update_skills(["athletics"]);
|
|
break;
|
|
case "dexterity":
|
|
update_skills(["acrobatics", "sleight_of_hand", "stealth"]);
|
|
update_ac();
|
|
update_initiative();
|
|
break;
|
|
case "intelligence":
|
|
update_skills(["eldertech", "history", "investigation", "materials", "medicine", "nature", "politics", "religion"]);
|
|
break;
|
|
case "wisdom":
|
|
update_skills(["animal_handling", "insight", "perception", "survival"]);
|
|
break;
|
|
case "charisma":
|
|
update_skills(["deception", "intimidation", "performance", "persuasion"]);
|
|
break;
|
|
default:
|
|
false;
|
|
}
|
|
});
|
|
});
|
|
|
|
['strength','dexterity','constitution','intelligence','wisdom','charisma'].forEach(attr => {
|
|
on(`change:${attr}_save_prof change:${attr}_save_mod`, function(eventinfo) {
|
|
if(eventinfo.sourceType === "sheetworker") {return;};
|
|
update_save(`${attr}`);
|
|
});
|
|
});
|
|
|
|
on("change:globalsavemod", function(eventinfo) {
|
|
if(eventinfo.sourceType === "sheetworker") {return;};
|
|
update_all_saves();
|
|
});
|
|
|
|
on("change:death_save_mod", function(eventinfo) {
|
|
if(eventinfo.sourceType === "sheetworker") {return;};
|
|
update_save("death");
|
|
});
|
|
|
|
['acrobatics','animal_handling','eldertech','athletics','deception','history','insight','intimidation','investigation','materials',
|
|
'medicine','nature','perception','performance','persuasion','politics','religion','sleight_of_hand','stealth','survival'].forEach(attr => {
|
|
on(`change:${attr}_prof change:${attr}_type change:${attr}_flat`, function(eventinfo) {
|
|
if(eventinfo.sourceType === "sheetworker") {return;};
|
|
update_skills([`${attr}`]);
|
|
});
|
|
});
|
|
|
|
on("change:repeating_tool:toolname change:repeating_tool:toolbonus_base change:repeating_tool:toolattr_base change:repeating_tool:tool_mod", function(eventinfo) {
|
|
if(eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
var tool_id = eventinfo.sourceAttribute.substring(15, 35);
|
|
update_tool(tool_id);
|
|
});
|
|
|
|
on("change:repeating_attack:atkname change:repeating_attack:atkflag change:repeating_attack:atkattr_base change:repeating_attack:atkmod change:repeating_attack:atkmagic change:repeating_attack:atkprofflag change:repeating_attack:dmgflag change:repeating_attack:dmgbase change:repeating_attack:dmgattr change:repeating_attack:dmgmod change:repeating_attack:dmgtype change:repeating_attack:dmg2flag change:repeating_attack:dmg2base change:repeating_attack:dmg2attr change:repeating_attack:dmg2mod change:repeating_attack:dmg2type change:repeating_attack:saveflag change:repeating_attack:savedc change:repeating_attack:saveflat change:repeating_attack:dmgcustcrit change:repeating_attack:dmg2custcrit change:repeating_attack:ammo change:repeating_attack:saveattr change:repeating_attack:atkrange", function(eventinfo) {
|
|
if(eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
|
|
var source = eventinfo.sourceAttribute.substr(38);
|
|
var attackid = eventinfo.sourceAttribute.substring(17, 37);
|
|
if(source == "atkattr_base" || source == "savedc") {
|
|
getAttrs(["repeating_attack_spellid", "repeating_attack_spelllevel"], function(v) {
|
|
set = {};
|
|
if(v.repeating_attack_spellid && v.repeating_attack_spellid != "" && v.repeating_attack_spelllevel && v.repeating_attack_spelllevel != "") {
|
|
var newVal = eventinfo.newValue == "spell" ? "spell" : _.last(eventinfo.newValue.split("_")[0].split("{"));
|
|
set["repeating_attack_atkattr_base"] = newVal == "spell" ? "spell" : "@{" + newVal + "_mod}";
|
|
set["repeating_attack_savedc"] = newVal == "spell" ? "spell" : "(@{" + newVal + "_mod}+8+@{pb})";
|
|
set["repeating_spell-" + v.repeating_attack_spelllevel + "_" + v.repeating_attack_spellid + "_spell_ability"] = newVal == "spell" ? "spell" : "@{" + newVal + "_mod}+";
|
|
}
|
|
setAttrs(set, function() {
|
|
update_attacks(attackid);
|
|
});
|
|
});
|
|
} else {
|
|
update_attacks(attackid);
|
|
}
|
|
});
|
|
|
|
on("change:repeating_damagemod remove:repeating_damagemod", function(eventinfo) {
|
|
update_globaldamage();
|
|
});
|
|
|
|
on("change:global_damage_mod_flag", function(eventinfo) {
|
|
getSectionIDs("damagemod", function(ids) {
|
|
var update = {};
|
|
if(eventinfo.newValue === "1") {
|
|
if(!ids || ids.length === 0) {
|
|
var rowid = generateRowID();
|
|
update[`repeating_damagemod_${rowid}_global_damage_active_flag`] = "1";
|
|
}
|
|
} else {
|
|
_.each(ids, function(rowid) {
|
|
update[`repeating_damagemod_${rowid}_global_damage_active_flag`] = "0";
|
|
});
|
|
}
|
|
setAttrs(update);
|
|
});
|
|
});
|
|
|
|
on("change:exhaustion_toggle", function(eventinfo) {
|
|
if(eventinfo.newValue !== "0") {
|
|
getAttrs(["exhaustion_level"], function(attrs) {
|
|
if(!attrs.exhaustion_level || attrs.exhaustion_level === "") {
|
|
var update = {};
|
|
update.exhaustion_level = "0";
|
|
setAttrs(update);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
on("change:exhaustion_level", function(eventinfo) {
|
|
const newValue = parseInt(eventinfo.newValue) || 0, previousValue = parseInt(eventinfo.previousValue) || 0;
|
|
let update = {};
|
|
|
|
if (newValue === 0) {
|
|
//If exhaustion is 0 the reset exhaustion_1 to "No Effect" and blank the other spans
|
|
for(let i = 2; i <= 6; i++) { update[`exhaustion_${i}`] = ""}
|
|
update[`exhaustion_1`] = "• " + getTranslationByKey(`exhaustion-0`)
|
|
} else if (newValue > previousValue) {
|
|
//If exhaustion increase then add text to the spans
|
|
for(let i = previousValue; i <= newValue; i++)
|
|
{update[`exhaustion_${i}`] = "• " + getTranslationByKey(`exhaustion-${i}`)}
|
|
} else {
|
|
//If exhaustion decrease remove text from spans
|
|
for(let i = newValue + 1; i <= previousValue; i++) {update[`exhaustion_${i}`] = ""}
|
|
};
|
|
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
|
|
on("change:race change:subrace", function(eventinfo) {
|
|
update_race_display();
|
|
});
|
|
|
|
on("change:drop_category", function(eventinfo) {
|
|
if(eventinfo.newValue === "Monsters") {
|
|
getAttrs(["class","race","speed","hp"], function(v) {
|
|
if(v["class"] != "" || v["race"] != "" || v["speed"] != "" || v["hp"] != "") {
|
|
setAttrs({monster_confirm_flag: 1});
|
|
}
|
|
else {
|
|
handle_drop(eventinfo.newValue);
|
|
}
|
|
});
|
|
}
|
|
else {
|
|
handle_drop(eventinfo.newValue);
|
|
}
|
|
});
|
|
|
|
on(`change:repeating_inventory:hasattack`, function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {return;};
|
|
|
|
const itemid = eventinfo.sourceAttribute.substring(20, 40);
|
|
getAttrs([`repeating_inventory_${itemid}_itemattackid`], function(v) {
|
|
const hasattack = eventinfo.newValue, itemattackid = v[`repeating_inventory_${itemid}_itemattackid`];
|
|
(hasattack == 1) ? create_attack_from_item(itemid) : remove_attack(itemattackid);
|
|
});
|
|
});
|
|
|
|
on(`change:repeating_inventory:useasresource`, function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {return;};
|
|
|
|
const itemid = eventinfo.sourceAttribute.substring(20, 40);
|
|
getAttrs([`repeating_inventory_${itemid}_itemresourceid`], function(v) {
|
|
const useasresource = eventinfo.newValue, itemresourceid = v[`repeating_inventory_${itemid}_itemresourceid`];
|
|
(useasresource == 1) ? create_resource_from_item(itemid) : remove_resource(itemresourceid);
|
|
});
|
|
});
|
|
|
|
on("change:repeating_inventory:itemname change:repeating_inventory:itemproperties change:repeating_inventory:itemmodifiers change:repeating_inventory:itemcount", function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
|
|
var itemid = eventinfo.sourceAttribute.substring(20, 40);
|
|
getAttrs(["repeating_inventory_" + itemid + "_itemattackid", "repeating_inventory_" + itemid + "_itemresourceid"], function(v) {
|
|
var attackid = v["repeating_inventory_" + itemid + "_itemattackid"];
|
|
var resourceid = v["repeating_inventory_" + itemid + "_itemresourceid"];
|
|
if(attackid) {
|
|
update_attack_from_item(itemid, attackid);
|
|
}
|
|
if(resourceid) {
|
|
update_resource_from_item(itemid, resourceid);
|
|
}
|
|
});
|
|
});
|
|
|
|
['other_resource','repeating_resource:resource_left','repeating_resource:resource_right'].forEach(attr => {
|
|
on(`change:${attr} change:${attr}_name`, (eventinfo) => {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {return;}
|
|
const resourceid = (eventinfo.sourceAttribute.includes("_name")) ? eventinfo.sourceAttribute.slice(0, -5) : eventinfo.sourceAttribute;
|
|
getAttrs([`${resourceid}_itemid`], (v) => {
|
|
const value = eventinfo.newValue;
|
|
//Update repeating_inventory if an itemid is associated with a resource
|
|
if (v[`${resourceid}_itemid`] && v[`${resourceid}_itemid`] != "") {
|
|
const itemid = v[`${resourceid}_itemid`];
|
|
let update = {};
|
|
if (eventinfo.sourceAttribute.includes("_name")) {
|
|
update[`repeating_inventory_${itemid}_itemname`] = eventinfo.newValue;
|
|
} else {
|
|
update[`repeating_inventory_${itemid}_itemcount`] = eventinfo.newValue;
|
|
};
|
|
setAttrs(update, {silent: true}, () => {update_weight()});
|
|
};
|
|
});
|
|
});
|
|
});
|
|
|
|
on("change:repeating_inventory:itemweight change:repeating_inventory:itemcount change:cp change:sp change:ep change:gp change:pp change:encumberance_setting change:size change:carrying_capacity_mod", function() {
|
|
update_weight();
|
|
});
|
|
|
|
on("change:repeating_inventory:itemmodifiers change:repeating_inventory:equipped", function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
var itemid = eventinfo.sourceAttribute.substring(20, 40);
|
|
getAttrs(["repeating_inventory_" + itemid + "_itemmodifiers"], function(v) {
|
|
if(v["repeating_inventory_" + itemid + "_itemmodifiers"]) {
|
|
check_itemmodifiers(v["repeating_inventory_" + itemid + "_itemmodifiers"], eventinfo.previousValue);
|
|
};
|
|
});
|
|
});
|
|
|
|
on("change:custom_ac_flag change:custom_ac_base change:custom_ac_part1 change:custom_ac_part2 change:custom_ac_shield", function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
update_ac();
|
|
});
|
|
|
|
['spell-cantrip','spell-1','spell-2','spell-3','spell-4','spell-5','spell-6','spell-7','spell-8','spell-9'].forEach(attr => {
|
|
on(`change:repeating_${attr}:includedesc change:repeating_${attr}:innate change:repeating_${attr}:spell_ability change:repeating_${attr}:spell_updateflag change:repeating_${attr}:spellathigherlevels change:repeating_${attr}:spellattack change:repeating_${attr}:spelldamage change:repeating_${attr}:spelldamage2 change:repeating_${attr}:spelldamagetype change:repeating_${attr}:spelldamagetype2 change:repeating_${attr}:spelldescription change:repeating_${attr}:spelldmgmod change:repeating_${attr}:spellhealing change:repeating_${attr}:spellhlbonus change:repeating_${attr}:spellhldie change:repeating_${attr}:spellhldietype change:repeating_${attr}:spellname change:repeating_${attr}:spellprepared change:repeating_${attr}:spellrange change:repeating_${attr}:spellsave change:repeating_${attr}:spellsavesuccess change:repeating_${attr}:spelltarget change:repeating_${attr}:spell_damage_progression`, (eventinfo) => {
|
|
if (eventinfo.sourceType && eventinfo.sourceType === "sheetworker") { return; }
|
|
|
|
const spellid = eventinfo.sourceAttribute.split("_")[2], repeating_source = `repeating_${attr}_${spellid}`;
|
|
getAttrs([`${repeating_source}_spellattackid`], (v) => {
|
|
var attackid = v[`${repeating_source}_spellattackid`];
|
|
var lvl = attr.split("spell-")[1];
|
|
if(attackid && lvl && spellid) {
|
|
update_attack_from_spell(lvl, spellid, attackid)
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
['spell-cantrip','spell-1','spell-2','spell-3','spell-4','spell-5','spell-6','spell-7','spell-8','spell-9'].forEach(attr => {
|
|
on(`change:repeating_${attr}:spelloutput`, (eventinfo) => {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {return;}
|
|
|
|
const spellid = eventinfo.sourceAttribute.split("_")[2], repeating_source = `repeating_${attr}_${spellid}`;
|
|
getAttrs([`${repeating_source}_spellattackid`, `${repeating_source}_spelllevel`, `${repeating_source}_spellathigherlevels`, "character_id"], function(v) {
|
|
const attackid = v[repeating_source + "_spellattackid"];
|
|
const higherlevels = v[repeating_source + "_spellathigherlevels"];
|
|
const spelloutput = eventinfo.newValue;
|
|
let lvl = v[repeating_source + "_spelllevel"];
|
|
|
|
if (spelloutput && spelloutput === "ATTACK") {
|
|
create_attack_from_spell(lvl, spellid, v["character_id"]);
|
|
} else if (spelloutput && spelloutput === "SPELLCARD" && attackid && attackid != "") {
|
|
let lvl = parseInt(v[repeating_source + "_spelllevel"], 10);
|
|
remove_attack(attackid);
|
|
update_spelloutput(higherlevels, lvl, repeating_source, spelloutput, licensedsheet);
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
['spell-cantrip','spell-1','spell-2','spell-3','spell-4','spell-5','spell-6','spell-7','spell-8','spell-9'].forEach(attr => {
|
|
on(`change:repeating_${attr}:spellathigherlevels`, (eventinfo) => {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {return;}
|
|
|
|
const spellid = eventinfo.sourceAttribute.split("_")[2], repeating_source = `repeating_${attr}_${spellid}`;
|
|
getAttrs([`${repeating_source}_spelllevel`, `${repeating_source}_spelloutput`], function(v) {
|
|
const higherlevels = eventinfo.newValue;
|
|
const lvl = parseInt(v[repeating_source + "_spelllevel"], 10);
|
|
const spelloutput = v[repeating_source + "_spelloutput"];
|
|
|
|
if (spelloutput && spelloutput === "SPELLCARD") {
|
|
update_spelloutput(higherlevels, lvl, repeating_source, spelloutput, licensedsheet);
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
const update_spelloutput = (higherlevels, lvl, repeating_source, spelloutput, licensedsheet) => {
|
|
let spelllevel = "@{spelllevel}";
|
|
let update = {};
|
|
|
|
if (higherlevels) {
|
|
for(i = 0; i < 10-lvl; i++) {
|
|
let tot = parseInt(i, 10) + parseInt(lvl, 10);
|
|
spelllevel = spelllevel + "|Level " + tot + "," + tot;
|
|
}
|
|
spelllevel = `?{Cast at what level? ${spelllevel}}`;
|
|
}
|
|
update[repeating_source + "_rollcontent"] = `@{wtype}&{template:spell} {{level=@{spellschool} ${spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} {{innate=@{innate}}} @{spellconcentration} @{charname_output} {{licensedsheet=@{licensedsheet}}}`;
|
|
setAttrs(update, {silent: true});
|
|
};
|
|
|
|
on("change:class change:custom_class change:cust_classname change:cust_hitdietype change:cust_spellcasting_ability change:cust_spellslots change:cust_strength_save_prof change:cust_dexterity_save_prof change:cust_constitution_save_prof change:cust_intelligence_save_prof change:cust_wisdom_save_prof change:cust_charisma_save_prof change:subclass change:multiclass1 change:multiclass1_subclass change:multiclass2 change:multiclass2_subclass change:multiclass3 change:multiclass3_subclass" , function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
update_class();
|
|
});
|
|
|
|
on("change:base_level change:multiclass1_flag change:multiclass1 change:multiclass1_lvl change:multiclass2_flag change:multiclass2 change:multiclass2_lvl change:multiclass3_flag change:multiclass3 change:multiclass3_lvl change:arcane_fighter change:arcane_rogue", function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
set_level();
|
|
});
|
|
|
|
on("change:level_calculations change:caster_level change:lvl1_slots_mod change:lvl2_slots_mod change:lvl3_slots_mod change:lvl4_slots_mod change:lvl5_slots_mod change:lvl6_slots_mod change:lvl7_slots_mod change:lvl8_slots_mod change:lvl9_slots_mod", function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
getAttrs(["level_calculations"], function(v) {
|
|
if(!v["level_calculations"] || v["level_calculations"] == "on") {
|
|
update_spell_slots();
|
|
};
|
|
});
|
|
});
|
|
|
|
on("change:caster_level", function(eventinfo) {
|
|
getAttrs(["caster_level","npc"], function(v) {
|
|
var casterlvl = v["caster_level"] && !isNaN(parseInt(v["caster_level"], 10)) ? parseInt(v["caster_level"], 10) : 0;
|
|
if(v["npc"] && v["npc"] == 1 && casterlvl > 0) {
|
|
setAttrs({level: casterlvl})
|
|
};
|
|
});
|
|
});
|
|
|
|
on("change:pb_type change:pb_custom", function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
update_pb();
|
|
});
|
|
|
|
on("change:dtype", function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
update_attacks("all");
|
|
update_npc_action("all");
|
|
});
|
|
|
|
on("change:jack_of_all_trades", function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
update_jack_attr();
|
|
update_all_ability_checks();
|
|
});
|
|
|
|
on("change:initmod change:init_tiebreaker", function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
update_initiative();
|
|
});
|
|
|
|
on("change:spellcasting_ability change:spell_dc_mod change:globalmagicmod", function(eventinfo) {
|
|
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
|
|
return;
|
|
}
|
|
update_spell_info();
|
|
});
|
|
|
|
on("change:npc_challenge", function() {
|
|
update_challenge();
|
|
});
|
|
|
|
on("change:npc_str_save_base change:npc_dex_save_base change:npc_con_save_base change:npc_int_save_base change:npc_wis_save_base change:npc_cha_save_base", function(eventinfo) {
|
|
update_npc_saves();
|
|
});
|
|
|
|
on("change:npc_acrobatics_base change:npc_animal_handling_base change:npc_eldertech_base change:npc_athletics_base change:npc_deception_base change:npc_history_base change:npc_insight_base change:npc_intimidation_base change:npc_investigation_base change:npc_materials_base change:npc_medicine_base change:npc_nature_base change:npc_perception_base change:npc_performance_base change:npc_persuasion_base change:npc_politics_base change:npc_religion_base change:npc_sleight_of_hand_base change:npc_stealth_base change:npc_survival_base", function(eventinfo) {
|
|
update_npc_skills();
|
|
});
|
|
|
|
on("change:repeating_npcaction:attack_flag change:repeating_npcaction:attack_type change:repeating_npcaction:attack_range change:repeating_npcaction:attack_target change:repeating_npcaction:attack_tohit change:repeating_npcaction:attack_damage change:repeating_npcaction:attack_damagetype change:repeating_npcaction:attack_damage2 change:repeating_npcaction:attack_damagetype2 change:repeating_npcaction-l:attack_flag change:repeating_npcaction-l:attack_type change:repeating_npcaction-l:attack_range change:repeating_npcaction-l:attack_target change:repeating_npcaction-l:attack_tohit change:repeating_npcaction-l:attack_damage change:repeating_npcaction-l:attack_damagetype change:repeating_npcaction-l:attack_damage2 change:repeating_npcaction-l:attack_damagetype2 change:repeating_npcaction:show_desc change:repeating_npcaction-l:show_desc change:repeating_npcaction:description change:repeating_npcaction-l:description", function(eventinfo) {
|
|
const actionid = eventinfo.sourceAttribute.split("_")[2];
|
|
const legendary = eventinfo.sourceAttribute.includes("npcaction-l") ? true : false;
|
|
|
|
update_npc_action(actionid, legendary);
|
|
});
|
|
|
|
on("change:core_die change:halflingluck_flag", function() {
|
|
getAttrs(["core_die","halflingluck_flag"], function(v) {
|
|
core = v.core_die && v.core_die != "" ? v.core_die : "1d20";
|
|
luck = v.halflingluck_flag && v.halflingluck_flag === "1" ? "ro<1" : "";
|
|
update = {};
|
|
update["d20"] = core + luck;
|
|
if(!v.core_die || v.core_die === "") {
|
|
update["core_die"] = "1d20";
|
|
}
|
|
setAttrs(update);
|
|
});
|
|
});
|
|
|
|
[`ac`,`attack`,'save','skill',].forEach(attr => {
|
|
on(`change:global_${attr}_mod_flag`, (eventinfo) => {
|
|
const mod = (attr === "attack") ? "tohitmod" : `${attr}mod`;
|
|
if(eventinfo.newValue === "1") {
|
|
const firstAttr = (attr === "ac") ? "val" : "roll";
|
|
const firstAttrValue = (attr === "ac") ? 1 : "1d4";
|
|
const secondAttrValue = (attr === "ac") ? "Defense" : (attr === "skill") ? "GUIDANCE" : "BLESS";
|
|
|
|
getSectionIDs(mod, (ids) => {
|
|
if(!ids || ids.length === 0) {
|
|
var update = {};
|
|
var rowid = generateRowID();
|
|
update[`repeating_${mod}_${rowid}_global_${attr}_${firstAttr}`]= `${firstAttrValue}`;
|
|
update[`repeating_${mod}_${rowid}_global_${attr}_name`] = `${secondAttrValue}`;
|
|
update[`repeating_${mod}_${rowid}_global_${attr}_active_flag`] = "1";
|
|
setAttrs(update);
|
|
}
|
|
});
|
|
} else {
|
|
getSectionIDs(mod, function(ids) {
|
|
var update = {};
|
|
var rowid = generateRowID();
|
|
_.each(ids, function(rowid) {
|
|
update[`repeating_${mod}_${rowid}_global_${attr}_active_flag`] = "0";
|
|
});
|
|
setAttrs(update);
|
|
});
|
|
}
|
|
});
|
|
});
|
|
|
|
on("change:repeating_skillmod remove:repeating_skillmod", function(eventinfo) {
|
|
update_globalskills();
|
|
});
|
|
|
|
on("change:repeating_savemod remove:repeating_savemod", function(eventinfo) {
|
|
update_globalsaves();
|
|
});
|
|
|
|
on("change:repeating_tohitmod remove:repeating_tohitmod", function(eventinfo) {
|
|
update_globalattack();
|
|
});
|
|
|
|
on("change:repeating_acmod remove:repeating_acmod", function(eventinfo) {
|
|
update_ac();
|
|
});
|
|
|
|
on("change:confirm", function(eventinfo) {
|
|
setAttrs({monster_confirm_flag: ""});
|
|
getAttrs(["drop_category"], function(v) {
|
|
if(v["drop_category"]) {
|
|
handle_drop(v["drop_category"]);
|
|
}
|
|
});
|
|
});
|
|
|
|
on("change:cancel", function(eventinfo) {
|
|
setAttrs({monster_confirm_flag: ""});
|
|
var update = {};
|
|
update["drop_category"] = "";
|
|
update["drop_name"] = "";
|
|
update["drop_data"] = "";
|
|
update["drop_content"] = "";
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
|
|
on("change:mancer_confirm", function(eventinfo) {
|
|
setAttrs({mancer_confirm_flag: "", charactermancer_step: "l1-welcome"}, function() {
|
|
check_l1_mancer();
|
|
});
|
|
});
|
|
|
|
on("change:mancer_cancel", function(eventinfo) {
|
|
setAttrs({mancer_confirm_flag: "", l1mancer_status: "completed"}, function() {
|
|
check_l1_mancer();
|
|
});
|
|
});
|
|
|
|
on("change:mancer_npc", function(eventinfo) {
|
|
setAttrs({mancer_confirm_flag: "", l1mancer_status: "completed", npc: "1"}, function() {
|
|
check_l1_mancer();
|
|
});
|
|
});
|
|
|
|
on("change:passiveperceptionmod", function(eventinfo) {
|
|
update_passive_perception();
|
|
});
|
|
|
|
on("remove:repeating_inventory", function(eventinfo) {
|
|
var itemid = eventinfo.sourceAttribute.substring(20, 40);
|
|
var attackids = eventinfo.removedInfo && eventinfo.removedInfo["repeating_inventory_" + itemid + "_itemattackid"] ? eventinfo.removedInfo["repeating_inventory_" + itemid + "_itemattackid"] : undefined;
|
|
var resourceid = eventinfo.removedInfo && eventinfo.removedInfo["repeating_inventory_" + itemid + "_itemresourceid"] ? eventinfo.removedInfo["repeating_inventory_" + itemid + "_itemresourceid"] : undefined;
|
|
|
|
if(attackids) {
|
|
_.each(attackids.split(","), function(value) { remove_attack(value); });
|
|
}
|
|
if(resourceid) {
|
|
remove_resource(resourceid);
|
|
}
|
|
|
|
if(eventinfo.removedInfo && eventinfo.removedInfo["repeating_inventory_" + itemid + "_itemmodifiers"]) {
|
|
check_itemmodifiers(eventinfo.removedInfo["repeating_inventory_" + itemid + "_itemmodifiers"]);
|
|
}
|
|
|
|
update_weight();
|
|
});
|
|
|
|
on("remove:repeating_attack", function(eventinfo) {
|
|
var attackid = eventinfo.sourceAttribute.substring(17, 37);
|
|
var itemid = eventinfo.removedInfo["repeating_attack_" + attackid + "_itemid"];
|
|
var spellid = eventinfo.removedInfo["repeating_attack_" + attackid + "_spellid"];
|
|
var spelllvl = eventinfo.removedInfo["repeating_attack_" + attackid + "_spelllevel"];
|
|
if(itemid) {
|
|
getAttrs(["repeating_inventory_" + itemid + "_hasattack"], function(v) {
|
|
if(v["repeating_inventory_" + itemid + "_hasattack"] && v["repeating_inventory_" + itemid + "_hasattack"] == 1) {
|
|
var update = {};
|
|
update["repeating_inventory_" + itemid + "_itemattackid"] = "";
|
|
update["repeating_inventory_" + itemid + "_hasattack"] = 0;
|
|
setAttrs(update, {silent: true});
|
|
}
|
|
});
|
|
};
|
|
if(spellid && spelllvl) {
|
|
getAttrs(["repeating_spell-" + spelllvl + "_" + spellid + "_spelloutput"], function(v) {
|
|
if(v["repeating_spell-" + spelllvl + "_" + spellid + "_spelloutput"] && v["repeating_spell-" + spelllvl + "_" + spellid + "_spelloutput"] == "ATTACK") {
|
|
var update = {};
|
|
update["repeating_spell-" + spelllvl + "_" + spellid + "_spellattackid"] = "";
|
|
update["repeating_spell-" + spelllvl + "_" + spellid + "_spelloutput"] = "SPELLCARD";
|
|
setAttrs(update, {silent: true});
|
|
}
|
|
});
|
|
};
|
|
});
|
|
|
|
on("remove:repeating_resource", function(eventinfo) {
|
|
const resourceid = eventinfo.sourceAttribute.substring(19, 39);
|
|
let update = {};
|
|
|
|
_.each(['left','right'], (side) => {
|
|
const itemid = eventinfo.removedInfo[`repeating_resource_${resourceid}_resource_${side}_itemid`];
|
|
if (itemid) {
|
|
update[`repeating_inventory_${itemid}_useasresource`] = 0;
|
|
update[`repeating_inventory_${itemid}_itemresourceid`] = "";
|
|
};
|
|
});
|
|
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
|
|
on("remove:repeating_spell-cantrip remove:repeating_spell-1 remove:repeating_spell-2 remove:repeating_spell-3 remove:repeating_spell-4 remove:repeating_spell-5 remove:repeating_spell-6 remove:repeating_spell-7 remove:repeating_spell-8 remove:repeating_spell-9", function(eventinfo) {
|
|
var attackid = eventinfo.removedInfo[eventinfo.sourceAttribute + "_spellattackid"];
|
|
if(attackid) {
|
|
remove_attack(attackid);
|
|
}
|
|
});
|
|
|
|
on("clicked:relaunch_lvl1mancer", function(eventinfo) {
|
|
getAttrs(["l1mancer_status"], function(v) {
|
|
if(v["l1mancer_status"] === "completed") {
|
|
setAttrs({l1mancer_status: "relaunch"});
|
|
}
|
|
check_l1_mancer();
|
|
});
|
|
});
|
|
|
|
on("clicked:launch_lvl+mancer", function(eventinfo) {
|
|
getAttrs(["class", "level", "hp_max", "custom_class","multiclass1_flag", "multiclass2_flag", "multiclass3_flag", "multiclass1", "multiclass2", "multiclass3"], function(v) {
|
|
var throw_warning = false;
|
|
var class_array = [v["class"]];
|
|
if(!v["class"] || !v["hp_max"] || isNaN(parseInt(v["hp_max"], 10)) || !v["level"] || isNaN(parseInt(v["level"], 10)) || parseInt(v["level"], 10) < 1 || (v["multiclass2_flag"] == 1 && v["multiclass1_flag"] == 0) || (v["multiclass3_flag"] == 1 && v["multiclass2_flag"] == 0) ) {
|
|
throw_warning = true;
|
|
};
|
|
|
|
if(v["multiclass1_flag"] == 1) {class_array.push(v["multiclass1"])};
|
|
if(v["multiclass2_flag"] == 1) {class_array.push(v["multiclass2"])};
|
|
if(v["multiclass3_flag"] == 1) {class_array.push(v["multiclass3"])};
|
|
// Check to see if there are any duplicate multiclasses
|
|
if((new Set(class_array)).size !== class_array.length) {
|
|
throw_warning = true;
|
|
};
|
|
|
|
if(throw_warning === true) {
|
|
setAttrs({leveler_warningflag: "show"});
|
|
return;
|
|
};
|
|
|
|
setAttrs({lpmancer_status: "active"}, function() {
|
|
startCharactermancer("lp-welcome");
|
|
});
|
|
});
|
|
|
|
});
|
|
|
|
on("change:experience", function(eventinfo) {
|
|
update_leveler_display();
|
|
});
|
|
|
|
var update_attr = function(attr) {
|
|
var update = {};
|
|
var attr_fields = [attr + "_base",attr + "_bonus"];
|
|
getSectionIDs("repeating_inventory", function(idarray) {
|
|
_.each(idarray, function(currentID, i) {
|
|
attr_fields.push("repeating_inventory_" + currentID + "_equipped");
|
|
attr_fields.push("repeating_inventory_" + currentID + "_itemmodifiers");
|
|
});
|
|
getAttrs(attr_fields, function(v) {
|
|
var base = v[attr + "_base"] && !isNaN(parseInt(v[attr + "_base"], 10)) ? parseInt(v[attr + "_base"], 10) : 10;
|
|
var bonus = v[attr + "_bonus"] && !isNaN(parseInt(v[attr + "_bonus"], 10)) ? parseInt(v[attr + "_bonus"], 10) : 0;
|
|
var item_base = 0;
|
|
var item_bonus = 0;
|
|
_.each(idarray, function(currentID) {
|
|
if((!v["repeating_inventory_" + currentID + "_equipped"] || v["repeating_inventory_" + currentID + "_equipped"] === "1") && v["repeating_inventory_" + currentID + "_itemmodifiers"] && v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().indexOf(attr > -1)) {
|
|
var mods = v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().split(",");
|
|
_.each(mods, function(mod) {
|
|
if(mod.indexOf(attr) > -1 && mod.indexOf("save") === -1) {
|
|
if(mod.indexOf(":") > -1) {
|
|
var new_base = !isNaN(parseInt(mod.replace(/[^0-9]/g, ""), 10)) ? parseInt(mod.replace(/[^0-9]/g, ""), 10) : false;
|
|
item_base = new_base && new_base > item_base ? new_base : item_base;
|
|
}
|
|
else if(mod.indexOf("-") > -1) {
|
|
var new_mod = !isNaN(parseInt(mod.replace(/[^0-9]/g, ""), 10)) ? parseInt(mod.replace(/[^0-9]/g, ""), 10) : false;
|
|
item_bonus = new_mod ? item_bonus - new_mod : item_bonus;
|
|
}
|
|
else {
|
|
var new_mod = !isNaN(parseInt(mod.replace(/[^0-9]/g, ""), 10)) ? parseInt(mod.replace(/[^0-9]/g, ""), 10) : false;
|
|
item_bonus = new_mod ? item_bonus + new_mod : item_bonus;
|
|
}
|
|
};
|
|
});
|
|
}
|
|
});
|
|
|
|
update[attr + "_flag"] = bonus > 0 || item_bonus > 0 || item_base > base ? 1 : 0;
|
|
base = base > item_base ? base : item_base;
|
|
update[attr] = base + bonus + item_bonus;
|
|
setAttrs(update);
|
|
});
|
|
});
|
|
};
|
|
|
|
var update_mod = function (attr) {
|
|
getAttrs([attr], function(v) {
|
|
var attr_abr = attr.substring(0,3);
|
|
var finalattr = v[attr] && isNaN(v[attr]) === false ? Math.floor((parseInt(v[attr], 10) - 10) / 2) : 0;
|
|
var update = {};
|
|
update[attr + "_mod"] = finalattr;
|
|
update["npc_" + attr_abr + "_negative"] = v[attr] && !isNaN(v[attr]) && parseInt(v[attr], 10) < 10 ? 1 : 0;
|
|
setAttrs(update);
|
|
});
|
|
};
|
|
|
|
var update_save = function (attr) {
|
|
var save_attrs = [attr + "_mod", attr + "_save_prof", attr + "_save_mod","pb","globalsavemod","pb_type"];
|
|
getSectionIDs("repeating_inventory", function(idarray) {
|
|
_.each(idarray, function(currentID, i) {
|
|
save_attrs.push("repeating_inventory_" + currentID + "_equipped");
|
|
save_attrs.push("repeating_inventory_" + currentID + "_itemmodifiers");
|
|
});
|
|
|
|
getAttrs(save_attrs, function(v) {
|
|
var attr_mod = v[attr + "_mod"] ? parseInt(v[attr + "_mod"], 10) : 0;
|
|
var prof = v[attr + "_save_prof"] && v[attr + "_save_prof"] != 0 && !isNaN(v["pb"]) ? parseInt(v["pb"], 10) : 0;
|
|
var save_mod = v[attr + "_save_mod"] && !isNaN(parseInt(v[attr + "_save_mod"], 10)) ? parseInt(v[attr + "_save_mod"], 10) : 0;
|
|
var global = v["globalsavemod"] && !isNaN(v["globalsavemod"]) ? parseInt(v["globalsavemod"], 10) : 0;
|
|
var items = 0;
|
|
_.each(idarray, function(currentID) {
|
|
if(v["repeating_inventory_" + currentID + "_equipped"] && v["repeating_inventory_" + currentID + "_equipped"] === "1" && v["repeating_inventory_" + currentID + "_itemmodifiers"] && (v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().indexOf("saving throws") > -1 || v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().indexOf(attr + " save") > -1)) {
|
|
var mods = v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().split(",");
|
|
_.each(mods, function(mod) {
|
|
if(mod.indexOf(attr + " save") > -1) {
|
|
var substr = mod.slice(mod.lastIndexOf(attr + " save") + attr.length + " save".length);
|
|
var bonus = substr && substr.length > 0 && !isNaN(parseInt(substr,10)) ? parseInt(substr,10) : 0;
|
|
}
|
|
else if(mod.indexOf("saving throws") > -1) {
|
|
var substr = mod.slice(mod.lastIndexOf("saving throws") + "saving throws".length);
|
|
var bonus = substr && substr.length > 0 && !isNaN(parseInt(substr,10)) ? parseInt(substr,10) : 0;
|
|
};
|
|
if(bonus && bonus != 0) {
|
|
items = items + bonus;
|
|
};
|
|
});
|
|
}
|
|
});
|
|
var total = attr_mod + prof + save_mod + global + items;
|
|
if(v["pb_type"] && v["pb_type"] === "die" && v[attr + "_save_prof"] != 0 && attr != "death") {
|
|
total = total + "+" + v["pb"];
|
|
};
|
|
var update = {};
|
|
update[attr + "_save_bonus"] = total;
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
});
|
|
};
|
|
|
|
var update_all_saves = function() {
|
|
update_save("strength");
|
|
update_save("dexterity");
|
|
update_save("constitution");
|
|
update_save("intelligence");
|
|
update_save("wisdom");
|
|
update_save("charisma");
|
|
update_save("death");
|
|
};
|
|
|
|
var update_all_ability_checks = function(){
|
|
update_initiative();
|
|
update_skills(["athletics", "acrobatics", "sleight_of_hand", "stealth", "eldertech", "history", "investigation", "nature", "religion", "animal_handling", "insight", "materials", "medicine", "perception", "survival", "deception", "intimidation", "performance", "persuasion", "politics"]);
|
|
};
|
|
|
|
var update_skills = function (skills_array) {
|
|
var skill_parent = {athletics: "strength", acrobatics: "dexterity", sleight_of_hand: "dexterity", stealth: "dexterity", eldertech: "intelligence", history: "intelligence", investigation: "intelligence", nature: "intelligence", religion: "intelligence", animal_handling: "wisdom", insight: "wisdom", materials: "intelligence", medicine: "intelligence", perception: "wisdom", survival: "wisdom", deception: "charisma", intimidation: "charisma", performance: "charisma", persuasion: "charisma", politics: "intelligence"};
|
|
var attrs_to_get = ["pb","pb_type","jack_of_all_trades","jack"];
|
|
var update = {};
|
|
var callbacks = [];
|
|
|
|
if(skills_array.indexOf("perception") > -1) {
|
|
callbacks.push( function() {update_passive_perception();} )
|
|
};
|
|
|
|
_.each(skills_array, function(s) {
|
|
if(skill_parent[s] && attrs_to_get.indexOf(skill_parent[s]) === -1) {attrs_to_get.push(skill_parent[s] + "_mod")};
|
|
attrs_to_get.push(s + "_prof");
|
|
attrs_to_get.push(s + "_type");
|
|
attrs_to_get.push(s + "_flat");
|
|
});
|
|
|
|
getSectionIDs("repeating_inventory", function(idarray) {
|
|
_.each(idarray, function(currentID, i) {
|
|
attrs_to_get.push("repeating_inventory_" + currentID + "_equipped");
|
|
attrs_to_get.push("repeating_inventory_" + currentID + "_itemmodifiers");
|
|
});
|
|
|
|
getAttrs(attrs_to_get, function(v) {
|
|
console.log("UPDATING SKILLS");
|
|
_.each(skills_array, function(s) {
|
|
var attr_mod = v[skill_parent[s] + "_mod"] ? parseInt(v[skill_parent[s] + "_mod"], 10) : 0;
|
|
var prof = v[s + "_prof"] != 0 && !isNaN(v["pb"]) ? parseInt(v["pb"], 10) : 0;
|
|
var flat = v[s + "_flat"] && !isNaN(parseInt(v[s + "_flat"], 10)) ? parseInt(v[s + "_flat"], 10) : 0;
|
|
var type = v[s + "_type"] && !isNaN(parseInt(v[s + "_type"], 10)) ? parseInt(v[s + "_type"], 10) : 1;
|
|
var jack = v["jack_of_all_trades"] && v["jack_of_all_trades"] != 0 && v["jack"] ? v["jack"] : 0;
|
|
var item_bonus = 0;
|
|
|
|
_.each(idarray, function(currentID) {
|
|
if(v["repeating_inventory_" + currentID + "_equipped"] && v["repeating_inventory_" + currentID + "_equipped"] === "1" && v["repeating_inventory_" + currentID + "_itemmodifiers"] && (v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().replace(/ /g,"_").indexOf(s) > -1 || v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().indexOf("ability checks") > -1)) {
|
|
var mods = v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().split(",");
|
|
_.each(mods, function(mod) {
|
|
if(mod.replace(/ /g,"_").indexOf(s) > -1 || mod.indexOf("ability checks") > -1) {
|
|
if(mod.indexOf("-") > -1) {
|
|
var new_mod = !isNaN(parseInt(mod.replace(/[^0-9]/g, ""), 10)) ? parseInt(mod.replace(/[^0-9]/g, ""), 10) : false;
|
|
item_bonus = new_mod ? item_bonus - new_mod : item_bonus;
|
|
}
|
|
else {
|
|
var new_mod = !isNaN(parseInt(mod.replace(/[^0-9]/g, ""), 10)) ? parseInt(mod.replace(/[^0-9]/g, ""), 10) : false;
|
|
item_bonus = new_mod ? item_bonus + new_mod : item_bonus;
|
|
}
|
|
};
|
|
});
|
|
};
|
|
});
|
|
|
|
var total = attr_mod + flat + item_bonus;
|
|
|
|
if(v["pb_type"] && v["pb_type"] === "die") {
|
|
if(v[s + "_prof"] != 0) {
|
|
type === 1 ? "" : "2"
|
|
total = total + "+" + type + v["pb"];
|
|
}
|
|
else if(v[s + "_prof"] == 0 && jack != 0) {
|
|
total = total + "+" + jack;
|
|
};
|
|
}
|
|
else {
|
|
if(v[s + "_prof"] != 0) {
|
|
total = total + (prof * type);
|
|
}
|
|
else if(v[s + "_prof"] == 0 && jack != 0) {
|
|
total = total + parseInt(jack, 10);
|
|
};
|
|
|
|
};
|
|
update[s + "_bonus"] = total;
|
|
});
|
|
|
|
setAttrs(update, {silent: true}, function() {callbacks.forEach(function(callback) {callback(); })} );
|
|
});
|
|
});
|
|
};
|
|
|
|
var update_tool = function(tool_id) {
|
|
//D&D 5e Mancer: Land Vehicles proficiency does not drop with Marine background (UC748)
|
|
//Added a test to check for an undefined tool_id so to prevent similar errors.
|
|
//By Miguel Peres
|
|
if(typeof tool_id == "undefined") return;
|
|
|
|
if(tool_id.substring(0,1) === "-" && tool_id.length === 20) {
|
|
do_update_tool([tool_id]);
|
|
}
|
|
else if(tool_id === "all") {
|
|
getSectionIDs("repeating_tool", function(idarray) {
|
|
do_update_tool(idarray);
|
|
});
|
|
}
|
|
else {
|
|
getSectionIDs("repeating_tool", function(idarray) {
|
|
var tool_attribs = [];
|
|
_.each(idarray, function(id) {
|
|
tool_attribs.push("repeating_tool_" + id + "_toolattr_base");
|
|
});
|
|
getAttrs(tool_attribs, function(v) {
|
|
var attr_tool_ids = [];
|
|
_.each(idarray, function(id) {
|
|
if(v["repeating_tool_" + id + "_toolattr_base"] && v["repeating_tool_" + id + "_toolattr_base"].indexOf(tool_id) > -1) {
|
|
attr_tool_ids.push(id);
|
|
}
|
|
});
|
|
if(attr_tool_ids.length > 0) {
|
|
do_update_tool(attr_tool_ids);
|
|
}
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
var do_update_tool = function(tool_array) {
|
|
var tool_attribs = ["pb","pb_type","jack","strength_mod","dexterity_mod","constitution_mod","intelligence_mod","wisdom_mod","charisma_mod"];
|
|
var update = {};
|
|
_.each(tool_array, function(tool_id) {
|
|
tool_attribs.push("repeating_tool_" + tool_id + "_toolbonus_base");
|
|
tool_attribs.push("repeating_tool_" + tool_id + "_tool_mod");
|
|
tool_attribs.push("repeating_tool_" + tool_id + "_toolattr_base");
|
|
});
|
|
|
|
getAttrs(tool_attribs, function(v) {
|
|
_.each(tool_array, function(tool_id) {
|
|
console.log("UPDATING TOOL: " + tool_id);
|
|
var query = false;
|
|
if(v["repeating_tool_" + tool_id + "_toolattr_base"] && v["repeating_tool_" + tool_id + "_toolattr_base"].substring(0,2) === "?{") {
|
|
update["repeating_tool_" + tool_id + "_toolattr"] = "QUERY";
|
|
var mod = "?{Attribute?|Strength,@{strength_mod}|Dexterity,@{dexterity_mod}|Constitution,@{constitution_mod}|Intelligence,@{intelligence_mod}|Wisdom,@{wisdom_mod}|Charisma,@{charisma_mod}}";
|
|
if(v["repeating_tool_" + tool_id + "_tool_mod"]) {
|
|
mod = mod + "+" + v["repeating_tool_" + tool_id + "_tool_mod"];
|
|
}
|
|
query = true;
|
|
} else {
|
|
var attr = v["repeating_tool_" + tool_id + "_toolattr_base"].substring(0, v["repeating_tool_" + tool_id + "_toolattr_base"].length - 5).substr(2);
|
|
var attr_mod = v[attr + "_mod"] ? parseInt(v[attr + "_mod"], 10) : 0;
|
|
var tool_mod = v["repeating_tool_" + tool_id + "_tool_mod"] && !isNaN(parseInt(v["repeating_tool_" + tool_id + "_tool_mod"], 10)) ? parseInt(v["repeating_tool_" + tool_id + "_tool_mod"], 10) : 0;
|
|
var mod = attr_mod + tool_mod;
|
|
update["repeating_tool_" + tool_id + "_toolattr"] = attr.toUpperCase();
|
|
if(v["repeating_tool_" + tool_id + "_tool_mod"] && v["repeating_tool_" + tool_id + "_tool_mod"].indexOf("@{") > -1) {
|
|
update["repeating_tool_" + tool_id + "_toolbonus"] = update["repeating_tool_" + tool_id + "_toolbonus"] + "+" + v["repeating_tool_" + tool_id + "_tool_mod"];
|
|
}
|
|
if(!v["repeating_tool_" + tool_id + "_tool_mod"]) {
|
|
update["repeating_tool_" + tool_id + "_tool_mod"] = 0;
|
|
}
|
|
};
|
|
|
|
if(v["pb_type"] && v["pb_type"] === "die" ) {
|
|
if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(@{pb})") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + "+" + v.pb}
|
|
else if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(@{pb}*2)") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + "+2" + v.pb}
|
|
else if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(floor(@{pb}/2))") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + "+" + v.jack};
|
|
}
|
|
else if(v["repeating_tool_" + tool_id + "_toolattr_base"] && v["repeating_tool_" + tool_id + "_toolattr_base"].substring(0,2) === "?{") {
|
|
if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(@{pb})") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + "+" + parseInt(v.pb, 10)}
|
|
else if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(@{pb}*2)") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + "+" + (parseInt(v.pb, 10)*2)}
|
|
else if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(floor(@{pb}/2))") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + "+" + parseInt(v.jack, 10)};
|
|
}
|
|
else {
|
|
if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(@{pb})") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + parseInt(v.pb, 10)}
|
|
else if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(@{pb}*2)") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + (parseInt(v.pb, 10)*2)}
|
|
else if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(floor(@{pb}/2))") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + parseInt(v.jack, 10)};
|
|
};
|
|
|
|
if(query) {
|
|
update["repeating_tool_" + tool_id + "_toolbonus_display"] = "?";
|
|
}
|
|
else {
|
|
update["repeating_tool_" + tool_id + "_toolbonus_display"] = update["repeating_tool_" + tool_id + "_toolbonus"];
|
|
};
|
|
|
|
});
|
|
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
};
|
|
|
|
var get_repeating_data = function(callback) {
|
|
var getallrepeating = function(getobj, thiscallback, attrlist) {
|
|
attrlist = attrlist || [];
|
|
var thisget = getobj.pop();
|
|
getSectionIDs(thisget.name, function(ids) {
|
|
_.each(ids, function(sectionId) {
|
|
_.each(thisget.list, function(attr) {
|
|
attrlist.push("repeating_" + thisget.name + "_" + sectionId + "_" + attr);
|
|
});
|
|
});
|
|
if(getobj.length > 0) {
|
|
getallrepeating(getobj, thiscallback, attrlist);
|
|
} else {
|
|
getAttrs(attrlist, function(vals) {
|
|
thiscallback(vals);
|
|
});
|
|
};
|
|
});
|
|
};
|
|
var getList = [
|
|
{name: "proficiencies", list: ["name"]},
|
|
{name: "tool", list: ["toolname", "toolattr_base"]},
|
|
{name: "traits", list: ["name", "source", "source_type"]},
|
|
{name: "resource", list: ["resource_left_name", "resource_right_name"]},
|
|
{name: "spell-cantrip", list: ["spellname", "spellattackid", "spellsource", "spellattackid"]},
|
|
{name: "savemod", list: ["global_save_name"]},
|
|
{name: "tohitmod", list: ["global_attack_name"]},
|
|
{name: "damagemod", list: ["global_damage_name"]},
|
|
{name: "acmod", list: ["global_ac_name"]},
|
|
{name: "skillmod", list: ["global_skill_name"]},
|
|
{name: "attack", list: ["atkname", "spellid"]},
|
|
{name: "hpmod", list: ["levels", "source", "mod"]}
|
|
];
|
|
for(var x=1; x<=9; x++) {
|
|
getList.push({ name: "spell-" + x, list: ["spellname", "spellattackid", "spellsource", "spellattackid"] });
|
|
}
|
|
var repeating = {prof_names: [], traits: []};
|
|
_.each(getList, function(section) {
|
|
if(!["proficiencies", "traits"].includes(section.name)) {
|
|
repeating[section.name] = {};
|
|
}
|
|
});
|
|
getallrepeating(getList, function(vals) {
|
|
var traitstemp = {};
|
|
_.each(vals, function(value, name) {
|
|
if(name.split("_")[1] == "proficiencies") {
|
|
repeating.prof_names.push(value.toLowerCase());
|
|
} else if(name.split("_")[1] == "tool") {
|
|
repeating.tool[name.split("_")[2]] = repeating.tool[name.split("_")[2]] || {};
|
|
let attr = _.last(name.split("_"));
|
|
repeating.tool[name.split("_")[2]][attr] = value.toLowerCase();
|
|
if(attr == "toolname") repeating.prof_names.push(value.toLowerCase());
|
|
} else if (name.split("_")[1] == "traits") {
|
|
traitstemp[name.split("_")[2]] = traitstemp[name.split("_")[2]] ? traitstemp[name.split("_")[2]] : {};
|
|
traitstemp[name.split("_")[2]][_.last(name.split("_"))] = value;
|
|
} else if (name.split("_")[1] == "resource") {
|
|
repeating.resource[name.split("_")[2]] = repeating.resource[name.split("_")[2]] || {};
|
|
repeating.resource[name.split("_")[2]][name.split("_")[4]] = value;
|
|
} else if (name.split("_")[1] == "hpmod") {
|
|
repeating.hpmod[name.split("_")[2]] = repeating.hpmod[name.split("_")[2]] || {};
|
|
repeating.hpmod[name.split("_")[2]][name.split("_")[3]] = value;
|
|
} else if (name.split("_")[1].split("-")[0] == "spell") {
|
|
repeating[name.split("_")[1]][name.split("_")[2]] = repeating[name.split("_")[1]][name.split("_")[2]] || {};
|
|
repeating[name.split("_")[1]][name.split("_")[2]][name.split("_")[3]] = value;
|
|
} else if (name.split("_")[1] == "attack") {
|
|
repeating[name.split("_")[1]][name.split("_")[2]] = repeating[name.split("_")[1]][name.split("_")[2]] || {};
|
|
repeating[name.split("_")[1]][name.split("_")[2]][name.split("_")[3]] = value;
|
|
} else {
|
|
repeating[name.split("_")[1]][name.split("_")[2]] = value;
|
|
}
|
|
});
|
|
_.each(traitstemp, function(v, k) {
|
|
var trait = _.clone(v);
|
|
trait.id = k;
|
|
repeating.traits.push(trait);
|
|
});
|
|
callback(repeating);
|
|
});
|
|
};
|
|
|
|
var handle_drop = function(category, eventinfo) {
|
|
|
|
getAttrs(["speed", "drop_name", "drop_data", "drop_content", "character_id", "npc_legendary_actions", "strength_mod", "dexterity_mod", "npc", "base_level", "strength_base", "dexterity_base", "constitution_base", "wisdom_base", "intelligence_base", "charisma_base", "class_resource_name", "other_resource_name", "multiclass1_lvl", "multiclass2_lvl", "multiclass3_lvl"], function(v) {
|
|
var pagedata = {};
|
|
try {
|
|
pagedata = JSON.parse(v.drop_data);
|
|
} catch(e) {
|
|
pagedata = v.drop_data;
|
|
}
|
|
var page = {
|
|
name: v.drop_name,
|
|
data: pagedata,
|
|
content: v.drop_content
|
|
};
|
|
var category = page.data["Category"];
|
|
get_repeating_data(function(repeating) {
|
|
var results = processDrop(page, v, repeating);
|
|
setAttrs(results.update, {silent: true}, function() {results.callbacks.forEach(function(callback) {callback(); })} );
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
var processDrop = function(page, currentData, repeating, looped) {
|
|
var jsonparse = function(data) {
|
|
var result = {};
|
|
try {
|
|
result = JSON.parse(data);
|
|
} catch(e) {
|
|
result = data;
|
|
}
|
|
return result;
|
|
};
|
|
var modStringToAttrib = function(modString) {
|
|
var finalAttrib = "";
|
|
if (modString == "FIN") {
|
|
if (parseInt(currentData.strength_base) > parseInt(currentData.dexterity_base)) {
|
|
finalAttrib = "@{strength_mod}";
|
|
} else {
|
|
finalAttrib = "@{dexterity_mod}";
|
|
}
|
|
} else {
|
|
switch(modString) {
|
|
case "STR":
|
|
finalAttrib = "@{strength_mod}";
|
|
break;
|
|
case "DEX":
|
|
finalAttrib = "@{dexterity_mod}";
|
|
break;
|
|
case "CON":
|
|
finalAttrib = "@{constitution_mod}";
|
|
break;
|
|
case "WIS":
|
|
finalAttrib = "@{wisdom_mod}";
|
|
break;
|
|
case "INT":
|
|
finalAttrib = "@{intelligence_mod}";
|
|
break;
|
|
case "CHA":
|
|
finalAttrib = "@{charisma_mod}";
|
|
break;
|
|
}
|
|
}
|
|
return finalAttrib;
|
|
};
|
|
var numUses = function(uses_string) {
|
|
uses_string = parseValues(uses_string);
|
|
|
|
var terms = uses_string.split("+");
|
|
var total = 0;
|
|
_.each(terms, function(term) {
|
|
total += parseInt(term);
|
|
});
|
|
return uses_string === "" || uses_string === "-" ? uses_string : total;
|
|
};
|
|
var parseValues = function(uses_string) {
|
|
var attribs = ["strength", "dexterity", "constitution", "wisdom", "intelligence", "charisma"];
|
|
uses_string = uses_string ? uses_string.toLowerCase() : "";
|
|
_.each(attribs, function(attrib) {
|
|
var attribMod = Math.floor((parseInt(currentData[attrib + "_base"]) - 10) / 2);
|
|
if (attribMod < 0 || isNaN(attribMod)) attribMod = 0;
|
|
uses_string = uses_string.replace(attrib, attribMod);
|
|
});
|
|
uses_string = uses_string.replace(/half_level/g, Math.floor(classlevel/2));
|
|
return uses_string.replace(/level/g, classlevel);
|
|
};//
|
|
var category = page.data["Category"];
|
|
var callbacks = [];
|
|
var update = {};
|
|
var id = generateRowID();
|
|
var blobs = {};
|
|
var classlevel = currentData.base_level ? parseInt(currentData.base_level) : 1;
|
|
repeating.traits = repeating.traits ? repeating.traits : [];
|
|
update["drop_category"] = "";
|
|
update["drop_name"] = "";
|
|
update["drop_data"] = "";
|
|
update["drop_content"] = "";
|
|
if(category === "Items") {
|
|
console.log(`%c ITEM: ${page.name} dropped`, "color: purple; font-size: 14px;");
|
|
if(currentData.npc === "0") {
|
|
update["tab"] = "core";
|
|
if(page.name) {update[`repeating_inventory_${id}_itemname`] = page.name};
|
|
if(page.data["itemcount"]) {update[`repeating_inventory_${id}_itemcount`] = page.data["itemcount"]};
|
|
|
|
["Properties", "Weight"].forEach((attr) => {
|
|
if (page.data[`${attr}`]) {
|
|
update[`repeating_inventory_${id}_item${attr.toLowerCase()}`] = page.data[`${attr}`]
|
|
};
|
|
});
|
|
|
|
if(page.content) {update[`repeating_inventory_${id}_itemcontent`] = page.content};
|
|
if(!page.data["Item Type"] || page.data["Item Type"] == "") {page.data["Item Type"] = category};
|
|
var mods = "Item Type: " + page.data["Item Type"];
|
|
if(page.data["AC"] && page.data["AC"] != "") {
|
|
mods += ", AC: " + page.data["AC"];
|
|
if(!looped) {
|
|
callbacks.push(() => {update_ac();} )
|
|
}
|
|
};
|
|
|
|
["Damage", "Damage Type", "Secondary Damage", "Secondary Damage Type", "Alternate Damage", "Alternate Damage Type", "Alternate Secondary Damage", "Alternate Secondary Damage Type", "Range"].forEach((attr) => {
|
|
if (page.data[`${attr}`] && page.data[`${attr}`] != "") {
|
|
mods += `, ${attr}: ${page.data[`${attr}`]}`
|
|
};
|
|
});
|
|
|
|
if(page.data["Modifiers"] && page.data["Modifiers"] != "") { mods += `, ${page.data["Modifiers"]}` };
|
|
update[`repeating_inventory_${id}_itemmodifiers`] = mods;
|
|
if(page.data["Item Type"].indexOf("Weapon") > -1) {
|
|
update[`repeating_inventory_${id}_hasattack`] = 1;
|
|
callbacks.push(() => {
|
|
(page.data["Alternate Damage"] && page.data["Alternate Damage"] !== "") ? create_attack_from_item(id, {versatile: true}) : create_attack_from_item(id);
|
|
});
|
|
} else if(page.data["Item Type"].indexOf("Ammunition") > -1) {
|
|
update[`repeating_inventory_${id}_useasresource`] = 1;
|
|
callbacks.push(() => { create_resource_from_item(id); });
|
|
};
|
|
|
|
if(page.data["Modifiers"]) {
|
|
callbacks.push(() => { check_itemmodifiers(page.data["Modifiers"]); });
|
|
};
|
|
|
|
if(!looped) {
|
|
callbacks.push(() => { update_weight(); });
|
|
}
|
|
} else {
|
|
if(page.data["Item Type"] && page.data["Item Type"].toLowerCase().includes("weapon")) {
|
|
const type = (page.data["Item Type"]) ? page.data["Item Type"].toLowerCase().split(" ")[0] : " ";
|
|
const properties = (page.data["Properties"]) ? page.data["Properties"].toLowerCase() : undefined;
|
|
|
|
const make_npc_attack_from_item = (rowid, options) => {
|
|
update[`repeating_npcaction_${rowid}_npc_options-flag`] = "0";
|
|
update[`repeating_npcaction_${rowid}_attack_flag`] = "on";
|
|
if(page.name) {
|
|
update[`repeating_npcaction_${rowid}_name`] = page.name;
|
|
if (options && options.versatile) {
|
|
update[`repeating_npcaction_${rowid}_name`] += " (" + (options.versatile === 1 ? "One-Handed" : "Two-Handed") + ")";
|
|
} else if (options && options.thrown) {
|
|
update[`repeating_npcaction_${rowid}_name`] += " (Thrown)";
|
|
};
|
|
};
|
|
if(page.content) { update[`repeating_npcaction_${rowid}_description`] = page.content; }
|
|
|
|
update[`repeating_npcaction_${rowid}_attack_display_flag`] = "{{attack=1}}";
|
|
update[`repeating_npcaction_${rowid}_attack_options`] = "{{attack=1}}";
|
|
update[`repeating_npcaction_${rowid}_attack_type`] = page.data["Item Type"];
|
|
update[`repeating_npcaction_${rowid}_attack_target`] = "one target";
|
|
|
|
|
|
update[`repeating_npcaction_${rowid}_attack_range`] =
|
|
(page.data["Range"] && page.data["Range"] != "" && (!properties.includes("thrown") || (options && options.thrown))) ? page.data["Range"] :
|
|
(page.data["Properties"] && properties.includes("range")) ? "10 ft" :
|
|
"5 ft";
|
|
|
|
const weapon_attr_mod = (type.includes("ranged") || (properties && properties.includes("finesse") && currentData.dexterity_mod > currentData.strength_mod)) ? currentData.dexterity_mod : currentData.strength_mod;
|
|
update[`repeating_npcaction_${rowid}_attack_tohit`] = weapon_attr_mod;
|
|
|
|
const dmgArray = (options && options.versatile === 2) ?
|
|
["Alternate Damage", "Alternate Damage Type", "Alternate Secondary Damage", "Alternate Secondary Damage Type"] :
|
|
["Damage", "Damage Type", "Secondary Damage", "Secondary Damage Type"];
|
|
|
|
dmgArray.forEach((attr) => {
|
|
if (page.data[`${attr}`]) {
|
|
// _attack_damage adds the weapon mod
|
|
const ending = (dmgArray.indexOf(`${attr}`) === 0) ? `+${weapon_attr_mod}` : "";
|
|
//Remove Alternate for the attribute name. Then check for Secondary and remote it while adding 2.
|
|
let attrEdit = (attr.includes("Alternate") && attr.includes("Secondary")) ? attr.slice(20) + "2" : (attr.includes("Alternate") || attr.includes("Secondary")) ? attr.slice(10) : attr;
|
|
//Lower case everything and remove spaces
|
|
let name = attrEdit.toLowerCase().replace(" ", "");
|
|
//Set all the necessary attack attributes
|
|
update[`repeating_npcaction_${rowid}_attack_${name}`] = page.data[`${attr}`] + [`${ending}`];
|
|
};
|
|
});
|
|
|
|
if(page.data["Modifiers"]) {
|
|
if(type === "melee" || type === "ranged") {
|
|
//+1 Weapons should be in the format of "Melee Attacks +1, Melee Damage +1"
|
|
const split = (page.data["Modifiers"].includes(",")) ? page.data["Modifiers"].split(", ") : page.data["Modifiers"];
|
|
split.forEach((attr) => {
|
|
const name = attr.toLowerCase();
|
|
if (name.includes("attacks")) {
|
|
update[`repeating_npcaction_${rowid}_attack_tohit`] = +update[`repeating_npcaction_${rowid}_attack_tohit`] + name.split("attacks ")[1];
|
|
} else if (name.includes("damage")) {
|
|
update[`repeating_npcaction_${rowid}_attack_damage`] += name.split("damage ")[1];
|
|
} else {
|
|
console.log(`%c ${page.name} modifiers format did not include damage or attacks`, "color:orange;");
|
|
};
|
|
});
|
|
};
|
|
};
|
|
};
|
|
|
|
const versatile = (properties && properties.includes("versatile")) ? 1 : undefined;
|
|
make_npc_attack_from_item(id, {versatile: versatile});
|
|
|
|
if (properties && properties.includes("thrown")) {
|
|
make_npc_attack_from_item(generateRowID(), {thrown: true});
|
|
}
|
|
if (versatile && page.data["Alternate Damage"]) {
|
|
make_npc_attack_from_item(generateRowID(), {versatile: 2})
|
|
}
|
|
|
|
if (page.data["Modifiers"]) {
|
|
callbacks.push(() => { check_itemmodifiers(page.data["Modifiers"]); }, () => { update_npc_action("all"); });
|
|
} else {
|
|
callbacks.push(() => { update_npc_action("all"); });
|
|
};
|
|
}
|
|
}
|
|
};
|
|
if(category === "Spells") {
|
|
console.log(`%c SPELL: ${page.name} dropped`, "color: purple; font-weight:14px;");
|
|
let existing = {};
|
|
var lvl = page.data["Level"] && page.data["Level"] > 0 ? page.data["Level"] : "cantrip";
|
|
if (repeating[`spell-${lvl}`]) {
|
|
_.each(repeating[`spell-${lvl}`], (spell, spellid) => {
|
|
if (spell.spellname.toLowerCase() === page.name.toLowerCase()) {
|
|
id = spellid;
|
|
existing = spell;
|
|
};
|
|
});
|
|
}
|
|
|
|
update[`repeating_spell-${lvl}_${id}_spelllevel`] = lvl;
|
|
update[`repeating_spell-${lvl}_${id}_spell_ability`] = (page.data["spellcasting_ability"]) ? `@{${page.data["spellcasting_ability"].toLowerCase()}_mod}+` : "spell";
|
|
(page.name) ? update[`repeating_spell-${lvl}_${id}_spellname`] = page.name : false;
|
|
|
|
["spellclass", "spellsource", "data-description"].forEach((attr) => {
|
|
const suffix = (attr.includes("description")) ? "spelldescription" : attr;
|
|
(page.data[`${attr}`]) ? update[`repeating_spell-${lvl}_${id}_${suffix}`] = page.data[`${attr}`] : false;
|
|
});
|
|
|
|
["Add Casting Modifier", "Casting Time", "Concentration", "Damage Type", "Damage", "Duration", "Healing", "Material", "Range", "Ritual", "Save", "Save Success", "School", "Secondary Damage", "Secondary Damage Type", "Target"].forEach((attr) => {
|
|
if(page.data[`${attr}`]) {
|
|
//Adjust the array entry to match the attribute name in the HTML
|
|
const name = (attr === "Add Casting Modifier") ? "dmgmod" : (attr === "Material") ? `comp_materials` : (attr.includes("Secondary Damage")) ? attr.split("Secondary ")[0] + "2" : attr;
|
|
const spellattribute = name.toLowerCase().replace(" ", "");
|
|
//Concentration, Ritual, and School are exceptions to norm
|
|
const updateValue = (attr === "Concentration" || attr === "Ritual") ? `{{${spellattribute}=1}}` : (attr === "School") ? page.data["School"].toLowerCase() : page.data[`${attr}`];
|
|
update[`repeating_spell-${lvl}_${id}_spell${spellattribute}`] = updateValue;
|
|
};
|
|
});
|
|
|
|
["Higher Spell Slot Bonus", "Higher Spell Slot Desc", "Higher Spell Slot Dice", "Higher Spell Slot Die"].forEach((attr) => {
|
|
if (page.data[`${attr}`]) {
|
|
const spellattribute = (attr.includes("Bonus")) ? "hlbonus" : (attr.includes("Desc")) ? "athigherlevels" : (attr.includes("Dice")) ? "hldie" : "hldietype";
|
|
update[`repeating_spell-${lvl}_${id}_spell${spellattribute}`] = page.data[`${attr}`];
|
|
};
|
|
});
|
|
|
|
if(page.data["Components"]) {
|
|
["v", "s", "m"].forEach((comp) => {
|
|
if(page.data["Components"].toLowerCase().indexOf(comp) === -1) {update[`repeating_spell-${lvl}_${id}_spellcomp_${comp}`] = "0"};
|
|
});
|
|
};
|
|
|
|
if (page.data["Spell Attack"]) {
|
|
update[`repeating_spell-${lvl}_${id}_spellattack`] = page.data[`Spell Attack`];
|
|
};
|
|
|
|
if(page.data["Damage"] || page.data["Healing"]) {
|
|
update["repeating_spell-" + lvl + "_" + id + "_spelloutput"] = "ATTACK";
|
|
if(!existing.spellattackid) callbacks.push( function() {create_attack_from_spell(lvl, id, currentData.character_id);});
|
|
}
|
|
else if(page.data["Higher Spell Slot Desc"] && page.data["Higher Spell Slot Desc"] != "") {
|
|
var spelllevel = "?{Cast at what level?";
|
|
for(i = 0; i < 10-lvl; i++) {
|
|
spelllevel = spelllevel + "|Level " + (parseInt(i, 10) + parseInt(lvl, 10)) + "," + (parseInt(i, 10) + parseInt(lvl, 10));
|
|
};
|
|
spelllevel = spelllevel + "}";
|
|
update[`repeating_spell-${lvl}_${id}_rollcontent`] = `@{wtype}&{template:spell} {{level=@{spellschool} ${spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} {{innate=@{innate}}} @{spellconcentration} @{charname_output} {{licensedsheet=@{licensedsheet}}}`;
|
|
};
|
|
|
|
if(page.data["data-Cantrip Scaling"] && lvl == "cantrip") {update[`repeating_spell-${lvl}_${id}_spell_damage_progression`] = "Cantrip " + page.data["data-Cantrip Scaling"].charAt(0).toUpperCase() + page.data["data-Cantrip Scaling"].slice(1);};
|
|
update[`repeating_spell-${lvl}_${id}_options-flag`] = "0";
|
|
};
|
|
if(category === "Monsters") {
|
|
console.log(`%c MONSTERS: ${page.name} dropped`, "color: purple; font-weight:14px;");
|
|
update["npc"] = "1";
|
|
update["npc_options-flag"] = "0";
|
|
update["licensedsheet"] = "1";
|
|
if(page.name && page.name != "") {update["npc_name"] = page.name};
|
|
|
|
//ABILITY SCORES
|
|
const npcAbilites = ["strength", "dexterity", "constitution", "intelligence", "wisdom", "charisma"];
|
|
npcAbilites.forEach((ability) => {
|
|
const abbreviation = ability.slice(0, 3).toUpperCase();
|
|
update[`${ability}_base`] = (page.data[`${abbreviation}`]) ? page.data[`${abbreviation}`] : "";
|
|
callbacks.push(() => {
|
|
update_attr(`${ability}`);
|
|
});
|
|
});
|
|
|
|
const npcExtras = ["Condition Immunities", "Immunities", "Languages", "Resistances", "Speed", "Token Size", "Vulnerabilities"];
|
|
npcExtras.forEach((attr) => {
|
|
//console.log(`%c MONSTERS Drop: ${attr}`, "color:cornflowerblue;");
|
|
const prefixExtra = (attr === "Token Size") ? "" : "npc_";
|
|
let nameExtra = (attr.includes(" ")) ? attr.replace(" ", "_").toLowerCase() : attr.toLowerCase();
|
|
update[`${prefixExtra}${nameExtra}`] = (page.data[`${attr}`]) ? page.data[`${attr}`] : "";
|
|
});
|
|
|
|
//CHALLENGE RATING
|
|
if(page.data["Challenge Rating"] && page.data["Challenge Rating"] != "") {
|
|
callbacks.push( function() {update_challenge();} );
|
|
update["npc_challenge"] = page.data["Challenge Rating"];
|
|
} else {
|
|
update["npc_challenge"] = "";
|
|
};
|
|
|
|
//XP
|
|
if(page.data["data-XP"]) { update["npc_xp"] = page.data["data-XP"].toString().replace(",",""); };
|
|
|
|
//SIZE, TYPE, ALIGNMENT
|
|
var type = "";
|
|
if(page.data["Size"]) { type = page.data["Size"] };
|
|
if(page.data["Type"]) { type = (type.length > 0) ? type + " " + page.data["Type"].toLowerCase() : page.data["Type"].toLowerCase(); };
|
|
if(page.data["Alignment"]) { type = (type.length > 0) ? type + ", " + page.data["Alignment"] : page.data["Alignment"]; };
|
|
update["npc_type"] = type;
|
|
|
|
["AC", "HP"].forEach((achp) => {
|
|
//console.log(`%c MONSTERS Drop: AC & HP ${achp}`, "color:cornflowerblue;");
|
|
const array = (achp === "AC") ? ["npc_ac", "npc_actype"] : ["hp_max", "npc_hpformula"];
|
|
if (page.data[`${achp}`] && page.data[`${achp}`].toString().indexOf("(") > -1) {
|
|
update[`${array[0]}`] = page.data[`${achp}`].toString().split(" (")[0];
|
|
update[`${array[1]}`] = page.data[`${achp}`].toString().split(" (")[1].slice(0, -1);
|
|
} else {
|
|
update[`${array[0]}`] = (page.data[`${achp}`]) ? page.data[`${achp}`] : "";
|
|
update[`${array[1]}`] = "";
|
|
};
|
|
});
|
|
|
|
var senses = page.data["Senses"] ? page.data["Senses"] : "";
|
|
if(page.data["Passive Perception"]) {
|
|
senses = (senses.length > 0) ? senses + ", passive Perception " + page.data["Passive Perception"] : "passive Perception " + page.data["Passive Perception"];
|
|
}
|
|
update["npc_senses"] = senses;
|
|
|
|
//SAVES & SKILLS
|
|
const npcSavesSkills = ["str_save", "dex_save", "con_save", "int_save", "wis_save", "cha_save",'acrobatics','animal_handling','eldertech','athletics','deception','history','insight','intimidation','investigation','materials','medicine','nature','perception','performance','persuasion','politics','religion','sleight_of_hand','stealth','survival'];
|
|
npcSavesSkills.forEach((attr) => {
|
|
update[`npc_${attr}_base`] = "";
|
|
});
|
|
["Saving Throws", "Skills"].forEach((attr) => {
|
|
//console.log(`%c MONSTERS Drop: Saving Throws & Skills: ${attr}`, "color:cornflowerblue;");
|
|
const array = (page.data[`${attr}`]) ? page.data[`${attr}`].split(", ") : [];
|
|
_.each(array, (entry) => {
|
|
const kv = (entry.indexOf("-") > -1) ? entry.split(" ") : entry.split(" +");
|
|
const attribute = (attr === "Saving Throws") ? kv[0].toLowerCase() + "_save" : kv[0].toLowerCase().split(' ').join('_');
|
|
update[`npc_${attribute}_base`] = parseInt(kv[1], 10);
|
|
});
|
|
(attr === "Saving Throws") ? callbacks.push(() => {update_npc_saves();} ) : callbacks.push(() => {update_npc_skills();} );
|
|
});
|
|
|
|
const npcRepeating = ['npcaction-l', 'npcreaction', 'npcaction', 'npctrait'];
|
|
_.each(npcRepeating, (section) => {
|
|
getSectionIDs(`repeating_${section}`, (idarray) => {
|
|
_.each(idarray, (currentID, i) => {
|
|
removeRepeatingRow(`repeating_${section}_${currentID}`);
|
|
});
|
|
});
|
|
});
|
|
// ACTIONS, LEGENDARY ACTIONS, REACTIONS, TRAITS
|
|
var contentarray = page.content;
|
|
if (page.data["data-Legendary Actions"]) {
|
|
const actionCount = (page.data["data-LANum"]) ? page.data["data-LANum"] : 3;
|
|
update["npc_legendary_actions"] = (page.data["data-LANum"]) ? page.data["data-LANum"] : 3;
|
|
if (page.data["Legendary Actions Desc"]) {
|
|
update["npc_legendary_actions_desc"] = page.data["Legendary Actions Desc"];
|
|
} else {
|
|
update["npc_legendary_actions_desc"] = `The ${page.name} can take ${actionCount}, choosing from the options below. Only one legendary option can be used at a time and only at the end of another creature's turn. The ${page.name} regains spent legendary actions at the start of its turn.`;
|
|
};
|
|
};
|
|
// ACTIONS & LEGENDARY ACTIONS
|
|
["Actions", "Legendary Actions"].forEach((attr) => {
|
|
if (page.data[`data-${attr}`]) {
|
|
const npcaction = (attr === "Actions") ? "npcaction" : "npcaction-l";
|
|
let actionsobj = {};
|
|
jsonparse(page.data[`data-${attr}`]).forEach((val) => { actionsobj[val.Name] = val; });
|
|
_.each(actionsobj, (action, name) => {
|
|
newrowid = generateRowID();
|
|
update[`repeating_${npcaction}_${newrowid}_npc_options-flag`] = "0";
|
|
update[`repeating_${npcaction}_${newrowid}_name`] = name;
|
|
(action["Desc"]) ? update[`repeating_${npcaction}_${newrowid}_description`] = action["Desc"] : false;
|
|
if(action["Type Attack"]) {
|
|
update[`repeating_${npcaction}_${newrowid}_attack_display_flag`] = "{{attack=1}}";
|
|
update[`repeating_${npcaction}_${newrowid}_attack_flag`] = "on";
|
|
update[`repeating_${npcaction}_${newrowid}_attack_options`] = "{{attack=1}}";
|
|
|
|
["Damage Type", "Damage", "Hit Bonus", "Reach", "Target", "Type"].forEach((attr) => {
|
|
if(action[`${attr}`]) {
|
|
const attributeName = (attr === "Hit Bonus") ? "tohit" : (attr === "Reach") ? "range" : attr.toLowerCase().replace(" ", "");
|
|
update[`repeating_${npcaction}_${newrowid}_attack_${attributeName}`] = action[`${attr}`];
|
|
};
|
|
});
|
|
|
|
if(action["Damage 2"] && action["Damage 2 Type"]) {
|
|
update[`repeating_${npcaction}_${newrowid}_attack_damage2`] = action["Damage 2"];
|
|
update[`repeating_${npcaction}_${newrowid}_attack_damagetype2`] = action["Damage 2 Type"];
|
|
}
|
|
}
|
|
});
|
|
(attr === "Actions") ? callbacks.push(() => {update_npc_action("all");} ) : false;
|
|
} else if(contentarray && contentarray.indexOf(`${attr}`) > -1) {
|
|
console.log(`%c ${attr} was not found for ${page.name}`, "color: orange;");
|
|
};
|
|
});
|
|
//REACTIONS
|
|
if (page.data["data-Reactions"]) {
|
|
update["npcreactionsflag"] = 1;
|
|
let reactionsobj = {};
|
|
jsonparse(page.data["data-Reactions"]).forEach((val) => { reactionsobj[val.Name] = val.Desc; });
|
|
_.each(reactionsobj, (desc, name) => {
|
|
newrowid = generateRowID();
|
|
update[`repeating_npcreaction_${newrowid}_name`] = name + ".";
|
|
if(desc.substring(0,2) === ": " || encodeURI(desc.substring(0,2)) === ":%C2%A0") {
|
|
desc = desc.substring(2);
|
|
};
|
|
update[`repeating_npcreaction_${newrowid}_desc`] = desc.trim();
|
|
});
|
|
} else if(contentarray && contentarray.indexOf("Reactions") > -1) {
|
|
console.log(`%c Reactions was not found for ${page.name}`, "color: orange;");
|
|
};
|
|
//TRAITS
|
|
if (page.data["data-Traits"]) {
|
|
//console.log(`%c MONSTERS Drop: NPC Traits`, "color:cornflowerblue;");
|
|
let traitsobj = {};
|
|
jsonparse(page.data["data-Traits"]).forEach((val) => {
|
|
traitsobj[val.Name] = (val.Name && val.Desc) ? val.Desc : "";
|
|
if (val.Name && val.Desc) {
|
|
traitsobj[val.Name] = val.Desc;
|
|
} else if (val.Name) {
|
|
traitsobj[val.Name] = "";
|
|
} else {
|
|
console.log(`%c Traits JSON is lacking a Name key`, "color: orange;")
|
|
};
|
|
});
|
|
_.each(traitsobj, (desc, name) => {
|
|
newrowid = generateRowID();
|
|
update[`repeating_npctrait_${newrowid}_name`] = name + ".";
|
|
if(desc.substring(0,2) === ": " || encodeURI(desc.substring(0,2)) === ":%C2%A0") {
|
|
desc = desc.substring(2);
|
|
}
|
|
update[`repeating_npctrait_${newrowid}_desc`] = desc.trim();
|
|
// SPELLCASTING NPCS
|
|
if(name === "Spellcasting") {
|
|
var lvl = parseInt(desc.substring(desc.indexOf("-level")-4, desc.indexOf("-level")-2).trim(), 10);
|
|
lvl = !isNaN(lvl) ? lvl : 1;
|
|
var ability = desc.match(/casting ability is (.*?) /);
|
|
ability = ability && ability.length > 1 ? ability[1] : false;
|
|
ability = ability ? "@{" + ability.toLowerCase() + "_mod}+" : "0*";
|
|
update["base_level"] = lvl;
|
|
update["caster_level"] = lvl;
|
|
update["class"] = "Wizard";
|
|
update["level"] = lvl;
|
|
update["npcspellcastingflag"] = 1;
|
|
update["spellcasting_ability"] = ability;
|
|
callbacks.push(() => {update_pb();} );
|
|
callbacks.push(() => {update_spell_slots();} );
|
|
}
|
|
//Githzerai in MToF have (Psionics)
|
|
if (name.includes("Innate Spellcasting")) {
|
|
const ability = (page.data["Spellcasting Ability"]) ? `@{${page.data["Spellcasting Ability"].toLowerCase()}_mod}+` : "0*";
|
|
update["npcspellcastingflag"] = 1;
|
|
update["spellcasting_ability"] = ability;
|
|
};
|
|
});
|
|
} else if(contentarray && contentarray.indexOf("Traits") > -1) {
|
|
console.log(`%c Traits was not found for ${page.name}`, "color: orange;");
|
|
};
|
|
//Spells
|
|
if (page.data["data-Spells"]) {
|
|
let spellsobj = [];
|
|
//Put together a list of spells to get from the Comepndium
|
|
["spells", "innate"].forEach((type) => {
|
|
let spellList = jsonparse(page.data["data-Spells"])[`${type}`];
|
|
if (spellList) {
|
|
Object.keys(spellList).map((objectKey, index) => {
|
|
spellList[objectKey].forEach((spell) => {
|
|
spellsobj.push(spell);
|
|
});
|
|
});
|
|
};
|
|
});
|
|
getCompendiumPage(spellsobj, (compendiumPages) => {
|
|
compendiumPages = removeDuplicatedPageData(compendiumPages);
|
|
const spellData = (compendiumPages.length === undefined || compendiumPages.length === 1) ? [compendiumPages] : compendiumPages;
|
|
const innate = (jsonparse(page.data["data-Spells"])[`innate`]) ? jsonparse(page.data["data-Spells"])[`innate`] : false;
|
|
let existing = {};
|
|
let update = [], callbacks = [];
|
|
|
|
spellData.forEach((page) => {
|
|
const spell = page.data;
|
|
const lvl = spell["Level"] && spell["Level"] > 0 ? spell["Level"] : "cantrip";
|
|
const newrowid = generateRowID();
|
|
const repeatingRow = `repeating_spell-${lvl}_${newrowid}`;
|
|
|
|
update[`${repeatingRow}_spelllevel`] = lvl;
|
|
update[`${repeatingRow}_spell_ability`] = (update["spellcasting_ability"]) ? update["spellcasting_ability"] : "spell";
|
|
(spell.Name) ? update[`${repeatingRow}_spellname`] = spell.Name : console.log(`%c ${JSON.stringify(page.name)} is incorrect. Update compendium data.`, "color: orange;");
|
|
update[`${repeatingRow}_spelloutput`] = (page.data["Damage"] || page.data["Healing"]) ? "ATTACK" : "SPELLCARD";
|
|
|
|
["spellclass", "spellsource", "data-description"].forEach((attr) => {
|
|
const suffix = (attr.includes("description")) ? "spelldescription" : attr;
|
|
(spell[`${attr}`]) ? update[`${repeatingRow}_${suffix}`] = spell[`${attr}`] : false;
|
|
});
|
|
|
|
["Add Casting Modifier", "Casting Time", "Concentration", "Damage Type", "Damage", "Duration", "Healing", "Material", "Range", "Ritual", "Save", "Save Success", "School", "Secondary Damage", "Secondary Damage Type", "Spell Attack", "Target"].forEach((attr) => {
|
|
if (spell[`${attr}`]) {
|
|
//Adjust the array entry to match the attribute name in the HTML
|
|
const name =
|
|
(attr === "Add Casting Modifier") ? "dmgmod" :
|
|
(attr === "Material") ? `comp_materials` :
|
|
(attr === "Spell Attack") ? `attack` :
|
|
(attr.includes("Secondary Damage")) ? attr.split("Secondary ")[0] + "2" :
|
|
attr;
|
|
const spellattribute = name.toLowerCase().replace(" ", "");
|
|
//Concentration, Ritual, and School are exceptions to norm
|
|
const updateValue =
|
|
(attr === "Concentration" || attr === "Ritual") ? `{{${spellattribute}=1}}` :
|
|
(attr === "School") ? spell["School"].toLowerCase() :
|
|
spell[`${attr}`];
|
|
update[`${repeatingRow}_spell${spellattribute}`] = updateValue;
|
|
};
|
|
});
|
|
|
|
["Higher Spell Slot Bonus", "Higher Spell Slot Desc", "Higher Spell Slot Dice", "Higher Spell Slot Die"].forEach((attr) => {
|
|
if (spell[`${attr}`]) {
|
|
const spellattribute = (attr.includes("Bonus")) ? "hlbonus" : (attr.includes("Desc")) ? "athigherlevels" : (attr.includes("Dice")) ? "hldie" : "hldietype";
|
|
update[`${repeatingRow}_spell${spellattribute}`] = spell[`${attr}`];
|
|
};
|
|
});
|
|
|
|
if (spell["Components"]) {
|
|
["v", "s", "m"].forEach((comp) => {
|
|
if (spell["Components"].toLowerCase().indexOf(comp) === -1) {update[`${repeatingRow}_spellcomp_${comp}`] = "0"};
|
|
});
|
|
};
|
|
|
|
if(page.data["Damage"] || page.data["Healing"]) {
|
|
//This needs to run the create_attack_from_spell
|
|
callbacks.push(() => { create_attack_from_spell(lvl, newrowid, currentData.character_id); });
|
|
} else if (page.data["Higher Spell Slot Desc"] && page.data["Higher Spell Slot Desc"] != "") {
|
|
//This needs to run the update_spelloutput
|
|
};
|
|
|
|
if (spell["data-Cantrip Scaling"] && lvl == "cantrip") {
|
|
update[`${repeatingRow}_spell_damage_progression`] = "Cantrip " + spell["data-Cantrip Scaling"].charAt(0).toUpperCase() + spell["data-Cantrip Scaling"].slice(1);
|
|
};
|
|
|
|
if (innate) {
|
|
const spellName = (spell.Name).toLowerCase();
|
|
//Search each keys in INNATE to see if spell name === one of the Values
|
|
Object.keys(innate).map((objectKey, index) => {
|
|
innate[objectKey].forEach((spell) => {
|
|
(spell === spellName) ? update[`${repeatingRow}_innate`] = objectKey : false;
|
|
});
|
|
});
|
|
};
|
|
|
|
update[`${repeatingRow}_options-flag`] = "0";
|
|
});
|
|
|
|
setAttrs(update, {silent: true}, () => {
|
|
callbacks.forEach((callback) => {
|
|
callback();
|
|
})
|
|
});
|
|
|
|
return {
|
|
callbacks: callbacks
|
|
};
|
|
});
|
|
};
|
|
};
|
|
if(category === "Feats") {
|
|
update["tab"] = "core";
|
|
var match = {name: page.name};
|
|
var existing = _.findWhere(repeating.traits, match);
|
|
var newrowid = generateRowID();
|
|
if(existing) {
|
|
newrowid = existing.id;
|
|
existing.name = page.name;
|
|
existing.source = "Feat";
|
|
existing.type = page.data["Properties"] ? page.data["Properties"] : "";
|
|
} else {
|
|
var newtrait = {};
|
|
newtrait.id = newrowid;
|
|
newtrait.name = page.name;
|
|
newtrait.source = "Feat";
|
|
newtrait.type = page.data["Properties"] ? page.data["Properties"] : "";
|
|
repeating.traits.push(newtrait);
|
|
}
|
|
if(page.name) {update[`repeating_traits_${newrowid}_name`] = page.name};
|
|
if(page.content) {update[`repeating_traits_${newrowid}_description`] = page.content};
|
|
update[`repeating_traits_${newrowid}_source`] = "Feat";
|
|
update[`repeating_traits_${newrowid}_source_type`] = page.data["Properties"] ? page.data["Properties"] : "";
|
|
update[`repeating_traits_${newrowid}_options-flag`] = "0";
|
|
update[`repeating_traits_${newrowid}_display_flag`] = "on";
|
|
};
|
|
if(category === "Proficiencies") {
|
|
var newrowid = generateRowID();
|
|
var type = page.data["Type"] || "";
|
|
if (type.toLowerCase() === "language" || type.toLowerCase() === "armor" || type.toLowerCase() === "weapon" || type.toLowerCase() === "other") {
|
|
if( repeating.prof_names.indexOf(page.name.toLowerCase()) == -1 ) {
|
|
update[`repeating_proficiencies_${newrowid}_prof_type`] = type.replace("custom", "").toUpperCase();
|
|
update[`repeating_proficiencies_${newrowid}_name`] = page.name;
|
|
update[`repeating_proficiencies_${newrowid}_options-flag`] = 0;
|
|
repeating.prof_names.push(page.name.toLowerCase());
|
|
};
|
|
} else if(type.toLowerCase() === "tool" || type.toLowerCase() === "skillcustom") {
|
|
let existing = {};
|
|
_.each(repeating.tool, (tool, id) => {
|
|
if(tool.toolname == page.name.toLowerCase()) {
|
|
newrowid = id;
|
|
existing = tool;
|
|
}
|
|
});
|
|
if(!existing.toolname) repeating.tool[newrowid] = {toolname: page.name.toLowerCase()}
|
|
update[`repeating_tool_${newrowid}_toolname`] = page.name;
|
|
if(!existing.base) update[`repeating_tool_${newrowid}_toolattr_base`] = "?{Attribute?|Strength,@{strength_mod}|Dexterity,@{dexterity_mod}|Constitution,@{constitution_mod}|Intelligence,@{intelligence_mod}|Wisdom,@{wisdom_mod}|Charisma,@{charisma_mod}}";
|
|
update[`repeating_tool_${newrowid}_options-flag`] = 0;
|
|
if(page.data["toolbonus_base"]) update[`repeating_tool_${newrowid}_toolbonus_base`] = "(@{pb}*2)";
|
|
repeating.prof_names.push(page.name.toLowerCase());
|
|
callbacks.push( function() {update_tool(newrowid);} );
|
|
}
|
|
if(type.toLowerCase() === "skill") {
|
|
var skill_string = page.name.toLowerCase().replace(/ /g, '_');
|
|
update[`${skill_string}_prof`] = `(@{pb}*@{${skill_string}_type})`;
|
|
};
|
|
};
|
|
if(category === "Classes") {
|
|
update["tab"] = "core";
|
|
if(page.data.multiclass) {
|
|
if(page.name && page.name !== "") { update[page.data.multiclass] = page.name; }
|
|
update[page.data.multiclass + "_flag"] = "1";
|
|
classlevel = parseInt(currentData[page.data.multiclass + "_lvl"]);
|
|
} else {
|
|
if(page.name && page.name !== "") { update["class"] = page.name; }
|
|
if(page.data["Hit Die"] && page.data["Hit Die"] !== "") {
|
|
update["base_level"] = currentData.base_level ? currentData.base_level : "1";
|
|
update["hit_dice_max"] = update["base_level"] + page.data["Hit Die"];
|
|
update["hit_dice"] = update["base_level"];
|
|
}
|
|
if(page.data["Spellcasting Ability"] && page.data["Spellcasting Ability"] !== "") {
|
|
update["spellcasting_ability"] = "@{" + page.data["Spellcasting Ability"].toLowerCase() + "_mod}+";
|
|
}
|
|
}
|
|
if(page.data["data-Saving Throws"] && !page.data.multiclass) {
|
|
var saves = jsonparse(page.data["data-Saving Throws"]);
|
|
_.each(saves, function(value) {
|
|
update[value.toLowerCase() + "_save_prof"] = "(@{pb})";
|
|
});
|
|
}
|
|
|
|
if(!looped) {
|
|
callbacks.push(update_class);
|
|
}
|
|
};
|
|
if(category === "Subclasses") {
|
|
if(page.data.multiclass) {
|
|
if(page.name && page.name !== "") { update[page.data.multiclass + "_subclass"] = page.name; }
|
|
classlevel = parseInt(currentData[page.data.multiclass + "_lvl"]);
|
|
} else {
|
|
if(page.name && page.name !== "") { update["subclass"] = page.name; };
|
|
}
|
|
if(page.data["Spellcasting Ability"]) {
|
|
if(page.data.Class == "Fighter") {
|
|
update["arcane_fighter"] = "1";
|
|
} else if(page.data.Class == "Rogue") {
|
|
update["arcane_rogue"] = "1";
|
|
}
|
|
}
|
|
if(!looped) {
|
|
callbacks.push(update_class);
|
|
};
|
|
};
|
|
if(category === "Races" || category === "Subraces") {
|
|
update["tab"] = "core";
|
|
if(category === "Races") {
|
|
update["race"] = page.name;
|
|
if (page.name == "Halfling") {
|
|
update["halflingluck_flag"] = "1";
|
|
}
|
|
}
|
|
else {
|
|
update["subrace"] = page.name;
|
|
};
|
|
if(page.data["Speed"]) {update["speed"] = page.data["Speed"]};
|
|
if(page.data["Size"]) {update["size"] = page.data["Size"]};
|
|
if(!looped) {
|
|
callbacks.push(update_race_display);
|
|
}
|
|
};
|
|
if(category === "Backgrounds") {
|
|
update["tab"] = "core";
|
|
if(page.name && page.name !== "") { update["background"] = page.name; };
|
|
};
|
|
|
|
if(page.data.theseblobs) {
|
|
_.each(page.data.theseblobs, function(blobname) {
|
|
if(page.data.blobs[blobname]) blobs[blobname] = page.data.blobs[blobname];
|
|
});
|
|
} else {
|
|
blobs = filterBlobs(page.data.blobs, {"Level": "1"});
|
|
}
|
|
_.each(blobs, function(blob, blobname) {
|
|
if(blob["Traits"]) {
|
|
var traitsource = "";
|
|
switch (category) {
|
|
case "Races":
|
|
case "Subraces":
|
|
traitsource = "Racial";
|
|
break;
|
|
case "Classes":
|
|
case "Subclasses":
|
|
traitsource = "Class";
|
|
break;
|
|
default:
|
|
traitsource = "Background";
|
|
}
|
|
var trait_array = jsonparse(blob["Traits"]);
|
|
if(trait_array && trait_array.length) {
|
|
_.each(trait_array, function(trait) {
|
|
if(!trait.Input) {
|
|
var match = {name: trait["Name"], type: page.name};
|
|
if(trait["Replace"]) {
|
|
match = {name: trait["Replace"]};
|
|
}
|
|
var existing = _.findWhere(repeating.traits, match);
|
|
if(existing) {
|
|
newrowid = existing.id;
|
|
existing.name = trait["Name"];
|
|
existing.source = traitsource;
|
|
existing.type = page.name;
|
|
} else {
|
|
var newtrait = {};
|
|
newrowid = generateRowID();
|
|
newtrait.id = newrowid;
|
|
newtrait.name = trait["Name"];
|
|
newtrait.source = traitsource;
|
|
newtrait.type = page.name;
|
|
repeating.traits.push(newtrait);
|
|
}
|
|
update["repeating_traits_" + newrowid + "_name"] = trait["Name"].replace(/{{Input}}/g, "");
|
|
update["repeating_traits_" + newrowid + "_description"] = trait["Desc"] ? trait["Desc"].replace(/{{Input}}/g, "") : "";
|
|
update["repeating_traits_" + newrowid + "_source"] = removeExpansionInfo(traitsource);
|
|
update["repeating_traits_" + newrowid + "_source_type"] = page.name ? removeExpansionInfo(page.name) : "";
|
|
update["repeating_traits_" + newrowid + "_options-flag"] = 0;
|
|
update["repeating_traits_" + newrowid + "_display_flag"] = "on";
|
|
}
|
|
});
|
|
};
|
|
};
|
|
if(blob["Language Proficiency"] || blob["Weapon Proficiency"] || blob["Armor Proficiency"] || blob["Tool Proficiency"]) {
|
|
if(blob["Language Proficiency"]) {
|
|
var lang_array = jsonparse(blob["Language Proficiency"]);
|
|
if(lang_array["Proficiencies"] && lang_array["Proficiencies"].length) {
|
|
_.each(lang_array["Proficiencies"], function(prof) {
|
|
if( repeating.prof_names.indexOf(prof.toLowerCase()) == -1 ) {
|
|
newrowid = generateRowID();
|
|
update["repeating_proficiencies_" + newrowid + "_prof_type"] = "LANGUAGE";
|
|
update["repeating_proficiencies_" + newrowid + "_name"] = prof;
|
|
update["repeating_proficiencies_" + newrowid + "_options-flag"] = 0;
|
|
repeating.prof_names.push(prof.toLowerCase());
|
|
}
|
|
});
|
|
}
|
|
};
|
|
if(blob["Weapon Proficiency"]) {
|
|
var weap_array = jsonparse(blob["Weapon Proficiency"]);
|
|
if(weap_array["Proficiencies"] && weap_array["Proficiencies"].length) {
|
|
_.each(weap_array["Proficiencies"], function(prof) {
|
|
if( repeating.prof_names.indexOf(prof.toLowerCase()) == -1 ) {
|
|
newrowid = generateRowID();
|
|
update["repeating_proficiencies_" + newrowid + "_prof_type"] = "WEAPON";
|
|
update["repeating_proficiencies_" + newrowid + "_name"] = prof;
|
|
update["repeating_proficiencies_" + newrowid + "_options-flag"] = 0;
|
|
repeating.prof_names.push(prof.toLowerCase());
|
|
}
|
|
});
|
|
}
|
|
};
|
|
if(blob["Armor Proficiency"]) {
|
|
var armor_array = jsonparse(blob["Armor Proficiency"]);
|
|
if(armor_array["Proficiencies"] && armor_array["Proficiencies"].length) {
|
|
_.each(armor_array["Proficiencies"], function(prof) {
|
|
if( repeating.prof_names.indexOf(prof.toLowerCase()) == -1 ) {
|
|
newrowid = generateRowID();
|
|
update["repeating_proficiencies_" + newrowid + "_prof_type"] = "ARMOR";
|
|
update["repeating_proficiencies_" + newrowid + "_name"] = prof;
|
|
update["repeating_proficiencies_" + newrowid + "_options-flag"] = 0;
|
|
repeating.prof_names.push(prof.toLowerCase());
|
|
}
|
|
});
|
|
}
|
|
};
|
|
if(blob["Tool Proficiency"]) {
|
|
var tool_array = jsonparse(blob["Tool Proficiency"]);
|
|
if(tool_array["Proficiencies"] && tool_array["Proficiencies"].length) {
|
|
_.each(tool_array["Proficiencies"], function(prof) {
|
|
//D&D 5e Mancer: Land Vehicles proficiency does not drop with Marine background (UC748)
|
|
//Generating ID that was coming empty for not existing rows.
|
|
//By Miguel Peres
|
|
let newrowid = generateRowID();
|
|
|
|
let existing = {};
|
|
_.each(repeating.tool, function(tool, id) {
|
|
if(tool.toolname == prof.toLowerCase()) {
|
|
newrowid = id;
|
|
existing = tool;
|
|
}
|
|
});
|
|
if(!existing.toolname) repeating.tool[newrowid] = {toolname: prof.toLowerCase()}
|
|
update["repeating_tool_" + newrowid + "_toolname"] = prof;
|
|
if(!existing.base) update["repeating_tool_" + newrowid + "_toolattr_base"] = "?{Attribute?|Strength,@{strength_mod}|Dexterity,@{dexterity_mod}|Constitution,@{constitution_mod}|Intelligence,@{intelligence_mod}|Wisdom,@{wisdom_mod}|Charisma,@{charisma_mod}}";
|
|
update["repeating_tool_" + newrowid + "_options-flag"] = 0;
|
|
repeating.prof_names.push(page.name.toLowerCase());
|
|
callbacks.push( function() {update_tool(newrowid);} );
|
|
});
|
|
}
|
|
};
|
|
};
|
|
if(blob["Skill Proficiency"]) {
|
|
var skill_array = jsonparse(blob["Skill Proficiency"]);
|
|
if(skill_array["Proficiencies"] && skill_array["Proficiencies"].length) {
|
|
_.each(skill_array["Proficiencies"], function(prof) {
|
|
var skill_string = prof.toLowerCase().replace(/ /g, '_');
|
|
update[skill_string + "_prof"] = "(@{pb}*@{" + skill_string + "_type})";
|
|
});
|
|
};
|
|
};
|
|
if(blob["Actions"]) {
|
|
var actionsobj = {};
|
|
jsonparse(blob["Actions"]).forEach(function(val) { actionsobj[val.Name] = val; });
|
|
_.each(actionsobj, function(action, name) {
|
|
newrowid = generateRowID();
|
|
_.each(repeating.attack, function(atk, atkid) {
|
|
if(atk.atkname === name) newrowid = atkid;
|
|
});
|
|
update["repeating_attack_" + newrowid + "_options-flag"] = "0";
|
|
update["repeating_attack_" + newrowid + "_atkname"] = name;
|
|
if(action["Desc"]) {
|
|
update["repeating_attack_" + newrowid + "_atk_desc"] = action["Desc"];
|
|
}
|
|
|
|
if(action["Type Attack"]) {
|
|
if (action["Type"] == "Spell") {
|
|
update["repeating_attack_" + newrowid + "_atkflag"] = "0";
|
|
update["repeating_attack_" + newrowid + "_attack_options"] = "";
|
|
update["repeating_attack_" + newrowid + "_saveflag"] = "{{save=1}} {{saveattr=@{saveattr}}} {{savedesc=@{saveeffect}}} {{savedc=[[[[@{savedc}]][SAVE]]]}}"
|
|
} else {
|
|
update["repeating_attack_" + newrowid + "_attack_flag"] = "on";
|
|
update["repeating_attack_" + newrowid + "_atkflag"] = "{{attack=1}}";
|
|
update["repeating_attack_" + newrowid + "_attack_options"] = "{{attack=1}}";
|
|
}
|
|
if(action["Reach"]) { update["repeating_attack_" + newrowid + "_atkrange"] = action["Reach"]; }
|
|
|
|
if(action["Damage"]) { update["repeating_attack_" + newrowid + "_dmgbase"] = action["Damage"]; }
|
|
if(action["Damage Type"]) { update["repeating_attack_" + newrowid + "_dmgtype"] = action["Damage Type"]; }
|
|
if (action["Modifier"]) {
|
|
update["repeating_attack_" + newrowid + "_dmgattr"] = modStringToAttrib(action["Modifier"]);
|
|
update["repeating_attack_" + newrowid + "_atkattr_base"] = modStringToAttrib(action["Modifier"]);
|
|
} else {
|
|
update["repeating_attack_" + newrowid + "_dmgattr"] = "0";
|
|
}
|
|
if (action["Save"]) { update["repeating_attack_" + newrowid + "_saveattr"] = action["Save"] }
|
|
if (action["Save DC"]) { update["repeating_attack_" + newrowid + "_savedc"] = "(" + modStringToAttrib(action["Save DC"]) + "+8+@{pb})" }
|
|
if (action["Save Effect"]) { update["repeating_attack_" + newrowid + "_saveeffect"] = action["Save Effect"] }
|
|
|
|
if(action["Damage 2"] && action["Damage 2 Type"]) {
|
|
update["repeating_attack_" + newrowid + "_dmg2flag"] = "{{damage=1}} {{dmg2flag=1}}";
|
|
update["repeating_attack_" + newrowid + "_atk_dmg2base"] = action["Damage 2"];
|
|
update["repeating_attack_" + newrowid + "_attack_damagetype2"] = action["Damage 2 Type"];
|
|
if (action["Modifier 2"]) {
|
|
update["repeating_attack_" + newrowid + "_dmg2attr"] = modStringToAttrib(action["Modifier 2"]);
|
|
} else {
|
|
update["repeating_attack_" + newrowid + "_dmgattr"] = "0";
|
|
}
|
|
}
|
|
}
|
|
});
|
|
};
|
|
if(blob["Global Damage"]) {
|
|
var dmgmod = jsonparse(blob["Global Damage"]);
|
|
var id = generateRowID();
|
|
_.each(repeating.damagemod, function(name, rowid) {
|
|
if(name.toLowerCase() === dmgmod["Name"].toLowerCase()) id = rowid;
|
|
});
|
|
update["repeating_damagemod_" + id + "_global_damage_name"] = `${dmgmod["Name"]}`;
|
|
update["repeating_damagemod_" + id + "_global_damage_damage"] = `${parseValues(dmgmod["Damage"])}`;
|
|
if(dmgmod["Active"] == "true") update["repeating_damagemod_" + id + "_global_damage_active_flag"] = "1";
|
|
update["repeating_damagemod_" + id + "_options-flag"] = "0";
|
|
update["repeating_damagemod_" + id + "_global_damage_type"] = dmgmod["Type"] ? dmgmod["Type"] : dmgmod["Name"];
|
|
update["global_damage_mod_flag"] = "1";
|
|
repeating.damagemod[id] = dmgmod["Name"];
|
|
};
|
|
if(blob["Resources"]) {
|
|
var resources = jsonparse(blob["Resources"]);
|
|
_.each(resources, function(value) {
|
|
var section = "";
|
|
if(currentData["class_resource_name"] == "" || currentData["class_resource_name"] == value["Name"]) {
|
|
section = "class_resource";
|
|
} else if (currentData["other_resource_name"] == "" || currentData["other_resource_name"] == value["Name"]) {
|
|
section = "other_resource";
|
|
} else {
|
|
_.each(repeating.resource, function(resource, id) {
|
|
if(resource.left == "" && section == "" || resource.left == value["Name"]) {
|
|
section = "repeating_resource_" + id + "_resource_left";
|
|
}
|
|
if(resource.right == "" && section == "" || resource.right == value["Name"]) {
|
|
section = "repeating_resource_" + id + "_resource_right";
|
|
}
|
|
})
|
|
}
|
|
if(section === "") {
|
|
var id = generateRowID();
|
|
section = "repeating_resource_" + id + "_resource_left";
|
|
repeating.resource[id] = {left: value["Name"], right: ""};
|
|
}
|
|
update[section + "_name"] = value["Name"];
|
|
if(value["Uses"]) update[section] = numUses(value["Uses"]);
|
|
update[section + "_max"] = value["Max"] ? numUses(value["Max"]) : numUses(value["Uses"]);
|
|
});
|
|
};
|
|
if(blob["Custom AC"]) {
|
|
var customac = jsonparse(blob["Custom AC"]);
|
|
update["custom_ac_flag"] = "1";
|
|
update["custom_ac_base"] = customac.Base;
|
|
update["custom_ac_part1"] = customac["Attribute 1"];
|
|
update["custom_ac_part2"] = customac["Attribute 2"] ? customac["Attribute 2"] : "";
|
|
update["custom_ac_shield"] = customac.Shields;
|
|
if(!looped) {
|
|
callbacks.push( function() {update_ac();} )
|
|
}
|
|
};
|
|
if(blob["Hit Points Per Level"]) {
|
|
var id = generateRowID();
|
|
update["repeating_hpmod_" + id + "_mod"] = blob["Hit Points Per Level"];
|
|
update["repeating_hpmod_" + id + "_source"] = page.name ? page.name : "Subclass";
|
|
if(category === "Races" || category === "Subraces") {
|
|
update["repeating_hpmod_" + id + "_levels"] = "total";
|
|
} else {
|
|
update["repeating_hpmod_" + id + "_levels"] = "base";
|
|
}
|
|
};
|
|
if(blob["Global AC Mod"]) {
|
|
var globalac = jsonparse(blob["Global AC Mod"]);
|
|
var id = generateRowID();
|
|
_.each(repeating.acmod, function(name, rowid) {
|
|
if(name.toLowerCase() === globalac["Name"].toLowerCase()) id = rowid;
|
|
});
|
|
update["repeating_acmod_" + id + "_global_ac_val"] = globalac.Bonus;
|
|
if(globalac["Active"] !== "false") update["repeating_acmod_" + id + "_global_ac_active_flag"] = "1";
|
|
update["repeating_acmod_" + id + "_options-flag"] = "0";
|
|
update["repeating_acmod_" + id + "_global_ac_name"] = globalac.Name;
|
|
update["global_ac_mod_flag"] = "1";
|
|
};
|
|
if(blob["Global Save"]) {
|
|
var globalsave = jsonparse(blob["Global Save Mod"]);
|
|
var id = generateRowID();
|
|
_.each(repeating.savemod, function(name, rowid) {
|
|
if(name.toLowerCase() === globalsave["Name"].toLowerCase()) id = rowid;
|
|
});
|
|
update["repeating_savemod_" + id + "_global_save_roll"] = globalsave.Bonus;
|
|
if(globalsave["Active"] !== "false") update["repeating_savemod_" + id + "_global_save_active_flag"] = "1";
|
|
update["repeating_savemod_" + id + "_options-flag"] = "0";
|
|
update["repeating_savemod_" + id + "_global_save_name"] = globalsave.Name;
|
|
update["global_save_mod_flag"] = "1";
|
|
}
|
|
if(blob["Global Attack"]) {
|
|
var globalattack = jsonparse(blob["Global Attack"]);
|
|
var id = generateRowID();
|
|
_.each(repeating.tohitmod, function(name, rowid) {
|
|
if(name.toLowerCase() === globalattack["Name"].toLowerCase()) id = rowid;
|
|
});
|
|
update["repeating_tohitmod_" + id + "_global_attack_rollstring"] = `${globalattack["Bonus"]}[${globalattack["Name"]}]`;
|
|
if(globalattack["Active"] !== "false") update["repeating_tohitmod_" + id + "_global_attack_active_flag"] = "1";
|
|
update["repeating_tohitmod_" + id + "_options-flag"] = "0";
|
|
update["global_attack_mod_flag"] = "1";
|
|
};
|
|
if(blob["Initiative"]) {
|
|
if(blob["Initiative"].toLowerCase() === "advantage") {
|
|
update["initiative_style"] = "{@{d20},@{d20}}kh1";
|
|
} else if (blob["Initiative"].toLowerCase() === "disadvantage") {
|
|
update["initiative_style"] = "{@{d20},@{d20}}kl1";
|
|
} else {
|
|
update.initmod = numUses(blob["Initiative"]);
|
|
}
|
|
};
|
|
if(blob["Carry Multiplier"]) {
|
|
update["carrying_capacity_mod"] = "*" + blob["Carry Multiplier"];
|
|
};
|
|
if(blob["Speed"]) {
|
|
if(blob["Speed"][0] === "+") {
|
|
let prevspeed = update["speed"] || currentData["speed"];
|
|
prevspeed = prevspeed && !isNaN(parseInt(prevspeed)) ? parseInt(prevspeed) : 0;
|
|
update["speed"] = prevspeed + parseInt(blob["Speed"]);
|
|
} else {
|
|
update["speed"] = parseInt(blob["Speed"]);
|
|
}
|
|
};
|
|
if(blob["Jack of All Trades"]) {
|
|
update["jack_of_all_trades"] = "@{jack}";
|
|
};
|
|
if(blob["Saving Throws"]) {
|
|
var saves = jsonparse(blob["Saving Throws"]);
|
|
_.each(saves, function(value) {
|
|
update[value.toLowerCase() + "_save_prof"] = "(@{pb})";
|
|
});
|
|
};
|
|
if(blob["Custom Spells"]) {
|
|
let spells = jsonparse(blob["Custom Spells"]);
|
|
_.each(spells, function(spell) {
|
|
var lvl = spell["Level"] && spell["Level"] > 0 ? spell["Level"] : "cantrip";
|
|
let id = generateRowID();
|
|
if(repeating["spell-" + lvl]) {
|
|
_.each(repeating["spell-" + lvl], function(spell, spellid) {
|
|
if(spell.spellname.toLowerCase() === page.name.toLowerCase()) {
|
|
id = spellid;
|
|
}
|
|
});
|
|
}
|
|
update["repeating_spell-" + lvl + "_" + id + "_spelllevel"] = lvl;
|
|
if(spell["spellcasting_ability"]) {
|
|
update["repeating_spell-" + lvl + "_" + id + "_spell_ability"] = "@{" + spell["spellcasting_ability"].toLowerCase() + "_mod}+";;
|
|
} else {
|
|
update["repeating_spell-" + lvl + "_" + id + "_spell_ability"] = "spell";
|
|
}
|
|
if(spell["spellclass"]) {
|
|
update["repeating_spell-" + lvl + "_" + id + "_spellclass"] = spell["spellclass"];
|
|
}
|
|
if(spell["spellsource"]) {
|
|
update["repeating_spell-" + lvl + "_" + id + "_spellsource"] = spell["spellsource"];
|
|
}
|
|
update["repeating_spell-" + lvl + "_" + id + "_spellname"] = spell.Name;
|
|
if(spell["Ritual"]) {update["repeating_spell-" + lvl + "_" + id + "_spellritual"] = "{{ritual=1}}"};
|
|
if(spell["School"]) {update["repeating_spell-" + lvl + "_" + id + "_spellschool"] = spell["School"].toLowerCase()};
|
|
if(spell["Casting Time"]) {update["repeating_spell-" + lvl + "_" + id + "_spellcastingtime"] = spell["Casting Time"]};
|
|
if(spell["Range"]) {update["repeating_spell-" + lvl + "_" + id + "_spellrange"] = spell["Range"]};
|
|
if(spell["Target"]) {update["repeating_spell-" + lvl + "_" + id + "_spelltarget"] = spell["Target"]};
|
|
if(spell["Components"]) {
|
|
if(spell["Components"].toLowerCase().indexOf("v") === -1) {update["repeating_spell-" + lvl + "_" + id + "_spellcomp_v"] = "0"};
|
|
if(spell["Components"].toLowerCase().indexOf("s") === -1) {update["repeating_spell-" + lvl + "_" + id + "_spellcomp_s"] = "0"};
|
|
if(spell["Components"].toLowerCase().indexOf("m") === -1) {update["repeating_spell-" + lvl + "_" + id + "_spellcomp_m"] = "0"};
|
|
};
|
|
if(spell["Material"]) {update["repeating_spell-" + lvl + "_" + id + "_spellcomp_materials"] = spell["Material"]};
|
|
if(spell["Concentration"]) {update["repeating_spell-" + lvl + "_" + id + "_spellconcentration"] = "{{concentration=1}}"};
|
|
if(spell["Duration"]) {update["repeating_spell-" + lvl + "_" + id + "_spellduration"] = spell["Duration"]};
|
|
if(spell["Damage"] || spell["Healing"]) {
|
|
update["repeating_spell-" + lvl + "_" + id + "_spelloutput"] = "ATTACK";
|
|
callbacks.push( function() {create_attack_from_spell(lvl, id, currentData.character_id);} );
|
|
}
|
|
else if(spell["Higher Spell Slot Desc"] && spell["Higher Spell Slot Desc"] != "") {
|
|
var spelllevel = "?{Cast at what level?";
|
|
for(i = 0; i < 10-lvl; i++) {
|
|
spelllevel = spelllevel + "|Level " + (parseInt(i, 10) + parseInt(lvl, 10)) + "," + (parseInt(i, 10) + parseInt(lvl, 10));
|
|
}
|
|
spelllevel = spelllevel + "}";
|
|
update["repeating_spell-" + lvl + "_" + id + "_rollcontent"] = `@{wtype}&{template:spell} {{level=@{spellschool} ${spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} {{innate=@{innate}}} @{spellconcentration} @{charname_output} {{licensedsheet=@{licensedsheet}}}`;
|
|
};
|
|
if(spell["Spell Attack"]) {update["repeating_spell-" + lvl + "_" + id + "_spellattack"] = spell["Spell Attack"]};
|
|
if(spell["Damage"]) {update["repeating_spell-" + lvl + "_" + id + "_spelldamage"] = spell["Damage"]};
|
|
if(spell["Damage Type"]) {update["repeating_spell-" + lvl + "_" + id + "_spelldamagetype"] = spell["Damage Type"]};
|
|
if(spell["Secondary Damage"]) {update["repeating_spell-" + lvl + "_" + id + "_spelldamage2"] = spell["Secondary Damage"]};
|
|
if(spell["Secondary Damage Type"]) {update["repeating_spell-" + lvl + "_" + id + "_spelldamagetype2"] = spell["Secondary Damage Type"]};
|
|
if(spell["Healing"]) {update["repeating_spell-" + lvl + "_" + id + "_spellhealing"] = spell["Healing"];};
|
|
if(spell["Add Casting Modifier"]) {update["repeating_spell-" + lvl + "_" + id + "_spelldmgmod"] = spell["Add Casting Modifier"]};
|
|
if(spell["Save"]) {update["repeating_spell-" + lvl + "_" + id + "_spellsave"] = spell["Save"]};
|
|
if(spell["Save Success"]) {update["repeating_spell-" + lvl + "_" + id + "_spellsavesuccess"] = spell["Save Success"]};
|
|
if(spell["Higher Spell Slot Dice"]) {update["repeating_spell-" + lvl + "_" + id + "_spellhldie"] = spell["Higher Spell Slot Dice"]};
|
|
if(spell["Higher Spell Slot Die"]) {update["repeating_spell-" + lvl + "_" + id + "_spellhldietype"] = spell["Higher Spell Slot Die"]};
|
|
if(spell["Higher Spell Slot Bonus"]) {update["repeating_spell-" + lvl + "_" + id + "_spellhlbonus"] = spell["Higher Spell Slot Bonus"]};
|
|
if(spell["Higher Spell Slot Desc"]) {update["repeating_spell-" + lvl + "_" + id + "_spellathigherlevels"] = spell["Higher Spell Slot Desc"]};
|
|
if(spell["data-Cantrip Scaling"] && lvl == "cantrip") {update["repeating_spell-" + lvl + "_" + id + "_spell_damage_progression"] = "Cantrip " + spell["data-Cantrip Scaling"].charAt(0).toUpperCase() + spell["data-Cantrip Scaling"].slice(1);};
|
|
if(spell["data-description"]) { update["repeating_spell-" + lvl + "_" + id + "_spelldescription"] = spell["data-description"]};
|
|
update["repeating_spell-" + lvl + "_" + id + "_options-flag"] = "0";
|
|
})
|
|
};
|
|
if(blob["Global Save Mod"]) {
|
|
update["globalsavemod"] = numUses(blob["Global Save Mod"]);
|
|
};
|
|
if(blob["Proficiency Bonus"]) {
|
|
var bonus = jsonparse(blob["Proficiency Bonus"]);
|
|
_.each(bonus, function(value, prof) {
|
|
update[prof.replace(/ /g, "_").toLowerCase() + "_flat"] = numUses(value);
|
|
});
|
|
};
|
|
/**/
|
|
});
|
|
|
|
return {
|
|
update: update,
|
|
repeating: repeating,
|
|
callbacks: callbacks
|
|
};
|
|
};
|
|
|
|
var check_itemmodifiers = function(modifiers, previousValue) {
|
|
var mods = modifiers.toLowerCase().split(",");
|
|
if(previousValue) {
|
|
prevmods = previousValue.toLowerCase().split(",");
|
|
mods = _.union(mods, prevmods);
|
|
};
|
|
_.each(mods, function(mod) {
|
|
if(mod.indexOf("ac:") > -1 || mod.indexOf("ac +") > -1 || mod.indexOf("ac -") > -1) {update_ac();};
|
|
if(mod.indexOf("spell") > -1) {update_spell_info();};
|
|
if(mod.indexOf("saving throws") > -1) {update_all_saves();};
|
|
if(mod.indexOf("strength save") > -1) {update_save("strength");} else if(mod.indexOf("strength") > -1) {update_attr("strength");};
|
|
if(mod.indexOf("dexterity save") > -1) {update_save("dexterity");} else if(mod.indexOf("dexterity") > -1) {update_attr("dexterity");};
|
|
if(mod.indexOf("constitution save") > -1) {update_save("constitution");} else if(mod.indexOf("constitution") > -1) {update_attr("constitution");};
|
|
if(mod.indexOf("intelligence save") > -1) {update_save("intelligence");} else if(mod.indexOf("intelligence") > -1) {update_attr("intelligence");};
|
|
if(mod.indexOf("wisdom save") > -1) {update_save("wisdom");} else if(mod.indexOf("wisdom") > -1) {update_attr("wisdom");};
|
|
if(mod.indexOf("charisma save") > -1) {update_save("charisma");} else if(mod.indexOf("charisma") > -1) {update_attr("charisma");};
|
|
if(mod.indexOf("ability checks") > -1) {update_all_ability_checks();};
|
|
if(mod.indexOf("acrobatics") > -1) {update_skills(["acrobatics"]);};
|
|
if(mod.indexOf("animal handling") > -1) {update_skills(["animal_handling"]);};
|
|
if(mod.indexOf("eldertech") > -1) {update_skills(["eldertech"]);};
|
|
if(mod.indexOf("athletics") > -1) {update_skills(["athletics"]);};
|
|
if(mod.indexOf("deception") > -1) {update_skills(["deception"]);};
|
|
if(mod.indexOf("history") > -1) {update_skills(["history"]);};
|
|
if(mod.indexOf("insight") > -1) {update_skills(["insight"]);};
|
|
if(mod.indexOf("intimidation") > -1) {update_skills(["intimidation"]);};
|
|
if(mod.indexOf("investigation") > -1) {update_skills(["investigation"]);};
|
|
if(mod.indexOf("materials") > -1) {update_skills(["materials"]);};
|
|
if(mod.indexOf("medicine") > -1) {update_skills(["medicine"]);};
|
|
if(mod.indexOf("nature") > -1) {update_skills(["nature"]);};
|
|
if(mod.indexOf("perception") > -1) {update_skills(["perception"]);};
|
|
if(mod.indexOf("performance") > -1) {update_skills(["performance"]);};
|
|
if(mod.indexOf("persuasion") > -1) {update_skills(["persuasion"]);};
|
|
if(mod.indexOf("politics") > -1) {update_skills(["politics"]);};
|
|
if(mod.indexOf("religion") > -1) {update_skills(["religion"]);};
|
|
if(mod.indexOf("sleight of hand") > -1) {update_skills(["sleight_of_hand"]);};
|
|
if(mod.indexOf("stealth") > -1) {update_skills(["stealth"]);};
|
|
if(mod.indexOf("survival") > -1) {update_skills(["survival"]);};
|
|
});
|
|
};
|
|
|
|
var create_attack_from_item = function(itemid, options) {
|
|
var update = {};
|
|
var newrowid = generateRowID();
|
|
update["repeating_inventory_" + itemid + "_itemattackid"] = newrowid;
|
|
if(options && options.versatile) {
|
|
var newrowid2 = generateRowID();
|
|
update["repeating_inventory_" + itemid + "_itemattackid"] += "," + newrowid2;
|
|
setAttrs(update, {}, function() {
|
|
update_attack_from_item(itemid, newrowid, {newattack: true, versatile: "primary"});
|
|
update_attack_from_item(itemid, newrowid2, {newattack: true, versatile: "secondary"});
|
|
});
|
|
}
|
|
else {
|
|
setAttrs(update, {}, update_attack_from_item(itemid, newrowid, {newattack: true}));
|
|
}
|
|
};
|
|
|
|
var update_attack_from_item = function(itemid, attackid, options) {
|
|
getAttrs(["repeating_inventory_" + itemid + "_itemname","repeating_inventory_" + itemid + "_itemproperties","repeating_inventory_" + itemid + "_itemmodifiers", "strength", "dexterity"], function(v) {
|
|
var update = {}; var itemtype; var damage; var damagetype; var damage2; var damagetype2; var attackmod; var damagemod; var range;
|
|
var alt = {};
|
|
|
|
if(options && options.newattack) {
|
|
update["repeating_attack_" + attackid + "_options-flag"] = "0";
|
|
update["repeating_attack_" + attackid + "_itemid"] = itemid;
|
|
}
|
|
|
|
if(v["repeating_inventory_" + itemid + "_itemmodifiers"] && v["repeating_inventory_" + itemid + "_itemmodifiers"] != "") {
|
|
var mods = v["repeating_inventory_" + itemid + "_itemmodifiers"].split(",");
|
|
_.each(mods, function(mod) {
|
|
if(mod.indexOf("Item Type:") > -1) {itemtype = mod.split(":")[1].trim()}
|
|
else if(mod.indexOf("Alternate Secondary Damage Type:") > -1) {alt.damagetype2 = mod.split(":")[1].trim();}
|
|
else if(mod.indexOf("Alternate Secondary Damage:") > -1) {alt.damage2 = mod.split(":")[1].trim();}
|
|
else if(mod.indexOf("Alternate Damage Type:") > -1) {alt.damagetype = mod.split(":")[1].trim();}
|
|
else if(mod.indexOf("Alternate Damage:") > -1) {alt.damage = mod.split(":")[1].trim();}
|
|
else if(mod.indexOf("Secondary Damage Type:") > -1) {damagetype2 = mod.split(":")[1].trim()}
|
|
else if(mod.indexOf("Secondary Damage:") > -1) {damage2 = mod.split(":")[1].trim()}
|
|
else if(mod.indexOf("Damage Type:") > -1) {damagetype = mod.split(":")[1].trim()}
|
|
else if(mod.indexOf("Damage:") > -1) {damage = mod.split(":")[1].trim()}
|
|
else if(mod.indexOf("Range:") > -1) {range = mod.split(":")[1].trim()}
|
|
else if(mod.indexOf(" Attacks ") > -1) {attackmod = mod.split(" Attacks ")[1].trim()}
|
|
else if(mod.indexOf(" Damage ") > -1) {damagemod = mod.split(" Damage ")[1].trim()}
|
|
});
|
|
}
|
|
|
|
if(v["repeating_inventory_" + itemid + "_itemname"] && v["repeating_inventory_" + itemid + "_itemname"] != "") {
|
|
update["repeating_attack_" + attackid + "_atkname"] = v["repeating_inventory_" + itemid + "_itemname"];
|
|
if(options && options.versatile === "primary") {
|
|
update["repeating_attack_" + attackid + "_atkname"] += " (One-Handed)";
|
|
} else if(options && options.versatile === "secondary") {
|
|
update["repeating_attack_" + attackid + "_atkname"] += " (Two-Handed)";
|
|
}
|
|
}
|
|
if(options && options.versatile === "secondary") {
|
|
if(alt.damage) {
|
|
update["repeating_attack_" + attackid + "_dmgbase"] = alt.damage;
|
|
}
|
|
if(alt.damagetype) {
|
|
update["repeating_attack_" + attackid + "_dmgtype"] = alt.damagetype;
|
|
}
|
|
if(alt.damage2) {
|
|
update["repeating_attack_" + attackid + "_dmg2base"] = alt.damage2;
|
|
update["repeating_attack_" + attackid + "_dmg2attr"] = 0;
|
|
update["repeating_attack_" + attackid + "_dmg2flag"] = "{{damage=1}} {{dmg2flag=1}}";
|
|
}
|
|
if(alt.damagetype2) {
|
|
update["repeating_attack_" + attackid + "_dmg2type"] = alt.damagetype2;
|
|
}
|
|
update["repeating_attack_" + attackid + "_versatile_alt"] = "1";
|
|
}
|
|
else {
|
|
if(damage) {
|
|
update["repeating_attack_" + attackid + "_dmgbase"] = damage;
|
|
}
|
|
if(damagetype) {
|
|
update["repeating_attack_" + attackid + "_dmgtype"] = damagetype;
|
|
}
|
|
if(damage2) {
|
|
update["repeating_attack_" + attackid + "_dmg2base"] = damage2;
|
|
update["repeating_attack_" + attackid + "_dmg2attr"] = 0;
|
|
update["repeating_attack_" + attackid + "_dmg2flag"] = "{{damage=1}} {{dmg2flag=1}}";
|
|
}
|
|
if(damagetype2) {
|
|
update["repeating_attack_" + attackid + "_dmg2type"] = damagetype2;
|
|
}
|
|
}
|
|
if(range) {
|
|
update["repeating_attack_" + attackid + "_atkrange"] = range;
|
|
}
|
|
var finesse = v["repeating_inventory_" + itemid + "_itemproperties"] && /finesse/i.test(v["repeating_inventory_" + itemid + "_itemproperties"]);
|
|
if( (itemtype && itemtype.indexOf("Ranged") > -1) || (finesse && +v.dexterity > +v.strength)) {
|
|
update["repeating_attack_" + attackid + "_atkattr_base"] = "@{dexterity_mod}";
|
|
update["repeating_attack_" + attackid + "_dmgattr"] = "@{dexterity_mod}";
|
|
}
|
|
else {
|
|
update["repeating_attack_" + attackid + "_atkattr_base"] = "@{strength_mod}";
|
|
update["repeating_attack_" + attackid + "_dmgattr"] = "@{strength_mod}";
|
|
}
|
|
if(attackmod && damagemod && attackmod == damagemod) {
|
|
update["repeating_attack_" + attackid + "_atkmagic"] = parseInt(attackmod, 10);
|
|
update["repeating_attack_" + attackid + "_atkmod"] = "";
|
|
update["repeating_attack_" + attackid + "_dmgmod"] = "";
|
|
}
|
|
else {
|
|
if(attackmod) {
|
|
update["repeating_attack_" + attackid + "_atkmod"] = parseInt(attackmod, 10);
|
|
}
|
|
if(damagemod) {
|
|
update["repeating_attack_" + attackid + "_dmgmod"] = parseInt(damagemod, 10);
|
|
}
|
|
update["repeating_attack_" + attackid + "_atkmagic"] = "";
|
|
}
|
|
var callback = function() {update_attacks(attackid, "item")};
|
|
setAttrs(update, {silent: true}, callback);
|
|
});
|
|
};
|
|
|
|
const create_resource_from_item = (itemid) => {
|
|
const newrowid = generateRowID();
|
|
let update = {};
|
|
|
|
getAttrs(["other_resource_name"], (v) => {
|
|
//Use other_resource if it is empty
|
|
if (!v.other_resource_name || v.other_resource_name == "") {
|
|
update[`repeating_inventory_${itemid}_itemresourceid`] = "other_resource";
|
|
setAttrs(update, {}, update_resource_from_item(itemid, "other_resource", true));
|
|
//If other_resource is populated look through the repeating sections for an empty spot
|
|
} else {
|
|
getSectionIDs(`repeating_resource`, (idarray) => {
|
|
if (idarray.length == 0) {
|
|
update[`repeating_inventory_${itemid}_itemresourceid`] = `${newrowid}_resource_left`;
|
|
setAttrs(update, {}, update_resource_from_item(itemid, `${newrowid}_resource_left`, true));
|
|
} else {
|
|
let array = [];
|
|
_.each(idarray, (currentID, i) => {
|
|
["left", "right"].forEach(side => {
|
|
array.push(`repeating_resource_${currentID}_resource_${side}`);
|
|
array.push(`repeating_resource_${currentID}_resource_${side}_name`);
|
|
array.push(`repeating_resource_${currentID}_resource_${side}_max`);
|
|
});
|
|
});
|
|
getAttrs(array, (y) => {
|
|
let existing = false;
|
|
_.each(idarray, (currentID, i) => {
|
|
["left", "right"].forEach(side => {
|
|
const Name = y[`repeating_resource_${currentID}_resource_${side}_name`] || false;
|
|
const Value = y[`repeating_resource_${currentID}_resource_${side}`] || false;
|
|
const Max = y[`repeating_resource_${currentID}_resource_${side}_max`] || false;
|
|
|
|
//If Name, Value, & Max are empty and existing === false then populate a resource there
|
|
if ((!Name && !Value && !Max) && existing === false) {
|
|
update[`repeating_inventory_${itemid}_itemresourceid`] = `${currentID}_resource_${side}`;
|
|
setAttrs(update, {}, update_resource_from_item(itemid, `${currentID}_resource_${side}`, true));
|
|
existing = true;
|
|
};
|
|
});
|
|
});
|
|
//If nothing is empty then generatae a new row
|
|
if(!existing) {
|
|
update[`repeating_inventory_${itemid}_itemresourceid`] = `${newrowid}_resource_left`;
|
|
setAttrs(update, {}, update_resource_from_item(itemid, `${newrowid}_resource_left`, true));
|
|
};
|
|
});
|
|
};
|
|
});
|
|
};
|
|
});
|
|
};
|
|
|
|
var update_resource_from_item = function(itemid, resourceid, newresource) {
|
|
getAttrs(["repeating_inventory_" + itemid + "_itemname","repeating_inventory_" + itemid + "_itemcount"], function(v) {
|
|
var update = {}; var id;
|
|
|
|
if(resourceid && resourceid == "other_resource") {
|
|
id = resourceid;
|
|
}
|
|
else {
|
|
id = "repeating_resource_" + resourceid;
|
|
};
|
|
|
|
if(newresource) {
|
|
update[id + "_itemid"] = itemid;
|
|
} ;
|
|
|
|
if(!v["repeating_inventory_" + itemid + "_itemname"]) {
|
|
update["repeating_inventory_" + itemid + "_useasresource"] = 0;
|
|
update["repeating_inventory_" + itemid + "_itemresourceid"] = "";
|
|
remove_resource(resourceid);
|
|
};
|
|
if(v["repeating_inventory_" + itemid + "_itemname"] && v["repeating_inventory_" + itemid + "_itemname"] != "") {
|
|
update[id + "_name"] = v["repeating_inventory_" + itemid + "_itemname"];
|
|
};
|
|
if(v["repeating_inventory_" + itemid + "_itemcount"] && v["repeating_inventory_" + itemid + "_itemcount"] != "") {
|
|
update[id] = v["repeating_inventory_" + itemid + "_itemcount"];
|
|
};
|
|
|
|
setAttrs(update, {silent: true});
|
|
|
|
});
|
|
};
|
|
|
|
|
|
const create_attack_from_spell = function(lvl, spellid, character_id) {
|
|
let update = {};
|
|
const newrowid = generateRowID();
|
|
update[`repeating_spell-${lvl}_${spellid}_spellattackid`] = newrowid;
|
|
update[`repeating_spell-${lvl}_${spellid}_rollcontent`] = `%{${character_id}|repeating_attack_${newrowid}_attack}`;
|
|
setAttrs(update, {}, update_attack_from_spell(lvl, spellid, newrowid, true));
|
|
}
|
|
|
|
const update_attack_from_spell = (lvl, spellid, attackid, newattack) => {
|
|
const repeating_spell = `repeating_spell-${lvl}_${spellid}`;
|
|
const repeating_attack = `repeating_attack_${attackid}`;
|
|
getAttrs([`${repeating_spell}_spellname`, `${repeating_spell}_spellrange`, `${repeating_spell}_spelltarget`, `${repeating_spell}_spellattack`, `${repeating_spell}_spelldamage`, `${repeating_spell}_spelldamage2`,`${repeating_spell}_spelldamagetype`,`${repeating_spell}_spelldamagetype2`,`${repeating_spell}_spellhealing`,`${repeating_spell}_spelldmgmod`,`${repeating_spell}_spellsave`,`${repeating_spell}_spellsavesuccess`,`${repeating_spell}_spellhldie`,`${repeating_spell}_spellhldietype`,`${repeating_spell}_spellhlbonus`,`${repeating_spell}_spelllevel`,`${repeating_spell}_includedesc`,`${repeating_spell}_spelldescription`,`${repeating_spell}_spellathigherlevels`,`${repeating_spell}_spell_damage_progression`,`${repeating_spell}_innate`,`${repeating_spell}_spell_ability`,"spellcasting_ability"], (v) => {
|
|
let update = {};
|
|
let description = "";
|
|
const spellAbility = (v[`${repeating_spell}_spell_ability`] != "spell") ? v[`${repeating_spell}_spell_ability`].slice(0, -1) : "spell";
|
|
update[`${repeating_attack}_atkattr_base`] = spellAbility;
|
|
|
|
if (newattack) {
|
|
update[`${repeating_attack}_options-flag`] = "0";
|
|
update[`${repeating_attack}_spellid`] = spellid;
|
|
update[`${repeating_attack}_spelllevel`] = lvl;
|
|
}
|
|
|
|
if (v[`${repeating_spell}_spell_ability`] == "spell") {
|
|
update[`${repeating_attack}_savedc`] = "(@{spell_save_dc})";
|
|
} else if (v[`${repeating_spell}_spell_ability`]) {
|
|
update[`${repeating_attack}_savedc`] = `(${spellAbility}+8+@{spell_dc_mod}+@{pb})`;
|
|
}
|
|
|
|
if (v[`${repeating_spell}_spellname`] && v[`${repeating_spell}_spellname`] != "") {
|
|
update[`${repeating_attack}_atkname`] = v[`${repeating_spell}_spellname`];
|
|
}
|
|
|
|
update[`${repeating_attack}_atkflag`] = (!v[`${repeating_spell}_spellattack`] || v[`${repeating_spell}_spellattack`] === "None") ? "0" : "{{attack=1}}";
|
|
|
|
if (v[`${repeating_spell}_spellattack`] || !v[`${repeating_spell}_spellattack`] === "None") {
|
|
description = description + v[`${repeating_spell}_spellattack`] + " Spell Attack. ";
|
|
};
|
|
|
|
if (v[`${repeating_spell}_spelldamage`] && v[`${repeating_spell}_spelldamage`] != "") {
|
|
update[`${repeating_attack}_dmgbase`] =
|
|
(v[`${repeating_spell}_spell_damage_progression`] && v[`${repeating_spell}_spell_damage_progression`] === "Cantrip Dice") ? "[[round((@{level} + 1) / 6 + 0.5)]]" + v[`${repeating_spell}_spelldamage`].substring(1) :
|
|
v[`${repeating_spell}_spelldamage`];
|
|
};
|
|
|
|
update[`${repeating_attack}_dmgflag`] = (v[`${repeating_spell}_spelldamage`] && v[`${repeating_spell}_spelldamage`] != "") ? "{{damage=1}} {{dmg1flag=1}}" : "0";
|
|
update[`${repeating_attack}_dmgattr`] = (v[`${repeating_spell}_spelldmgmod`] && v[`${repeating_spell}_spelldmgmod`] === "Yes") ? spellAbility : "0";
|
|
update[`${repeating_attack}_dmgtype`] = (v[`${repeating_spell}_spelldamagetype`]) ? v[`${repeating_spell}_spelldamagetype`] : "";
|
|
update[`${repeating_attack}_dmg2base`] = (v[`${repeating_spell}_spelldamage2`]) ? v[`${repeating_spell}_spelldamage2`] : "";
|
|
update[`${repeating_attack}_dmg2attr`] = "0";
|
|
update[`${repeating_attack}_dmg2flag`] = (v[`${repeating_spell}_spelldamage2`]) ? "{{damage=1}} {{dmg2flag=1}}" : 0;
|
|
update[`${repeating_attack}_dmg2type`] = (v[`${repeating_spell}_spelldamagetype2`]) ? v[`${repeating_spell}_spelldamagetype2`] : "";
|
|
update[`${repeating_attack}_atkrange`] = (v[`${repeating_spell}_spellrange`]) ? v[`${repeating_spell}_spellrange`] : "";
|
|
update[`${repeating_attack}_saveflag`] = (v[`${repeating_spell}_spellsave`]) ? "{{save=1}} {{saveattr=@{saveattr}}} {{savedesc=@{saveeffect}}} {{savedc=[[[[@{savedc}]][SAVE]]]}}" : "0";
|
|
update[`${repeating_attack}_saveeffect`] = (v[`${repeating_spell}_spellsavesuccess`]) ? v[`${repeating_spell}_spellsavesuccess`] : "";
|
|
|
|
if(v[`${repeating_spell}_spellsave`]) {
|
|
update[`${repeating_attack}_saveattr`] = v[`${repeating_spell}_spellsave`];
|
|
};
|
|
|
|
if(v[`${repeating_spell}_spellhldie`] && v[`${repeating_spell}_spellhldie`] != "" && v[`${repeating_spell}_spellhldietype`] && v[`${repeating_spell}_spellhldietype`] != "") {
|
|
let bonus = "";
|
|
const spelllevel = v[`${repeating_spell}_spelllevel`];
|
|
let query = "?{Cast at what level?";
|
|
for(i = 0; i < 10-spelllevel; i++) {
|
|
query = query + "|Level " + (parseInt(i, 10) + parseInt(spelllevel, 10)) + "," + i;
|
|
}
|
|
query = query + "}";
|
|
if(v[`${repeating_spell}_spellhlbonus`] && v[`${repeating_spell}_spellhlbonus`] != "") {
|
|
bonus = "+(" + v[`${repeating_spell}_spellhlbonus`] + "*" + query + ")";
|
|
}
|
|
update[`${repeating_attack}_hldmg`] = `{{hldmg=[[(${v[`${repeating_spell}_spellhldie`]}*${query})${v[`${repeating_spell}_spellhldietype`]}${bonus}]]}}`;
|
|
} else {
|
|
update[`${repeating_attack}_hldmg`] = "";
|
|
}
|
|
|
|
if (v[`${repeating_spell}_spellhealing`] && v[`${repeating_spell}_spellhealing`] != "") {
|
|
if(!v[`${repeating_spell}_spelldamage`] || v[`${repeating_spell}_spelldamage`] === "") {
|
|
update[`${repeating_attack}_dmgbase`] = v[`${repeating_spell}_spellhealing`];
|
|
update[`${repeating_attack}_dmgflag`] = "{{damage=1}} {{dmg1flag=1}}";
|
|
update[`${repeating_attack}_dmgtype`] = "Healing";
|
|
} else if (!v[`${repeating_spell}_spelldamage2`] || v[`${repeating_spell}_spelldamage2`] === "") {
|
|
update[`${repeating_attack}_dmg2base`] = v[`${repeating_spell}_spellhealing`];
|
|
update[`${repeating_attack}_dmg2flag`] = "{{damage=1}} {{dmg2flag=1}}";
|
|
update[`${repeating_attack}_dmg2type`] = "Healing";
|
|
}
|
|
}
|
|
|
|
update[`${repeating_attack}_spell_innate`] = (v[`${repeating_spell}_innate`]) ? v[`${repeating_spell}_innate`] : "";
|
|
|
|
if(v[`${repeating_spell}_spelltarget`]) {
|
|
description = description + v[`${repeating_spell}_spelltarget`] + ". ";
|
|
}
|
|
if(v[`${repeating_spell}_includedesc`] && v[`${repeating_spell}_includedesc`] === "on") {
|
|
description = v[`${repeating_spell}_spelldescription`];
|
|
if(v[`${repeating_spell}_spellathigherlevels`] && v[`${repeating_spell}_spellathigherlevels`] != "") {
|
|
description = description + "\n\nAt Higher Levels: " + v[`${repeating_spell}_spellathigherlevels`];
|
|
}
|
|
} else if(v[`${repeating_spell}_includedesc`] && v[`${repeating_spell}_includedesc`] === "off") {
|
|
description = "";
|
|
};
|
|
update[`${repeating_attack}_atk_desc`] = description;
|
|
|
|
var callback = () => {update_attacks(attackid, "spell")};
|
|
setAttrs(update, {silent: true}, callback);
|
|
});
|
|
};
|
|
|
|
const update_attacks = (update_id, source) => {
|
|
if (update_id.substring(0,1) === "-" && update_id.length === 20) {
|
|
do_update_attack([update_id], source);
|
|
} else if (["strength","dexterity","constitution","intelligence","wisdom","charisma","spells","all"].indexOf(update_id) > -1) {
|
|
getSectionIDs("repeating_attack", (idarray) => {
|
|
if (update_id === "all") {
|
|
do_update_attack(idarray);
|
|
} else if (update_id === "spells") {
|
|
let attack_attribs = [];
|
|
_.each(idarray, (id) => {
|
|
attack_attribs.push(`repeating_attack_${id}_spellid`, `repeating_attack_${id}_spelllevel`);
|
|
});
|
|
getAttrs(attack_attribs, (v) => {
|
|
const filteredIds = _.filter(idarray, (id) => {
|
|
return v[`repeating_attack_${id}_spellid`] && v[`repeating_attack_${id}_spellid`] != "";
|
|
});
|
|
let spell_attacks = {};
|
|
_.each(filteredIds, (attack_id) => {
|
|
spell_attacks[attack_id] = {
|
|
spell_id: v[`repeating_attack_${attack_id}_spellid`],
|
|
spell_lvl: v[`repeating_attack_${attack_id}_spelllevel`]
|
|
};
|
|
});
|
|
_.each(spell_attacks, (data, attack_id) => { update_attack_from_spell(data.spell_lvl, data.spell_id, attack_id); });
|
|
});
|
|
} else {
|
|
let attack_attribs = ["spellcasting_ability"];
|
|
_.each(idarray, (id) => {
|
|
attack_attribs.push(`repeating_attack_${id}_atkattr_base`);
|
|
attack_attribs.push(`repeating_attack_${id}_dmgattr`);
|
|
attack_attribs.push(`repeating_attack_${id}_dmg2attr`);
|
|
attack_attribs.push(`repeating_attack_${id}_savedc`);
|
|
});
|
|
getAttrs(attack_attribs, (v) => {
|
|
let attr_attack_ids = [];
|
|
_.each(idarray, (id) => {
|
|
if ((v[`repeating_attack_${id}_atkattr_base`] && v[`repeating_attack_${id}_atkattr_base`].indexOf(update_id) > -1) || (v[`repeating_attack_${id}_dmgattr`] && v[`repeating_attack_${id}_dmgattr`].indexOf(update_id) > -1) || (v[`repeating_attack_${id}_dmg2attr`] && v[`repeating_attack_${id}_dmg2attr`].indexOf(update_id) > -1) || (v[`repeating_attack_${id}_savedc`] && v[`repeating_attack_${id}_savedc`].indexOf(update_id) > -1) || (v[`repeating_attack_${id}_savedc`] && v[`repeating_attack_${id}_savedc`] === "(@{spell_save_dc})" && v["spellcasting_ability"] && v["spellcasting_ability"].indexOf(update_id) > -1)) {
|
|
attr_attack_ids.push(id);
|
|
}
|
|
});
|
|
if (attr_attack_ids.length > 0) {
|
|
do_update_attack(attr_attack_ids);
|
|
}
|
|
});
|
|
};
|
|
});
|
|
};
|
|
};
|
|
|
|
const do_update_attack = (attack_array, source) => {
|
|
let attack_attribs = ["level","d20","pb","pb_type","pbd_safe","dtype","globalmagicmod","strength_mod","dexterity_mod","constitution_mod","intelligence_mod","wisdom_mod","charisma_mod","spellcasting_ability","spell_save_dc","spell_attack_mod", "spell_dc_mod", "global_damage_mod_roll", "global_damage_mod_crit"];
|
|
_.each(attack_array, (attackid) => {
|
|
["atkflag","atkname","atkattr_base","atkmod","atkprofflag","atkmagic","dmgflag","dmgbase","dmgattr","dmgmod","dmgtype","dmg2flag","dmg2base","dmg2attr","dmg2mod","dmg2type","dmgcustcrit","dmg2custcrit","saveflag","savedc","saveeffect","saveflat","hldmg","spellid","spelllevel","atkrange","itemid","ammo",].forEach((attr) => {
|
|
attack_attribs.push(`repeating_attack_${attackid}_${attr}`)
|
|
});
|
|
});
|
|
|
|
getAttrs(attack_attribs, (v) => {
|
|
_.each(attack_array, (attackid) => {
|
|
const repeating_attack = `repeating_attack_${attackid}`;
|
|
let callbacks = [];
|
|
let update = {};
|
|
let hbonus = "";
|
|
let hdmg1 = "";
|
|
let hdmg2 = "";
|
|
let dmg = "";
|
|
let dmg2 = "";
|
|
let rollbase = "";
|
|
let spellattack = false;
|
|
let magicattackmod = 0;
|
|
let magicsavemod = 0;
|
|
let atkattr_abrev = "";
|
|
let dmgattr_abrev = "";
|
|
let dmg2attr_abrev = "";
|
|
//PROFICIENCY BONUS select in Settings.
|
|
const pbd_safe = v["pbd_safe"] || "";
|
|
|
|
//HIGHER LVL CAST DMG found in Spells for spells like Fireball
|
|
const hldmgcrit = (v[`${repeating_attack}_hldmg`] && v[`${repeating_attack}_hldmg`] != "") ? v[`${repeating_attack}_hldmg`].slice(0, 7) + "crit" + v[`${repeating_attack}_hldmg`].slice(7) : "";
|
|
|
|
if (v[`${repeating_attack}_spellid`] && v[`${repeating_attack}_spellid`] != "") {
|
|
spellattack = true;
|
|
//GLOBAL MAGIC ATTACK MODIFIER in Settings
|
|
magicattackmod = parseInt(v["spell_attack_mod"],10) || 0;
|
|
//SPELL SAVE DC MOD in Settings
|
|
magicsavemod = parseInt(v["spell_dc_mod"],10) || 0;
|
|
};
|
|
|
|
//ATTACK select inside settings for the repeating attack
|
|
if (!v[`${repeating_attack}_atkattr_base`] || v[`${repeating_attack}_atkattr_base`] === "0") {
|
|
atkattr_base = 0
|
|
} else if (v[`${repeating_attack}_atkattr_base`] && v[`${repeating_attack}_atkattr_base`] === "spell") {
|
|
atkattr_base = parseInt(v[v["spellcasting_ability"].substring(2, v["spellcasting_ability"].length - 2)], 10);
|
|
atkattr_abrev = v["spellcasting_ability"].substring(2, 5).toUpperCase();
|
|
} else {
|
|
atkattr_base = parseInt(v[v[`${repeating_attack}_atkattr_base`].substring(2, v[`${repeating_attack}_atkattr_base`].length - 1)], 10);
|
|
atkattr_abrev = v[`${repeating_attack}_atkattr_base`].substring(2, 5).toUpperCase();
|
|
};
|
|
|
|
//DAMAGE 1 ability select inside settings for the repeating attack
|
|
if (!v[`${repeating_attack}_dmgattr`] || v[`${repeating_attack}_dmgattr`] === "0") {
|
|
dmgattr = 0;
|
|
} else if (v[`${repeating_attack}_dmgattr`] && v[`${repeating_attack}_dmgattr`] === "spell") {
|
|
dmgattr = parseInt(v[v["spellcasting_ability"].substring(2, v["spellcasting_ability"].length - 2)], 10);
|
|
dmgattr_abrev = v["spellcasting_ability"].substring(2, 5).toUpperCase();
|
|
} else {
|
|
dmgattr = parseInt(v[v[`${repeating_attack}_dmgattr`].substring(2, v[`${repeating_attack}_dmgattr`].length - 1)], 10);
|
|
dmgattr_abrev = v[`${repeating_attack}_dmgattr`].substring(2, 5).toUpperCase();
|
|
};
|
|
|
|
//DAMAGE 2 ability select inside settings for the repeating attack
|
|
if (!v[`${repeating_attack}_dmg2attr`] || v[`${repeating_attack}_dmg2attr`] === "0") {
|
|
dmg2attr = 0;
|
|
} else if (v[`${repeating_attack}_dmg2attr`] && v[`${repeating_attack}_dmg2attr`] === "spell") {
|
|
dmg2attr = parseInt(v[v["spellcasting_ability"].substring(2, v["spellcasting_ability"].length - 2)], 10);
|
|
dmg2attr_abrev = v["spellcasting_ability"].substring(2, 5).toUpperCase();
|
|
} else {
|
|
dmg2attr = parseInt(v[v[`${repeating_attack}_dmg2attr`].substring(2, v[`${repeating_attack}_dmg2attr`].length - 1)], 10);
|
|
dmg2attr_abrev =v[`${repeating_attack}_dmg2attr`].substring(2, 5).toUpperCase();
|
|
};
|
|
|
|
//DAMAGE first input inside settings for the repeating attack
|
|
const dmgbase = v[`${repeating_attack}_dmgbase`] || 0;
|
|
const dmg2base = v[`${repeating_attack}_dmg2base`] || 0;
|
|
//DAMAGE 1 second input inside settings for the repeating attack
|
|
const dmgmod = parseInt(v[`${repeating_attack}_dmgmod`],10) || 0;
|
|
//DAMAGE 2 second input inside settings for the repeating attack
|
|
const dmg2mod = parseInt(v[`${repeating_attack}_dmg2mod`],10) || 0;
|
|
//DAMAGE 1 TYPE input inside settings for the repeating attack
|
|
const dmgtype = v[`${repeating_attack}_dmgtype`] || "";
|
|
//DAMAGE 2 TYPE input inside settings for the repeating attack
|
|
const dmg2type = v[`${repeating_attack}_dmg2type`] || "";
|
|
|
|
//PROFICIENT flag inside settings for the repeating attack && PROFICIENCY BONUS from Settings
|
|
const atkprofflag = v[`${repeating_attack}_atkprofflag`] || 0;
|
|
const pb = (atkprofflag != 0 && v.pb) ? v.pb : 0;
|
|
|
|
//ATTACK input inside settings for the repeating attack
|
|
const atkmod = parseInt(v[`${repeating_attack}_atkmod`],10) || 0;
|
|
//MAGIC BONUS input inside settings for the repeating attack
|
|
const atkmag = parseInt(v[`${repeating_attack}_atkmagic`],10) || 0;
|
|
|
|
//used in _atkdmgtype display
|
|
const dmgmag = (isNaN(atkmag) === false && atkmag != 0 && ((v[`${repeating_attack}_dmgflag`] && v[`${repeating_attack}_dmgflag`] != 0) || (v[`${repeating_attack}_dmg2flag`] && v[`${repeating_attack}_dmg2flag`] != 0))) ? `+ ${atkmag} Magic Bonus` : "";
|
|
|
|
//ATTACK checkbox inside settings for the repeating attack
|
|
const atkflag = v[`${repeating_attack}_atkflag`] || 0;
|
|
if (atkflag != 0) {
|
|
bonus_mod = atkattr_base + atkmod + atkmag + magicattackmod;
|
|
plus_minus = (bonus_mod > -1) ? "+" : "";
|
|
//pb_type is PROFICIENCY BONUS select in Settings
|
|
if (v["pb_type"] && v["pb_type"] === "die") {
|
|
bonus = `${bonus_mod}+${pb}`;
|
|
} else {
|
|
bonus_mod = bonus_mod + parseInt(pb, 10);
|
|
bonus = plus_minus + bonus_mod;
|
|
};
|
|
//SAVING THROW checkbox inside settings for the repeating attack
|
|
} else if (v[`${repeating_attack}_saveflag`] && v[`${repeating_attack}_saveflag`] != 0) {
|
|
const saveDC = v[`${repeating_attack}_savedc`] || "";
|
|
//SAVING THROW VS DC select "Spell" inside settings for the repeating attack
|
|
if (!saveDC || saveDC === "(@{spell_save_dc})") {
|
|
const tempdc = v["spell_save_dc"];
|
|
bonus = "DC" + tempdc;
|
|
//SAVING THROW VS DC select "FLAT" inside settings for the repeating attack
|
|
} else if (saveDC === "(@{saveflat})") {
|
|
const tempdc = parseInt(v[`${repeating_attack}_saveflat`]) || 0;
|
|
bonus = "DC" + tempdc;
|
|
//SAVING THROW VS DC select ability score inside settings for the repeating attack
|
|
} else {
|
|
const savedcattr = v[`${repeating_attack}_savedc`].split("_mod")[0].slice(3);
|
|
const safe_pb = v["pb_type"] && v["pb_type"] === "die" ? parseInt(pb.substring(1), 10) / 2 : parseInt(pb,10);
|
|
const safe_attr = v[`${savedcattr}_mod`] ? parseInt(v[`${savedcattr}_mod`],10) : 0;
|
|
const tempdc = 8 + safe_attr + safe_pb + magicsavemod;
|
|
bonus = "DC" + tempdc;
|
|
};
|
|
} else {
|
|
bonus = "-";
|
|
}
|
|
|
|
//DAMAGE checkbox inside settings for the repeating attack
|
|
const dmgflag1 = v[`${repeating_attack}_dmgflag`] || 0;
|
|
const dmgflag2 = v[`${repeating_attack}_dmg2flag`] || 0;
|
|
if (dmgflag1 != 0) {
|
|
if (spellattack === true && dmgbase.indexOf("[[round((@{level} + 1) / 6 + 0.5)]]") > -1) {
|
|
// SPECIAL CANTRIP DAMAGE
|
|
dmgdiestring = Math.round(((parseInt(v["level"], 10) + 1) / 6) + 0.5).toString();
|
|
dmg = dmgdiestring + dmgbase.substring(dmgbase.lastIndexOf("d"));
|
|
//select & input to the right of damage
|
|
if (dmgattr + dmgmod != 0) {
|
|
dmg += `+${(dmgattr + dmgmod)}`;
|
|
}
|
|
dmg += ` ${dmgtype}`;
|
|
} else {
|
|
if (dmgbase === 0 && (dmgattr + dmgmod === 0)) {
|
|
dmg = 0;
|
|
}
|
|
if (dmgbase != 0) {
|
|
dmg = dmgbase;
|
|
}
|
|
if (dmgbase != 0 && (dmgattr + dmgmod != 0)) {
|
|
dmg = (dmgattr + dmgmod > 0) ? dmg + "+" : dmg;
|
|
}
|
|
if (dmgattr + dmgmod != 0) {
|
|
dmg = dmg + (dmgattr + dmgmod);
|
|
}
|
|
dmg = dmg + " " + dmgtype;
|
|
}
|
|
};
|
|
if (dmgflag2 != 0) {
|
|
if (dmg2base === 0 && (dmg2attr + dmg2mod === 0)) {
|
|
dmg2 = 0;
|
|
}
|
|
if (dmg2base != 0) {
|
|
dmg2 = dmg2base;
|
|
}
|
|
if (dmg2base != 0 && (dmg2attr + dmg2mod != 0)) {
|
|
dmg2 = (dmg2attr + dmg2mod > 0) ? dmg2 + "+" : dmg2;
|
|
}
|
|
if (dmg2attr + dmg2mod != 0) {
|
|
dmg2 = dmg2 + (dmg2attr + dmg2mod);
|
|
}
|
|
dmg2 = dmg2 + " " + dmg2type;
|
|
};
|
|
update[`${repeating_attack}_atkdmgtype`] = (dmgflag1 != 0 && dmgflag2 != 0) ? `${dmg} + ${dmg2}${dmgmag} `:`${dmg}${dmg2}${dmgmag} `;
|
|
|
|
//Build ROLL TEMPLATE with below variables
|
|
//ATTACK checkbox inside settings for the repeating attack
|
|
if (atkflag != 0) {
|
|
if (atkattr_base != 0) {hbonus += ` + ${atkattr_base}[${atkattr_abrev}]`};
|
|
if (atkmod != 0) {hbonus += ` + ${atkmod}[MOD]`};
|
|
if (pb != 0) {hbonus += ` + ${pb}${pbd_safe}[PROF]`};
|
|
if (atkmag != 0) {hbonus += ` + ${atkmag}[MAGIC]`};
|
|
if (magicattackmod != 0) {hbonus += ` + ${magicattackmod}[SPELLATK]`};
|
|
}
|
|
//DAMAGE 1 checkbox inside settings for the repeating attack
|
|
if (dmgflag1 != 0) {
|
|
hdmg1 += dmgbase;
|
|
if (dmgattr != 0) {hdmg1 += ` + ${dmgattr}[${dmgattr_abrev}]`};
|
|
if (dmgmod != 0) {hdmg1 += ` + ${dmgmod}[MOD]`};
|
|
if (atkmag != 0) {hdmg1 += ` + ${atkmag}[MAGIC]`};
|
|
} else {
|
|
hdmg1 += "0";
|
|
}
|
|
//DAMAGE 2 checkbox inside settings for the repeating attack
|
|
if (dmgflag2 != 0) {
|
|
hdmg2 += dmg2base
|
|
if (dmg2attr != 0) {hdmg2 += ` + ${dmg2attr}[${dmg2attr_abrev}]`};
|
|
if (dmg2mod != 0) {hdmg2 += ` + ${dmg2mod}[MOD]`};
|
|
} else {
|
|
hdmg2 += "0";
|
|
}
|
|
//CRIT input inside settings for the repeating attack
|
|
let crit1 = v[`${repeating_attack}_dmgcustcrit`] || 0;
|
|
let crit2 = v[`${repeating_attack}_dmg2custcrit`] || 0;
|
|
crit1 = (crit1 != 0) ? v[`${repeating_attack}_dmgcustcrit`] : dmgbase;
|
|
crit2 = (crit2 != 0) ? v[`${repeating_attack}_dmg2custcrit`] : dmg2base;
|
|
r1 = (atkflag != 0) ? "@{d20}" : "0d20";
|
|
r2 = (atkflag != 0) ? "@{rtype}" : "{{r2=[[0d20";
|
|
//set in the GLOBAL DAMAGE MODIFIER section
|
|
let globaldamage = `[[${v.global_damage_mod_roll || 0}]]`;
|
|
let globaldamagecrit = `[[${v.global_damage_mod_crit || 0}]]`;
|
|
|
|
//Assamble Roll Templates
|
|
if (v.dtype === "full") {
|
|
rollbase = `@{wtype}&{template:atkdmg} {{mod=@{atkbonus}}} {{rname=@{atkname}}} {{r1=[[${r1}cs>@{atkcritrange}${hbonus}]]}} ${r2}cs>@{atkcritrange}${hbonus}]]}} @{atkflag} {{range=@{atkrange}}} @{dmgflag} {{dmg1=[[${hdmg1}]]}} {{dmg1type=${dmgtype}}} @{dmg2flag} {{dmg2=[[${hdmg2}]]}} {{dmg2type=${dmg2type}}} {{crit1=[[${crit1}[CRIT]]]}} {{crit2=[[${crit2}[CRIT]]]}} @{saveflag} {{desc=@{atk_desc}}} @{hldmg} ${hldmgcrit} {{spelllevel=@{spelllevel}}} {{innate=@{spell_innate}}} {{globalattack=@{global_attack_mod}}} {{globaldamage=${globaldamage}}} {{globaldamagecrit=${globaldamagecrit}}} {{globaldamagetype=@{global_damage_mod_type}}} ammo=@{ammo} @{charname_output} {{licensedsheet=@{licensedsheet}}}`;
|
|
} else if (atkflag != 0) {
|
|
rollbase = `@{wtype}&{template:atk} {{mod=@{atkbonus}}} {{rname=[@{atkname}](~repeating_attack_attack_dmg)}} {{rnamec=[@{atkname}](~repeating_attack_attack_crit)}} {{r1=[[${r1}cs>@{atkcritrange}${hbonus}]]}} ${r2}cs>@{atkcritrange}${hbonus}]]}} {{range=@{atkrange}}} {{desc=@{atk_desc}}} {{spelllevel=@{spelllevel}}} {{innate=@{spell_innate}}} {{globalattack=@{global_attack_mod}}} ammo=@{ammo} @{charname_output} {{licensedsheet=@{licensedsheet}}}`;
|
|
} else if (dmgflag1 != 0) {
|
|
rollbase = `@{wtype}&{template:dmg} {{rname=@{atkname}}} @{atkflag} {{range=@{atkrange}}} @{dmgflag} {{dmg1=[[${hdmg1}]]}} {{dmg1type=${dmgtype}}} @{dmg2flag} {{dmg2=[[${hdmg2}]]}} {{dmg2type=${dmg2type}}} @{saveflag} {{desc=@{atk_desc}}} @{hldmg} {{spelllevel=@{spelllevel}}} {{innate=@{spell_innate}}} {{globaldamage=${globaldamage}}} {{globaldamagetype=@{global_damage_mod_type}}} ammo=@{ammo} @{charname_output} {{licensedsheet=@{licensedsheet}}}`;
|
|
} else {
|
|
rollbase = `@{wtype}&{template:dmg} {{rname=@{atkname}}} @{atkflag} {{range=@{atkrange}}} @{saveflag} {{desc=@{atk_desc}}} {{spelllevel=@{spelllevel}}} {{innate=@{spell_innate}}} ammo=@{ammo} @{charname_output} {{licensedsheet=@{licensedsheet}}}`;
|
|
}
|
|
|
|
update[`${repeating_attack}_rollbase_dmg`] = `@{wtype}&{template:dmg} {{rname=@{atkname}}} @{atkflag} {{range=@{atkrange}}} @{dmgflag} {{dmg1=[[${hdmg1}]]}} {{dmg1type=${dmgtype}}} @{dmg2flag} {{dmg2=[[${hdmg2}]]}} {{dmg2type=${dmg2type}}} @{saveflag} {{desc=@{atk_desc}}} @{hldmg} {{spelllevel=@{spelllevel}}} {{innate=@{spell_innate}}} {{globaldamage=${globaldamage}}} {{globaldamagetype=@{global_damage_mod_type}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}`;
|
|
update[`${repeating_attack}_rollbase_crit`] = `@{wtype}&{template:dmg} {{crit=1}} {{rname=@{atkname}}} @{atkflag} {{range=@{atkrange}}} @{dmgflag} {{dmg1=[[${hdmg1}]]}} {{dmg1type=${dmgtype}}} @{dmg2flag} {{dmg2=[[${hdmg2}]]}} {{dmg2type=${dmg2type}}} {{crit1=[[${crit1}]]}} {{crit2=[[${crit2}]]}} @{saveflag} {{desc=@{atk_desc}}} @{hldmg} ${hldmgcrit} {{spelllevel=@{spelllevel}}} {{innate=@{spell_innate}}} {{globaldamage=${globaldamage}}} {{globaldamagecrit=${globaldamagecrit}}} {{globaldamagetype=@{global_damage_mod_type}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}`;
|
|
update[`${repeating_attack}_atkbonus`] = bonus;
|
|
update[`${repeating_attack}_rollbase`] = rollbase;
|
|
|
|
if (v[`${repeating_attack}_spellid`] && v[`${repeating_attack}_spellid`] != "" && (!source || source && source != "spell") && v[`${repeating_attack}_spellid`].length == 20) {
|
|
const spellid = v[`${repeating_attack}_spellid`];
|
|
const lvl = v[`${repeating_attack}_spelllevel`];
|
|
callbacks.push(() => {
|
|
update_spell_from_attack(lvl, spellid, attackid);
|
|
});
|
|
}
|
|
if (v[`${repeating_attack}_itemid`] && v[`${repeating_attack}_itemid`] != "" && (!source || source && source != "item")) {
|
|
const itemid = v[`${repeating_attack}_itemid`];
|
|
callbacks.push(() => {
|
|
update_item_from_attack(itemid, attackid);
|
|
});
|
|
}
|
|
setAttrs(update, {silent: true}, () => {
|
|
callbacks.forEach((callback) => {
|
|
callback();
|
|
});
|
|
});
|
|
});
|
|
});
|
|
};
|
|
|
|
//Update spells in the attack section
|
|
const update_spell_from_attack = (lvl, spellid, attackid) => {
|
|
const repeating_attack = `repeating_attack_${attackid}`;
|
|
const repeating_spell = `repeating_spell-${lvl}_${spellid}`;
|
|
let update = {};
|
|
getAttrs([`${repeating_attack}_atkname`, `${repeating_attack}_atkrange`, `${repeating_attack}_atkflag`, `${repeating_attack}_atkattr_base`, `${repeating_attack}_dmgbase`, `${repeating_attack}_dmgtype`, `${repeating_attack}_dmg2base`, `${repeating_attack}_dmg2type`, `${repeating_attack}_saveflag`, `${repeating_attack}_saveattr`, `${repeating_attack}_saveeffect`], (v) => {
|
|
update[`${repeating_spell}_spellname`] = v[`${repeating_attack}_atkname`];
|
|
update[`${repeating_spell}_spellrange`] = v[`${repeating_attack}_atkrange`] || "";
|
|
update[`${repeating_spell}_spellsavesuccess`] = v[`${repeating_attack}_saveeffect`] || "";
|
|
|
|
if (v[`${repeating_attack}_dmgtype`] && v[`${repeating_attack}_dmgtype`].toLowerCase() == "healing") {
|
|
if (v[`${repeating_attack}_dmgbase`] && v[`${repeating_attack}_dmgbase`] != "") {
|
|
update[`${repeating_spell}_spellhealing`] = v[`${repeating_attack}_dmgbase`];
|
|
}
|
|
} else {
|
|
if (v[`${repeating_attack}_dmgbase`] && v[`${repeating_attack}_dmgbase`] != "" && v[`${repeating_attack}_dmgbase`].indexOf("[[round((@{level} + 1) / 6 + 0.5)]]") === -1) {
|
|
update[`${repeating_spell}_spelldamage`] = v[`${repeating_attack}_dmgbase`];
|
|
} else if (!v[`${repeating_attack}_dmgbase`] || v[`${repeating_attack}_dmgbase`] === "") {
|
|
update[`${repeating_spell}_spelldamage`] = "";
|
|
}
|
|
|
|
update[`${repeating_spell}_spelldamagetype`] = v[`${repeating_attack}_dmgtype`] || "";
|
|
};
|
|
if (v[`${repeating_attack}_dmg2type`] && v[`${repeating_attack}_dmg2type`].toLowerCase() === "healing") {
|
|
if (v[`${repeating_attack}_dmgbase`] && v[`${repeating_attack}_dmgbase`] != "") {
|
|
update[`${repeating_spell}_spellhealing`] = v[`${repeating_attack}_dmgbase`];
|
|
}
|
|
} else {
|
|
update[`${repeating_spell}_spelldamage2`] = v[`${repeating_attack}_dmg2base`] || "";
|
|
update[`${repeating_spell}_spelldamagetype2`] = v[`${repeating_attack}_dmg2type`] || "";
|
|
};
|
|
|
|
//SAVING THROW checkbox inside settings for the repeating attack
|
|
update[`${repeating_spell}_spellsave`] = (v[`${repeating_attack}_saveflag`] && v[`${repeating_attack}_saveflag`] != "0") ? v[`${repeating_attack}_saveattr`] : "";
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
};
|
|
|
|
var update_item_from_attack = function(itemid, attackid) {
|
|
getAttrs(["repeating_attack_" + attackid + "_atkname", "repeating_attack_" + attackid + "_dmgbase", "repeating_attack_" + attackid + "_dmg2base", "repeating_attack_" + attackid + "_dmgtype", "repeating_attack_" + attackid + "_dmg2type", "repeating_attack_" + attackid + "_atkrange", "repeating_attack_" + attackid + "_atkmod", "repeating_attack_" + attackid + "_dmgmod", "repeating_inventory_" + itemid + "_itemmodifiers", "repeating_attack_" + attackid + "_versatile_alt", "repeating_inventory_" + itemid + "_itemproperties", "repeating_attack_" + attackid + "_atkmagic"], function(v) {
|
|
var update = {};
|
|
var mods = v["repeating_inventory_" + itemid + "_itemmodifiers"];
|
|
var damage = v["repeating_attack_" + attackid + "_dmgbase"] ? v["repeating_attack_" + attackid + "_dmgbase"] : 0;
|
|
var damage2 = v["repeating_attack_" + attackid + "_dmg2base"] ? v["repeating_attack_" + attackid + "_dmg2base"] : 0;
|
|
var damagetype = v["repeating_attack_" + attackid + "_dmgtype"] ? v["repeating_attack_" + attackid + "_dmgtype"] : 0;
|
|
var damagetype2 = v["repeating_attack_" + attackid + "_dmg2type"] ? v["repeating_attack_" + attackid + "_dmg2type"] : 0;
|
|
var range = v["repeating_attack_" + attackid + "_atkrange"] ? v["repeating_attack_" + attackid + "_atkrange"] : 0;
|
|
var attackmod = v["repeating_attack_" + attackid + "_atkmod"] ? v["repeating_attack_" + attackid + "_atkmod"] : 0;
|
|
var damagemod = v["repeating_attack_" + attackid + "_dmgmod"] ? v["repeating_attack_" + attackid + "_dmgmod"] : 0;
|
|
var magicmod = v["repeating_attack_" + attackid + "_atkmagic"] ? v["repeating_attack_" + attackid + "_atkmagic"] : 0;
|
|
var atktype = "";
|
|
var altprefix = v["repeating_attack_" + attackid + "_versatile_alt"] === "1" ? "Alternate " : "";
|
|
|
|
if(/Alternate Damage:/i.test(v["repeating_inventory_" + itemid + "_itemmodifiers"])) {
|
|
update["repeating_inventory_" + itemid + "_itemname"] = v["repeating_attack_" + attackid + "_atkname"].replace(/\s*(?:\(One-Handed\)|\(Two-Handed\))/, "");
|
|
} else {
|
|
update["repeating_inventory_" + itemid + "_itemname"] = v["repeating_attack_" + attackid + "_atkname"];
|
|
}
|
|
|
|
var attack_type_regex = /(?:^|,)\s*Item Type: (Melee|Ranged) Weapon(?:,|$)/i;
|
|
var attack_type_results = attack_type_regex.exec(v["repeating_inventory_" + itemid + "_itemmodifiers"]);
|
|
atktype = attack_type_results ? attack_type_results[1] : "";
|
|
if(mods) {
|
|
mods = mods.split(",");
|
|
} else {
|
|
mods = [];
|
|
}
|
|
|
|
var damage_regex = new RegExp("^\\s*" + altprefix + "Damage:\\s*(.+)$", "i");
|
|
var damage_found = false;
|
|
for(var i = 0; i < mods.length; i++) {
|
|
if(damage_found = damage_regex.exec(mods[i])) {
|
|
if(damage !== 0) {
|
|
mods[i] = mods[i].replace(damage_found[1], damage);
|
|
} else {
|
|
mods.splice(i, 1);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if(!damage_found && damage !== 0) {
|
|
mods.push(altprefix + "Damage: " + damage);
|
|
}
|
|
|
|
var damage2_regex = new RegExp("^\\s*" + altprefix + "Secondary Damage:\\s*(.+)$", "i");
|
|
var damage2_found = false;
|
|
for(var i = 0; i < mods.length; i++) {
|
|
if(damage2_found = damage2_regex.exec(mods[i])) {
|
|
if(damage2 !== 0) {
|
|
mods[i] = mods[i].replace(damage2_found[1], damage2);
|
|
} else {
|
|
mods.splice(i, 1);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if(!damage2_found && damage2 !== 0) {
|
|
mods.push(altprefix + "Secondary Damage: " + damage2);
|
|
}
|
|
|
|
var dmgtype_regex = new RegExp("^\\s*" + altprefix + "Damage Type:\\s*(.+)$", "i");
|
|
var dmgtype_found = false;
|
|
for(var i = 0; i < mods.length; i++) {
|
|
if(dmgtype_found = dmgtype_regex.exec(mods[i])) {
|
|
if(damagetype !== 0) {
|
|
mods[i] = mods[i].replace(dmgtype_found[1], damagetype);
|
|
} else {
|
|
mods.splice(i, 1);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if(!dmgtype_found && damagetype !== 0) {
|
|
mods.push(altprefix + "Damage Type: " + damagetype);
|
|
}
|
|
|
|
var dmgtype2_regex = new RegExp("^\\s*" + altprefix + "Secondary Damage Type:\\s*(.+)$", "i");
|
|
var dmgtype2_found = false;
|
|
for(var i = 0; i < mods.length; i++) {
|
|
if(dmgtype2_found = dmgtype2_regex.exec(mods[i])) {
|
|
if(damagetype2 !== 0) {
|
|
mods[i] = mods[i].replace(dmgtype_found[1], damagetype);
|
|
} else {
|
|
mods.splice(i, 1);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if(!dmgtype2_found && damagetype2 !== 0) {
|
|
mods.push(altprefix + "Secondary Damage Type: " + damagetype2);
|
|
}
|
|
|
|
var range_found = false;
|
|
for(var i = 0; i < mods.length; i++) {
|
|
if(range_found = /^\s*Range:\s*(.+)$/i.exec(mods[i])) {
|
|
if(range !== 0) {
|
|
mods[i] = mods[i].replace(range_found[1], range);
|
|
} else {
|
|
mods.splice(i, 1);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if(!range_found && range !== 0) {
|
|
mods.push("Range: " + range);
|
|
}
|
|
|
|
var attackmod_regex = new RegExp("^\\s*(?:" + (atktype !== "" ? atktype + "|" : "") + "Weapon) Attacks \\+?(.+)$", "i");
|
|
var attackmod_found = false;
|
|
for(var i = 0; i < mods.length; i++) {
|
|
if(attackmod_found = attackmod_regex.exec(mods[i])) {
|
|
if(magicmod !== 0 || attackmod !== 0) {
|
|
mods[i] = mods[i].replace(attackmod_found[1], magicmod !== 0 ? magicmod : attackmod);
|
|
} else {
|
|
mods.splice(i, 1);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if(!attackmod_found && (magicmod !== 0 || attackmod !== 0)) {
|
|
var properties = v["repeating_inventory_" + itemid + "_itemproperties"];
|
|
if(properties && /Thrown/i.test(properties)) {
|
|
mods.push("Weapon Attacks: " + (magicmod !== 0 ? magicmod : attackmod));
|
|
}
|
|
else {
|
|
mods.push(atktype + " Attacks: " + (magicmod !== 0 ? magicmod : attackmod));
|
|
}
|
|
}
|
|
|
|
var damagemod_regex = new RegExp("^\\s*(?:" + (atktype !== "" ? atktype + "|" : "") + "Weapon) Damage \\+?(.+)$", "i");
|
|
var damagemod_found = false;
|
|
for(var i = 0; i < mods.length; i++) {
|
|
if(damagemod_found = damagemod_regex.exec(mods[i])) {
|
|
if(magicmod !== 0 || damagemod !== 0) {
|
|
mods[i] = mods[i].replace(damagemod_found[1], magicmod !== 0 ? magicmod : attackmod);
|
|
} else {
|
|
mods.splice(i, 1);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if(!damagemod_found && (magicmod !== 0 || damagemod !== 0)) {
|
|
var properties = v["repeating_inventory_" + itemid + "_itemproperties"];
|
|
if(properties && /Thrown/i.test(properties)) {
|
|
mods.push("Weapon Damage: " + (magicmod !== 0 ? magicmod : damagemod));
|
|
}
|
|
else {
|
|
mods.push(atktype + " Damage: " + (magicmod !== 0 ? magicmod : damagemod));
|
|
}
|
|
}
|
|
|
|
update["repeating_inventory_" + itemid + "_itemmodifiers"] = mods.join(",");
|
|
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
};
|
|
|
|
var remove_attack = function(attackid) {
|
|
removeRepeatingRow("repeating_attack_" + attackid);
|
|
};
|
|
|
|
const remove_resource = (id) => {
|
|
const attr = (id === "other_resource") ? id : `repeating_resource_${id}_itemid`;
|
|
let update = {};
|
|
getAttrs([`${attr}`], (v) => {
|
|
const itemid = v[`${attr}`];
|
|
//Uncheck Use As A Resource in inventory for an item if its resource row is deleted
|
|
if (itemid) {
|
|
update[`repeating_inventory_${itemid}_useasresource`] = 0;
|
|
update[`repeating_inventory_${itemid}_itemresourceid`] = "";
|
|
};
|
|
if (id == "other_resource") {
|
|
update["other_resource"] = "";
|
|
update["other_resource_name"] = "";
|
|
update["other_resource_itemid"] = "";
|
|
setAttrs(update, {silent: true});
|
|
} else {
|
|
const currentID = id.replace("repeating_resource_", "").substring(0,20);
|
|
const side = (id.includes("left")) ? `right` : `left`;
|
|
//Get the inputs for the opposite side to see if they are empty.
|
|
//If they are empty delete the entire row. Otherwise set the side that was the source of this event to empty strings
|
|
getAttrs([`repeating_resource_${currentID}_resource_${side}`, `repeating_resource_${currentID}_resource_${side}_name`, `repeating_resource_${currentID}_resource_${side}_max`], (v) => {
|
|
const Name = v[`repeating_resource_${currentID}_resource_${side}_name`] || false;
|
|
const Value = v[`repeating_resource_${currentID}_resource_${side}`] || false;
|
|
const Max = v[`repeating_resource_${currentID}_resource_${side}_max`] || false;
|
|
if (!Name && !Value && !Max) {
|
|
removeRepeatingRow(`repeating_resource_${currentID}`);
|
|
} else {
|
|
update[`repeating_resource_${id}`] = "";
|
|
update[`repeating_resource_${id}_name`] = "";
|
|
update[`repeating_resource_${id}_max`] = "";
|
|
update[`repeating_resource_${id}_itemid`] = "";
|
|
};
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
};
|
|
});
|
|
};
|
|
|
|
const update_weight = function() {
|
|
let update = {};
|
|
let wtotal = 0;
|
|
let weight_attrs = ["cp","sp","ep","gp","pp","encumberance_setting","strength","size","carrying_capacity_mod"];
|
|
getSectionIDs("repeating_inventory", (idarray) => {
|
|
_.each(idarray, (currentID, i) => {
|
|
weight_attrs.push(`repeating_inventory_${currentID}_itemweight`);
|
|
weight_attrs.push(`repeating_inventory_${currentID}_itemcount`);
|
|
});
|
|
getAttrs(weight_attrs, (v) => {
|
|
let coinWeight = 0;
|
|
["cp", "sp", "ep", "gp", "pp"].forEach((type)=> {
|
|
coinWeight += (isNaN(parseInt(v[`${type}`], 10)) === false) ? parseInt(v[`${type}`], 10) : 0;
|
|
});
|
|
wtotal = wtotal + ((coinWeight) / 50);
|
|
|
|
_.each(idarray, (currentID, i) => {
|
|
if (v[`repeating_inventory_${currentID}_itemweight`] && isNaN(parseInt(v[`repeating_inventory_${currentID}_itemweight`], 10)) === false) {
|
|
count = v[`repeating_inventory_${currentID}_itemcount`] && isNaN(parseFloat(v[`repeating_inventory_${currentID}_itemcount`])) === false ? parseFloat(v[`repeating_inventory_${currentID}_itemcount`]) : 1;
|
|
wtotal = wtotal + (parseFloat(v[`repeating_inventory_${currentID}_itemweight`]) * count);
|
|
}
|
|
});
|
|
|
|
update["weighttotal"] = wtotal;
|
|
|
|
const str_base = parseInt(v.strength, 10);
|
|
let size_multiplier = 1;
|
|
if (v["size"] && v["size"] != "") {
|
|
const size = v["size"].toLowerCase().trim();
|
|
size_multiplier =
|
|
(size === "tiny") ? .5 : (size === "large") ? 2 : (size === "huge") ? 4 : (size === "gargantuan") ? 8 : size_multiplier;
|
|
};
|
|
let str = str_base*size_multiplier;
|
|
// Parse the carrying capacitiy modificator if any
|
|
if (v.carrying_capacity_mod) {
|
|
const operator = v.carrying_capacity_mod.substring(0,1);
|
|
const value = v.carrying_capacity_mod.substring(1);
|
|
if(["*","x","+","-"].indexOf(operator) > -1 && isNaN(parseFloat(value,10)) === false) {
|
|
str =
|
|
(operator === "*" || operator == "x") ? str*parseFloat(value,10) :
|
|
(operator === "+") ? str+parseFloat(value,10) :
|
|
(operator === "-") ? str-parseFloat(value,10) :
|
|
str;
|
|
}
|
|
}
|
|
|
|
if (!v.encumberance_setting || v.encumberance_setting === "off") {
|
|
update["encumberance"] = (wtotal > str*15) ? "OVER CARRYING CAPACITY" : " ";
|
|
} else if (v.encumberance_setting === "on") {
|
|
update["encumberance"] =
|
|
(wtotal > str*15) ? "IMMOBILE" :
|
|
(wtotal > str*10) ? "HEAVILY ENCUMBERED" :
|
|
(wtotal > str*5) ? "ENCUMBERED" :
|
|
" ";
|
|
} else {
|
|
update["encumberance"] = " ";
|
|
}
|
|
|
|
setAttrs(update, {silent: true});
|
|
|
|
});
|
|
});
|
|
};
|
|
|
|
var update_ac = function() {
|
|
getAttrs(["custom_ac_flag"], function(v) {
|
|
if(v.custom_ac_flag === "2") {
|
|
return;
|
|
}
|
|
else {
|
|
var update = {};
|
|
var ac_attrs = ["simpleinventory","custom_ac_base","custom_ac_part1","custom_ac_part2","strength_mod","dexterity_mod","constitution_mod","intelligence_mod","wisdom_mod","charisma_mod", "custom_ac_shield"];
|
|
getSectionIDs("repeating_acmod", function(acidarray) {
|
|
_.each(acidarray, function(currentID, i) {
|
|
ac_attrs.push("repeating_acmod_" + currentID + "_global_ac_val");
|
|
ac_attrs.push("repeating_acmod_" + currentID + "_global_ac_active_flag");
|
|
});
|
|
getSectionIDs("repeating_inventory", function(idarray) {
|
|
_.each(idarray, function(currentID, i) {
|
|
ac_attrs.push("repeating_inventory_" + currentID + "_equipped");
|
|
ac_attrs.push("repeating_inventory_" + currentID + "_itemmodifiers");
|
|
});
|
|
getAttrs(ac_attrs, function(b) {
|
|
var custom_total = 0;
|
|
if(v.custom_ac_flag === "1") {
|
|
var base = isNaN(parseInt(b.custom_ac_base, 10)) === false ? parseInt(b.custom_ac_base, 10) : 10;
|
|
var part1attr = b.custom_ac_part1.toLowerCase();
|
|
var part2attr = b.custom_ac_part2.toLowerCase();
|
|
var part1 = part1attr === "none" ? 0 : parseInt(b[part1attr + "_mod"], 10);
|
|
var part2 = part2attr === "none" ? 0 : parseInt(b[part2attr + "_mod"], 10);
|
|
custom_total = base + part1 + part2;
|
|
}
|
|
var globalacmod = 0;
|
|
_.each(acidarray, function(currentID, i) {
|
|
if(b["repeating_acmod_" + currentID + "_global_ac_active_flag"] == "1") {
|
|
globalacmod += parseInt(b["repeating_acmod_" + currentID + "_global_ac_val"], 10);
|
|
}
|
|
});
|
|
var dexmod = +b["dexterity_mod"];
|
|
var total = 10 + dexmod;
|
|
var armorcount = 0;
|
|
var shieldcount = 0;
|
|
var armoritems = [];
|
|
if(b.simpleinventory === "complex") {
|
|
_.each(idarray, function(currentID, i) {
|
|
if(b["repeating_inventory_" + currentID + "_equipped"] && b["repeating_inventory_" + currentID + "_equipped"] === "1" && b["repeating_inventory_" + currentID + "_itemmodifiers"] && b["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().indexOf("ac") > -1) {
|
|
var mods = b["repeating_inventory_" + currentID + "_itemmodifiers"].split(",");
|
|
var ac = 0;
|
|
var type = "mod";
|
|
_.each(mods, function(mod) {
|
|
if(mod.substring(0,10) === "Item Type:") {
|
|
type = mod.substring(11, mod.length).trim().toLowerCase();
|
|
}
|
|
if(mod.toLowerCase().indexOf("ac:") > -1 || mod.toLowerCase().indexOf("ac +") > -1 || mod.toLowerCase().indexOf("ac+") > -1) {
|
|
var regex = mod.replace(/[^0-9]/g, "");
|
|
var bonus = regex && regex.length > 0 && isNaN(parseInt(regex,10)) === false ? parseInt(regex,10) : 0;
|
|
ac = ac + bonus;
|
|
}
|
|
if(mod.toLowerCase().indexOf("ac -") > -1 || mod.toLowerCase().indexOf("ac-") > -1) {
|
|
var regex = mod.replace(/[^0-9]/g, "");
|
|
var bonus = regex && regex.length > 0 && isNaN(parseInt(regex,10)) === false ? parseInt(regex,10) : 0;
|
|
ac = ac - bonus;
|
|
}
|
|
});
|
|
armoritems.push({type: type, ac: ac});
|
|
}
|
|
});
|
|
armorcount = armoritems.filter(function(item){ return item["type"].indexOf("armor") > -1 }).length;
|
|
shieldcount = armoritems.filter(function(item){ return item["type"].indexOf("shield") > -1 }).length;
|
|
var base = dexmod;
|
|
var armorac = 10;
|
|
var shieldac = 0;
|
|
var modac = 0;
|
|
|
|
_.each(armoritems, function(item) {
|
|
if(item["type"].indexOf("light armor") > -1) {
|
|
armorac = item["ac"];
|
|
base = dexmod;
|
|
}
|
|
else if(item["type"].indexOf("medium armor") > -1) {
|
|
armorac = item["ac"];
|
|
base = Math.min(dexmod, 2);
|
|
}
|
|
else if(item["type"].indexOf("heavy armor") > -1) {
|
|
armorac = item["ac"];
|
|
base = 0;
|
|
}
|
|
else if(item["type"].indexOf("shield") > -1) {
|
|
shieldac = item["ac"];
|
|
}
|
|
else {
|
|
modac = modac + item["ac"]
|
|
}
|
|
});
|
|
|
|
total = base + armorac + shieldac + modac;
|
|
|
|
};
|
|
update["armorwarningflag"] = "hide";
|
|
update["customacwarningflag"] = "hide";
|
|
if(armorcount > 1 || shieldcount > 1) {
|
|
update["armorwarningflag"] = "show";
|
|
}
|
|
update["ac"] = total + globalacmod;
|
|
if(custom_total > 0) {
|
|
if(armorcount > 0 || (shieldcount > 0 && b.custom_ac_shield != "yes")) {
|
|
update["customacwarningflag"] = "show";
|
|
}
|
|
else {
|
|
update["ac"] = b.custom_ac_shield == "yes" ? custom_total + shieldac + globalacmod + modac : custom_total + globalacmod + modac;
|
|
}
|
|
}
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
});
|
|
});
|
|
};
|
|
});
|
|
};
|
|
|
|
var check_customac = function(attr) {
|
|
getAttrs(["custom_ac_flag","custom_ac_part1","custom_ac_part2"], function(v) {
|
|
if(v["custom_ac_flag"] && v["custom_ac_flag"] === "1" && ((v["custom_ac_part1"] && v["custom_ac_part1"] === attr) || (v["custom_ac_part2"] && v["custom_ac_part2"] === attr))) {
|
|
update_ac();
|
|
}
|
|
});
|
|
};
|
|
|
|
const update_initiative = () => {
|
|
const attrs_to_get = ["dexterity","dexterity_mod","initmod","jack_of_all_trades","jack","init_tiebreaker","pb_type"];
|
|
getSectionIDs("repeating_inventory", (idarray) => {
|
|
_.each(idarray, (currentID) => {
|
|
attrs_to_get.push(`repeating_inventory_${currentID}_equipped`);
|
|
attrs_to_get.push(`repeating_inventory_${currentID}_itemmodifiers`);
|
|
});
|
|
getAttrs(attrs_to_get, (v) => {
|
|
let update = {};
|
|
let final_init = parseInt(v["dexterity_mod"], 10);
|
|
if (v["initmod"] && !isNaN(parseInt(v["initmod"], 10))) {
|
|
final_init = final_init + parseInt(v["initmod"], 10);
|
|
}
|
|
if (v["init_tiebreaker"] && v["init_tiebreaker"] != 0) {
|
|
final_init = final_init + (parseInt(v["dexterity"], 10)/100);
|
|
}
|
|
if (v["jack_of_all_trades"] && v["jack_of_all_trades"] != 0) {
|
|
if (v["pb_type"] && v["pb_type"] === "die" && v["jack"]) {
|
|
final_init = final_init + "+" + v["jack"];
|
|
} else if (v["jack"] && !isNaN(parseInt(v["jack"], 10))) {
|
|
final_init = final_init + parseInt(v["jack"], 10);
|
|
}
|
|
}
|
|
_.each(idarray, (currentID) => {
|
|
if (v[`repeating_inventory_${currentID}_equipped`] && v[`repeating_inventory_${currentID}_equipped`] === "1" && v[`repeating_inventory_${currentID}_itemmodifiers`] && v[`repeating_inventory_${currentID}_itemmodifiers`].toLowerCase().indexOf("ability checks") > -1) {
|
|
const mods = v[`repeating_inventory_${currentID}_itemmodifiers`].toLowerCase().split(",");
|
|
_.each(mods, (mod) => {
|
|
if (mod.indexOf("ability checks") > -1) {
|
|
const new_mod = !isNaN(parseInt(mod.replace(/[^0-9]/g, ""), 10)) ? parseInt(mod.replace(/[^0-9]/g, ""), 10) : false;
|
|
final_init = (mod.indexOf("-") > -1 && new_mod) ? final_init - new_mod : (new_mod) ? final_init + new_mod : final_init;
|
|
}
|
|
});
|
|
}
|
|
});
|
|
if (final_init % 1 != 0) {
|
|
final_init = parseFloat(final_init.toPrecision(12)); // ROUNDING ERROR BUGFIX
|
|
}
|
|
update["initiative_bonus"] = final_init;
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
});
|
|
};
|
|
|
|
const update_class = () => {
|
|
getAttrs(["class", "base_level","custom_class","cust_hitdietype","cust_spellcasting_ability","cust_strength_save_prof","cust_dexterity_save_prof","cust_constitution_save_prof","cust_intelligence_save_prof","cust_wisdom_save_prof","cust_charisma_save_prof", "npc"], (v) => {
|
|
if (v.npc && v.npc == "1") { return; }
|
|
const abilites = ["Strength", "Dexterity", "Constitution", "Intelligence", "Wisdom", "Charisma"];
|
|
//Custom Classes
|
|
if (v.custom_class && v.custom_class != "0") {
|
|
update = {};
|
|
update["hitdietype"] = v.cust_hitdietype;
|
|
update["spellcasting_ability"] = v.cust_spellcasting_ability;
|
|
abilites.forEach((save) => {
|
|
const ability = save.toLowerCase();
|
|
update[`${ability}_save_prof`] = v[`cust_${ability}_save_prof`];
|
|
});
|
|
setAttrs(update, {silent: true});
|
|
//If "Choose" has been selected in the select
|
|
} else if (v.class === "") {
|
|
update = {};
|
|
update["hitdietype"] = 6;
|
|
update["spellcasting_ability"] = "0*";
|
|
abilites.forEach((save) => {
|
|
const ability = save.toLowerCase();
|
|
update[`${ability}_save_prof`] = 0;
|
|
});
|
|
setAttrs(update, {silent: true});
|
|
//Standard classes can pull their data from the Comependium
|
|
} else {
|
|
getCompendiumPage(v.class, (pages) => {
|
|
pages = removeDuplicatedPageData(pages);
|
|
update = {};
|
|
const classPages = (Array.isArray(pages)) ? pages : [pages];
|
|
classPages.forEach((classData) => {
|
|
if (classData.data && 'Category' in classData.data && classData.data[`Category`] === "Classes") {
|
|
update["hitdietype"] = classData.data["Hit Die"].slice(1);
|
|
update["spellcasting_ability"] = (classData.data["Spellcasting Ability"]) ? `@{${classData.data["Spellcasting Ability"].toLowerCase()}_mod}+` : "0*";
|
|
abilites.forEach((save) => {
|
|
const ability = save.toLowerCase();
|
|
update[`${ability}_save_prof`] = (classData.data["data-Saving Throws"].indexOf(`${save}`) > -1) ? "(@{pb})" : 0;
|
|
update_save(ability);;
|
|
});
|
|
};
|
|
|
|
setAttrs(update, {silent: true});
|
|
//Update Spell info to change or remove casting attributes in Spells
|
|
update_spell_info();
|
|
});
|
|
});
|
|
};
|
|
});
|
|
set_level();
|
|
};
|
|
|
|
const set_level = function() {
|
|
getAttrs(["base_level","multiclass1_flag","multiclass2_flag","multiclass3_flag","multiclass1_lvl","multiclass2_lvl","multiclass3_lvl","class","multiclass1","multiclass2","multiclass3", "arcane_fighter", "arcane_rogue", "custom_class", "cust_spellslots", "cust_classname", "level_calculations", "class", "subclass", "multiclass1_subclass","multiclass2_subclass","multiclass3_subclass"], (v) => {
|
|
let update = {};
|
|
let callbacks = [];
|
|
const multiclass = (v[`multiclass1_flag`] && v[`multiclass1_flag`] === "1") || (v.multiclass2_flag && v.multiclass2_flag === "1") || (v.multiclass3_flag && v.multiclass3_flag === "1") ? true : false;
|
|
const finalclass = (v[`custom_class`] && v[`custom_class`] != "0") ? v[`cust_spellslots`] : v[`class`];
|
|
let finallevel = (v[`base_level`] && v[`base_level`] > 0) ? parseInt(v.base_level,10) : 1;
|
|
const charclass = (v[`custom_class`] && v[`custom_class`] != "0") ? v[`cust_classname`] : v[`class`];
|
|
let hitdie_final = (multiclass) ? `?{Hit Die Class|${charclass},@{hitdietype}` : "@{hitdietype}";
|
|
const subclass = (v[`subclass`]) ? v[`subclass`] + " " : "";
|
|
let class_display = `${subclass}${charclass} ${finallevel}`;
|
|
|
|
// This nested array is used to determine the overall spellcasting level for the character.
|
|
var classes = [ [finalclass.toLowerCase(), v[`base_level`]] ];
|
|
|
|
["multiclass1", "multiclass2", "multiclass3"].forEach((multiclass) => {
|
|
if (v[`${multiclass}_flag`] && v[`${multiclass}_flag`] === "1") {
|
|
const multiclasslevel = (v[`${multiclass}_lvl`] && v[`${multiclass}_lvl`] > 0) ? parseInt(v[`${multiclass}_lvl`], 10) : 1;
|
|
const subclass = (v[`${multiclass}_subclass`]) ? v[`${multiclass}_subclass`] + " " : "";
|
|
finallevel = finallevel + multiclasslevel;
|
|
hitdie_final = `${hitdie_final}|` + v[`${multiclass}`].charAt(0).toUpperCase() + v[`${multiclass}`].slice(1) + "," + checkHitDie(v[`${multiclass}`]);
|
|
classes.push([ v[`${multiclass}`], multiclasslevel ]);
|
|
class_display = `${class_display}, ${subclass}` + v[`${multiclass}`] + ` ${multiclasslevel}`;
|
|
};
|
|
});
|
|
|
|
const casterlevel = checkCasterLevel(classes, v[`arcane_fighter`], v[`arcane_rogue`]);
|
|
|
|
update["hitdie_final"] = (multiclass) ? `${hitdie_final}}` : hitdie_final;
|
|
update["level"] = finallevel;
|
|
update["caster_level"] = casterlevel;
|
|
update["class_display"] = class_display;
|
|
|
|
if(!v["level_calculations"] || v["level_calculations"] === "on") {
|
|
update["hit_dice_max"] = finallevel;
|
|
callbacks.push(() => {update_spell_slots();} );
|
|
}
|
|
callbacks.push(() => {update_pb();} );
|
|
callbacks.push(() => {update_leveler_display();} );
|
|
setAttrs(update, {silent: true},() => {callbacks.forEach((callback) => {callback(); })} );
|
|
});
|
|
};
|
|
|
|
var isMultiCaster = function(classes, arcane_fighter, arcane_rogue) {
|
|
var singlecaster = false;
|
|
var multicaster = false;
|
|
_.each(classes, function(multiclass) {
|
|
var caster = getCasterType(multiclass[0], multiclass[1], arcane_fighter, arcane_rogue) > 0;
|
|
if(caster && singlecaster) {
|
|
multicaster = true;
|
|
} else if(caster) {
|
|
singlecaster = true;
|
|
}
|
|
});
|
|
return multicaster;
|
|
};
|
|
|
|
var getCasterType = function(class_string, levels, arcane_fighter, arcane_rogue) {
|
|
var full = ["bard","cleric","druid","sorcerer","wizard","full"];
|
|
var half = ["artificer","paladin","ranger","half"];
|
|
class_string = class_string.toLowerCase();
|
|
if(full.indexOf(class_string) != -1) {
|
|
return 1;
|
|
} else if(half.indexOf(class_string) != -1) {
|
|
if(class_string === "artificer" && levels == 1) return 1;
|
|
return (levels == 1) ? 0 : (1/2);
|
|
} else if(class_string === "third" || (class_string === "fighter" && arcane_fighter === "1") || (class_string === "rogue" && arcane_rogue === "1")) {
|
|
return (levels == 1 || levels == 2) ? 0 : (1/3);
|
|
} else {
|
|
return 0;
|
|
}
|
|
};
|
|
|
|
var checkCasterLevel = function(classes, arcane_fighter, arcane_rogue) {
|
|
console.log("CHECKING CASTER LEVEL");
|
|
var multicaster = isMultiCaster(classes, arcane_fighter, arcane_rogue);
|
|
var totalcasterlevel = 0;
|
|
_.each(classes, function(multiclass) {
|
|
var casterlevel = parseInt(multiclass[1], 10) * getCasterType(multiclass[0], multiclass[1], arcane_fighter, arcane_rogue);
|
|
// Characters with multiple spellcasting classes round down the casting level for that class
|
|
// Character with a single spellcasting class round up the casting level
|
|
totalcasterlevel = totalcasterlevel + (multicaster ? Math.floor(casterlevel) : Math.ceil(casterlevel));
|
|
});
|
|
return totalcasterlevel;
|
|
};
|
|
|
|
var checkHitDie = function(class_string) {
|
|
var d10class = ["fighter","paladin","ranger"];
|
|
var d8class = ["artificer","bard","cleric","druid","monk","rogue","warlock"];
|
|
var d6class = ["sorcerer","wizard"];
|
|
class_string = class_string.toLowerCase();
|
|
if(class_string === "barbarian") {return "12"}
|
|
else if (d10class.indexOf(class_string) != -1) {return "10"}
|
|
else if (d8class.indexOf(class_string) != -1) {return "8"}
|
|
else if (d6class.indexOf(class_string) != -1) {return "6"}
|
|
else {return "0"};
|
|
};
|
|
|
|
var update_leveler_display = function () {
|
|
getAttrs(["experience","level"], function(v) {
|
|
let lvl = 0;
|
|
let exp = 0;
|
|
let update = {};
|
|
update["showleveler"] = 0;
|
|
if(v["level"] && !isNaN(parseInt(v["level"], 10)) && parseInt(v["level"], 10) > 0) {
|
|
lvl = parseInt(v["level"], 10);
|
|
}
|
|
if(v["experience"] && !isNaN(parseInt(v["experience"], 10)) && parseInt(v["experience"], 10) > 0) {
|
|
exp = parseInt(v["experience"], 10);
|
|
}
|
|
if(lvl > 0 && exp > 0) {
|
|
if((lvl === 1 && exp >= 300) || (lvl === 2 && exp >= 900) || (lvl === 3 && exp >= 2700) || (lvl === 4 && exp >= 6500) || (lvl === 5 && exp >= 14000) || (lvl === 6 && exp >= 23000) || (lvl === 7 && exp >= 34000) || (lvl === 8 && exp >= 48000) || (lvl === 9 && exp >= 64000) || (lvl === 10 && exp >= 85000) || (lvl === 11 && exp >= 100000) || (lvl === 12 && exp >= 120000) || (lvl === 13 && exp >= 140000) || (lvl === 14 && exp >= 165000) || (lvl === 15 && exp >= 195000) || (lvl === 16 && exp >= 225000) || (lvl === 17 && exp >= 265000) || (lvl === 18 && exp >= 305000) || (lvl === 19 && exp >= 355000)) {
|
|
update["showleveler"] = 1;
|
|
};
|
|
};
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
};
|
|
|
|
var update_spell_slots = function() {
|
|
getAttrs(["lvl1_slots_mod","lvl2_slots_mod","lvl3_slots_mod","lvl4_slots_mod","lvl5_slots_mod","lvl6_slots_mod","lvl7_slots_mod","lvl8_slots_mod","lvl9_slots_mod","caster_level"], function(v) {
|
|
var update = {};
|
|
var lvl = v["caster_level"] && !isNaN(parseInt(v["caster_level"], 10)) ? parseInt(v["caster_level"], 10) : 0;
|
|
var l1 = v["lvl1_slots_mod"] && !isNaN(parseInt(v["lvl1_slots_mod"], 10)) ? parseInt(v["lvl1_slots_mod"], 10) : 0;
|
|
var l2 = v["lvl2_slots_mod"] && !isNaN(parseInt(v["lvl2_slots_mod"], 10)) ? parseInt(v["lvl2_slots_mod"], 10) : 0;
|
|
var l3 = v["lvl3_slots_mod"] && !isNaN(parseInt(v["lvl3_slots_mod"], 10)) ? parseInt(v["lvl3_slots_mod"], 10) : 0;
|
|
var l4 = v["lvl4_slots_mod"] && !isNaN(parseInt(v["lvl4_slots_mod"], 10)) ? parseInt(v["lvl4_slots_mod"], 10) : 0;
|
|
var l5 = v["lvl5_slots_mod"] && !isNaN(parseInt(v["lvl5_slots_mod"], 10)) ? parseInt(v["lvl5_slots_mod"], 10) : 0;
|
|
var l6 = v["lvl6_slots_mod"] && !isNaN(parseInt(v["lvl6_slots_mod"], 10)) ? parseInt(v["lvl6_slots_mod"], 10) : 0;
|
|
var l7 = v["lvl7_slots_mod"] && !isNaN(parseInt(v["lvl7_slots_mod"], 10)) ? parseInt(v["lvl7_slots_mod"], 10) : 0;
|
|
var l8 = v["lvl8_slots_mod"] && !isNaN(parseInt(v["lvl8_slots_mod"], 10)) ? parseInt(v["lvl8_slots_mod"], 10) : 0;
|
|
var l9 = v["lvl9_slots_mod"] && !isNaN(parseInt(v["lvl9_slots_mod"], 10)) ? parseInt(v["lvl9_slots_mod"], 10) : 0;
|
|
if(lvl > 0) {
|
|
l1 = l1 + Math.min((lvl + 1),4);
|
|
if(lvl < 3) {l2 = l2 + 0;} else if(lvl === 3) {l2 = l2 + 2;} else {l2 = l2 + 3;};
|
|
if(lvl < 5) {l3 = l3 + 0;} else if(lvl === 5) {l3 = l3 + 2;} else {l3 = l3 + 3;};
|
|
if(lvl < 7) {l4 = l4 + 0;} else if(lvl === 7) {l4 = l4 + 1;} else if(lvl === 8) {l4 = l4 + 2;} else {l4 = l4 + 3;};
|
|
if(lvl < 9) {l5 = l5 + 0;} else if(lvl === 9) {l5 = l5 + 1;} else if(lvl < 18) {l5 = l5 + 2;} else {l5 = l5 + 3;};
|
|
if(lvl < 11) {l6 = l6 + 0;} else if(lvl < 19) {l6 = l6 + 1;} else {l6 = l6 + 2;};
|
|
if(lvl < 13) {l7 = l7 + 0;} else if(lvl < 20) {l7 = l7 + 1;} else {l7 = l7 + 2;};
|
|
if(lvl < 15) {l8 = l8 + 0;} else {l8 = l8 + 1;};
|
|
if(lvl < 17) {l9 = l9 + 0;} else {l9 = l9 + 1;};
|
|
};
|
|
|
|
update["lvl1_slots_total"] = l1;
|
|
update["lvl2_slots_total"] = l2;
|
|
update["lvl3_slots_total"] = l3;
|
|
update["lvl4_slots_total"] = l4;
|
|
update["lvl5_slots_total"] = l5;
|
|
update["lvl6_slots_total"] = l6;
|
|
update["lvl7_slots_total"] = l7;
|
|
update["lvl8_slots_total"] = l8;
|
|
update["lvl9_slots_total"] = l9;
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
};
|
|
|
|
var update_pb = function() {
|
|
callbacks = [];
|
|
getAttrs(["level","pb_type","pb_custom"], function(v) {
|
|
var update = {};
|
|
var pb = 2;
|
|
var lvl = parseInt(v["level"],10);
|
|
if(lvl < 5) {pb = "2"} else if(lvl < 9) {pb = "3"} else if(lvl < 13) {pb = "4"} else if(lvl < 17) {pb = "5"} else {pb = "6"}
|
|
var jack = Math.floor(pb/2);
|
|
if(v["pb_type"] === "die") {
|
|
update["jack"] = "d" + pb;
|
|
update["pb"] = "d" + pb*2;
|
|
update["pbd_safe"] = "cs0cf0";
|
|
}
|
|
else if(v["pb_type"] === "custom" && v["pb_custom"] && v["pb_custom"] != "") {
|
|
update["pb"] = v["pb_custom"]
|
|
update["jack"] = !isNaN(parseInt(v["pb_custom"],10)) ? Math.floor(parseInt(v["pb_custom"],10)/2) : jack;
|
|
update["pbd_safe"] = "";
|
|
}
|
|
else {
|
|
update["pb"] = pb;
|
|
update["jack"] = jack;
|
|
update["pbd_safe"] = "";
|
|
};
|
|
callbacks.push( function() {update_attacks("all");} );
|
|
callbacks.push( function() {update_spell_info();} );
|
|
callbacks.push( function() {update_jack_attr();} );
|
|
callbacks.push( function() {update_initiative();} );
|
|
callbacks.push( function() {update_tool("all");} );
|
|
callbacks.push( function() {update_all_saves();} );
|
|
callbacks.push( function() {update_skills(["athletics", "acrobatics", "sleight_of_hand", "stealth", "eldertech", "history", "investigation", "nature", "religion", "animal_handling", "insight", "materials", "medicine", "perception", "survival", "deception", "intimidation", "performance", "persuasion", "politics"]);} );
|
|
|
|
setAttrs(update, {silent: true}, function() {callbacks.forEach(function(callback) {callback(); })} );
|
|
});
|
|
};
|
|
|
|
var update_jack_attr = function() {
|
|
var update = {};
|
|
getAttrs(["jack_of_all_trades","jack"], function(v) {
|
|
if(v["jack_of_all_trades"] && v["jack_of_all_trades"] != 0) {
|
|
update["jack_bonus"] = "+" + v["jack"];
|
|
update["jack_attr"] = "+" + v["jack"] + "@{pbd_safe}";
|
|
}
|
|
else {
|
|
update["jack_bonus"] = "";
|
|
update["jack_attr"] = "";
|
|
}
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
};
|
|
|
|
var update_spell_info = function(attr) {
|
|
var update = {};
|
|
getAttrs(["spellcasting_ability","spell_dc_mod","globalmagicmod","strength_mod","dexterity_mod","constitution_mod","intelligence_mod","wisdom_mod","charisma_mod"], function(v) {
|
|
if(attr && v["spellcasting_ability"] && v["spellcasting_ability"].indexOf(attr) === -1) {
|
|
return
|
|
};
|
|
if(!v["spellcasting_ability"] || (v["spellcasting_ability"] && v["spellcasting_ability"] === "0*")) {
|
|
update["spell_attack_bonus"] = "0";
|
|
update["spell_save_dc"] = "0";
|
|
var callback = function() {update_attacks("spells")};
|
|
setAttrs(update, {silent: true}, callback);
|
|
return
|
|
};
|
|
var attr = attr ? attr : "";
|
|
console.log("UPDATING SPELL INFO: " + attr);
|
|
|
|
var ability = parseInt(v[v["spellcasting_ability"].substring(2,v["spellcasting_ability"].length-2)],10);
|
|
var spell_mod = v["globalmagicmod"] && !isNaN(parseInt(v["globalmagicmod"], 10)) ? parseInt(v["globalmagicmod"], 10) : 0;
|
|
var atk = v["globalmagicmod"] && !isNaN(parseInt(v["globalmagicmod"], 10)) ? ability + parseInt(v["globalmagicmod"], 10) : ability;
|
|
var dc = v["spell_dc_mod"] && !isNaN(parseInt(v["spell_dc_mod"], 10)) ? 8 + ability + parseInt(v["spell_dc_mod"], 10) : 8 + ability;
|
|
var itemfields = ["pb_type","pb"];
|
|
|
|
getSectionIDs("repeating_inventory", function(idarray) {
|
|
_.each(idarray, function(currentID, i) {
|
|
itemfields.push("repeating_inventory_" + currentID + "_equipped");
|
|
itemfields.push("repeating_inventory_" + currentID + "_itemmodifiers");
|
|
});
|
|
getAttrs(itemfields, function(v) {
|
|
_.each(idarray, function(currentID) {
|
|
if((!v["repeating_inventory_" + currentID + "_equipped"] || v["repeating_inventory_" + currentID + "_equipped"] === "1") && v["repeating_inventory_" + currentID + "_itemmodifiers"] && v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().indexOf("spell" > -1)) {
|
|
var mods = v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().split(",");
|
|
_.each(mods, function(mod) {
|
|
if(mod.indexOf("spell attack") > -1) {
|
|
var substr = mod.slice(mod.lastIndexOf("spell attack") + "spell attack".length);
|
|
atk = substr && substr.length > 0 && !isNaN(parseInt(substr,10)) ? atk + parseInt(substr,10) : atk;
|
|
spell_mod = substr && substr.length > 0 && !isNaN(parseInt(substr,10)) ? spell_mod + parseInt(substr,10) : spell_mod;
|
|
};
|
|
if(mod.indexOf("spell dc") > -1) {
|
|
var substr = mod.slice(mod.lastIndexOf("spell dc") + "spell dc".length);
|
|
dc = substr && substr.length > 0 && !isNaN(parseInt(substr,10)) ? dc + parseInt(substr,10) : dc;
|
|
};
|
|
});
|
|
};
|
|
});
|
|
|
|
if(v["pb_type"] && v["pb_type"] === "die") {
|
|
atk = atk + "+" + v["pb"];
|
|
//Fixing Spell DC when using type Die
|
|
//By Miguel
|
|
//Used to be equals to: dc + parseInt(v["pb"].substring(1), 10) / 2
|
|
dc = dc + "+" + v["pb"];
|
|
}
|
|
else {
|
|
atk = parseInt(atk, 10) + parseInt(v["pb"], 10);
|
|
dc = parseInt(dc, 10) + parseInt(v["pb"], 10);
|
|
};
|
|
update["spell_attack_mod"] = spell_mod;
|
|
update["spell_attack_bonus"] = atk;
|
|
update["spell_save_dc"] = dc;
|
|
var callback = function() {update_attacks("spells")};
|
|
setAttrs(update, {silent: true}, callback);
|
|
});
|
|
});
|
|
});
|
|
};
|
|
|
|
var update_passive_perception = function() {
|
|
getAttrs(["pb_type","passiveperceptionmod","perception_bonus"], function(v) {
|
|
var passive_perception = 10;
|
|
var mod = !isNaN(parseInt(v["passiveperceptionmod"],10)) ? parseInt(v["passiveperceptionmod"],10) : 0;
|
|
var bonus = !isNaN(parseInt(v["perception_bonus"],10)) ? parseInt(v["perception_bonus"],10) : 0;
|
|
if(v["pb_type"] && v["pb_type"] === "die" && v["perception_bonus"] && isNaN(v["perception_bonus"]) && v["perception_bonus"].indexOf("+") > -1) {
|
|
var pieces = v["perception_bonus"].split(/\+|d/);
|
|
var base = !isNaN(parseInt(pieces[0],10)) ? parseInt(pieces[0],10) : 0;
|
|
var num_dice = !isNaN(parseInt(pieces[1],10)) ? parseInt(pieces[1],10) : 1;
|
|
var half_pb_die = !isNaN(parseInt(pieces[2],10)) ? parseInt(pieces[2],10)/2 : 2;
|
|
bonus = base + (num_dice * half_pb_die);
|
|
}
|
|
passive_perception = passive_perception + bonus + mod;
|
|
setAttrs({passive_wisdom: passive_perception})
|
|
});
|
|
};
|
|
|
|
var update_race_display = function() {
|
|
getAttrs(["race", "subrace"], function(v) {
|
|
var final_race = "";
|
|
final_race = v.subrace ? v.subrace : v.race;
|
|
if(v.race.toLowerCase() === "dragonborn") { final_race = v.race; };
|
|
setAttrs({race_display: final_race});
|
|
});
|
|
};
|
|
|
|
var organize_section_proficiencies = function() {
|
|
getSectionIDs("proficiencies", function(ids) {
|
|
var attribs = ["_reporder_repeating_proficiencies"];
|
|
_.each(ids, function(id) {
|
|
attribs.push("repeating_proficiencies_" + id + "_prof_type");
|
|
attribs.push("repeating_proficiencies_" + id + "_name");
|
|
});
|
|
|
|
getAttrs(attribs, function(v) {
|
|
var final_array = _(ids).chain().sortBy(function(id) {
|
|
return v["repeating_proficiencies_" + id + "_name"];
|
|
}).sortBy(function(id) {
|
|
return v["repeating_proficiencies_" + id + "_prof_type"];
|
|
}).value();
|
|
_.each(final_array, function(id) {
|
|
});
|
|
if(final_array && final_array.length > 0) {
|
|
setSectionOrder("proficiencies", final_array);
|
|
};
|
|
});
|
|
});
|
|
};
|
|
|
|
const update_challenge = () => {
|
|
getAttrs(["npc_challenge"], (v) => {
|
|
let update = {};
|
|
const challengeRatingsXP = { '0':'10', '1/8':'25', '1/4':'50', '1/2':'100', '1':'200', '2':'450', '3':'700', '4':'1100', '5':'1800', '6':'2300', '7':'2900', '8':'3900', '9':'5000', '10':'5900', '11':'7200', '12':'8400', '13':'10000', '14':'11500', '15':'13000', '16':'15000', '17':'18000', '18':'20000', '19':'22000', '20':'25000', '21':'33000', '22':'41000', '23':'50000', '24':'62000', '25':'75000', '26':'90000', '27':'105000', '28':'120000', '29':'135000', '30':'155000'
|
|
};
|
|
|
|
const xp = parseInt(challengeRatingsXP[v.npc_challenge]) || 0;
|
|
const pb = xp <= 1100 ? 2 : xp <= 3900 ? 3 : xp <= 8400 ? 4 : xp <= 15000 ? 5 : xp <= 25000 ? 6 : xp <= 62000 ? 7 : xp <= 120000 ? 8 : xp <= 155000 ? 9 : 0;
|
|
|
|
update["npc_xp"] = xp;
|
|
update["pb_custom"] = pb;
|
|
update["pb_type"] = "custom";
|
|
setAttrs(update, {silent: true}, function() {update_pb()});
|
|
});
|
|
};
|
|
|
|
const update_npc_saves = () => {
|
|
const list = ["npc_str_save_base","npc_dex_save_base","npc_con_save_base","npc_int_save_base","npc_wis_save_base","npc_cha_save_base"];
|
|
const type = "save";
|
|
update_npc_lists(list, type);
|
|
};
|
|
|
|
const update_npc_skills = () => {
|
|
const list = ["npc_acrobatics_base","npc_animal_handling_base","npc_eldertech_base","npc_athletics_base","npc_deception_base","npc_history_base","npc_insight_base","npc_intimidation_base","npc_investigation_base","npc_materials_base","npc_medicine_base","npc_nature_base","npc_perception_base","npc_performance_base","npc_persuasion_base","npc_politics_base","npc_religion_base","npc_sleight_of_hand_base","npc_stealth_base","npc_survival_base"];
|
|
const type = "skills";
|
|
update_npc_lists(list, type);
|
|
};
|
|
|
|
const update_npc_lists = (list, type) => {
|
|
getAttrs(list, function(v) {
|
|
let update = {};
|
|
let last_save = 0;
|
|
let npc_flag = 0;
|
|
|
|
_.each(list.reverse(), (base) => {
|
|
const attr = base.slice(4, -5); //Remove npc_ and _base
|
|
let item = parseInt(v[`${base}`], 10);
|
|
|
|
// CSS will add comma :after 2 & 4 and +/- :before
|
|
// 1 = Positive Number, 2 = Last Number, 3 = Negative Number, 4 = Last Negative Number
|
|
if (v[`${base}`] && !isNaN(item) || v[`${base}`] === 0) {
|
|
if (last_save === 0) {
|
|
last_save = 1;
|
|
item_flag = item < 0 ? 4 : 2;
|
|
} else {
|
|
item_flag = item < 0 ? 3 : 1;
|
|
}
|
|
} else {
|
|
item_flag = 0;
|
|
item = "";
|
|
};
|
|
|
|
update[`npc_${attr}_flag`] = item_flag;
|
|
update[`npc_${attr}`] = item;
|
|
|
|
npc_flag += item_flag;
|
|
});
|
|
|
|
const flagAttr = (type === "save") ? "saving" : type;
|
|
update[`npc_${flagAttr}_flag`] = (npc_flag === 0) ? "" : npc_flag;
|
|
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
};
|
|
|
|
var update_npc_action = function(update_id, legendary) {
|
|
if(update_id.substring(0,1) === "-" && update_id.length === 20) {
|
|
do_update_npc_action([update_id], legendary);
|
|
}
|
|
else if(update_id === "all") {
|
|
var legendary_array = [];
|
|
var actions_array = [];
|
|
getSectionIDs("repeating_npcaction-l", function(idarray) {
|
|
legendary_array = idarray;
|
|
if(legendary_array.length > 0) {
|
|
do_update_npc_action(legendary_array, true);
|
|
}
|
|
getSectionIDs("repeating_npcaction", function(idarray) {
|
|
actions_array = idarray.filter(function(i) {return legendary_array.indexOf(i) < 0;});
|
|
if(actions_array.length > 0) {
|
|
do_update_npc_action(actions_array, false);
|
|
};
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
var do_update_npc_action = function(action_array, legendary) {
|
|
var repvar = legendary ? "repeating_npcaction-l_" : "repeating_npcaction_";
|
|
var action_attribs = ["dtype"];
|
|
_.each(action_array, function(actionid) {
|
|
action_attribs.push(repvar + actionid + "_attack_flag");
|
|
action_attribs.push(repvar + actionid + "_attack_type");
|
|
action_attribs.push(repvar + actionid + "_attack_range");
|
|
action_attribs.push(repvar + actionid + "_attack_target");
|
|
action_attribs.push(repvar + actionid + "_attack_tohit");
|
|
action_attribs.push(repvar + actionid + "_attack_damage");
|
|
action_attribs.push(repvar + actionid + "_attack_damagetype");
|
|
action_attribs.push(repvar + actionid + "_attack_damage2");
|
|
action_attribs.push(repvar + actionid + "_attack_damagetype2");
|
|
});
|
|
|
|
getAttrs(action_attribs, function(v) {
|
|
_.each(action_array, function(actionid) {
|
|
console.log("UPDATING NPC ACTION: " + actionid);
|
|
var callbacks = [];
|
|
var update = {};
|
|
var onhit = "";
|
|
var damage_flag = "";
|
|
var range = "";
|
|
var attack_flag = v[repvar + actionid + "_attack_flag"] && v[repvar + actionid + "_attack_flag"] != "0" ? "{{attack=1}}" : "";
|
|
var tohit = v[repvar + actionid + "_attack_tohit"] && isNaN(parseInt(v[repvar + actionid + "_attack_tohit"], 10)) === false ? parseInt(v[repvar + actionid + "_attack_tohit"], 10) : 0;
|
|
if(v[repvar + actionid + "_attack_type"] && v[repvar + actionid + "_attack_range"]) {
|
|
if(v[repvar + actionid + "_attack_type"] === "Melee") {var rangetype = "Reach";} else {var rangetype = "Range";};
|
|
range = ", " + rangetype + " " + v[repvar + actionid + "_attack_range"];
|
|
}
|
|
var target = v[repvar + actionid + "_attack_target"] && v[repvar + actionid + "_attack_target"] != "" ? ", " + v[repvar + actionid + "_attack_target"] : ""
|
|
var attack_tohitrange = "+" + tohit + range + target;
|
|
var dmg1 = v[repvar + actionid + "_attack_damage"] && v[repvar + actionid + "_attack_damage"] != "" ? v[repvar + actionid + "_attack_damage"] : "";
|
|
var dmg1type = v[repvar + actionid + "_attack_damagetype"] && v[repvar + actionid + "_attack_damagetype"] != "" ? " " + v[repvar + actionid + "_attack_damagetype"] : "";
|
|
var dmg2 = v[repvar + actionid + "_attack_damage2"] && v[repvar + actionid + "_attack_damage2"] != "" ? v[repvar + actionid + "_attack_damage2"] : "";
|
|
var dmg2type = v[repvar + actionid + "_attack_damagetype2"] && v[repvar + actionid + "_attack_damagetype2"] != "" ? " " + v[repvar + actionid + "_attack_damagetype2"] : "";
|
|
var dmgspacer = dmg1 != "" && dmg2 != "" ? " plus " : "";
|
|
|
|
var parsed_dmg1 = parse_roll_string(dmg1);
|
|
var parsed_dmg2 = parse_roll_string(dmg2);
|
|
|
|
if(dmg1 != "") {
|
|
onhit = onhit + parsed_dmg1.avg + " (" + dmg1 + ")" + dmg1type + " damage";
|
|
};
|
|
dmgspacer = dmg1 != "" && dmg2 != "" ? " plus " : "";
|
|
onhit = onhit + dmgspacer;
|
|
if(dmg2 != "") {
|
|
onhit = onhit + parsed_dmg2.avg + " (" + dmg2 + ")" + dmg2type + " damage";
|
|
};
|
|
if(dmg1 != "" || dmg2 != "") {damage_flag = damage_flag + "{{damage=1}} "};
|
|
if(dmg1 != "") {damage_flag = damage_flag + "{{dmg1flag=1}} "};
|
|
if(dmg2 != "") {damage_flag = damage_flag + "{{dmg2flag=1}} "};
|
|
|
|
var crit1 = "";
|
|
if(parsed_dmg1.rolls.length > 0){
|
|
parsed_dmg1.rolls.forEach(function(value) {
|
|
crit1 += parsed_dmg1.array[value] + "+";
|
|
});
|
|
crit1 = crit1.substring(0, crit1.length - 1);
|
|
}
|
|
|
|
var crit2 = "";
|
|
if(parsed_dmg2.rolls.length > 0){
|
|
parsed_dmg2.rolls.forEach(function(value) {
|
|
crit2 += parsed_dmg2.array[value] + "+";
|
|
});
|
|
crit2 = crit2.substring(0, crit2.length - 1);
|
|
}
|
|
|
|
var rollbase = "";
|
|
if(v.dtype === "full") {
|
|
rollbase = `@{wtype}&{template:npcaction} ${attack_flag} @{damage_flag} @{npc_name_flag} {{rname=@{name}}} {{r1=[[@{d20}+(@{attack_tohit}+0)]]}} @{rtype}+(@{attack_tohit}+0)]]}} {{dmg1=[[@{attack_damage}+0]]}} {{dmg1type=@{attack_damagetype}}} {{dmg2=[[@{attack_damage2}+0]]}} {{dmg2type=@{attack_damagetype2}}} {{crit1=[[@{attack_crit}+0]]}} {{crit2=[[@{attack_crit2}+0]]}} {{description=@{show_desc}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}`;
|
|
}
|
|
else if(v[repvar + actionid + "_attack_flag"] && v[repvar + actionid + "_attack_flag"] != "0") {
|
|
if(legendary) {
|
|
rollbase = `@{wtype}&{template:npcatk} ${attack_flag} @{damage_flag} @{npc_name_flag} {{rname=[@{name}](~repeating_npcaction-l_npc_dmg)}} {{rnamec=[@{name}](~repeating_npcaction-l_npc_crit)}} {{type=[Attack](~repeating_npcaction-l_npc_dmg)}} {{typec=[Attack](~repeating_npcaction-l_npc_crit)}} {{r1=[[@{d20}+(@{attack_tohit}+0)]]}} @{rtype}+(@{attack_tohit}+0)]]}} {{description=@{show_desc}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}`
|
|
}
|
|
else {
|
|
rollbase = `@{wtype}&{template:npcatk} ${attack_flag} @{damage_flag} @{npc_name_flag} {{rname=[@{name}](~repeating_npcaction_npc_dmg)}} {{rnamec=[@{name}](~repeating_npcaction_npc_crit)}} {{type=[Attack](~repeating_npcaction_npc_dmg)}} {{typec=[Attack](~repeating_npcaction_npc_crit)}} {{r1=[[@{d20}+(@{attack_tohit}+0)]]}} @{rtype}+(@{attack_tohit}+0)]]}} {{description=@{show_desc}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}`;
|
|
}
|
|
}
|
|
else if(dmg1 || dmg2) {
|
|
rollbase = `@{wtype}&{template:npcdmg} @{damage_flag} {{dmg1=[[@{attack_damage}+0]]}} {{dmg1type=@{attack_damagetype}}} {{dmg2=[[@{attack_damage2}+0]]}} {{dmg2type=@{attack_damagetype2}}} {{crit1=[[@{attack_crit}+0]]}} {{crit2=[[@{attack_crit2}+0]]}} @{charname_output} {{licensedsheet=@{licensedsheet}}}`
|
|
}
|
|
else {
|
|
rollbase = `@{wtype}&{template:npcaction} @{npc_name_flag} {{rname=@{name}}} {{description=@{show_desc}}} @{charname_output} {{licensedsheet=@{licensedsheet}}}`
|
|
}
|
|
|
|
update[repvar + actionid + "_attack_tohitrange"] = attack_tohitrange;
|
|
update[repvar + actionid + "_attack_onhit"] = onhit;
|
|
update[repvar + actionid + "_damage_flag"] = damage_flag;
|
|
update[repvar + actionid + "_attack_crit"] = crit1;
|
|
update[repvar + actionid + "_attack_crit2"] = crit2;
|
|
update[repvar + actionid + "_rollbase"] = rollbase;
|
|
setAttrs(update, {silent: true});
|
|
});
|
|
});
|
|
};
|
|
|
|
var parse_roll_string = function(rollstring) {
|
|
var out = {array: [], avg: 0, rolls: []};
|
|
|
|
if(!rollstring || rollstring === "") {
|
|
return out;
|
|
}
|
|
|
|
var rs_regex_initial = /(\-?\d+(?:d\d+)?)/ig;
|
|
var rs_regex_repeating = /([\+\-])(\-?\d+(?:d\d+)?)/ig;
|
|
var rs_nospace = rollstring.replace(/\s/g, '');
|
|
var rs_initial = rs_regex_initial.exec(rs_nospace);
|
|
|
|
if(rs_initial) {
|
|
out.array.push(rs_initial[1]);
|
|
rs_regex_repeating.lastIndex = rs_regex_initial.lastIndex;
|
|
var rs_repeating;
|
|
while(rs_repeating = rs_regex_repeating.exec(rs_nospace)) {
|
|
out.array.push(rs_repeating[1], rs_repeating[2]);
|
|
}
|
|
}
|
|
|
|
var add = true;
|
|
var dice_regex = /(\d+)d(\d+)/i;
|
|
var dice;
|
|
|
|
out.array.forEach(function(value, index, array) {
|
|
if(value === "+") {
|
|
add = true;
|
|
} else if(value === "-") {
|
|
add = false;
|
|
} else if(dice = dice_regex.exec(value)){
|
|
// this value is a die roll
|
|
var dice_avg = Math.floor(+dice[1] * (+dice[2] / 2 + 0.5));
|
|
out.avg += add ? dice_avg : -dice_avg;
|
|
out.rolls.push(index);
|
|
} else {
|
|
// this value is a number
|
|
out.avg += add ? +value : -+value;
|
|
}
|
|
})
|
|
|
|
return out;
|
|
};
|
|
|
|
var get_class_level = function(class_name, callback) {
|
|
getAttrs(["class", "base_level", "multiclass1_flag", "multiclass1", "multiclass1_lvl", "multiclass2_flag", "multiclass2", "multiclass2_lvl", "multiclass3_flag", "multiclass3", "multiclass3_lvl"], function(attrs) {
|
|
var regex = new RegExp(class_name, "i");
|
|
if(regex.test(attrs["class"])) {
|
|
callback(attrs.base_level);
|
|
} else if(attrs.multiclass1_flag && attrs.multiclass1_flag !== "0" && regex.test(attrs.multiclass1)) {
|
|
callback(attrs.multiclass1_lvl);
|
|
} else if(attrs.multiclass2_flag && attrs.multiclass2_flag !== "0" && regex.test(attrs.multiclass2)) {
|
|
callback(attrs.multiclass2_lvl);
|
|
} else if(attrs.multiclass3_flag && attrs.multiclass3_flag !== "0" && regex.test(attrs.multiclass3)) {
|
|
callback(attrs.multiclass3_lvl);
|
|
} else {
|
|
callback("0");
|
|
}
|
|
});
|
|
};
|
|
|
|
var update_globaldamage = function(callback) {
|
|
getSectionIDs("damagemod", function(ids) {
|
|
if(ids) {
|
|
var fields = {};
|
|
var attr_name_list = [];
|
|
ids.forEach(function(id) {
|
|
fields[id] = {};
|
|
attr_name_list.push(`repeating_damagemod_${id}_global_damage_active_flag`, `repeating_damagemod_${id}_global_damage_name`, `repeating_damagemod_${id}_global_damage_damage`, `repeating_damagemod_${id}_global_damage_type`);
|
|
});
|
|
|
|
getAttrs(attr_name_list, function(attrs) {
|
|
var regex = /^repeating_damagemod_(.+)_global_damage_(active_flag|name|damage|type)$/;
|
|
_.each(attrs, function(obj, name) {
|
|
var r = regex.exec(name);
|
|
if(r) {
|
|
fields[r[1]][r[2]] = obj;
|
|
};
|
|
});
|
|
|
|
var update = {global_damage_mod_roll: "", global_damage_mod_crit: "", global_damage_mod_type: ""};
|
|
|
|
console.log("GLOBALDAMAGE");
|
|
_.each(fields, function(element) {
|
|
if(element.active_flag != "0") {
|
|
if(element.name && element.name !== "") { update["global_damage_mod_roll"] += element.damage + '[' + element.name + ']' + "+"; }
|
|
if(element.type && element.type !== "") { update["global_damage_mod_type"] += element.type + "/"; }
|
|
}
|
|
});
|
|
|
|
update["global_damage_mod_roll"] = update["global_damage_mod_roll"].replace(/\+(?=$)/, '');
|
|
update["global_damage_mod_type"] = update["global_damage_mod_type"].replace(/\/(?=$)/, '');
|
|
|
|
// Remove any non-roll damage modifiers from the global damage modifier for the crit rolls
|
|
// Will also remove any labels attached to these non-roll damage modifiers
|
|
update["global_damage_mod_crit"] = update["global_damage_mod_roll"].replace(/(?:[+\-*\/%]|\*\*|^)\s*\d+(?:\[.*?])?(?!d\d+)/gi, '')
|
|
// If what was just replace removed the first damage modifier, remove any now precending plus signs
|
|
.replace(/(?:^\+)/i, '');
|
|
|
|
setAttrs(update, {silent:true}, function() {
|
|
update_attacks("all");
|
|
if(typeof callback == "function") callback();
|
|
});
|
|
});
|
|
}
|
|
});
|
|
};
|
|
|
|
var update_globalattack = function(callback) {
|
|
getSectionIDs("tohitmod", function(ids) {
|
|
if(ids) {
|
|
var fields = {};
|
|
var attr_name_list = [];
|
|
ids.forEach(function(id) {
|
|
fields[id] = {};
|
|
attr_name_list.push(`repeating_tohitmod_${id}_global_attack_active_flag`, `repeating_tohitmod_${id}_global_attack_roll`, `repeating_tohitmod_${id}_global_attack_name`);
|
|
});
|
|
getAttrs(attr_name_list, function(attrs) {
|
|
var regex = /^repeating_tohitmod_(.+)_global_attack_(active_flag|roll|name)$/;
|
|
_.each(attrs, function(obj, name) {
|
|
var r = regex.exec(name);
|
|
if(r) {
|
|
fields[r[1]][r[2]] = obj;
|
|
}
|
|
});
|
|
|
|
var update = {global_attack_mod: ""};
|
|
console.log("GLOBALATTACK");
|
|
_.each(fields, function(element) {
|
|
if(element.active_flag != "0") {
|
|
if(element.roll && element.roll !== "") { update["global_attack_mod"] += element.roll + "[" + element.name + "]" + "+"; }
|
|
}
|
|
});
|
|
if(update["global_attack_mod"] !== "") {
|
|
update["global_attack_mod"] = "[[" + update["global_attack_mod"].replace(/\+(?=$)/, '') + "]]";
|
|
}
|
|
setAttrs(update, {silent:true}, function() {
|
|
if(typeof callback == "function") callback();
|
|
});
|
|
});
|
|
}
|
|
});
|
|
};
|
|
|
|
var update_globalsaves = function(callback) {
|
|
getSectionIDs("savemod", function(ids) {
|
|
if(ids) {
|
|
var fields = {};
|
|
var attr_name_list = [];
|
|
ids.forEach(function(id) {
|
|
fields[id] = {};
|
|
attr_name_list.push(`repeating_savemod_${id}_global_save_active_flag`, `repeating_savemod_${id}_global_save_roll`, `repeating_savemod_${id}_global_save_name`);
|
|
});
|
|
getAttrs(attr_name_list, function(attrs) {
|
|
var regex = /^repeating_savemod_(.+)_global_save_(active_flag|roll|name)$/;
|
|
_.each(attrs, function(obj, name) {
|
|
var r = regex.exec(name);
|
|
if(r) {
|
|
fields[r[1]][r[2]] = obj;
|
|
}
|
|
});
|
|
|
|
var update = {global_save_mod: ""};
|
|
console.log("GLOBAL SAVES");
|
|
_.each(fields, function(element) {
|
|
if(element.active_flag != "0") {
|
|
if(element.roll && element.roll !== "") { update["global_save_mod"] += element.roll + "[" + element.name + "]" + "+"; }
|
|
}
|
|
});
|
|
if(update["global_save_mod"] !== "") {
|
|
update["global_save_mod"] = "[[" + update["global_save_mod"].replace(/\+(?=$)/, '') + "]]";
|
|
}
|
|
setAttrs(update, {silent:true}, function() {
|
|
if(typeof callback == "function") callback();
|
|
});
|
|
});
|
|
}
|
|
});
|
|
};
|
|
|
|
var update_globalskills = function(callback) {
|
|
getSectionIDs("skillmod", function(ids) {
|
|
if(ids) {
|
|
var fields = {};
|
|
var attr_name_list = [];
|
|
ids.forEach(function(id) {
|
|
fields[id] = {};
|
|
attr_name_list.push(`repeating_skillmod_${id}_global_skill_active_flag`, `repeating_skillmod_${id}_global_skill_roll`, `repeating_skillmod_${id}_global_skill_name`);
|
|
});
|
|
getAttrs(attr_name_list, function(attrs) {
|
|
var regex = /^repeating_skillmod_(.+)_global_skill_(active_flag|roll|name)$/;
|
|
_.each(attrs, function(obj, name) {
|
|
var r = regex.exec(name);
|
|
if(r) {
|
|
fields[r[1]][r[2]] = obj;
|
|
}
|
|
});
|
|
|
|
var update = {global_skill_mod: ""};
|
|
console.log("GLOBAL SKILLS");
|
|
_.each(fields, function(element) {
|
|
if(element.active_flag != "0") {
|
|
if(element.roll && element.roll !== "") { update["global_skill_mod"] += element.roll + "[" + element.name + "]" + "+"; }
|
|
}
|
|
});
|
|
if(update["global_skill_mod"] !== "") {
|
|
update["global_skill_mod"] = "[[" + update["global_skill_mod"].replace(/\+(?=$)/, '') + "]]";
|
|
}
|
|
setAttrs(update, {silent:true}, function() {
|
|
if(typeof callback == "function") callback();
|
|
});
|
|
});
|
|
}
|
|
});
|
|
};
|
|
|
|
var check_l1_mancer = function() {
|
|
getAttrs(["class", "base_level", "strength_base","dexterity_base","constitution_base","intelligence_base","wisdom_base","charisma_base","l1mancer_status","version","charactermancer_step"], function(v) {
|
|
if(!v["version"] || parseFloat(v["version"]) < 2.2) {
|
|
return;
|
|
}
|
|
if(v["l1mancer_status"] && v["l1mancer_status"] === "completed") {
|
|
return;
|
|
}
|
|
|
|
if(v["charactermancer_step"] && v["charactermancer_step"].split("-")[0] == "l1") {
|
|
startCharactermancer(v["charactermancer_step"]);
|
|
}
|
|
else {
|
|
if(v["l1mancer_status"] && v["l1mancer_status"] === "relaunch") {
|
|
startCharactermancer("l1-welcome");
|
|
} else {
|
|
setAttrs({mancer_confirm_flag: 1});
|
|
}
|
|
}
|
|
});
|
|
};
|
|
|
|
var check_lp_mancer = function() {
|
|
getAttrs(["class", "base_level", "strength_base","dexterity_base","constitution_base","intelligence_base","wisdom_base","charisma_base","l1mancer_status", "lpmancer_status","version","charactermancer_step"], function(v) {
|
|
if(v["lpmancer_status"] === "active" && v["charactermancer_step"] && v["charactermancer_step"].split("-")[0] == "lp") {
|
|
startCharactermancer(v["charactermancer_step"]);
|
|
}
|
|
});
|
|
};
|
|
|
|
on("mancer:cancel", function(eventinfo) {
|
|
if(!eventinfo["value"]) {return;};
|
|
var update = {};
|
|
|
|
if(eventinfo["value"] === "l1-welcome" || eventinfo["value"] === "l1-cancel") {
|
|
update["l1mancer_status"] = "completed";
|
|
update["charactermancer_step"] = "l1-welcome";
|
|
deleteCharmancerData(["l1-welcome","l1-race","l1-class","l1-abilities","l1-background","l1-equipment","l1-spells","l1-summary"]);
|
|
}
|
|
else if(eventinfo["value"].substring(0,3) === "l1-") {
|
|
update["l1mancer_status"] = eventinfo["value"];
|
|
}
|
|
else if(eventinfo["value"] === "lp-welcome" || eventinfo["value"] === "lp-cancel") {
|
|
update["lpmancer_status"] = "";
|
|
update["charactermancer_step"] = "";
|
|
deleteCharmancerData(["lp-welcome", "lp-levels", "lp-choices", "lp-asi", "lp-spells","lp-summary"]);
|
|
}
|
|
else if(eventinfo["value"].substring(0,3) === "lp-") {
|
|
update["charactermancer_step"] = "";
|
|
update["lpmancer_status"] = "";
|
|
};
|
|
setAttrs(update);
|
|
});
|
|
|
|
on("change:licensedsheet", function(eventinfo) {
|
|
//debugger
|
|
});
|
|
|
|
/* on("sheet:opened", function(eventinfo) {
|
|
getAttrs([licensedsheet], function(v) {
|
|
debugger
|
|
});
|
|
}); */
|
|
var v2_old_values_check = function() {
|
|
// update_attacks("all");
|
|
var update = {};
|
|
var attrs = ["simpletraits","features_and_traits","initiative_bonus","npc","character_id"];
|
|
getSectionIDs("repeating_spell-npc", function(idarray) {
|
|
_.each(idarray, function(id) {
|
|
attrs.push("repeating_spell-npc_" + id + "_rollcontent");
|
|
});
|
|
getAttrs(attrs, function(v) {
|
|
if(v["npc"] && v["npc"] == 1 && (!v["initiative_bonus"] || v["initiative_bonus"] == 0)) {
|
|
update_initiative();
|
|
}
|
|
var spellflag = idarray && idarray.length > 0 ? 1 : 0;
|
|
var missing = v["features_and_traits"] && v["simpletraits"] === "complex" ? 1 : 0;
|
|
update["npcspell_flag"] = spellflag;
|
|
update["missing_info"] = missing;
|
|
_.each(idarray, function(id) {
|
|
var content = v["repeating_spell-npc_" + id + "_rollcontent"];
|
|
if(content.substring(0,3) === "%{-" && content.substring(22,41) === "|repeating_attack_-" && content.substring(60,68) === "_attack}") {
|
|
var thisid = content.substring(2,21);
|
|
if(thisid != v["character_id"]) {
|
|
update["repeating_spell-npc_" + id + "_rollcontent"] = content.substring(0,2) + v["character_id"] + content.substring(22,68);
|
|
}
|
|
}
|
|
});
|
|
setAttrs(update);
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
var clear_npc_spell_attacks = function(complete) {
|
|
getSectionIDs("repeating_attack", function(attack_ids) {
|
|
var getList = [];
|
|
var done = false;
|
|
_.each(attack_ids, function(id) {
|
|
getList.push(`repeating_attack_${id}_spellid`);
|
|
});
|
|
getAttrs(getList, function(v) {
|
|
_.each(attack_ids, function(id) {
|
|
if (v[`repeating_attack_${id}_spellid`] && v[`repeating_attack_${id}_spellid`].indexOf("npc_") != -1) {
|
|
removeRepeatingRow(`repeating_attack_${id}`);
|
|
}
|
|
});
|
|
complete();
|
|
});
|
|
});
|
|
}
|
|
|
|
var upgrade_to_2_0 = function(doneupdating) {
|
|
getAttrs(["npc","strength","dexterity","constitution","intelligence","wisdom","charisma","strength_base","dexterity_base","constitution_base","intelligence_base","wisdom_base","charisma_base","deathsavemod","death_save_mod","npc_str_save","npc_dex_save","npc_con_save","npc_int_save","npc_wis_save","npc_cha_save","npc_str_save_base","npc_dex_save_base","npc_con_save_base","npc_int_save_base","npc_wis_save_base","npc_cha_save_base","npc_acrobatics_base", "npc_animal_handling_base", "npc_eldertech_base", "npc_athletics_base", "npc_deception_base", "npc_history_base", "npc_insight_base", "npc_intimidation_base", "npc_investigation_base", "npc_materials_base", "npc_medicine_base", "npc_nature_base", "npc_perception_base", "npc_performance_base", "npc_persuasion_base", "npc_politics_base", "npc_religion_base", "npc_sleight_of_hand_base", "npc_stealth_base", "npc_survival_base", "npc_acrobatics", "npc_animal_handling", "npc_eldertech", "npc_athletics", "npc_deception", "npc_history", "npc_insight", "npc_intimidation", "npc_investigation", "npc_materials", "npc_medicine", "npc_nature", "npc_perception", "npc_performance", "npc_persuasion", "npc_politics", "npc_religion", "npc_sleight_of_hand", "npc_stealth", "npc_survival"], function(v) {
|
|
var update = {};
|
|
var stats = ["strength","dexterity","constitution","intelligence","wisdom","charisma"];
|
|
var npc_stats = ["npc_str_save","npc_dex_save","npc_con_save","npc_int_save","npc_wis_save","npc_cha_save","npc_acrobatics", "npc_animal_handling", "npc_eldertech", "npc_athletics", "npc_deception", "npc_history", "npc_insight", "npc_intimidation", "npc_investigation", "npc_materials", "npc_medicine", "npc_nature", "npc_perception", "npc_performance", "npc_persuasion", "npc_politics", "npc_religion", "npc_sleight_of_hand", "npc_stealth", "npc_survival"];
|
|
_.each(stats, function(attr) {
|
|
if(v[attr] && v[attr] != "10" && v[attr + "_base"] == "10") {
|
|
update[attr + "_base"] = v[attr];
|
|
}
|
|
|
|
});
|
|
_.each(npc_stats, function(attr) {
|
|
if(v[attr] && !isNaN(v[attr]) && v[attr + "_base"] == "") {
|
|
update[attr + "_base"] = v[attr];
|
|
}
|
|
|
|
});
|
|
if(v["deathsavemod"] && v["deathsavemod"] != "0" && v["death_save_mod"] === "0") {v["death_save_mod"] = v["deathsavemod"];};
|
|
|
|
if(v["npc"] && v["npc"] == "1") {
|
|
var callback = function() {
|
|
update_attr("all");
|
|
update_mod("strength");
|
|
update_mod("dexterity");
|
|
update_mod("constitution");
|
|
update_mod("intelligence");
|
|
update_mod("wisdom");
|
|
update_mod("charisma");
|
|
update_npc_action("all");
|
|
update_npc_saves();
|
|
update_npc_skills();
|
|
update_initiative();
|
|
}
|
|
}
|
|
else {
|
|
var callback = function() {
|
|
update_attr("all");
|
|
update_mod("strength");
|
|
update_mod("dexterity");
|
|
update_mod("constitution");
|
|
update_mod("intelligence");
|
|
update_mod("wisdom");
|
|
update_mod("charisma");
|
|
update_all_saves();
|
|
update_skills(["athletics", "acrobatics", "sleight_of_hand", "stealth", "eldertech", "history", "investigation", "nature", "religion", "animal_handling", "insight", "materials", "medicine", "perception", "survival", "deception", "intimidation", "performance", "persuasion", "politics"]);
|
|
update_tool("all")
|
|
update_attacks("all");
|
|
update_pb();
|
|
update_jack_attr();
|
|
update_initiative();
|
|
update_weight();
|
|
update_spell_info();
|
|
update_ac();
|
|
}
|
|
}
|
|
|
|
setAttrs(update, {silent: true}, callback);
|
|
doneupdating();
|
|
});
|
|
};
|
|
|
|
var upgrade_to_2_1 = function(doneupdating) {
|
|
v2_old_values_check();
|
|
doneupdating();
|
|
};
|
|
|
|
var upgrade_to_2_2 = function(doneupdating) {
|
|
setAttrs({l1mancer_status: "completed"}, function(eventinfo) {
|
|
setAttrs({"options-class-selection":"0"});
|
|
console.log("Preprocessed v2.2 upgrade");
|
|
update_tool("all");
|
|
update_attacks("all");
|
|
update_class();
|
|
update_race_display();
|
|
doneupdating();
|
|
});
|
|
};
|
|
|
|
var upgrade_to_2_3 = function(doneupdating) {
|
|
getSectionIDs("damagemod", function(ids) {
|
|
var update = {};
|
|
_.each(ids, function(rowid) {
|
|
update[`repeating_damagemod_${rowid}_options-flag`] = "0";
|
|
});
|
|
getSectionIDs("tohitmod", function(ids) {
|
|
_.each(ids, function(rowid) {
|
|
update[`repeating_tohitmod_${rowid}_options-flag`] = "0";
|
|
});
|
|
setAttrs(update);
|
|
doneupdating();
|
|
});
|
|
});
|
|
};
|
|
|
|
var upgrade_to_2_4 = function(doneupdating) {
|
|
clear_npc_spell_attacks(function() {
|
|
update_globalskills(function() {
|
|
update_globalsaves(function() {
|
|
update_globalattack(function() {
|
|
update_globaldamage(function() {
|
|
getAttrs(["npc", "npcspellcastingflag", "spellcasting_ability", "caster_level", "level_calculations"], function(v) {
|
|
if(v.npc == "1" && v.npcspellcastingflag == "1") {
|
|
getSectionIDs("npctrait", function(secIds) {
|
|
var getList = [];
|
|
_.each(secIds, function(x) {
|
|
getList.push("repeating_npctrait_" + x + "_name");
|
|
getList.push("repeating_npctrait_" + x + "_desc");
|
|
});
|
|
getAttrs(getList, function(traits) {
|
|
var update = {};
|
|
if(v.spellcasting_ability == "0*" || v.caster_level == "0") {
|
|
var spellSec = "";
|
|
if (v.spellcasting_ability == "0*") {
|
|
update.spellcasting_ability = "@{intelligence_mod}+";
|
|
}
|
|
_.each(secIds, function(traitId) {
|
|
if(traits["repeating_npctrait_" + traitId + "_name"].toLowerCase().includes("spellcasting.")) spellSec = traitId;
|
|
});
|
|
if(spellSec != "") {
|
|
var spellcasting = traits["repeating_npctrait_" + spellSec + "_desc"].toLowerCase();
|
|
if (v.spellcasting_ability == "0*") {
|
|
var lastIndex = 9999;
|
|
_.each(["intelligence", "wisdom", "charisma"], function(ability) {
|
|
var found = spellcasting.indexOf(ability);
|
|
if(found > -1 && found < lastIndex) {
|
|
lastIndex = found;
|
|
update.spellcasting_ability = "@{" + ability + "_mod}+";
|
|
}
|
|
});
|
|
}
|
|
if (v.caster_level == "0") {
|
|
var foundLevelidx = spellcasting.search(/(\d|\d\d)(st|nd|rd|th)/);
|
|
if (foundLevelidx) {
|
|
var level = parseInt(spellcasting.substring(foundLevelidx, foundLevelidx+4));
|
|
console.log(`Found spellcasting level ${level} in trait, setting caster_level...`);
|
|
update.caster_level = level;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
setAttrs(update, function() {
|
|
// Recalculate spell slots in case NPC level was restored
|
|
if(!v["level_calculations"] || v["level_calculations"] == "on") {
|
|
update_spell_slots();
|
|
};
|
|
// Set all spells without a given modifier to 'spell'
|
|
var spgetList = [];
|
|
getSectionIDs("spell-cantrip", function(secIds0) {
|
|
_.each(secIds0, function(x) {
|
|
spgetList.push("repeating_spell-cantrip_" + x + "_spell_ability");
|
|
});
|
|
getSectionIDs("spell-1", function(secIds1) {
|
|
_.each(secIds1, function(x) {
|
|
spgetList.push("repeating_spell-1_" + x + "_spell_ability");
|
|
});
|
|
getSectionIDs("spell-2", function(secIds2) {
|
|
_.each(secIds2, function(x) {
|
|
spgetList.push("repeating_spell-2_" + x + "_spell_ability");
|
|
});
|
|
getSectionIDs("spell-3", function(secIds3) {
|
|
_.each(secIds3, function(x) {
|
|
spgetList.push("repeating_spell-3_" + x + "_spell_ability");
|
|
});
|
|
getSectionIDs("spell-4", function(secIds4) {
|
|
_.each(secIds4, function(x) {
|
|
spgetList.push("repeating_spell-4_" + x + "_spell_ability");
|
|
});
|
|
getSectionIDs("spell-5", function(secIds5) {
|
|
_.each(secIds5, function(x) {
|
|
spgetList.push("repeating_spell-5_" + x + "_spell_ability");
|
|
});
|
|
getSectionIDs("spell-6", function(secIds6) {
|
|
_.each(secIds6, function(x) {
|
|
spgetList.push("repeating_spell-6_" + x + "_spell_ability");
|
|
});
|
|
getSectionIDs("spell-7", function(secIds7) {
|
|
_.each(secIds7, function(x) {
|
|
spgetList.push("repeating_spell-7_" + x + "_spell_ability");
|
|
});
|
|
getSectionIDs("spell-8", function(secIds8) {
|
|
_.each(secIds8, function(x) {
|
|
spgetList.push("repeating_spell-8_" + x + "_spell_ability");
|
|
});
|
|
getSectionIDs("spell-9", function(secIds9) {
|
|
_.each(secIds9, function(x) {
|
|
spgetList.push("repeating_spell-9_" + x + "_spell_ability");
|
|
});
|
|
getAttrs(spgetList, function(spellAbilities) {
|
|
spupdate = {};
|
|
_.each(spellAbilities, function(ability, attributeName) {
|
|
if (ability == "0*") {
|
|
console.log("UPDATING SPELL: " + attributeName);
|
|
spupdate[attributeName] = "spell";
|
|
}
|
|
});
|
|
setAttrs(spupdate, function() {
|
|
update_attacks("spells");
|
|
update_challenge();
|
|
doneupdating();
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
} else if(v.npc != "1") {
|
|
doneupdating();
|
|
} else {
|
|
doneupdating();
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
};
|
|
|
|
var upgrade_to_2_5 = function(doneupdating) {
|
|
getAttrs(["globalacmod"], function(v) {
|
|
var update = {};
|
|
if(v.globalacmod && v.globalacmod != "0") {
|
|
var rowid = generateRowID();
|
|
update[`repeating_acmod_${rowid}_global_ac_val`] = parseInt(v.globalacmod);
|
|
update[`repeating_acmod_${rowid}_global_ac_name`] = "GLOBAL ARMOR CLASS MODIFIER";
|
|
update[`repeating_acmod_${rowid}_global_ac_active_flag`] = "1";
|
|
update[`repeating_acmod_${rowid}_options-flag`] = "0";
|
|
update["global_ac_mod_flag"] = "1";
|
|
}
|
|
setAttrs(update, {silent: true}, function() {
|
|
update_ac();
|
|
doneupdating();
|
|
});
|
|
});
|
|
};
|
|
|
|
var upgrade_to_2_6 = function(doneupdating) {
|
|
getSectionIDs("hpmod", function(ids) {
|
|
var getArray = [];
|
|
_.each(ids, function(sectionid) {
|
|
getArray.push("repeating_hpmod_" + sectionid + "_source");
|
|
});
|
|
getAttrs(getArray, function(v) {
|
|
_.each(v, function(val, key) {
|
|
if(val === "CON") removeRepeatingRow("repeating_hpmod_" + key.split("_")[2]);
|
|
});
|
|
doneupdating();
|
|
});
|
|
});
|
|
};
|
|
|
|
var upgrade_to_2_7 = function(doneupdating) {
|
|
getSectionIDs("damagemod", function(ids) {
|
|
console.log("Version 2.7 UPGRADE");
|
|
let getArray = [];
|
|
ids.forEach(sectionid => {
|
|
getArray.push(`repeating_damagemod_${sectionid}_global_damage_rollstring`);
|
|
getArray.push(`repeating_damagemod_${sectionid}_global_damage_type`);
|
|
});
|
|
getSectionIDs("savemod", function(ids) {
|
|
_.each(ids, (sectionid) => {
|
|
getArray.push(`repeating_savemod_${sectionid}_global_save_rollstring`);
|
|
});
|
|
getSectionIDs("tohitmod", function(ids) {
|
|
_.each(ids, (sectionid) => {
|
|
getArray.push(`repeating_tohitmod_${sectionid}_global_attack_rollstring`);
|
|
});
|
|
getSectionIDs("skillmod", function(ids) {
|
|
_.each(ids, (sectionid) => {
|
|
getArray.push(`repeating_skillmod_${sectionid}_global_skill_rollstring`);
|
|
});
|
|
getAttrs(getArray, function(v) {
|
|
let set = {};
|
|
_.each(v, (value, attr) => {
|
|
if(_.last(attr.split("_")) === "rollstring") {
|
|
const section = attr.slice(0, -10);
|
|
const brackets = value.split('['), roll = brackets[0];
|
|
let name = brackets[1] ? brackets[1].slice(0, -1) : "";
|
|
if(attr.split("_")[1] == "damagemod") {
|
|
name = name ? name : v[`${section}type`];
|
|
set[`${section}damage`] = roll;
|
|
} else {
|
|
set[`${section}roll`] = roll;
|
|
}
|
|
set[`${section}name`] = name;
|
|
}
|
|
});
|
|
setAttrs(set);
|
|
|
|
doneupdating();
|
|
});
|
|
});
|
|
});
|
|
});
|
|
});
|
|
};
|
|
|
|
var no_version_bugfix = function(doneupdating) {
|
|
getAttrs(["npc","class"], function(v) {
|
|
if(v["npc"] && v["npc"] != "0" || v["class"] && v["class"] != "") {
|
|
setAttrs({version: "2.1"});
|
|
}
|
|
else {
|
|
setAttrs({version: "2.3"}, {silent: true});
|
|
}
|
|
});
|
|
doneupdating();
|
|
};
|
|
|
|
var versioning = function(finished) {
|
|
getAttrs(["version"], function(v) {
|
|
const version = parseFloat(v["version"]) || 0.0;
|
|
if(version >= "2.7") {
|
|
setAttrs({version: "2.7"}, function(){
|
|
finished();
|
|
});
|
|
console.log("5th Edition OGL by Roll20 v" + v["version"]);
|
|
return;
|
|
}
|
|
else if(!version || version === "") {
|
|
console.log("NO VERSION FOUND");
|
|
no_version_bugfix(function() {
|
|
versioning(finished);
|
|
});
|
|
}
|
|
else if(version >= "2.6") {
|
|
console.log("UPGRADING TO v2.7");
|
|
upgrade_to_2_7(function() {
|
|
setAttrs({version: "2.7"}, function() {
|
|
versioning(finished);
|
|
});
|
|
});
|
|
}
|
|
else if(version >= "2.5") {
|
|
console.log("UPGRADING TO v2.6");
|
|
upgrade_to_2_6(function() {
|
|
setAttrs({version: "2.6"}, function() {
|
|
versioning(finished);
|
|
});
|
|
});
|
|
}
|
|
else if(version >= "2.4") {
|
|
console.log("UPGRADING TO v2.5");
|
|
upgrade_to_2_5(function() {
|
|
setAttrs({version: "2.5"}, function() {
|
|
versioning(finished);
|
|
});
|
|
});
|
|
}
|
|
else if(version >= "2.3") {
|
|
console.log("UPGRADING TO v2.4");
|
|
upgrade_to_2_4(function() {
|
|
setAttrs({version: "2.4"}, function() {
|
|
versioning(finished);
|
|
});
|
|
});
|
|
}
|
|
else if(version >= "2.2") {
|
|
console.log("UPGRADING TO v2.3");
|
|
upgrade_to_2_3(function() {
|
|
setAttrs({version: "2.3"}, function() {
|
|
versioning(finished);
|
|
});
|
|
});
|
|
}
|
|
else if(version >= "2.1") {
|
|
console.log("UPGRADING TO v2.2");
|
|
upgrade_to_2_2(function() {
|
|
setAttrs({version: "2.2"}, function() {
|
|
versioning(finished);
|
|
});
|
|
});
|
|
}
|
|
else if(version >= "2.0") {
|
|
console.log("UPGRADING TO v2.1");
|
|
upgrade_to_2_1(function() {
|
|
setAttrs({version: "2.1"}, function() {
|
|
versioning(finished);
|
|
});
|
|
});
|
|
}
|
|
else {
|
|
console.log("UPGRADING TO v2.0");
|
|
upgrade_to_2_0(function() {
|
|
setAttrs({version: "2.0"}, function() {
|
|
versioning(finished);
|
|
});
|
|
});
|
|
};
|
|
});
|
|
};</script>
|
|
|
|
|
|
|
|
|