All user data for FoundryVTT. Includes worlds, systems, modules, and any asset in the "foundryuserdata" directory. Does NOT include the FoundryVTT installation itself.
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.

290 lines
18 KiB

1 year ago
  1. <div class="tab actions actions-pane" data-group="primary" data-tab="actions">
  2. <nav class="actions-nav sub-nav" data-group="actions-tabs">
  3. <a class="tab" data-tab="encounter" data-group="actions-tabs">{{localize "PF2E.TabActionsEncounterLabel"}}</a>
  4. <a class="tab" data-tab="exploration" data-group="actions-tabs">{{localize "PF2E.TabActionsExplorationLabel"}}</a>
  5. <a class="tab" data-tab="downtime" data-group="actions-tabs">{{localize "PF2E.TabActionsDowntimeLabel"}}</a>
  6. </nav>
  7. <div class="actions-container tab-content">
  8. <div class="actions-tabs-wrapper">
  9. <section class="actions-panels">
  10. <div class="actions-panel" data-tab="encounter" data-group="actions-tabs">
  11. {{#if toggles}}
  12. <div class="actions-options item-list">
  13. {{#each toggles as |toggle idx|}}
  14. {{#if (or (not toggle.scope) (eq toggle.scope "actions-tab"))}}
  15. <div class="actions-option item" data-item-id="{{toggle.itemId}}" data-domain="{{toggle.domain}}" data-option="{{toggle.option}}" data-scope="{{toggle.scope}}">
  16. <label>
  17. <input type="checkbox" data-action="toggle-roll-option" {{disabled (not toggle.enabled)}} {{checked toggle.checked}} />
  18. <span{{#if (not (or toggle.checked toggle.enabled))}} class="unchecked-disabled"{{/if}}>{{localize toggle.label}}</span>
  19. {{#if toggle.suboptions}}
  20. <select data-action="set-suboption">
  21. {{#each toggle.suboptions as |suboption|}}
  22. <option value="{{suboption.value}}"{{#if suboption.selected}} selected{{/if}}>{{localize suboption.label}}</option>
  23. {{/each}}
  24. </select>
  25. {{/if}}
  26. </label>
  27. </div>
  28. {{/if}}
  29. {{/each}}
  30. </div>
  31. {{/if}}
  32. <h3 class="header">
  33. {{localize "PF2E.StrikesLabel"}}
  34. <button type="button" class="toggle-unready-strikes" title="{{localize "PF2E.ToggleUnreadyStrikes"}}">
  35. <i class="fa-solid fa-tshirt"{{#if actor.flags.pf2e.showUnreadyStrikes}} style="color: rgba(0, 0, 0, 0.4);"{{/if}}></i>
  36. </button>
  37. </h3>
  38. <ol class="actions-list item-list directory-list strikes-list">
  39. {{#each data.actions as |action ai|}}
  40. <li class="item action strike expandable{{#if action.ready}} ready{{/if}}{{#unless action.visible}} hidden{{/unless}}" data-action-index="{{ai}}">
  41. <div class="item-name rollable">
  42. <div class="item-image variant-strike framed" data-action="strike-attack" data-variant-index="0">
  43. <img src="{{action.imageUrl}}"/>
  44. <i class="fa-solid fa-dice-d20"></i>
  45. </div>
  46. <div class="actions-title">
  47. <div class="action-name">
  48. <h4>
  49. {{action.label}}
  50. {{#if action.item.isTemporary}}<i class="fa-solid fa-info-circle small" title="{{localize "PF2E.TemporaryItemToolTip"}}"></i>{{/if}}
  51. </h4>
  52. </div>
  53. {{#if (any action.ready ../actor.flags.pf2e.showUnreadyStrikes)}}
  54. <!-- ATTACK/DAMAGE -->
  55. {{#> attackDamage action}}{{/attackDamage}}
  56. {{/if}}
  57. </div>
  58. </div>
  59. {{#if (and action.altUsages (or action.ready ../actor.flags.pf2e.showUnreadyStrikes))}}
  60. {{#each action.altUsages as |usage|}}
  61. <div class="alt-usage">
  62. {{#if usage.item.isThrown}}
  63. <img class="alt-usage-icon" src="systems/pf2e/icons/mdi/thrown.svg" title="{{localize "PF2E.Item.Weapon.ThrownUsage.Label"}}" />
  64. {{else}}
  65. <img class="alt-usage-icon" src="systems/pf2e/icons/mdi/sword.svg" title="{{localize "PF2E.Item.Weapon.MeleeUsage.Label"}}" />
  66. {{/if}}
  67. {{#> attackDamage usage isAltUsage=true}}{{/attackDamage}}
  68. </div>
  69. {{/each}}
  70. {{/if}}
  71. {{#if (and action.ammunition (or action.ready ../actor.flags.pf2e.showUnreadyStrikes))}}
  72. <div class="ammo auxiliary-actions">
  73. <select class="linked"
  74. data-action="link-ammo"
  75. {{#if action.ammunition.selected}} data-compatible="{{action.ammunition.selected.compatible}}"{{/if}}>
  76. {{#select action.ammunition.selected.id}}
  77. <option value="">{{localize "PF2E.NoAmmoLabel"}}</option>
  78. {{#each action.ammunition.compatible as |ammo|}}
  79. <option value="{{ammo.id}}" data-compatible="true">{{ammo.name}} ({{ammo.quantity}})</option>
  80. {{/each}}
  81. {{/select}}
  82. </select>
  83. <span class="magazine" data-item-id="{{action.item.id}}">
  84. {{#if (gt action.item.ammo.uses.max 1)}}
  85. <span class="remaining"><i class="icon"></i> {{action.item.ammo.uses.value}}</span>
  86. {{/if}}
  87. </span>
  88. </div>
  89. {{/if}}
  90. <div class="auxiliary-actions{{#if action.ready}} weapon-drawn{{/if}}">
  91. {{#each action.auxiliaryActions as |aux aid|}}
  92. <button type="button" data-action="auxiliary-action" data-auxiliary-action-index="{{aid}}">
  93. <span class="activity-icon">{{aux.glyph}}</span>
  94. <span>{{aux.label}}</span>
  95. {{#if aux.options}}
  96. <select class="modular" data-action="auxiliary-action" data-auxiliary-action-index="{{aid}}">
  97. {{#each aux.options as |option|}}
  98. <option value="{{option.value}}"{{#if option.selected}} selected{{/if}}>
  99. {{option.label}} {{#if option.selected}}✔️{{/if}}
  100. </option>
  101. {{/each}}
  102. </select>
  103. {{/if}}
  104. </button>
  105. {{/each}}
  106. </div>
  107. <div class="item-summary">
  108. <div class="item-description">
  109. <p>{{{localize action.description}}}</p>
  110. <hr />
  111. <dl>
  112. <dt>{{{localize "PF2E.CritSuccess"}}}</dt>
  113. <dd>{{{localize action.criticalSuccess}}}</dd>
  114. <dt>{{{localize "PF2E.Success"}}}</dt>
  115. <dd>{{{localize action.success}}}</dd>
  116. </dl>
  117. </div>
  118. <div class="item-properties tags">
  119. {{#each action.traits as |trait|}}
  120. <span class="tag {{trait.cssClass}}"{{#if trait.description}} data-description="{{trait.description}}"{{/if}}>{{trait.label}}</span>
  121. {{/each}}
  122. {{#each action.weaponTraits as |trait|}}
  123. <span class="tag tag_alt {{trait.cssClass}}"{{#if trait.description}} data-description="{{trait.description}}"{{/if}}>{{trait.label}}</span>
  124. {{/each}}
  125. {{#if action.item.system.reload.label}}
  126. <span class="tag tag_secondary">{{action.item.system.reload.label}}</span>
  127. {{/if}}
  128. {{#if action.item.system.maxRange}}
  129. <span class="tag tag_secondary">{{localize (concat "PF2E.TraitRange" action.item.system.maxRange)}}</span>
  130. {{else if action.item.system.range}}
  131. <span class="tag tag_secondary">{{localize (concat "PF2E.TraitRangeIncrement" action.item.system.range)}}</span>
  132. {{/if}}
  133. </div>
  134. </div>
  135. </li>
  136. {{/each}}
  137. </ol>
  138. {{#each actor.actions as |section sid|}}
  139. <h3 class="header">
  140. {{section.label}}
  141. {{#if @root.options.editable}}
  142. <div class="controls">
  143. <button type="button" class="item-control item-create" data-type="action" data-action-type="{{sid}}">
  144. <i class="fa-solid fa-fw fa-plus"></i>{{localize "PF2E.CreateActionTitle"}}
  145. </button>
  146. <button type="button" class="item-control action-browse" data-type="action" data-action-type="{{sid}}">
  147. <i class="fa-solid fa-fw fa-search"></i>{{localize "PF2E.BrowseLabel"}}
  148. </button>
  149. </div>
  150. {{/if}}
  151. </h3>
  152. <ol class="actions-list item-list directory-list">
  153. {{#each section.actions as |action aid|}}
  154. {{#if action.encounter}}
  155. {{> action action=action}}
  156. {{/if}}
  157. {{/each}}
  158. </ol>
  159. {{/each}}
  160. </div>
  161. <div class="actions-panel" data-tab="exploration" data-group="actions-tabs">
  162. <h3 class="header">
  163. {{localize "PF2E.ActionsActionsHeader"}}
  164. {{#if @root.options.editable}}
  165. <div class="controls">
  166. <button type="button" class="item-control item-create" data-type="action" data-action-type="free" data-traits="exploration">
  167. <i class="fa-solid fa-fw fa-plus"></i>{{localize "PF2E.CreateActionTitle"}}
  168. </button>
  169. <button type="button" class="item-control action-browse" data-type="action" data-action-type="passive" data-action-trait="exploration">
  170. <i class="fa-solid fa-fw fa-search"></i>{{localize "PF2E.BrowseLabel"}}
  171. </button>
  172. </div>
  173. {{/if}}
  174. </h3>
  175. <ol class="actions-list item-list directory-list">
  176. {{#each actor.actions.free.actions as |action aid|}}
  177. {{#if action.exploration}}
  178. {{> action action=action}}
  179. {{/if}}
  180. {{/each}}
  181. </ol>
  182. </div>
  183. <div class="actions-panel" data-tab="downtime" data-group="actions-tabs">
  184. <h3 class="header">
  185. {{localize "PF2E.ActionsActionsHeader"}}
  186. {{#if @root.options.editable}}
  187. <div class="controls">
  188. <button type="button" class="item-control item-create" data-type="action" data-action-type="free" data-traits="downtime">
  189. <i class="fa-solid fa-fw fa-plus"></i>{{localize "PF2E.CreateActionTitle"}}
  190. </button>
  191. <button type="button" class="item-control action-browse" data-type="action" data-action-type="passive" data-action-trait="downtime">
  192. <i class="fa-solid fa-fw fa-search"></i>{{localize "PF2E.BrowseLabel"}}
  193. </button>
  194. </div>
  195. {{/if}}
  196. </h3>
  197. <ol class="actions-list item-list directory-list">
  198. {{#each actor.actions.free.actions as |action aid|}}
  199. {{#if action.downtime}}
  200. {{> action action=action}}
  201. {{/if}}
  202. {{/each}}
  203. </ol>
  204. </div>
  205. </section>
  206. </div>
  207. </div>
  208. </div>
  209. {{#*inline "attackDamage"}}
  210. <div class="button-group tags">
  211. {{#each variants as |variant vi|}}
  212. <button type="button" class="tag variant-strike" data-action="strike-attack" data-variant-index="{{vi}}"
  213. {{#if ../isAltUsage}} data-alt-usage="{{#if ../item.isThrown}}thrown{{else}}melee{{/if}}"{{/if}}
  214. {{#if (eq ../quantity 0)}} disabled="disabled" title="{{localize "PF2E.ErrorMessage.WeaponQuantityZero"}}"{{/if}}>
  215. {{#if (eq vi 0)}}<span class="activity-icon">{{../glyph}}</span>{{/if}}
  216. {{variant.label}}
  217. </button>
  218. {{/each}}
  219. {{#if item.dealsDamage}}
  220. <button type="button" class="tag damage" data-action="strike-damage"
  221. {{#if isAltUsage}}data-alt-usage="{{#if item.isThrown}}thrown{{else}}melee{{/if}}"{{/if}}
  222. >{{localize "PF2E.DamageLabel"}}</button>
  223. <button type="button" class="tag damage" data-action="strike-critical"
  224. {{#if isAltUsage}}data-alt-usage="{{#if item.isThrown}}thrown{{else}}melee{{/if}}"{{/if}}
  225. >{{localize "PF2E.CriticalDamageLabel"}}</button>
  226. {{#if (and versatileOptions (not (eq item.altUsageType "thrown")))}}
  227. <div class="versatile-options">
  228. {{#each versatileOptions as |option|}}
  229. <button
  230. type="button"
  231. {{#if option.selected}}class="selected"{{/if}}
  232. data-tooltip="{{localize option.label}}"
  233. {{#if ../isAltUsage}} data-alt-usage="{{#if ../item.isThrown}}thrown{{else}}melee{{/if}}"{{/if}}
  234. value="{{option.value}}"
  235. data-action="toggle-versatile">
  236. <i class="fa-solid fa-{{option.glyph}} fa-fw"></i>
  237. </button>
  238. {{/each}}
  239. </div>
  240. {{/if}}
  241. {{/if}}
  242. </div>
  243. {{/inline}}
  244. {{#*inline "action"}}
  245. <li class="action item" data-item-id="{{action._id}}">
  246. <div class="item-name rollable">
  247. <div class="item-image">
  248. <img src="{{action.img}}"/>
  249. </div>
  250. <h4>{{action.name}}</h4>
  251. {{#if action.system.frequency}}
  252. <div class="action-tracking">
  253. <input type="number" value="{{action.system.frequency.value}}" data-item-id="{{action._id}}" data-item-property="system.frequency.value"/>
  254. <span>
  255. /
  256. {{action.system.frequency.max}}
  257. {{localize "PF2E.Frequency.per"}}
  258. {{localize (lookup @root.frequencies action.system.frequency.per)}}
  259. </span>
  260. </div>
  261. {{/if}}
  262. </div>
  263. {{#if @root.options.editable}}
  264. <div class="item-controls">
  265. <a class="item-control item-edit" title="{{localize "PF2E.EditItemTitle"}}"><i class="fa-solid fa-fw fa-edit"></i></a>
  266. {{#unless action.feat}}
  267. <a class="item-control item-delete" title="{{localize "PF2E.DeleteItemTitle"}}"><i class="fa-solid fa-fw fa-trash"></i></a>
  268. {{/unless}}
  269. </div>
  270. {{/if}}
  271. </li>
  272. {{/inline}}