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.

134 lines
6.0 KiB

1 year ago
  1. <div class="inventory-filters spellbook-filters flexrow">
  2. <div class="form-group spellcasting-ability">
  3. {{#unless isNPC}}
  4. <label>{{localize "DND5E.Spellcasting"}}</label>
  5. {{else}}
  6. <label>{{localize "DND5E.Level"}}</label>
  7. {{numberInput system.details.spellLevel name="system.details.spellLevel" class="spellcasting-level"
  8. placeholder="0" min=0 step=1}}
  9. {{/unless}}
  10. <select name="system.attributes.spellcasting" data-type="String">
  11. {{#select system.attributes.spellcasting}}
  12. <option value="">{{localize "DND5E.None"}}</option>
  13. {{#each abilities as |abl a|}}
  14. <option value="{{a}}">{{abl.label}}</option>
  15. {{/each}}
  16. {{/select}}
  17. </select>
  18. <span>{{localize "DND5E.AbbreviationDC"}} {{system.attributes.spelldc}}</span>
  19. </div>
  20. <ul class="filter-list flexrow" data-filter="spellbook">
  21. <li class="filter-item" data-filter="action">{{localize "DND5E.Action"}}</li>
  22. <li class="filter-item" data-filter="bonus">{{localize "DND5E.BonusAction"}}</li>
  23. <li class="filter-item" data-filter="reaction">{{localize "DND5E.Reaction"}}</li>
  24. <li class="filter-item" data-filter="concentration">{{localize "DND5E.AbbreviationConc"}}</li>
  25. <li class="filter-item" data-filter="ritual">{{localize "DND5E.Ritual"}}</li>
  26. <li class="filter-item" data-filter="prepared">{{localize "DND5E.Prepared"}}{{#if preparedSpells}} ({{preparedSpells}}){{/if}}</li>
  27. </ul>
  28. </div>
  29. <ol class="items-list inventory-list">
  30. {{#each spellbook as |section|}}
  31. <li class="items-header spellbook-header flexrow">
  32. <div class="item-name flexrow">
  33. <h3>{{section.label}}</h3>
  34. <div class="spell-slots">
  35. {{#if section.usesSlots}}
  36. <input type="text" name="system.spells.{{section.prop}}.value" value="{{section.uses}}" placeholder="0"
  37. data-dtype="Number">
  38. <span class="sep"> / </span>
  39. <span class="spell-max" data-level="{{section.prop}}" data-slots="{{section.slots}}">
  40. {{{section.slots}}}
  41. {{#if section.editable}}
  42. <a class="slot-max-override" data-tooltip="DND5E.SpellProgOverride">
  43. <i class="fas fa-edit"></i>
  44. </a>
  45. {{/if}}
  46. </span>
  47. {{ else }}
  48. <span>{{{section.uses}}}</span>
  49. <span class="sep"> / </span>
  50. <span class="spell-max">{{{section.slots}}}</span>
  51. {{/if}}
  52. </div>
  53. </div>
  54. <div class="spell-school">{{localize "DND5E.SpellSchool"}}</div>
  55. <div class="spell-action">{{localize "DND5E.SpellUsage"}}</div>
  56. <div class="spell-target">{{localize "DND5E.SpellTarget"}}</div>
  57. <div class="item-controls flexrow">
  58. {{#if section.canCreate}}
  59. <a class="item-control item-create" data-tooltip="DND5E.SpellCreate"
  60. {{#each section.dataset as |v k|}}data-{{k}}="{{v}}"{{/each}}>
  61. <i class="fas fa-plus"></i> {{localize "DND5E.Add"}}
  62. </a>
  63. {{/if}}
  64. </div>
  65. </li>
  66. <ol class="item-list">
  67. {{#each section.spells as |item i|}}
  68. {{#dnd5e-itemContext item as |ctx|}}
  69. <li class="item flexrow {{#if ctx.isExpanded}}expanded{{/if}}" data-item-id="{{item.id}}">
  70. <div class="item-name flexrow rollable">
  71. <div class="item-image" tabindex="0" role="button" aria-label="{{item.name}}" style="background-image: url('{{item.img}}')"></div>
  72. <h4>{{item.name}}</h4>
  73. {{#if item.system.uses.per }}
  74. <div class="item-detail spell-uses">Uses {{item.system.uses.value}} / {{item.system.uses.max}}</div>
  75. {{/if}}
  76. <div class="spell-comps">
  77. {{#each item.labels.components.all}}
  78. <span class="spell-component{{#if tag}} tag{{/if}}">{{abbr}}</span>
  79. {{/each}}
  80. </div>
  81. </div>
  82. <div class="spell-school">{{item.labels.school}}</div>
  83. <div class="spell-action">{{item.labels.activation}}</div>
  84. <div class="spell-target" data-tooltip="{{localize 'DND5E.Range'}}: {{item.labels.range}}">
  85. {{#if item.labels.target}}
  86. {{item.labels.target}}
  87. {{else}}{{localize 'DND5E.None'}}
  88. {{/if}}
  89. </div>
  90. {{#if @root.owner}}
  91. <div class="item-controls flexrow">
  92. {{#if section.canPrepare}}
  93. <a class="item-control item-toggle {{ctx.toggleClass}}" data-tooltip="{{ctx.toggleTitle}}">
  94. <i class="fas fa-sun"></i>
  95. </a>
  96. {{/if}}
  97. <a class="item-control item-edit" data-tooltip="DND5E.ItemEdit">
  98. <i class="fas fa-edit"></i>
  99. </a>
  100. <a class="item-control item-delete" data-tooltip="DND5E.ItemDelete">
  101. <i class="fas fa-trash"></i>
  102. </a>
  103. </div>
  104. {{/if}}
  105. {{#if ctx.isExpanded}}
  106. {{> "dnd5e.item-summary" (lookup @root.expandedData item.id)}}
  107. {{/if}}
  108. </li>
  109. {{/dnd5e-itemContext}}
  110. {{/each}}
  111. </ol>
  112. {{else}}
  113. {{#if owner}}
  114. {{#if filters.spellbook.size}}
  115. <li class="item flexrow"><p class="notes">{{localize "DND5E.FilterNoSpells"}}</p></li>
  116. {{else}}
  117. <li class="item flexrow inventory-header spellbook-header spellbook-empty">
  118. <div class="item-controls flexrow">
  119. <a class="item-control item-create" data-tooltip="DND5E.SpellCreate" data-type="spell" data-level="{{lvl}}">
  120. <i class="fas fa-plus"></i> {{localize "DND5E.SpellAdd"}}
  121. </a>
  122. </div>
  123. </li>
  124. <li class="item flexrow"><p class="notes">{{localize "DND5E.NoSpellLevels"}}</p></li>
  125. {{/if}}
  126. {{/if}}
  127. {{/each}}
  128. </ol>