Add customizable rolls to items
This commit is contained in:
+45
-43
@@ -5,52 +5,54 @@
|
||||
<table>
|
||||
<tbody>
|
||||
{{#if (eq iType "spell")}}
|
||||
<tr>
|
||||
<td>{{localize "midgard5.actor-ap"}}</td>
|
||||
<td class="roll-spell-details">{{i.ap}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-castDuration"}}</td>
|
||||
<td class="roll-spell-details">{{i.castDuration}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-range"}}</td>
|
||||
<td class="roll-spell-details">{{i.range}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-effectTarget"}}</td>
|
||||
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-target-" i.effectTarget)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-effectArea"}}</td>
|
||||
<td class="roll-spell-details">{{i.effectArea}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-effectDuration"}}</td>
|
||||
<td class="roll-spell-details">{{i.effectDuration}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-origin"}}</td>
|
||||
<td class="roll-spell-details">{{i.origin}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-type"}}</td>
|
||||
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-type-" i.type)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-process"}}</td>
|
||||
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-process-" i.process)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.actor-ap"}}</td>
|
||||
<td class="roll-spell-details">{{i.ap}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-castDuration"}}</td>
|
||||
<td class="roll-spell-details">{{i.castDuration}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-range"}}</td>
|
||||
<td class="roll-spell-details">{{i.range}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-effectTarget"}}</td>
|
||||
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-target-" i.effectTarget)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-effectArea"}}</td>
|
||||
<td class="roll-spell-details">{{i.effectArea}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-effectDuration"}}</td>
|
||||
<td class="roll-spell-details">{{i.effectDuration}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-origin"}}</td>
|
||||
<td class="roll-spell-details">{{i.origin}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-type"}}</td>
|
||||
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-type-" i.type)}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.spell-process"}}</td>
|
||||
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-process-" i.process)}}</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
|
||||
{{#each rolls as |roll index|}}
|
||||
<tr class="roll-row {{roll.css}}">
|
||||
<td>{{roll.label}}</td>
|
||||
<td class="roll-result">
|
||||
<span class="roll-total">{{roll.totalStr}}</span>
|
||||
<span class="roll-detail">{{roll.result}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{{#if roll.enabled}}
|
||||
<tr class="roll-row {{roll.css}}">
|
||||
<td>{{roll.label}}</td>
|
||||
<td class="roll-result">
|
||||
<span class="roll-total">{{roll.totalStr}}</span>
|
||||
<span class="roll-detail">{{roll.result}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{localize "ITEM.TypeWeapon"}}</th>
|
||||
<th>{{localize "midgard5.ew"}}</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th class="fixed-value">{{localize "midgard5.ew"}}</th>
|
||||
<th class="fixed-value"></th>
|
||||
<th class="fixed-value"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -30,9 +30,9 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{localize "ITEM.TypeDefensiveWeapon"}}</th>
|
||||
<th>{{localize "midgard5.ew"}}</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th class="fixed-value">{{localize "midgard5.ew"}}</th>
|
||||
<th class="fixed-value"></th>
|
||||
<th class="fixed-value"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -51,13 +51,13 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{localize "ITEM.TypeArmor"}}</th>
|
||||
<th>{{localize "midgard5.actor-lp-short"}}</th>
|
||||
<th>{{localize "midgard5.actor-ap-short"}}</th>
|
||||
<th>{{localize "midgard5.attackBonus-short"}}</th>
|
||||
<th>{{localize "midgard5.defenseBonus-short"}}</th>
|
||||
<th>B</th>
|
||||
<th>Gw</th>
|
||||
<th></th>
|
||||
<th class="fixed-value">{{localize "midgard5.actor-lp-short"}}</th>
|
||||
<th class="fixed-value">{{localize "midgard5.actor-ap-short"}}</th>
|
||||
<th class="fixed-value">{{localize "midgard5.attackBonus-short"}}</th>
|
||||
<th class="fixed-value">{{localize "midgard5.defenseBonus-short"}}</th>
|
||||
<th class="fixed-value">B</th>
|
||||
<th class="fixed-value">Gw</th>
|
||||
<th class="fixed-value"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -80,12 +80,14 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{localize "ITEM.TypeItem"}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each data.calc.gear.items as |item itemId|}}
|
||||
<tr data-item="{{itemId}}">
|
||||
<td class="padding edit-item">{{item.label}}</td>
|
||||
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
|
||||
|
||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,22 @@
|
||||
<table class="rolls-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-enabled"></th>
|
||||
<th class="col-label">{{localize "midgard5.label"}}</th>
|
||||
<th class="col-formula">{{localize "midgard5.formula"}}</th>
|
||||
<th class="col-delete"><button class="roll-create">+</button></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each data.rolls.formulas as |roll rollIndex|}}
|
||||
{{#if roll}}
|
||||
<tr data-roll="{{rollIndex}}">
|
||||
<td><input type="checkbox" name="data.rolls.formulas.{{rollIndex}}.enabled" {{checked roll.enabled}} /></td>
|
||||
<td><input type="text" name="data.rolls.formulas.{{rollIndex}}.label" value="{{roll.label}}" data-dtype="String" /></td>
|
||||
<td><input type="text" name="data.rolls.formulas.{{rollIndex}}.formula" value="{{roll.formula}}" data-dtype="String" /></td>
|
||||
<td class="fixed-value"><a class="roll-delete" title="Delete Roll"><i class="fas fa-trash"></i></a></td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -29,6 +29,8 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
|
||||
|
||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</form>
|
||||
@@ -62,6 +62,9 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
|
||||
|
||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</form>
|
||||
@@ -48,7 +48,7 @@
|
||||
{{/select}}
|
||||
</select>
|
||||
{{else}}
|
||||
<span>Assign item to character to select weapon skill</span>
|
||||
<span>{{localize "midgard5.assignItemToCharacter"}}</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -60,6 +60,9 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
|
||||
|
||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</form>
|
||||
Reference in New Issue
Block a user