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.

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