Adds gear and spells as items.

Adds custom roll logic, inclusing chat message.
This commit is contained in:
mstein
2022-06-19 00:18:41 +02:00
parent ca82fa119f
commit 8b6bfd2efb
33 changed files with 1334 additions and 482 deletions
+58
View File
@@ -0,0 +1,58 @@
<div class="dice-roll m5-roll">
<div class="flexcol">
<h3 class="roll-title">{{res.label}}</h3>
<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>
{{/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>
{{/each}}
</tbody>
</table>
</div>
</div>