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.

113 lines
5.2 KiB

1 year ago
  1. <div class="form-group">
  2. <label class="short">{{localize "PF2E.RuleEditor.General.Label"}}</label>
  3. <div class="spaced-fields details-container-flex-row">
  4. <input type="text" name="system.rules.{{index}}.label" value="{{rule.label}}" {{#unless rule.label}}placeholder="{{object.data.label}}"{{/unless}} />
  5. <label>
  6. {{localize "PF2E.RuleEditor.FlatModifier.HideIfDisabled"}}
  7. <input type="checkbox" name="system.rules.{{index}}.hideIfDisabled" {{checked rule.hideIfDisabled}}>
  8. </label>
  9. </div>
  10. </div>
  11. <div class="form-group">
  12. <label class="short">{{localize "PF2E.RuleEditor.General.Selector"}}</label>
  13. <div class="attached-input">
  14. <button type="button" class="attachment" data-action="toggle-selector">
  15. {{#if selectorIsArray}}Multiple{{else}}Single{{/if}}
  16. </button>
  17. {{#if selectorIsArray}}
  18. <input type="text" class="pf2e-tagify selector-list" name="system.rules.{{index}}.selector" value="{{json rule.selector}}" data-dtype="JSON"/>
  19. {{else}}
  20. <input type="text" name="system.rules.{{index}}.selector" value="{{rule.selector}}" />
  21. {{/if}}
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label class="short">{{localize "PF2E.RuleEditor.General.Value"}}</label>
  26. <div class="spaced-fields details-container-flex-row">
  27. {{#if (eq rule.type "ability")}}
  28. <select name="system.rules.{{index}}.ability">
  29. {{#select rule.ability}}
  30. {{#each abilities as |label key|}}
  31. <option value="{{key}}">{{localize label}}</option>
  32. {{/each}}
  33. {{/select}}
  34. </select>
  35. {{else if (eq value.mode "primitive")}}
  36. <div class="attached-input">
  37. <button type="button" class="attachment" data-action="toggle-brackets">
  38. {{localize "PF2E.RuleEditor.General.Primitive"}}
  39. </button>
  40. <input type="text" name="system.rules.{{index}}.value" value="{{rule.value}}"/>
  41. </div>
  42. {{else if (eq value.mode "brackets")}}
  43. <div class="attached-input">
  44. <button type="button" class="attachment" data-action="toggle-brackets">
  45. {{localize "PF2E.RuleEditor.General.Brackets"}}
  46. </button>
  47. <input type="text" name="system.rules.{{index}}.value.field" value="{{rule.value.field}}" placeholder="Actor Level (Default)"/>
  48. </div>
  49. {{/if}}
  50. <select name="system.rules.{{index}}.type" class="type-input">
  51. {{#select rule.type}}
  52. <option value="">untyped</option>
  53. {{#each types as |type|}}
  54. <option value="{{type}}">{{type}}</option>
  55. {{/each}}
  56. {{/select}}
  57. </select>
  58. {{#if (eq value.mode "brackets")}}
  59. <a data-action="bracket-add"><i class="fas fa-fw fa-plus"></i></a>
  60. {{/if}}
  61. </div>
  62. </div>
  63. {{#if (eq value.mode "brackets")}}
  64. <div class="brackets">
  65. {{#each rule.value.brackets as |bracket idx|}}
  66. <div class="bracket details-container-flex-row spaced-fields">
  67. <label>{{localize "PF2E.RuleEditor.General.Range"}}</label>
  68. <div class="range">
  69. <input type="number" name="system.rules.{{@root.index}}.value.brackets.{{idx}}.start" value="{{bracket.start}}">
  70. -
  71. <input type="number" name="system.rules.{{@root.index}}.value.brackets.{{idx}}.end" value="{{bracket.end}}">
  72. </div>
  73. <label>{{localize "PF2E.RuleEditor.General.Value"}}</label>
  74. <input type="text" name="system.rules.{{@root.index}}.value.brackets.{{idx}}.value" value="{{bracket.value}}"/>
  75. <a data-action="bracket-delete" data-idx="{{idx}}"><i class="fas fa-fw fa-trash"></i></a>
  76. </div>
  77. {{/each}}
  78. </div>
  79. {{/if}}
  80. {{#if isDamage}}
  81. <div class="form-group">
  82. <label class="short">{{localize "PF2E.RuleEditor.General.DamageType"}}</label>
  83. <div class="spaced-fields details-container-flex-row">
  84. <input type="text" class="pf2e-tagify damage-type" name="system.rules.{{index}}.damageType" value="{{rule.damageType}}"/>
  85. <select name="system.rules.{{index}}.damageCategory">
  86. {{#select rule.damageCategory}}
  87. <option value=""></option>
  88. {{#each damageCategories as |label key|}}
  89. <option value="{{key}}">{{localize label}}</option>
  90. {{/each}}
  91. {{/select}}
  92. </select>
  93. <select name="system.rules.{{index}}.critical">
  94. {{#select rule.critical}}
  95. <option value="">{{localize "PF2E.RuleEditor.General.CriticalBehavior.null"}}</option>
  96. <option value="false">{{localize "PF2E.RuleEditor.General.CriticalBehavior.false"}}</option>
  97. <option value="true">{{localize "PF2E.RuleEditor.General.CriticalBehavior.true"}}</option>
  98. {{/select}}
  99. </select>
  100. </div>
  101. </div>
  102. {{/if}}
  103. <div class="form-group">
  104. <label class="short">{{localize "PF2E.RuleEditor.General.Predicate"}}</label>
  105. <input type="text" name="system.rules.{{index}}.predicate" value="{{json rule.predicate}}" />
  106. </div>