Adds skills and how to add them to the sheet

This commit is contained in:
mstein
2022-06-09 23:50:19 +02:00
parent 403109921c
commit 0f06d4020b
16 changed files with 478 additions and 162 deletions
View File
+4
View File
@@ -22,5 +22,9 @@
{{> "systems/midgard5/templates/sheets/character/skills.hbs"}}
</div>
<div class="tab base_values flexcol" data-group="primary" data-tab="gear">
{{> "systems/midgard5/templates/sheets/character/gear.hbs"}}
</div>
</section>
</form>
+86 -9
View File
@@ -1,8 +1,7 @@
<h3>Gelernte Fertigkeiten</h3>
<table>
<thead>
<tr>
<th>{{localize "midgard5.skill"}}</th>
<th>{{localize "midgard5.learned-skill"}}</th>
<th>{{localize "midgard5.fw"}}</th>
<th>{{localize "midgard5.bonus"}}</th>
<th>{{localize "midgard5.ew"}}</th>
@@ -10,24 +9,102 @@
</tr>
</thead>
<tbody>
{{#each data.calc.skills.general as |skill label|}}
<tr data-skill="{{skill.id}}">
<td class="padding edit-skill">{{label}}</td>
{{#each data.calc.skills.general as |skill skillId|}}
<tr data-skill="{{skillId}}">
<td class="padding edit-skill">{{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 class="center">{{skill.calc.bonus}}</td>
<td class="center">{{skill.calc.ew}}</td>
<td><button class="roll-learned-button">{{localize "midgard5.roll"}}</button></td>
</tr>
{{/each}}
<tr class="new-skill">
<td class="padding">{{localize "midgard5.new-skill"}}</td>
<td></td>
<td></td>
<td></td>
<td><button data-skilltype="general" class="create-skill-button">{{localize "midgard5.learn"}}</button></td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>{{localize "midgard5.language"}}</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.language as |skill skillId|}}
<tr data-skill="{{skillId}}">
<td class="padding edit-skill">{{skill.label}}</td>
<td class="center">{{skill.fw}}</td>
<td class="center">{{skill.calc.bonus}}</td>
<td class="center">{{skill.calc.ew}}</td>
<td><button class="roll-learned-button">{{localize "midgard5.roll"}}</button></td>
</tr>
{{/each}}
<tr class="new-skill">
<td class="padding">{{localize "midgard5.new-skill"}}</td>
<td></td>
<td></td>
<td></td>
<td><button data-skilltype="language" class="create-skill-button">{{localize "midgard5.learn"}}</button></td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>{{localize "midgard5.weapon-skill"}}</th>
<th>{{localize "midgard5.special"}}</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.combat as |skill skillId|}}
<tr data-skill="{{skillId}}">
<td class="padding edit-skill">{{skill.label}}</td>
<td class="center">
{{#if (eq skillId ../data.skills.preferredCombatSkill)}}
<input type="checkbox" checked />
{{else}}
<input type="checkbox" class="change-special-combat-skill" />
{{/if}}
</td>
<td class="center">{{skill.fw}}</td>
<td class="center">{{skill.calc.bonus}}</td>
<td class="center">{{skill.calc.ew}}</td>
<td><button class="roll-learned-button">{{localize "midgard5.roll"}}</button></td>
</tr>
{{/each}}
<tr class="new-skill">
<td class="padding">{{localize "midgard5.new-skill"}}</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><button data-skilltype="combat" class="create-skill-button">{{localize "midgard5.learn"}}</button></td>
</tr>
</tbody>
</table>
<h3>Ungelernte Fertigkeiten</h3>
<table>
<thead>
<tr>
<th></th>
<th>{{localize "midgard5.skill"}}</th>
<th>{{localize "midgard5.unlearned-skill"}}</th>
<th>{{localize "midgard5.fw"}}</th>
<th>{{localize "midgard5.bonus"}}</th>
<th>{{localize "midgard5.ew"}}</th>
+22 -12
View File
@@ -4,19 +4,29 @@
<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" />
<table>
<tbody>
<tr>
<td>{{localize "midgard5.skill-value"}}</td>
<td><input name="data.fw" type="text" value="{{data.fw}}" data-dtype="Number" /></td>
</tr>
<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>
{{#unless (eq data.type "combat")}}
<tr>
<td>{{localize "midgard5.attribute"}}</td>
<td>
<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>
</td>
</tr>
{{/unless}}
</tbody>
</table>
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
+10
View File
@@ -0,0 +1,10 @@
<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">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</form>