Add skills as items

This commit is contained in:
mstein
2022-06-07 00:58:21 +02:00
parent ab59b19e56
commit c7f6a38acf
13 changed files with 399 additions and 136 deletions
+2 -2
View File
@@ -2,8 +2,8 @@
<div class="flexrow">
<span class="flex0">{{localize "midgard5.class"}}</span>
<input class="flex3" name="data.info.class" type="text" value="{{data.info.class}}" data-dtype="String" />
<input id="data.info.magic_using" type="checkbox" name="data.info.magic_using" {{checked data.info.magic_using}}>
<label class="flex0" for="data.info.magic_using">{{localize "midgard5.magic_using"}}</label>
<input id="data.info.magicUsing" type="checkbox" name="data.info.magicUsing" {{checked data.info.magicUsing}}>
<label class="flex0" for="data.info.magicUsing">{{localize "midgard5.magicUsing"}}</label>
<span class="level-display">Grad {{data.calc.level}}</span>
</div>
+48 -11
View File
@@ -1,12 +1,49 @@
<h3>Gelernte Fertigkeiten</h3>
<table>
<thead>
<tr>
<th>{{localize "midgard5.skill"}}</th>
<th>{{localize "midgard5.fw"}}</th>
<th>{{localize "midgard5.bonus"}}</th>
<th>{{localize "midgard5.ew"}}</th>
<th></th>
</tr>
</thead>
<tbody>
{{#each data.calc.skills.general as |skill label|}}
<tr data-skill="{{skill.id}}">
<td class="padding edit-skill">{{label}}</td>
<td class="center">{{skill.fw}}</td>
<td class="center">{{skillBonus ../actor._id skill}}</td>
<td class="center">{{skillEw ../actor._id skill}}</td>
<td><button class="roll-learned-button">{{localize "midgard5.roll"}}</button></td>
</tr>
{{/each}}
</tbody>
</table>
<h3>Ungelernte Fertigkeiten</h3>
<ol class="attributes-list">
{{#each actor.data.skills.general as |skill key|}}
<li class="attribute flexrow" data-skill="{{key}}">
<div class="roll-button">Roll </div>
<span class="attribute-label flexrow" name="data.skills.{{key}}.label">{{localizeMidgard key}}</span>
<div class="attribute-editbox flexrow">
<input class="attribute-value" type="text" name="data.skills.general.{{key}}.fw" value="{{skill.fw}}" data-dtype="Number" readonly />
</div>
</li>
{{/each}}
</ol>
<table>
<thead>
<tr>
<th></th>
<th>{{localize "midgard5.skill"}}</th>
<th>{{localize "midgard5.fw"}}</th>
<th>{{localize "midgard5.bonus"}}</th>
<th>{{localize "midgard5.ew"}}</th>
<th></th>
</tr>
</thead>
<tbody>
{{#each actor.data.skills.general as |skill key|}}
<tr data-skill="{{key}}">
<td><button class="learn-button">{{localize "midgard5.learn"}}</button></td>
<td class="padding">{{localizeMidgard key}}</td>
<td class="center">{{skill.fw}}</td>
<td class="center">{{skillBonus ../actor._id skill}}</td>
<td class="center">{{skillEw ../actor._id skill}}</td>
<td><button class="roll-general-button">{{localize "midgard5.roll"}}</button></td>
</tr>
{{/each}}
</tbody>
</table>
+23
View File
@@ -0,0 +1,23 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-img" src="{{item.img}}" data-edit="img" title="{{item.name}}" />
<h1><input name="name" type="text" value="{{item.name}}" placeholder="Name" /></h1>
</header>
<div class="sheet-content">
<div class="flexrow">
<span>{{localize "midgard5.skill-value"}}</span>
<input name="data.fw" type="text" value="{{data.fw}}" data-dtype="Number" />
<span>{{localize "midgard5.attribute"}}</span>
<select class="select-attribute" name="data.attribute" data-type="String">
{{#select data.attribute}}
{{#each data.attributes as |attribute key|}}
<option value="{{key}}">{{localize attribute.long}}</option>
{{/each}}
{{/select}}
</select>
</div>
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</form>