-
Notifications
You must be signed in to change notification settings - Fork 324
/
spell-overlay.hbs
167 lines (159 loc) · 7.5 KB
/
spell-overlay.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<div class="overlay" data-overlay-type="{{type}}" {{#if level}}data-level="{{level}}"{{/if}} {{#if id}}data-overlay-id="{{id}}"{{/if}}>
{{#if (eq type "heighten")}}
<h3 class="form-group">
<label>{{localize "PF2E.Item.Spell.Rank.Label"}}</label>
<div class="form-fields">
<select data-action="change-heighten-level">
{{#select level}}
{{#each heightenLevels as |key|}}
<option value="{{key}}">{{localize "PF2E.SpellScalingOverlay.Selection" level=(ordinal key)}}</option>
{{/each}}
{{/select}}
</select>
<div class="item-controls">
<a data-action="delete-overlay" data-tooltip="Delete"><i class="fa-solid fa-trash"></i></a>
</div>
</div>
</h3>
{{else}}
<div class="form-group">
<label>{{localize "PF2E.Item.NameLabel"}}</label>
<div class="form-fields">
<input type="text" name="{{base}}.name" value="{{overlay.name}}" />
<div class="item-controls">
<a data-action="delete-overlay" data-tooltip="Delete"><i class="fa-solid fa-trash"></i></a>
</div>
</div>
</div>
{{/if}}
<div class="toggle-button-list">
{{#each missing}}
<button type="button" data-action="add-overlay-property" data-property="{{key}}">
<i class="fa-solid fa-plus"></i>
{{localize label}}
</button>
{{/each}}
</div>
{{#if (includes system "traits")}}
<div class="traits">
<a data-action="delete-overlay-property" data-property="traits"><i class="fa-solid fa-times"></i></a>
<input
class="paizo-style tags spell-traits"
name="{{dataPath}}.traits.value"
value="{{json traits}}"
data-dtype="JSON"
{{#if (eq system.traits.value.length 0)}}placeholder="{{localize "PF2E.Traits"}}"{{/if}} />
</div>
{{/if}}
{{#if (includes system "time")}}
<div class="form-group">
<label class="short">
<a data-action="delete-overlay-property" data-property="time"><i class="fa-solid fa-times"></i></a>
{{localize "PF2E.Item.Spell.Cast"}}
</label>
<div>
<input type="text" name="{{dataPath}}.time.value" value="{{system.time.value}}" />
</div>
</div>
{{/if}}
{{#if (includes system "target")}}
<div class="form-group">
<label class="short">
<a data-action="delete-overlay-property" data-property="target"><i class="fa-solid fa-times"></i></a>
{{localize "PF2E.SpellTargetLabel"}}
</label>
<div>
<input type="text" name="{{dataPath}}.target.value" value="{{system.target.value}}" />
</div>
</div>
{{/if}}
{{#if (includes system "area")}}
<div class="form-group">
<label class="short">
<a data-action="delete-overlay-property" data-property="area"><i class="fa-solid fa-times"></i></a>
{{localize "PF2E.Area.Label"}}
</label>
<div class="details-container-two-columns">
<select name="{{dataPath}}.area.value">
{{#select system.area.value}}
{{#each @root.areaSizes as |label key|}}
<option value="{{key}}">{{localize label}}</option>
{{/each}}
{{/select}}
</select>
<select name="{{dataPath}}.area.type">
{{#select system.area.type}}
{{#each @root.areaTypes as |label type|}}
<option value="{{type}}">{{localize label}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div>
{{/if}}
{{#if (includes system "range")}}
<div class="form-group">
<label class="short">
<a data-action="delete-overlay-property" data-property="range"><i class="fa-solid fa-times"></i></a>
{{localize "PF2E.TraitRange"}}
</label>
<div>
<input type="text" name="{{dataPath}}.range.value" value="{{system.range.value}}" />
</div>
</div>
{{/if}}
{{#if (includes system "damage")}}
<div class="damage-formulas">
<h3>
<a data-action="delete-overlay-property" data-property="damage"><i class="fa-solid fa-times"></i></a>
{{localize "PF2E.DamageLabel"}}
<div class="item-controls">
<a data-action="add-damage-partial"><i class="fa-solid fa-plus"></i></a>
</div>
</h3>
{{#each system.damage as |damage id|}}
<div class="formula-section form-group">
<div class="form-fields">
<input type="text" name="{{../dataPath}}.damage.{{id}}.formula" value="{{damage.formula}}" placeholder="{{localize "PF2E.Formula"}}" />
<label class="apply-mod">
{{localize "PF2E.SpellAbilityModLabel"}}
<input type="checkbox" name="{{../dataPath}}.damage.{{id}}.applyMod" {{checked damage.applyMod}} />
</label>
<select name="{{../dataPath}}.damage.{{id}}.category">
{{#select damage.category}}
<option value=""></option>
{{#each @root.damageSubtypes as |name type|}}
<option value="{{type}}">{{localize name}}</option>
{{/each}}
{{/select}}
</select>
<select name="{{../dataPath}}.damage.{{id}}.type">
{{#select damage.type}}
<option value=""></option>
{{#each @root.damageTypes as |name type|}}
<option value="{{type}}">{{localize name}}</option>
{{/each}}
{{/select}}
</select>
<div class="item-controls">
<a class="tag-selector"
data-tag-selector="basic"
data-title="PF2E.Item.MaterialEffects.Label"
data-config-types="materialDamageEffects"
data-property="{{../dataPath}}.damage.{{id}}.materials"
><i class="fa-solid fa-edit"></i></a>
<a data-action="delete-damage-partial" data-id="{{id}}"><i class="fa-solid fa-trash"></i></a>
</div>
</div>
{{#if damage.materials}}
<div class="materials">
{{#each damage.materials as |material|}}
<div class="tag-legacy">{{localize (lookup @root.materials this)}}</div>
{{/each}}
</div>
{{/if}}
</div>
{{/each}}
</div>
{{/if}}
</div>