Added advantage/disadvantageSource to Character model. It's shown from a tooltip icon on rolls

This commit is contained in:
WBHarry 2025-07-16 22:15:00 +02:00
parent 3176438293
commit bc92dec7f0
5 changed files with 35 additions and 0 deletions

View file

@ -98,6 +98,9 @@
<span><i class="fa-regular fa-circle"></i></span>
{{/if}}
<span class="label">{{localize "DAGGERHEART.GENERAL.Advantage.full"}}</span>
{{#if @root.rollConfig.data.advantageSources.length}}
<span class="advantage-chip-tooltip" data-tooltip="{{concat "#advantage#" @root.rollConfig.source.actor}}"><i class="fa-solid fa-circle-info"></i></span>
{{/if}}
</button>
<button class="disadvantage-chip flex1 {{#if (eq advantage -1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="-1">
{{#if (eq advantage -1)}}
@ -106,6 +109,9 @@
<span><i class="fa-regular fa-circle"></i></span>
{{/if}}
<span class="label">{{localize "DAGGERHEART.GENERAL.Disadvantage.full"}}</span>
{{#if @root.rollConfig.data.disadvantageSources.length}}
<span class="advantage-chip-tooltip" data-tooltip="{{concat "#disadvantage#" @root.rollConfig.source.actor}}"><i class="fa-solid fa-circle-info"></i></span>
{{/if}}
</button>
{{#unless (eq @root.rollType 'D20Roll')}}
<select name="roll.dice.advantageFaces">

View file

@ -0,0 +1,5 @@
<div class="daggerheart dh-style tooltip">
{{#each sources as | source |}}
<div>{{{source}}}</div>
{{/each}}
</div>