You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

714 lines
35 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>
  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>Total</span>
  267. <input class="spells-input" type="text" name="attr_spells_l1_max">
  268. <input class="spells-input" type="text" name="attr_spells_l2_max">
  269. <input class="spells-input" type="text" name="attr_spells_l3_max">
  270. <input class="spells-input" type="text" name="attr_spells_l4_max">
  271. <input class="spells-input" type="text" name="attr_spells_l5_max">
  272. <input class="spells-input" type="text" name="attr_spells_l6_max">
  273. </div>
  274. <div class="spells-grid">
  275. <div class="sheet-spells-title sheet-margin-top">
  276. <h3>Spellbook</h3>
  277. </div>
  278. <span class="grid-span-1-2">Spell Name</span><span>Level</span><span class="grid-span-4-2">Effect</span><span>Damage</span><span></span><span></span><span></span>
  279. </div>
  280. <fieldset class="repeating_spells">
  281. <div class="spells-grid">
  282. <input class="sheet-name-input grid-span-1-2" type="text" name="attr_spell_name">
  283. <div><input class="sheet-stat-input" type="text" name="attr_spell_level"></div>
  284. <div class="grid-span-4-2"><input class="sheet-stat-input" type="text" name="attr_spell_effect"></div>
  285. <div><input class="sheet-stat-input" type="text" name="attr_spell_damage"></div>
  286. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=@{spell_name}}} {{subheader=Level @{spell_level} Arcane Spell}} {{desc=@{spell_effect}}} {{damage=[[@{spell_damage}]]}}" name="roll_Spell"></button></div>
  287. </div>
  288. </fieldset>
  289. </div>
  290. </div>
  291. </div>
  292. <div class="npc">
  293. <div class="npc-header sheet-grid-span-1-2 sheet-text-center">
  294. <h2>Adventurer Conqueror King System</h2>
  295. <h4>NPC/Monster Stat Block</h4>
  296. <br><br><br>
  297. </div>
  298. <div class="npc-lsection">
  299. <div class="attacks-grid">
  300. <span class="sheet-initiative-span">Attack Throw</span>
  301. <div><input class="sheet-stat-input" type="text" name="attr_npc_attack_throw_vis" value="@{npc_attack_throw}" disabled="true"></div>
  302. <div><input class="sheet-stat-input sheet-hidden" type="text" name="attr_npc_attack_throw"></div>
  303. <span class="sheet-initiative-span">Armour Class</span>
  304. <div><input class="sheet-stat-input" type="text" name="attr_ac" value="0"></div>
  305. <div></div>
  306. <!-- Initiative -->
  307. <span class="sheet-initiative-span">Initiative</span>
  308. <div><input class="sheet-stat-input" type="text" name="attr_initiative_mod" value="0"></div>
  309. <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>
  310. </div>
  311. <div class="attacks-grid">
  312. <div class="sheet-attack-title">
  313. <h3>Weapons & Attacks</h3>
  314. </div>
  315. <span>Attack Name</span><span>Th. Mod</span><span>Damage</span><span></span>
  316. </div>
  317. <fieldset class="repeating_attacks">
  318. <div class="attacks-grid">
  319. <input class="sheet-name-input" type="text" name="attr_attack_name">
  320. <div><input class="sheet-stat-input" type="text" name="attr_attack_throw_mod"></div>
  321. <div><input class="sheet-stat-input" type="text" name="attr_attack_dmg"></div>
  322. <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>
  323. </div>
  324. </fieldset>
  325. <div class="proficiencies-grid">
  326. <div class="sheet-proficiency-title">
  327. <h3>Proficiencies</h3>
  328. </div>
  329. <span>Proficiency</span><span>Desc</span><span></span>
  330. </div>
  331. <fieldset class="repeating_proficiencies">
  332. <div class="proficiencies-grid">
  333. <input class="sheet-name-input" type="text" name="attr_proficiency_name">
  334. <div><input class="sheet-stat-input" type="text" name="attr_proficiency_desc"></div>
  335. <div><button class="sheet-roll-button" type="roll" value="&{template:acks} {{name=@{proficiency_name} Proficency}} {{desc=@{proficiency_desc}}}" name="roll_Proficiency"></button></div>
  336. </div>
  337. </fieldset>
  338. </div>
  339. <div class="npc-rsection">
  340. <div class="attacks-grid">
  341. <span class="sheet-title-line">Hit Dice</span>
  342. <input class="sheet-stat-input" type="text" name="attr_npc_hitdice">
  343. <input class="sheet-stat-input" type="text" name="attr_npc_hitdicemod" value="d8">
  344. <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>
  345. <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>
  346. <span class="sheet-title-line">Class</span><span></span><span class="sheet-title-line">Level</span><span></span>
  347. <select name="attr_class">
  348. <option>Fighter</option>
  349. <option>Mage</option>
  350. <option>Cleric</option>
  351. <option>Thief</option>
  352. <option>Assassin</option>
  353. <option>Bard</option>
  354. <option>Bladedancer</option>
  355. <option>Explorer</option>
  356. </select>
  357. <span></span>
  358. <input class="sheet-stat-input" type="text" name="attr_level">
  359. <span></span>
  360. </div>
  361. <div class="saves-grid">
  362. <div class="sheet-saves-title">
  363. <h3>Saving Throws</h3>
  364. </div>
  365. <span></span><span>Throw</span><span>Modifier</span><span></span>
  366. <span class="sheet-save-span">Petrif. & Paral.</span>
  367. <div><input class="sheet-stat-input" type="text" name="attr_save_pp"></div>
  368. <div><input class="sheet-stat-input" type="text" name="attr_save_pp_mod" value="0"></div>
  369. <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>
  370. <span class="sheet-save-span">Poison & Death</span>
  371. <div><input class="sheet-stat-input" type="text" name="attr_save_pd"></div>
  372. <div><input class="sheet-stat-input" type="text" name="attr_save_pd_mod" value="0"></div>
  373. <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>
  374. <span class="sheet-save-span">Blast & Breath</span>
  375. <div><input class="sheet-stat-input" type="text" name="attr_save_bb"></div>
  376. <div><input class="sheet-stat-input" type="text" name="attr_save_bb_mod" value="0"></div>
  377. <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>
  378. <span class="sheet-save-span">Staffs & Wands</span>
  379. <div><input class="sheet-stat-input" type="text" name="attr_save_sw"></div>
  380. <div><input class="sheet-stat-input" type="text" name="attr_save_sw_mod" value="0"></div>
  381. <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>
  382. <span class="sheet-save-span">Spells</span>
  383. <div><input class="sheet-stat-input" type="text" name="attr_save_sp"></div>
  384. <div><input class="sheet-stat-input" type="text" name="attr_save_sp_mod" value="0"></div>
  385. <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>
  386. </div>
  387. </div>
  388. </div>
  389. <!-- Roll Templates -->
  390. <rolltemplate class="sheet-rolltemplate-acks">
  391. <div class="sheet-acks-container">
  392. <div class="sheet-acks-header">{{name}}</div>
  393. {{#subheader}}
  394. <div class="sheet-acks-subheader sheet-acks-row">{{subheader}}</div>
  395. {{/subheader}}
  396. {{#target}}
  397. <div class="sheet-acks-row">Target <span class="sheet-acks-target-value">{{target}}+</span></div>
  398. {{/target}}
  399. {{#roll}}
  400. <div class="sheet-acks-row">Roll {{roll}}</div>
  401. {{/roll}}
  402. {{#damage}}
  403. <div class="sheet-acks-row">Damage {{damage}}</div>
  404. {{/damage}}
  405. {{#desc}}
  406. <div class="sheet-acks-row sheet-acks-desc">{{desc}}</div>
  407. {{/desc}}
  408. </div>
  409. </rolltemplate>
  410. <!-- Sheet Workers -->
  411. <script type="text/worker">
  412. /*** ATTRIBUTE RELATED WORKERS ***/
  413. const calculateAttrMod = function(attr) {
  414. // Calculate the modifier for a given attribute value
  415. let atr = parseInt(attr);
  416. let mod = 0;
  417. if(atr <= 3) mod = -3;
  418. if(atr >= 4 && atr <= 5) mod = -2;
  419. if(atr >= 6 && atr <= 8) mod = -1;
  420. if(atr >= 9 && atr <= 12) mod = 0;
  421. if(atr >= 13 && atr <= 15) mod = 1;
  422. if(atr >= 16 && atr <= 17) mod = 2;
  423. if(atr >= 18) mod = 3;
  424. return mod;
  425. };
  426. /** Calculate Modifiers when an Attribute value changes **/
  427. on("change:str", function(e) {
  428. console.log('calculate mod for str');
  429. setAttrs({str_mod: calculateAttrMod(e.newValue)});
  430. });
  431. on("change:int", function(e) {
  432. console.log('calculate mod for int');
  433. setAttrs({int_mod: calculateAttrMod(e.newValue)});
  434. });
  435. on("change:wis", function(e) {
  436. console.log('calculate mod for wis');
  437. setAttrs({wis_mod: calculateAttrMod(e.newValue)});
  438. });
  439. on("change:dex", function(e) {
  440. console.log('calculate mod for dex');
  441. setAttrs({dex_mod: calculateAttrMod(e.newValue)});
  442. });
  443. on("change:con", function(e) {
  444. console.log('calculate mod for con');
  445. setAttrs({con_mod: calculateAttrMod(e.newValue)});
  446. });
  447. on("change:chr", function(e) {
  448. console.log('calculate mod for chr');
  449. setAttrs({chr_mod: calculateAttrMod(e.newValue)});
  450. });
  451. </script>
  452. <script type="text/worker">
  453. /*** SAVES/THROWS RELATED WORKERS ***/
  454. const calculateSavesThrows = function(level, clas) {
  455. level = parseInt(level);
  456. var saves = [0, 0, 0, 0, 0, 0];
  457. switch(clas) {
  458. case 'Fighter':
  459. case 'Assassin':
  460. case 'Explorer':
  461. switch(level) {
  462. case 0:
  463. saves = [16, 15, 17, 17, 18];
  464. break;
  465. case 1:
  466. saves = [15, 14, 16, 16, 17, 10];
  467. break;
  468. case 2:
  469. case 3:
  470. saves = [14, 13, 15, 15, 16, 9];
  471. break;
  472. case 4:
  473. saves = [13, 12, 14, 14, 15, 8];
  474. break;
  475. case 5:
  476. case 6:
  477. saves = [12, 11, 13, 13, 14, 7];
  478. break;
  479. case 7:
  480. saves = [11, 10, 12, 12, 13, 6];
  481. break;
  482. case 8:
  483. case 9:
  484. saves = [10, 9, 11, 11, 12, 5];
  485. break;
  486. case 10:
  487. saves = [9, 8, 10, 10, 11, 4];
  488. break;
  489. case 11:
  490. case 12:
  491. saves = [8, 7, 9, 9, 10, 3];
  492. break;
  493. case 13:
  494. saves = [7, 6, 8, 8, 9, 2];
  495. break;
  496. case 14:
  497. saves = [6, 5, 7, 7, 8, 1];
  498. break;
  499. }
  500. break;
  501. case 'Mage':
  502. switch(level) {
  503. case 1:
  504. case 2:
  505. case 3:
  506. saves = [13, 13, 15, 11, 12, 10];
  507. break;
  508. case 4:
  509. case 5:
  510. case 6:
  511. saves = [12, 12, 14, 10, 11, 9];
  512. break;
  513. case 7:
  514. case 8:
  515. case 9:
  516. saves = [11, 11, 13, 9, 10, 8];
  517. break;
  518. case 10:
  519. case 11:
  520. case 12:
  521. saves = [10, 10, 12, 8, 9, 7];
  522. break;
  523. case 13:
  524. case 14:
  525. saves = [9, 9, 11, 7, 8, 6];
  526. break;
  527. }
  528. break;
  529. case 'Cleric':
  530. case 'Bladedancer':
  531. switch(level) {
  532. case 1:
  533. case 2:
  534. saves = [13, 10, 16, 13, 15, 10];
  535. break;
  536. case 3:
  537. case 4:
  538. saves = [12, 9, 15, 12, 14, 9];
  539. break;
  540. case 5:
  541. case 6:
  542. saves = [11, 8, 14, 11, 13, 8];
  543. break;
  544. case 7:
  545. case 8:
  546. saves = [10, 7, 13, 10, 12, 7];
  547. break;
  548. case 9:
  549. case 10:
  550. saves = [9, 6, 12, 9, 11, 6];
  551. break;
  552. case 11:
  553. case 12:
  554. saves = [8, 5, 11, 8, 10, 5];
  555. break;
  556. case 13:
  557. case 14:
  558. saves = [7, 4, 10, 7, 9, 4];
  559. break;
  560. }
  561. break;
  562. case 'Thief':
  563. case 'Bard':
  564. switch(level) {
  565. case 1:
  566. case 2:
  567. saves = [13, 13, 16, 14, 15, 10];
  568. break;
  569. case 3:
  570. case 4:
  571. saves = [12, 12, 15, 13, 14, 9];
  572. break;
  573. case 5:
  574. case 6:
  575. saves = [11, 11, 14, 12, 13, 8];
  576. break;
  577. case 7:
  578. case 8:
  579. saves = [10, 10, 13, 11, 12, 7];
  580. break;
  581. case 9:
  582. case 10:
  583. saves = [9, 9, 12, 10, 11, 6];
  584. break;
  585. case 11:
  586. case 12:
  587. saves = [8, 8, 11, 9, 10, 5];
  588. break;
  589. case 13:
  590. case 14:
  591. saves = [7, 7, 10, 8, 9, 4];
  592. break;
  593. }
  594. break;
  595. }
  596. return saves;
  597. };
  598. on("change:level change:class", function(e) {
  599. console.log('calculate saves and throws for class/level');
  600. getAttrs(["level", "class"], function(v) {
  601. let saves = calculateSavesThrows(v.level, v.class);
  602. setAttrs({
  603. save_pp: saves[0],
  604. save_pd: saves[1],
  605. save_bb: saves[2],
  606. save_sw: saves[3],
  607. save_sp: saves[4],
  608. attack_throw: saves[5]
  609. });
  610. });
  611. });
  612. /* NPC Attack Throw */
  613. const calculateNpcHit = function(hd) {
  614. switch(hd.toString()) {
  615. case '1':
  616. return 10;
  617. case '2':
  618. return 9;
  619. case '3':
  620. return 8;
  621. case '4':
  622. return 7;
  623. case '5':
  624. return 6;
  625. case '6':
  626. return 5;
  627. case '7':
  628. return 4;
  629. case '8':
  630. case '9':
  631. return 3;
  632. case '10':
  633. case '11':
  634. return 2;
  635. case '12':
  636. case '13':
  637. return 1;
  638. case '14':
  639. case '15':
  640. return 0;
  641. case '16':
  642. case '17':
  643. return -1;
  644. case '18':
  645. case '19':
  646. return -2;
  647. case '20':
  648. case '21':
  649. return -3;
  650. default:
  651. return -4;
  652. }
  653. };
  654. on("change:npc_hitdice", function(e) {
  655. getAttrs(["npc_hitdice"], function(v) {
  656. let thrw = calculateNpcHit(v.npc_hitdice);
  657. setAttrs({npc_attack_throw: thrw});
  658. });
  659. });
  660. </script>