#4 : Weakness management, including bonus/malus field for scores and reminder in the flip dialog

This commit is contained in:
2021-03-12 17:12:14 +01:00
parent 96991516b6
commit 87ca3febd3
11 changed files with 132 additions and 30 deletions

View File

@ -31,7 +31,13 @@
src="systems/foundryvtt-shadows-over-sol/img/icons/{{#if data.editStatSkill}}unlocked.svg{{else}}locked.svg{{/if}}" alt="lock/unlock"
>{{#if data.editStatSkill}}Lock{{else}}Unlock{{/if}}</a></span>
<ul class="stat-list alternate-list">
{{#each data.stats as |stat key|}}
<li class="stat flexrow" >
<span class="stat-label flexrow tooltip tooltip-nobottom" name="statlabel">Stat name</span>
<span class="stat-label flexrow tooltip tooltip-nobottom" name="statlabel">Value</span>
<span class="stat-label flexrow tooltip tooltip-nobottom" name="statlabel">XP</span>
</li>
{{#each data.stats as |stat key|}}
{{#if stat.isLevelUp}}
<li class="stat flexrow xp-level-up" data-attribute="{{key}}">
<span class="stat-label flexrow tooltip tooltip-nobottom" name="data.stats.{{key}}.label">
@ -55,6 +61,11 @@
</div>
<div class="flex-group-left flexcol">
<ul class="stat-list alternate-list">
<li class="stat flexrow" >
<span class="generic-label flexrow tooltip tooltip-nobottom" name="statlabel">Score name</span>
<span class="generic-label flexrow tooltip tooltip-nobottom" name="statlabel">Value</span>
<span class="generic-label flexrow tooltip tooltip-nobottom" name="statlabel">Bonus/Malus</span>
</li>
{{#each data.scores as |score key|}}
<li class="stat flexrow list-item" data-attribute="{{key}}">
<span class="generic-label flexrow tooltip tooltip-nobottom" name="data.scores.{{key}}.label">{{localize score.label}}</span>
@ -62,9 +73,7 @@
{{#if (eq key 'defense')}}
<input class="stat-value flexrow" type="text" name="data.scores.{{key}}.critical" value="{{score.critical}}" data-dtype="Number" {{#unless @root.data.editStatSkill}}disabled{{/unless}} />
{{/if}}
{{#if (eq key 'edge')}}
<input class="stat-value flexrow" type="text" name="data.scores.{{key}}.bonus" value="{{score.bonus}}" data-dtype="Number" {{#unless @root.data.editStatSkill}}disabled{{/unless}} />
{{/if}}
<input class="stat-value flexrow" type="text" name="data.scores.{{key}}.bonusmalus" value="{{score.bonusmalus}}" data-dtype="Number" {{#unless @root.data.editStatSkill}}disabled{{/unless}} />
</li>
{{/each}}
</ul>
@ -313,7 +322,7 @@
</article>
<hr>
<article class="flexcol">
<div class="grid grid-2col">
<div class="grid grid-3col">
<div class="flex-group-left flexcol genelang-column">
<span class="description-label">Familiar Subcultures</span>
@ -345,6 +354,21 @@
{{/each}}
</ul>
</div>
<div class="flex-group-left flexcol genelang-column">
<span class="description-label">Weaknesses</span>
<ul class="item-list alternate-list">
{{#each data.weaknessList as |weakness key|}}
<li class="item flexrow list-item" data-item-id="{{weakness._id}}">
<img class="sheet-skill-img" src="{{weakness.img}}"/>
<span class="conseq-label">{{weakness.name}}</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</article>