721 lines
36 KiB

  1. <input type="checkbox" class="sheet-block-switch" name="attr_npcsheet" value="1"><span> NPC? (DO NOT CLICK)</span><br/><br/>
  2. <div class="main">
  3. <div class="header section">
  4. <div class="header-grid">
  5. <div class="header-field-grid">
  6. <span>Name</span>
  7. <input class="line-input" name="attr_character_name">
  8. </div>
  9. <div>
  10. <h2>Adventurer Conqueror King</h2>
  11. </div>
  12. <div class="header-field-grid">
  13. <span>Title</span>
  14. <input class="line-input" type="text" name="attr_classtitle" value="the Unknown">
  15. <span>Class</span>
  16. <select name="attr_class">
  17. <option>Fighter</option>
  18. <option>Mage</option>
  19. <option>Cleric</option>
  20. <option>Thief</option>
  21. <option>Assassin</option>
  22. <option>Bard</option>
  23. <option>Bladedancer</option>
  24. <option>Explorer</option>
  25. </select>
  26. </div>
  27. <div class="header-field-grid">
  28. <span>Alignment</span>
  29. <input class="line-input" type="text" name="attr_align" value="">
  30. <span>Level</span>
  31. <input class="line-input" type="text" name="attr_level" value="0">
  32. </div>
  33. </div>
  34. </div>
  35. <div class="attributes section">
  36. <div class="grid-container-2col">
  37. <div class="stat-grid">
  38. <div class="sheet-stat-title">
  39. <h3>Attributes</h3>
  40. </div>
  41. <span>Value</span><span></span><span>Modifier</span><span></span>
  42. <!-- Strength -->
  43. <input class="sheet-stat-input" type="text" name="attr_str" value="10">
  44. <span class="sheet-stat-span">Str</span>
  45. <input class="sheet-stat-input" type="text" name="attr_str_mod" value="0">
  46. <button class="sheet-roll-button" type='roll' value='&{template:acks} {{name=Strength Throw}} {{roll=[[1d20 + @{str_mod}]]}}' name='roll_StrengthCheck'></button>
  47. <!-- Intelligence -->
  48. <input class="sheet-stat-input" type="text" name="attr_int" value="10">
  49. <span class="sheet-stat-span">Int</span>
  50. <input class="sheet-stat-input" type="text" name="attr_int_mod" value="0">
  51. <button class="sheet-roll-button" type='roll' value='&{template:acks} {{name=Intelligence Throw}} {{roll=[[1d20 + @{int_mod}]]}}' name='roll_IntelligenceCheck'></button>
  52. <!-- Wisdom -->
  53. <input class="sheet-stat-input" type="text" name="attr_wis" value="10">
  54. <span class="sheet-stat-span">Wis</span>
  55. <input class="sheet-stat-input" type="text" name="attr_wis_mod" value="0">
  56. <button class="sheet-roll-button" type='roll' value='&{template:acks} {{name=Wisdom Throw}} {{roll=[[1d20 + @{wis_mod}]]}}' name='roll_WisdomCheck'></button>
  57. <!-- Dexterity -->
  58. <input class="sheet-stat-input" type="text" name="attr_dex" value="10">
  59. <span class="sheet-stat-span">Dex</span>
  60. <input class="sheet-stat-input" type="text" name="attr_dex_mod" value="0">
  61. <button class="sheet-roll-button" type='roll' value='&{template:acks} {{name=Dexterity Throw}} {{roll=[[1d20 + @{dex_mod}]]}}' name='roll_DexterityCheck'></button>
  62. <!-- Constitution -->
  63. <input class="sheet-stat-input" type="text" name="attr_con" value="10">
  64. <span class="sheet-stat-span">Con</span>
  65. <input class="sheet-stat-input" type="text" name="attr_con_mod" value="0">
  66. <button class="sheet-roll-button" type='roll' value='&{template:acks} {{name=Constitution Throw}} {{roll=[[1d20 + @{con_mod}]]}}' name='roll_ConstitutionCheck'></button>
  67. <!-- Charisma -->
  68. <input class="sheet-stat-input" type="text" name="attr_chr" value="10">
  69. <span class="sheet-stat-span">Chr</span>
  70. <input class="sheet-stat-input" type="text" name="attr_chr_mod" value="0">
  71. <button class="sheet-roll-button" type='roll' value='&{template:acks} {{name=Charisma Throw}} {{roll=[[1d20 + @{chr_mod}]]}}' name='roll_CharismaCheck'></button>
  72. </div>
  73. <div class="stat2-grid">
  74. <!-- Hit Points -->
  75. <span class="sheet-hp-span">HP</span>
  76. <span class="sheet-text-center">Current</span><span class="sheet-text-center">Maximum</span>
  77. <div><input class="sheet-stat-input sheet-hp-input" type="text" name="attr_hp"></div>
  78. <div><input class="sheet-stat-input sheet-hp-mod-input" type="text" name="attr_hp_max"></div>
  79. <!-- Hit Points -->
  80. <span class="sheet-hp-span">AC</span>
  81. <div class="sheet-ac-wrapper"><input class="sheet-stat-input sheet-ac-input" type="text" name="attr_ac" value="0"></div>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="saves section">
  86. <div class="grid-container-2col">
  87. <div class="movement-grid">
  88. <div class="sheet-movement-title">
  89. <h3>Movement</h3>
  90. </div>
  91. <span class="sheet-save-span">Base</span>
  92. <input class="sheet-stat-input sheet-input-big" type="text" name="attr_base_movement" value="120">
  93. <span class="sheet-save-span">Combat</span>
  94. <input class="sheet-stat-input sheet-input-big" type="text" name="attr_combat_movement" value="floor(@{base_movement} / 3)" disabled="true">
  95. <span class="sheet-save-span">Chrg/Run</span>
  96. <input class="sheet-stat-input sheet-input-big" type="text" name="attr_charge_movement" value="@{base_movement}" disabled="true">
  97. <span class="sheet-save-span">Climb</span>
  98. <input class="sheet-stat-input sheet-input-big" type="text" name="attr_climb_movement">
  99. <span class="sheet-save-span">Stealth</span>
  100. <input class="sheet-stat-input sheet-input-big" type="text" name="attr_stealth_movement" value="floor(@{base_movement} / 2)" disabled="true">
  101. <span class="sheet-save-span">Daily</span>
  102. <input class="sheet-stat-input sheet-input-big" type="text" name="attr_daily_movement" value="floor(@{base_movement} * 2 / 10)" disabled="true">
  103. </div>
  104. <div class="saves-grid">
  105. <div class="sheet-saves-title">
  106. <h3>Saving Throws</h3>
  107. </div>
  108. <span></span><span>Throw</span><span>Modifier</span><span></span>
  109. <span class="sheet-save-span">Petrif. & Paral.</span>
  110. <div><input class="sheet-stat-input" type="text" name="attr_save_pp"></div>
  111. <div><input class="sheet-stat-input" type="text" name="attr_save_pp_mod" value="0"></div>
  112. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=Saving Throw}} {{subheader=Petrification & Paralysis}} {{roll=[[1d20 + @{save_pp_mod}]]}} {{target=[[@{save_pp}]]}}" name="roll_PPSave"></button></div>
  113. <span class="sheet-save-span">Poison & Death</span>
  114. <div><input class="sheet-stat-input" type="text" name="attr_save_pd"></div>
  115. <div><input class="sheet-stat-input" type="text" name="attr_save_pd_mod" value="0"></div>
  116. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=Saving Throw}} {{subheader=Poison & Death}} {{roll=[[1d20 + @{save_pd_mod}]]}} {{target=[[@{save_pd}]]}}" name="roll_PDSave"></button></div>
  117. <span class="sheet-save-span">Blast & Breath</span>
  118. <div><input class="sheet-stat-input" type="text" name="attr_save_bb"></div>
  119. <div><input class="sheet-stat-input" type="text" name="attr_save_bb_mod" value="0"></div>
  120. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=Saving Throw}} {{subheader=Blast & Breath}} {{roll=[[1d20 + @{save_bb_mod}]]}} {{target=[[@{save_bb}]]}}" name="roll_BBSave"></button></div>
  121. <span class="sheet-save-span">Staffs & Wands</span>
  122. <div><input class="sheet-stat-input" type="text" name="attr_save_sw"></div>
  123. <div><input class="sheet-stat-input" type="text" name="attr_save_sw_mod" value="0"></div>
  124. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=Saving Throw}} {{subheader=Staffs & Wands}} {{roll=[[1d20 + @{save_sw_mod}]]}} {{target=[[@{save_sw}]]}}" name="roll_SWSave"></button></div>
  125. <span class="sheet-save-span">Spells</span>
  126. <div><input class="sheet-stat-input" type="text" name="attr_save_sp"></div>
  127. <div><input class="sheet-stat-input" type="text" name="attr_save_sp_mod" value="0"></div>
  128. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=Saving Throw}} {{subheader=Spells}} {{roll=[[1d20 + @{save_sp_mod}]]}} {{target=[[@{save_sp}]]}}" name="roll_SPSave"></button></div>
  129. </div>
  130. </div>
  131. </div>
  132. <div class="lactions section">
  133. <div class="attacks-grid">
  134. <!-- Initiative -->
  135. <span class="sheet-initiative-span">Initiative</span>
  136. <div><input class="sheet-stat-input" type="text" name="attr_initiative_mod" value="0"></div>
  137. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=Initiative Roll}} {{subheader=@{character_name}}} {{roll=[[1d6 + @{initiative_mod} &{tracker}]]}}" name="roll_Initiative"></button></div>
  138. <span class="sheet-initiative-span">Attack Throw</span>
  139. <div><input class="sheet-stat-input" type="text" name="attr_attack_throw_vis" value="@{attack_throw}" disabled="true"></div>
  140. <div><input class="sheet-stat-input sheet-hidden" type="text" name="attr_attack_throw"></div>
  141. </div>
  142. <div class="attacks-grid">
  143. <div class="sheet-attack-title">
  144. <h3>Weapons & Attacks</h3>
  145. </div>
  146. <span>Attack Name</span><span>Th. Mod</span><span>Damage</span><span></span>
  147. </div>
  148. <fieldset class="repeating_attacks">
  149. <div class="attacks-grid">
  150. <input class="sheet-name-input" type="text" name="attr_attack_name">
  151. <div><input class="sheet-stat-input" type="text" name="attr_attack_throw_mod"></div>
  152. <div><input class="sheet-stat-input" type="text" name="attr_attack_dmg"></div>
  153. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=@{attack_name} Attack}} {{roll=[[1d20 + @{attack_throw_mod}]]}} {{target=[[@{attack_throw}]]}} {{damage=[[@{attack_dmg}]]}}" name="roll_Attack"></button></div>
  154. </div>
  155. </fieldset>
  156. <div class="proficiencies-grid">
  157. <div class="sheet-proficiency-title">
  158. <h3>Proficiencies</h3>
  159. </div>
  160. <span>Proficiency</span><span>Desc</span><span></span>
  161. </div>
  162. <fieldset class="repeating_proficiencies">
  163. <div class="proficiencies-grid">
  164. <input class="sheet-name-input" type="text" name="attr_proficiency_name">
  165. <div><input class="sheet-stat-input" type="text" name="attr_proficiency_desc"></div>
  166. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=@{proficiency_name} Proficency}} {{desc=@{proficiency_desc}}}" name="roll_Proficiency"></button></div>
  167. </div>
  168. </fieldset>
  169. </div>
  170. <div class="ractions section">
  171. <div class="proficiencies-grid">
  172. <div class="sheet-proficiency-title">
  173. <h3>Class & Race Abilities</h3>
  174. </div>
  175. <span>Ability Name</span><span>Throw</span><span></span>
  176. </div>
  177. <fieldset class="repeating_abilities">
  178. <div class="proficiencies-grid">
  179. <input class="sheet-name-input" type="text" name="attr_ability_name">
  180. <div><input class="sheet-stat-input" type="text" name="attr_ability_throw"></div>
  181. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=@{ability_name}}} {{@subheader=Class/Race Ability}} {{roll=[[1d20]]}} {{target=@{ability_throw}}}" name="roll_Ability"></button></div>
  182. </div>
  183. </fieldset>
  184. <div class="proficiencies-grid">
  185. <div class="sheet-proficiency-title">
  186. <h3>Actions</h3>
  187. </div>
  188. <span>Action Name</span><span>Throw</span><span></span>
  189. </div>
  190. <div class="proficiencies-grid">
  191. <input class="sheet-name-input" type="text" name="attr_opendoor_name" value="Open Door" disabled>
  192. <div><input class="sheet-stat-input" type="text" name="attr_opendoor_throw"></div>
  193. <div><button class="sheet-roll-button" type="roll" value="/roll 1d20" name="roll_OpenDoor"></button></div>
  194. </div>
  195. <div class="proficiencies-grid">
  196. <input class="sheet-name-input" type="text" name="attr_detectdoor_name" value="Detect Secret Door" disabled>
  197. <div><input class="sheet-stat-input" type="text" name="attr_detectdoor_throw"></div>
  198. <div><button class="sheet-roll-button" type="roll" value="/roll 1d20" name="roll_DetectDoor"></button></div>
  199. </div>
  200. <div class="proficiencies-grid">
  201. <input class="sheet-name-input" type="text" name="attr_hearnoise_name" value="Hear Noise" disabled>
  202. <div><input class="sheet-stat-input" type="text" name="attr_hearnoise_throw"></div>
  203. <div><button class="sheet-roll-button" type="roll" value="/roll 1d20" name="roll_HearNoise"></button></div>
  204. </div>
  205. <div class="proficiencies-grid">
  206. <input class="sheet-name-input" type="text" name="attr_findtraps_name" value="Find Traps" disabled>
  207. <div><input class="sheet-stat-input" type="text" name="attr_findtraps_throw"></div>
  208. <div><button class="sheet-roll-button" type="roll" value="?{Spell|Cure Light Wounds, **Cure Light Wounds** Target Regains [[1d8+5]] HP. | Cure Moderate Wounds, **Cure Moderate Wounds** Target Regains [[2d8+8]] HP. | Cure Serious Wounds, **Cure Serious Wounds** Target Regains [[3d8+8]] HP.}" name="roll_FindTraps"></button></div>
  209. </div>
  210. <fieldset class="repeating_actions">
  211. <div class="proficiencies-grid">
  212. <input class="sheet-name-input" type="text" name="attr_action_name">
  213. <div><input class="sheet-stat-input" type="text" name="attr_action_throw"></div>
  214. <div><button class="sheet-roll-button" type="roll" value="/roll 1d20" name="roll_Action"></button></div>
  215. </div>
  216. </fieldset>
  217. </div>
  218. <div class="equipment section">
  219. <div class="equipment-grid">
  220. <div class="sheet-equipment-title">
  221. <h3>Equipment & Magic Items</h3>
  222. </div>
  223. <span>Item Name</span><span>Encumb.</span>
  224. </div>
  225. <fieldset class="repeating_equipment">
  226. <div class="equipment-grid">
  227. <input class="sheet-name-input" type="text" name="attr_equipment_name">
  228. <div><input class="sheet-stat-input" type="text" name="attr_equipment_encumb"></div>
  229. </div>
  230. </fieldset>
  231. </div>
  232. <div class="loot section">
  233. <div class="currency-grid">
  234. <div class="sheet-exp-title">
  235. <h3>Experience</h3>
  236. </div>
  237. <span>Current</span><span></span><span>Needed</span><span></span><span>Bonus</span>
  238. <div class="sheet-exp-current"><input type="text" name="attr_exp_current"></div>
  239. <div class="sheet-exp-needed"><input type="text" name="attr_exp_needed"></div>
  240. <div><input class="sheet-currency-input" type="text" name="attr_exp_bonus"></div>
  241. <div class="sheet-currency-title">
  242. <h3>Loot</h3>
  243. </div>
  244. <span>Copper</span><span>Silver</span><span>Electrum</span><span>Gold</span><span>Platinum</span>
  245. <input class="currency-input" type="text" name="attr_cp">
  246. <input class="currency-input" type="text" name="attr_sp">
  247. <input class="currency-input" type="text" name="attr_ep">
  248. <input class="currency-input" type="text" name="attr_gp">
  249. <input class="currency-input" type="text" name="attr_pp">
  250. <div class="sheet-lootbox"><textarea class="sheet-textarea" wrap="off" name="attr_loot"></textarea></div>
  251. </div>
  252. </div>
  253. <div class="spells section">
  254. <div class="spells-grid spells-grid-daily">
  255. <div class="sheet-spells-title">
  256. <h3>Spells Per Day</h3>
  257. </div>
  258. <span></span><span>One</span><span>Two</span><span>Three</span><span>Four</span><span>Five</span><span>Six</span><span></span><span></span>
  259. <span>Used</span>
  260. <input class="spells-input" type="text" name="attr_spells_l1">
  261. <input class="spells-input" type="text" name="attr_spells_l2">
  262. <input class="spells-input" type="text" name="attr_spells_l3">
  263. <input class="spells-input" type="text" name="attr_spells_l4">
  264. <input class="spells-input" type="text" name="attr_spells_l5">
  265. <input class="spells-input" type="text" name="attr_spells_l6">
  266. <span></span><span></span>
  267. <span>Total</span>
  268. <input class="spells-input" type="text" name="attr_spells_l1_max">
  269. <input class="spells-input" type="text" name="attr_spells_l2_max">
  270. <input class="spells-input" type="text" name="attr_spells_l3_max">
  271. <input class="spells-input" type="text" name="attr_spells_l4_max">
  272. <input class="spells-input" type="text" name="attr_spells_l5_max">
  273. <input class="spells-input" type="text" name="attr_spells_l6_max">
  274. <span></span><span></span>
  275. </div>
  276. <div class="spells-grid">
  277. <div class="sheet-spells-title sheet-margin-top">
  278. <h3>Spellbook</h3>
  279. </div>
  280. <span class="grid-span-1-2">Spell Name</span><span>Level</span><span class="grid-span-4-2">Effect</span><span>Range</span><span>Roll</span><span></span><span></span><span></span><span></span>
  281. </div>
  282. <fieldset class="repeating_spells">
  283. <div class="spells-grid">
  284. <input class="sheet-name-input grid-span-1-2" type="text" name="attr_spell_name">
  285. <div><input class="sheet-stat-input" type="text" name="attr_spell_level"></div>
  286. <div class="grid-span-4-2"><textarea class="sheet-stat-input sheet-txtarea" name="attr_spell_effect" ></textarea></div>
  287. <div><input class="sheet-stat-input" type="text" name="attr_spell_range"></div>
  288. <div><input class="sheet-stat-input" type="text" name="attr_spell_roll"></div>
  289. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=@{spell_name}}} {{subheader=Level @{spell_level} @{spell_school} Spell}} {{desc=@{spell_effect}}} {{roll=[[@{spell_roll}]]}} {{range=@{spell_range}}}" name="roll_Spell"></button></div>
  290. <div class="sheet-hidden"><input type="text" name="attr_spell_school"></div>
  291. </div>
  292. </fieldset>
  293. </div>
  294. </div>
  295. </div>
  296. <div class="npc">
  297. <div class="npc-header sheet-grid-span-1-2 sheet-text-center">
  298. <h2>Adventurer Conqueror King System</h2>
  299. <h4>NPC/Monster Stat Block</h4>
  300. <br><br><br>
  301. </div>
  302. <div class="npc-lsection">
  303. <div class="attacks-grid">
  304. <span class="sheet-initiative-span">Attack Throw</span>
  305. <div><input class="sheet-stat-input" type="text" name="attr_npc_attack_throw_vis" value="@{npc_attack_throw}" disabled="true"></div>
  306. <div><input class="sheet-stat-input sheet-hidden" type="text" name="attr_npc_attack_throw"></div>
  307. <span class="sheet-initiative-span">Armour Class</span>
  308. <div><input class="sheet-stat-input" type="text" name="attr_ac" value="0"></div>
  309. <div></div>
  310. <!-- Initiative -->
  311. <span class="sheet-initiative-span">Initiative</span>
  312. <div><input class="sheet-stat-input" type="text" name="attr_initiative_mod" value="0"></div>
  313. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=Initiative Roll}} {{subheader=@{character_name}}} {{roll=[[1d6 + @{initiative_mod} &{tracker}]]}}" name="roll_Initiative"></button></div>
  314. </div>
  315. <div class="attacks-grid">
  316. <div class="sheet-attack-title">
  317. <h3>Weapons & Attacks</h3>
  318. </div>
  319. <span>Attack Name</span><span>Th. Mod</span><span>Damage</span><span></span>
  320. </div>
  321. <fieldset class="repeating_attacks">
  322. <div class="attacks-grid">
  323. <input class="sheet-name-input" type="text" name="attr_attack_name">
  324. <div><input class="sheet-stat-input" type="text" name="attr_attack_throw_mod"></div>
  325. <div><input class="sheet-stat-input" type="text" name="attr_attack_dmg"></div>
  326. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=@{attack_name} Attack}} {{roll=[[1d20 + @{attack_throw_mod}]]}} {{target=[[@{attack_throw}]]}} {{damage=[[@{attack_dmg}]]}}" name="roll_Attack"></button></div>
  327. </div>
  328. </fieldset>
  329. <div class="proficiencies-grid">
  330. <div class="sheet-proficiency-title">
  331. <h3>Proficiencies</h3>
  332. </div>
  333. <span>Proficiency</span><span>Desc</span><span></span>
  334. </div>
  335. <fieldset class="repeating_proficiencies">
  336. <div class="proficiencies-grid">
  337. <input class="sheet-name-input" type="text" name="attr_proficiency_name">
  338. <div><input class="sheet-stat-input" type="text" name="attr_proficiency_desc"></div>
  339. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=@{proficiency_name} Proficency}} {{desc=@{proficiency_desc}}}" name="roll_Proficiency"></button></div>
  340. </div>
  341. </fieldset>
  342. </div>
  343. <div class="npc-rsection">
  344. <div class="attacks-grid">
  345. <span class="sheet-title-line">Hit Dice</span>
  346. <input class="sheet-stat-input" type="text" name="attr_npc_hitdice">
  347. <input class="sheet-stat-input" type="text" name="attr_npc_hitdicemod" value="d8">
  348. <div><button class="sheet-roll-button" type="roll" value="/w gm &{template:acks}{{name=@{character_name} Hit Dice}}{{roll=[[@{npc_hitdice}@{npc_hitdicemod}]]}}" name="roll_NPCHitDice"></button></div>
  349. <span class="sheet-title-line">Hit Points/Max</span><input class="sheet-stat-input" type="text" name="attr_hp"><input class="sheet-stat-input" type="text" name="attr_hp_max"><span></span>
  350. <span class="sheet-title-line">Class</span><span></span><span class="sheet-title-line">Level</span><span></span>
  351. <select name="attr_class">
  352. <option>Fighter</option>
  353. <option>Mage</option>
  354. <option>Cleric</option>
  355. <option>Thief</option>
  356. <option>Assassin</option>
  357. <option>Bard</option>
  358. <option>Bladedancer</option>
  359. <option>Explorer</option>
  360. </select>
  361. <span></span>
  362. <input class="sheet-stat-input" type="text" name="attr_level">
  363. <span></span>
  364. </div>
  365. <div class="saves-grid">
  366. <div class="sheet-saves-title">
  367. <h3>Saving Throws</h3>
  368. </div>
  369. <span></span><span>Throw</span><span>Modifier</span><span></span>
  370. <span class="sheet-save-span">Petrif. & Paral.</span>
  371. <div><input class="sheet-stat-input" type="text" name="attr_save_pp"></div>
  372. <div><input class="sheet-stat-input" type="text" name="attr_save_pp_mod" value="0"></div>
  373. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=Saving Throw}} {{subheader=Petrification & Paralysis}} {{roll=[[1d20 + @{save_pp_mod}]]}} {{target=[[@{save_pp}]]}}" name="roll_PPSave"></button></div>
  374. <span class="sheet-save-span">Poison & Death</span>
  375. <div><input class="sheet-stat-input" type="text" name="attr_save_pd"></div>
  376. <div><input class="sheet-stat-input" type="text" name="attr_save_pd_mod" value="0"></div>
  377. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=Saving Throw}} {{subheader=Poison & Death}} {{roll=[[1d20 + @{save_pd_mod}]]}} {{target=[[@{save_pd}]]}}" name="roll_PDSave"></button></div>
  378. <span class="sheet-save-span">Blast & Breath</span>
  379. <div><input class="sheet-stat-input" type="text" name="attr_save_bb"></div>
  380. <div><input class="sheet-stat-input" type="text" name="attr_save_bb_mod" value="0"></div>
  381. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=Saving Throw}} {{subheader=Blast & Breath}} {{roll=[[1d20 + @{save_bb_mod}]]}} {{target=[[@{save_bb}]]}}" name="roll_BBSave"></button></div>
  382. <span class="sheet-save-span">Staffs & Wands</span>
  383. <div><input class="sheet-stat-input" type="text" name="attr_save_sw"></div>
  384. <div><input class="sheet-stat-input" type="text" name="attr_save_sw_mod" value="0"></div>
  385. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=Saving Throw}} {{subheader=Staffs & Wands}} {{roll=[[1d20 + @{save_sw_mod}]]}} {{target=[[@{save_sw}]]}}" name="roll_SWSave"></button></div>
  386. <span class="sheet-save-span">Spells</span>
  387. <div><input class="sheet-stat-input" type="text" name="attr_save_sp"></div>
  388. <div><input class="sheet-stat-input" type="text" name="attr_save_sp_mod" value="0"></div>
  389. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=Saving Throw}} {{subheader=Spells}} {{roll=[[1d20 + @{save_sp_mod}]]}} {{target=[[@{save_sp}]]}}" name="roll_SPSave"></button></div>
  390. </div>
  391. </div>
  392. </div>
  393. <!-- Roll Templates -->
  394. <rolltemplate class="sheet-rolltemplate-acks">
  395. <div class="sheet-acks-container">
  396. <div class="sheet-acks-header">{{name}}</div>
  397. {{#subheader}}
  398. <div class="sheet-acks-subheader sheet-acks-row">{{subheader}}</div>
  399. {{/subheader}}
  400. {{#target}}
  401. <div class="sheet-acks-row"><strong>Target</strong> <span class="sheet-acks-target-value">{{target}}+</span></div>
  402. {{/target}}
  403. {{#range}}
  404. <div class="sheet-acks-row"><strong>Range</strong> <span class="sheet-acks-target-value">{{range}}</span></div>
  405. {{/range}}
  406. {{#roll}}
  407. <div class="sheet-acks-row"><strong>Roll</strong> {{roll}}</div>
  408. {{/roll}}
  409. {{#damage}}
  410. <div class="sheet-acks-row"><strong>Damage</strong> {{damage}}</div>
  411. {{/damage}}
  412. {{#desc}}
  413. <div class="sheet-acks-row sheet-acks-desc">{{desc}}</div>
  414. {{/desc}}
  415. </div>
  416. </rolltemplate>
  417. <!-- Sheet Workers -->
  418. <script type="text/worker">
  419. /*** ATTRIBUTE RELATED WORKERS ***/
  420. const calculateAttrMod = function(attr) {
  421. // Calculate the modifier for a given attribute value
  422. let atr = parseInt(attr);
  423. let mod = 0;
  424. if(atr <= 3) mod = -3;
  425. if(atr >= 4 && atr <= 5) mod = -2;
  426. if(atr >= 6 && atr <= 8) mod = -1;
  427. if(atr >= 9 && atr <= 12) mod = 0;
  428. if(atr >= 13 && atr <= 15) mod = 1;
  429. if(atr >= 16 && atr <= 17) mod = 2;
  430. if(atr >= 18) mod = 3;
  431. return mod;
  432. };
  433. /** Calculate Modifiers when an Attribute value changes **/
  434. on("change:str", function(e) {
  435. console.log('calculate mod for str');
  436. setAttrs({str_mod: calculateAttrMod(e.newValue)});
  437. });
  438. on("change:int", function(e) {
  439. console.log('calculate mod for int');
  440. setAttrs({int_mod: calculateAttrMod(e.newValue)});
  441. });
  442. on("change:wis", function(e) {
  443. console.log('calculate mod for wis');
  444. setAttrs({wis_mod: calculateAttrMod(e.newValue)});
  445. });
  446. on("change:dex", function(e) {
  447. console.log('calculate mod for dex');
  448. setAttrs({dex_mod: calculateAttrMod(e.newValue)});
  449. });
  450. on("change:con", function(e) {
  451. console.log('calculate mod for con');
  452. setAttrs({con_mod: calculateAttrMod(e.newValue)});
  453. });
  454. on("change:chr", function(e) {
  455. console.log('calculate mod for chr');
  456. setAttrs({chr_mod: calculateAttrMod(e.newValue)});
  457. });
  458. </script>
  459. <script type="text/worker">
  460. /*** SAVES/THROWS RELATED WORKERS ***/
  461. const calculateSavesThrows = function(level, clas) {
  462. level = parseInt(level);
  463. var saves = [0, 0, 0, 0, 0, 0];
  464. switch(clas) {
  465. case 'Fighter':
  466. case 'Assassin':
  467. case 'Explorer':
  468. switch(level) {
  469. case 0:
  470. saves = [16, 15, 17, 17, 18];
  471. break;
  472. case 1:
  473. saves = [15, 14, 16, 16, 17, 10];
  474. break;
  475. case 2:
  476. case 3:
  477. saves = [14, 13, 15, 15, 16, 9];
  478. break;
  479. case 4:
  480. saves = [13, 12, 14, 14, 15, 8];
  481. break;
  482. case 5:
  483. case 6:
  484. saves = [12, 11, 13, 13, 14, 7];
  485. break;
  486. case 7:
  487. saves = [11, 10, 12, 12, 13, 6];
  488. break;
  489. case 8:
  490. case 9:
  491. saves = [10, 9, 11, 11, 12, 5];
  492. break;
  493. case 10:
  494. saves = [9, 8, 10, 10, 11, 4];
  495. break;
  496. case 11:
  497. case 12:
  498. saves = [8, 7, 9, 9, 10, 3];
  499. break;
  500. case 13:
  501. saves = [7, 6, 8, 8, 9, 2];
  502. break;
  503. case 14:
  504. saves = [6, 5, 7, 7, 8, 1];
  505. break;
  506. }
  507. break;
  508. case 'Mage':
  509. switch(level) {
  510. case 1:
  511. case 2:
  512. case 3:
  513. saves = [13, 13, 15, 11, 12, 10];
  514. break;
  515. case 4:
  516. case 5:
  517. case 6:
  518. saves = [12, 12, 14, 10, 11, 9];
  519. break;
  520. case 7:
  521. case 8:
  522. case 9:
  523. saves = [11, 11, 13, 9, 10, 8];
  524. break;
  525. case 10:
  526. case 11:
  527. case 12:
  528. saves = [10, 10, 12, 8, 9, 7];
  529. break;
  530. case 13:
  531. case 14:
  532. saves = [9, 9, 11, 7, 8, 6];
  533. break;
  534. }
  535. break;
  536. case 'Cleric':
  537. case 'Bladedancer':
  538. switch(level) {
  539. case 1:
  540. case 2:
  541. saves = [13, 10, 16, 13, 15, 10];
  542. break;
  543. case 3:
  544. case 4:
  545. saves = [12, 9, 15, 12, 14, 9];
  546. break;
  547. case 5:
  548. case 6:
  549. saves = [11, 8, 14, 11, 13, 8];
  550. break;
  551. case 7:
  552. case 8:
  553. saves = [10, 7, 13, 10, 12, 7];
  554. break;
  555. case 9:
  556. case 10:
  557. saves = [9, 6, 12, 9, 11, 6];
  558. break;
  559. case 11:
  560. case 12:
  561. saves = [8, 5, 11, 8, 10, 5];
  562. break;
  563. case 13:
  564. case 14:
  565. saves = [7, 4, 10, 7, 9, 4];
  566. break;
  567. }
  568. break;
  569. case 'Thief':
  570. case 'Bard':
  571. switch(level) {
  572. case 1:
  573. case 2:
  574. saves = [13, 13, 16, 14, 15, 10];
  575. break;
  576. case 3:
  577. case 4:
  578. saves = [12, 12, 15, 13, 14, 9];
  579. break;
  580. case 5:
  581. case 6:
  582. saves = [11, 11, 14, 12, 13, 8];
  583. break;
  584. case 7:
  585. case 8:
  586. saves = [10, 10, 13, 11, 12, 7];
  587. break;
  588. case 9:
  589. case 10:
  590. saves = [9, 9, 12, 10, 11, 6];
  591. break;
  592. case 11:
  593. case 12:
  594. saves = [8, 8, 11, 9, 10, 5];
  595. break;
  596. case 13:
  597. case 14:
  598. saves = [7, 7, 10, 8, 9, 4];
  599. break;
  600. }
  601. break;
  602. }
  603. return saves;
  604. };
  605. on("change:level change:class", function(e) {
  606. console.log('calculate saves and throws for class/level');
  607. getAttrs(["level", "class"], function(v) {
  608. let saves = calculateSavesThrows(v.level, v.class);
  609. setAttrs({
  610. save_pp: saves[0],
  611. save_pd: saves[1],
  612. save_bb: saves[2],
  613. save_sw: saves[3],
  614. save_sp: saves[4],
  615. attack_throw: saves[5]
  616. });
  617. });
  618. });
  619. /* NPC Attack Throw */
  620. const calculateNpcHit = function(hd) {
  621. switch(hd.toString()) {
  622. case '1':
  623. return 10;
  624. case '2':
  625. return 9;
  626. case '3':
  627. return 8;
  628. case '4':
  629. return 7;
  630. case '5':
  631. return 6;
  632. case '6':
  633. return 5;
  634. case '7':
  635. return 4;
  636. case '8':
  637. case '9':
  638. return 3;
  639. case '10':
  640. case '11':
  641. return 2;
  642. case '12':
  643. case '13':
  644. return 1;
  645. case '14':
  646. case '15':
  647. return 0;
  648. case '16':
  649. case '17':
  650. return -1;
  651. case '18':
  652. case '19':
  653. return -2;
  654. case '20':
  655. case '21':
  656. return -3;
  657. default:
  658. return -4;
  659. }
  660. };
  661. on("change:npc_hitdice", function(e) {
  662. getAttrs(["npc_hitdice"], function(v) {
  663. let thrw = calculateNpcHit(v.npc_hitdice);
  664. setAttrs({npc_attack_throw: thrw});
  665. });
  666. });
  667. </script>