Dev Kampfkünste Items & Integration (#7)

Changes:
 + add kampfkuenste template
 + add kampfkuenste tab
 + make kampfkuenste rollable
 + update localization
This commit is contained in:
2023-11-28 19:42:38 +01:00
committed by GitHub
parent e27f4209e5
commit c635c54f24
13 changed files with 369 additions and 11 deletions
@@ -0,0 +1,33 @@
<table>
<thead>
<tr>
<th>{{localize "ITEM.type.kampfkunst"}}</th>
<th>{{localize "midgard5.ew"}}</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
{{#each data.calc.kampfkuenste as |item itemId|}}
<tr data-item="{{itemId}}">
<td class="padding edit-item">
<span>{{item.label}}</span>
{{#if item.isKido}}
<span class="spell-process">{{localize (m5concat "midgard5.kido-type-" item.type)}}</span>
{{#unless (eq item.type "finte")}}
<span class="spell-process">({{localize (m5concat "midgard5.kido-variante-" item.variante)}})</span>
{{/unless}}
{{else}}
<span class="spell-process">{{localize (m5concat "midgard5.kampfkunst-type-" item.type)}}</span>
{{#if (eq item.type "angriff")}}
<span class="spell-process">({{localize (m5concat "midgard5.kampfkunst-variante-" item.variante)}})</span>
{{/if}}
{{/if}}
</td>
<td class="fixed-value">{{item.calc.ew}}</td>
<td class="fixed-value"><button class="roll-button roll-weapon-button" /></td>
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
</tr>
{{/each}}
</tbody>
</table>
+8 -2
View File
@@ -9,7 +9,10 @@
<a class="item active" data-tab="base_values">{{ localize "midgard5.base_values" }}</a>
<a class="item" data-tab="skills">{{ localize "midgard5.skills" }}</a>
<a class="item" data-tab="gear">{{ localize "midgard5.gear" }}</a>
<a class="item" data-tab="spells">{{ localize "midgard5.spells" }}</a>
{{#if actor.system.info.magicUsing }}
<a class="item" data-tab="spells">{{ localize "midgard5.spells" }}</a>
{{/if}}
<a class="item" data-tab="kampfkuenste">{{ localize "midgard5.kampfkuenste" }}</a>
<a class="item" data-tab="effects">{{ localize "midgard5.effects" }}</a>
</nav>
@@ -31,9 +34,12 @@
{{> "systems/midgard5/templates/sheets/character/spells.hbs"}}
</div>
<div class="tab base_values flexcol" data-group="primary" data-tab="kampfkuenste">
{{> "systems/midgard5/templates/sheets/character/kampfkuenste.hbs"}}
</div>
<div class="tab base_values flexcol" data-group="primary" data-tab="effects">
{{> "systems/midgard5/templates/sheets/character/effects.hbs"}}
</div>
</section>
</form>
+99
View File
@@ -0,0 +1,99 @@
<form class="item-sheet {{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">
<table>
<tbody>
<tr>
<td colspan=4>
<div class="flexrow">
<span>
<input id="data.isKido" type="checkbox" name="data.isKido" {{checked data.isKido}}>
<label for="data.isKido">{{localize "midgard5.kido"}}</label>
</span>
</div>
</td>
</tr>
<tr>
<td>{{localize "midgard5.bonus"}}</td>
<td><input name="data.bonus" type="text" value="{{data.bonus}}" data-dtype="Number" /></td>
<td>{{localize "midgard5.actor-ap"}}</td>
<td><input name="data.ap" type="text" value="{{data.ap}}" data-dtype="String" /></td>
</tr>
<tr>
{{#unless item.system.isKido}}
<td>{{localize "midgard5.kampfkunst-type"}}</td>
<td>
<select class="select-type" name="data.type" data-type="String">
{{#select data.type}}
{{#each data.kampfkunstTypeSelection as |label key|}}
<option value="{{key}}">{{localize label}}</option>
{{/each}}
{{/select}}
</select>
</td>
{{else}}
<td>{{localize "midgard5.kido-type"}}</td>
<td>
<select class="select-type" name="data.type" data-type="String">
{{#select data.type}}
{{#each data.kidoTypeSelection as |label key|}}
<option value="{{key}}">{{localize label}}</option>
{{/each}}
{{/select}}
</select>
</td>
{{/unless}}
{{#unless item.system.isKido}}
{{#if (eq item.system.type "angriff")}}
<td>{{localize "midgard5.kampfkunst-variante"}}</td>
<td>
<select class="select-variante" name="data.variante" data-type="String">
{{#select data.variante}}
{{#each data.kampfkunstVarianteSelection as |label key|}}
<option value="{{key}}">{{localize label}}</option>
{{/each}}
{{/select}}
</select>
</td>
{{/if}}
{{else}}
{{#unless (eq item.system.type "finte")}}
<td>{{localize "midgard5.kido-variante"}}</td>
<td>
<select class="select-variante" name="data.variante" data-type="String">
{{#select data.variante}}
{{#each data.kidoVarianteSelection as |label key|}}
<option value="{{key}}">{{localize label}}</option>
{{/each}}
{{/select}}
</select>
</td>
{{/unless}}
{{/unless}}
</tr>
<td>{{localize "midgard5.skill"}}</td>
<td>
{{!-- {{#if data.calc.skills.general}} --}}
<select class="select-skill" name="data.skillId" data-type="String">
{{#select data.skillId}}
<option value="">{{localize "midgard5.no-skill"}}</option>
{{#each data.calc.generalSkills as |skill key|}}
<option value="{{key}}">{{skill.label}}</option>
{{/each}}
{{/select}}
</select>
{{!-- {{else}}
<span>{{localize "midgard5.assignItemToCharacter"}}</span>
{{/if}} --}}
</td>
</tbody>
</table>
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</form>