Levelup Followup (#126)

* Levelup applies bonuses to character

* Added visualisation of domain card levels

* Fixed domaincard level max for selections in a tier

* A trait can now only be level up once within the same tier
This commit is contained in:
WBHarry 2025-06-13 14:15:02 +02:00 committed by GitHub
parent f840dc2553
commit ec3aecfe99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 566 additions and 202 deletions

View file

@ -7,19 +7,19 @@
{{#each this.attributes as |attribute key|}}
<div class="attribute">
<div class="attribute-banner">
<img class="attribute-roll" data-action="attributeRoll" data-attribute="{{key}}" data-value="{{attribute.value}}" src="icons/svg/d12-grey.svg" />
<img class="attribute-roll" data-action="attributeRoll" data-attribute="{{key}}" data-value="{{attribute.total}}" src="icons/svg/d12-grey.svg" />
<div class="attribute-text">{{key}}</div>
</div>
<div class="attribute-image">
{{#if ../editAttributes}}
<select class="attribute-value{{#if (lt attribute.value 0)}} negative{{/if}}{{#if (and (not attribute.value) (not ../abilityScoresFinished))}} unselected{{/if}}" data-attribute="{{key}}">
{{#if (not (eq attribute.value 0))}}<option value="">{{attribute.value}}</option>{{/if}}
<select class="attribute-value{{#if (lt attribute.total 0)}} negative{{/if}}{{#if (and (not attribute.total) (not ../abilityScoresFinished))}} unselected{{/if}}" data-attribute="{{key}}">
{{#if (not (eq attribute.total 0))}}<option value="">{{attribute.total}}</option>{{/if}}
{{#each ../abilityScoreArray as |option|}}
<option value="{{option.value}}">{{option.name}}</option>
<option value="{{option.total}}">{{option.name}}</option>
{{/each}}
</select>
{{else}}
<div class="attribute-text {{#if (lt attribute.value 0)}}negative{{/if}}">{{attribute.value}}</div>
<div class="attribute-text {{#if (lt attribute.total 0)}}negative{{/if}}">{{attribute.total}}</div>
{{/if}}
<img src="systems/daggerheart/assets/AttributeShield.svg" />
<div>

View file

@ -4,7 +4,7 @@
<div class="defense-row">
<div class="defense-section">
<div class="defense-container">
<div class="defense-value">{{document.system.evasion}}</div>
<div class="defense-value">{{document.system.evasion.total}}</div>
<img src="systems/daggerheart/assets/AttributeShield.svg" />
<div class="defense-banner">{{localize "DAGGERHEART.Sheets.PC.Defense.Evasion"}}</div>
</div>

View file

@ -3,7 +3,7 @@
{{#each document.system.experiences as |experience id|}}
<div class="experience-row">
<input name="{{concat "system.experiences." id ".description"}}" data-experience={{id}} value="{{experience.description}}" type="text" />
<div name="{{concat "system.experiences." id ".value"}}" class="experience-value">{{experience.value}}</div>
<div name="{{concat "system.experiences." id ".value"}}" class="experience-value">{{experience.total}}</div>
</div>
{{/each}}
{{#times (subtract 5 (length document.system.experiences))}}

View file

@ -21,7 +21,7 @@
<i class="fa-solid fa-caret-left"></i>
<div class="health-category">{{localize "DAGGERHEART.Sheets.PC.Health.Severe"}}</div>
</div>
<i data-action="makeDeathMove" class="fas fa-skull death-save {{#if (lt resources.hitPoints.value document.system.resources.hitPoints.max)}}disabled{{/if}}" title="{{localize "DAGGERHEART.Sheets.PC.Health.DeathMoveTooltip"}}"></i>
<i data-action="makeDeathMove" class="fas fa-skull death-save {{#if (lt resources.hitPoints.value document.system.resources.hitPoints.maxTotal)}}disabled{{/if}}" title="{{localize "DAGGERHEART.Sheets.PC.Health.DeathMoveTooltip"}}"></i>
</div>
<div class="flexrow" style="flex-wrap: nowrap; align-items: center;">
<div class="flexcol flex0">
@ -30,22 +30,22 @@
</div>
<div class="flexcol">
<div class="flexrow" style="flex-wrap: nowrap;">
{{#times document.system.resources.hitPoints.max}}
{{#times document.system.resources.hitPoints.maxTotal}}
{{#with (add this 1)}}
<input class="resource-box" type="checkbox" data-action="toggleHP" data-value="{{this}}" {{ checked (gte ../../document.system.resources.hitPoints.value this) }} />
{{/with}}
{{/times}}
{{#times (subtract 12 document.system.resources.hitPoints.max)}}
{{#times (subtract 12 document.system.resources.hitPoints.maxTotal)}}
<input class="resource-box disabled" type="checkbox" disabled />
{{/times}}
</div>
<div class="flexrow">
{{#times document.system.resources.stress.max}}
{{#times document.system.resources.stress.maxTotal}}
{{#with (add this 1)}}
<input class="resource-box" type="checkbox" data-action="toggleStress" data-value="{{this}}" {{ checked (gte ../../document.system.resources.stress.value this) }} />
{{/with}}
{{/times}}
{{#times (subtract 12 document.system.resources.stress.max)}}
{{#times (subtract 12 document.system.resources.stress.maxTotal)}}
<input class="resource-box disabled" type="checkbox" disabled />
{{/times}}
</div>

View file

@ -5,7 +5,7 @@
<div class="proficiency-container">
<span>{{localize "DAGGERHEART.Sheets.PC.Weapons.ProficiencyTitle"}}</span>
{{#times 6}}
<i class="fa-solid fa-circle proficiency-dot {{#if (gt ../proficiency this)}}marked{{/if}}"></i>
<i class="fa-solid fa-circle proficiency-dot {{#if (gt ../proficiency.total this)}}marked{{/if}}"></i>
{{/times}}
</div>
<div class="proficiency-container-visual-element"></div>