This commit is contained in:
Chris Ryan 2026-01-10 10:28:46 +10:00 committed by GitHub
commit 54b0cda45a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 647 additions and 155 deletions

View file

@ -68,82 +68,115 @@
{{/if}}
{{/if}}
{{/if}}
{{#if (eq @root.rollType 'FateRoll')}}
{{#if (eq @root.roll.fateDie 'Hope')}}
<div class="dice-option">
<img class="dice-icon" src="{{concat 'systems/daggerheart/assets/icons/dice/hope/' @root.roll.dHope.denomination '.svg'}}" alt="">
<div class="dice-select">
<span class="label">{{localize "DAGGERHEART.GENERAL.hope"}}</span>
<select name="roll.dice.dHope">
{{selectOptions diceOptions selected=@root.roll.dHope.denomination}}
</select>
</div>
</div>
{{/if}}
{{#if (eq @root.roll.fateDie 'Fear')}}
<div class="dice-option">
<img class="dice-icon" src="{{concat 'systems/daggerheart/assets/icons/dice/fear/' @root.roll.dFear.denomination '.svg'}}" alt="">
<div class="dice-select">
<span class="label">{{localize "DAGGERHEART.GENERAL.fear"}}</span>
<select name="roll.dice.dFear">
{{selectOptions diceOptions selected=@root.roll.dFear.denomination}}
</select>
</div>
</div>
{{/if}}
{{/if}}
</div>
{{#if experiences.length}}
<fieldset class="experience-container">
<legend>{{localize "DAGGERHEART.GENERAL.experience.plural"}}</legend>
{{#each experiences}}
{{#if name}}
<div class="experience-chip {{#if (includes ../selectedExperiences id)}}selected{{/if}}" data-action="selectExperience" data-key="{{id}}" data-tooltip="{{this.description}}">
<span><i class="{{ifThen (includes ../selectedExperiences id) "fa-solid" "fa-regular"}} fa-circle"></i></span>
<span class="label">{{name}} +{{value}}</span>
</div>
{{/if}}
{{/each}}
</fieldset>
{{/if}}
{{#if (ne @root.rollType 'FateRoll')}}
<fieldset class="modifier-container {{#if (eq @root.rollType 'DualityRoll')}}two-columns{{else}}one-column{{/if}}">
<legend>{{localize "DAGGERHEART.GENERAL.Modifier.plural"}}</legend>
<div class="nest-inputs">
<button class="advantage-chip flex1 {{#if (eq advantage 1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="1">
{{#if (eq advantage 1)}}
<span><i class="fa-solid fa-circle"></i></span>
{{else}}
<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)}}
<span><i class="fa-solid fa-circle"></i></span>
{{else}}
<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>
</div>
{{#unless (eq @root.rollType 'D20Roll')}}
{{#if experiences.length}}
<fieldset class="experience-container">
<legend>{{localize "DAGGERHEART.GENERAL.experience.plural"}}</legend>
{{#each experiences}}
{{#if name}}
<div class="experience-chip {{#if (includes ../selectedExperiences id)}}selected{{/if}}" data-action="selectExperience" data-key="{{id}}" data-tooltip="{{this.description}}">
<span><i class="{{ifThen (includes ../selectedExperiences id) "fa-solid" "fa-regular"}} fa-circle"></i></span>
<span class="label">{{name}} +{{value}}</span>
</div>
{{/if}}
{{/each}}
</fieldset>
{{/if}}
<fieldset class="modifier-container {{#if (eq @root.rollType 'DualityRoll')}}two-columns{{else}}one-column{{/if}}">
{{#if @root.advantage}}
<legend>{{localize "DAGGERHEART.GENERAL.Modifier.plural"}}</legend>
<div class="nest-inputs">
<select name="roll.dice.advantageNumber"{{#unless advantage}} disabled{{/unless}}>
{{#times 10}}
<option value="{{add this 1}}" {{#if (eq @root.roll.advantageNumber (add this 1))}} selected{{/if}}>{{add this 1}}</option>
{{/times}}
</select>
<select name="roll.dice.advantageFaces"{{#unless advantage}} disabled{{/unless}}>
{{selectOptions diceOptions selected=@root.roll.dAdvantage.denomination}}
</select>
<button class="advantage-chip flex1 {{#if (eq advantage 1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="1">
{{#if (eq advantage 1)}}
<span><i class="fa-solid fa-circle"></i></span>
{{else}}
<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)}}
<span><i class="fa-solid fa-circle"></i></span>
{{else}}
<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>
</div>
{{#if abilities}}
<span>{{localize "DAGGERHEART.GENERAL.traitModifier"}}</span>
<select name="trait">
{{selectOptions abilities selected=@root.rollConfig.roll.trait valueAttr="id" labelAttr="label" blank="" localize=true}}
{{#unless (eq @root.rollType 'D20Roll')}}
<div class="nest-inputs">
<select name="roll.dice.advantageNumber"{{#unless advantage}} disabled{{/unless}}>
{{#times 10}}
<option value="{{add this 1}}" {{#if (eq @root.roll.advantageNumber (add this 1))}} selected{{/if}}>{{add this 1}}</option>
{{/times}}
</select>
<select name="roll.dice.advantageFaces"{{#unless advantage}} disabled{{/unless}}>
{{selectOptions diceOptions selected=@root.roll.dAdvantage.denomination}}
</select>
</div>
{{#if abilities}}
<span>{{localize "DAGGERHEART.GENERAL.traitModifier"}}</span>
<select name="trait">
{{selectOptions abilities selected=@root.rollConfig.roll.trait valueAttr="id" labelAttr="label" blank="" localize=true}}
</select>
{{/if}}
{{/unless}}
{{/if}}
{{#if @root.rallyDie.length}}
<span class="formula-label">{{localize "DAGGERHEART.CLASS.Feature.rallyDice"}}</span>
<select name="roll.dice._rallyIndex">
{{selectOptions @root.rallyDie blank="" selected=@root.roll._rallyIndex}}
</select>
{{/if}}
{{/unless}}
{{#if @root.rallyDie.length}}
<span class="formula-label">{{localize "DAGGERHEART.CLASS.Feature.rallyDice"}}</span>
<select name="roll.dice._rallyIndex">
{{selectOptions @root.rallyDie blank="" selected=@root.roll._rallyIndex}}
</select>
{{/if}}
{{#if (eq @root.rollType 'DualityRoll')}}<span class="formula-label">{{localize "DAGGERHEART.GENERAL.situationalBonus"}}</span>{{/if}}
<input type="text" value="{{extraFormula}}" name="extraFormula" placeholder="{{#if (eq @root.rollType 'DualityRoll')}}Ex: 1d6 + 5{{else}}Situational Bonus{{/if}}">
</fieldset>
{{#if (eq @root.rollType 'DualityRoll')}}<span class="formula-label">{{localize "DAGGERHEART.GENERAL.situationalBonus"}}</span>{{/if}}
<input type="text" value="{{extraFormula}}" name="extraFormula" placeholder="{{#if (eq @root.rollType 'DualityRoll')}}Ex: 1d6 + 5{{else}}Situational Bonus{{/if}}">
</fieldset>
{{/if}}
{{/unless}}
{{#if (or costs uses)}}
{{> 'systems/daggerheart/templates/dialogs/dice-roll/costSelection.hbs'}}
{{/if}}
<span class="formula-label"><b>{{localize "DAGGERHEART.GENERAL.formula"}}:</b> {{@root.formula}}</span>
{{#if (ne @root.rollType 'FateRoll')}}
<span class="formula-label"><b>{{localize "DAGGERHEART.GENERAL.formula"}}:</b> {{@root.formula}}</span>
{{/if}}
<div class="roll-dialog-controls">
<select class="roll-mode-select" name="selectedRollMode">

View file

@ -1,13 +1,13 @@
<div class="daggerheart chat downtime">
<ul class="downtime-moves-list">
<details class="downtime-move">
<details class="downtime-move" {{this.open}}>
<summary class="downtime-label">
<img class="downtime-image" src="{{this.img}}" />
<div class="header-label">
<h2 class="title">{{this.title}}</h2>
<span class="label">{{localize 'DAGGERHEART.UI.Chat.deathMove.title'}}</span>
</div>
<i class="fa-solid fa-chevron-down"></i>
<i class="fa-solid {{this.chevron}}"></i>
</summary>
<div class="description">
{{{this.description}}}

View file

@ -29,64 +29,86 @@
<div class="dice-tooltip">
<div class="wrapper">
<div class="roll-dice">
{{#if roll.hope}}
<div class="roll-die">
<label>{{localize "DAGGERHEART.GENERAL.hope"}}</label>
<div class="dice {{roll.hope.dice}} color-hope reroll-button" data-die-index="0" data-type="hope" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerollThing" thing=(localize "DAGGERHEART.GENERAL.hope")}}">
{{#if roll.hope.rerolled.any}}<i class="fa-solid fa-dice dice-rerolled" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=roll.hope.rerolled.rerolls.length}}"></i>{{/if}}
{{roll.hope.value}}
</div>
</div>
<div class="roll-die has-plus">
<label>{{localize "DAGGERHEART.GENERAL.fear"}}</label>
<div class="dice {{roll.fear.dice}} color-fear reroll-button" data-die-index="2" data-type="fear" style="--svg-folder: 'fear';" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerollThing" thing=(localize "DAGGERHEART.GENERAL.fear")}}">
{{#if roll.fear.rerolled.any}}<i class="fa-solid fa-dice dice-rerolled" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=roll.fear.rerolled.rerolls.length}}"></i>{{/if}}
{{roll.fear.value}}
</div>
</div>
{{#if roll.advantage.type}}
<div class="roll-die has-plus">
{{#if (eq roll.advantage.type 1)}}
<label>{{localize "DAGGERHEART.GENERAL.Advantage.short"}}</label>
<div class="dice {{roll.advantage.dice}} color-adv">{{roll.advantage.value}}</div>
{{else}}
<label>{{localize "DAGGERHEART.GENERAL.Disadvantage.short"}}</label>
<div class="dice {{roll.advantage.dice}} color-dis">{{roll.advantage.value}}</div>
{{/if}}
</div>
{{/if}}
{{#if roll.rally.dice}}
<div class="roll-die has-plus">
<label>{{localize "DAGGERHEART.CLASS.Feature.short"}}</label>
<div class="dice {{roll.rally.dice}}">{{roll.rally.value}}</div>
</div>
{{/if}}
{{#each roll.extra}}
{{#each results}}
{{#unless discarded}}
<div class="roll-die has-plus">
<label></label>
<div class="dice {{../dice}}">{{result}}</div>
</div>
{{/unless}}
{{/each}}
{{/each}}
{{else}}
{{#each roll.dice}}
{{#each results}}
<div class="roll-die {{#unless (or @../first discarded)}} has-plus{{/unless}}">
<div class="dice {{../dice}}{{#if discarded}} discarded{{else}}{{#if (and @../first ../../roll.advantage.type)}}{{#if (eq ../../roll.advantage.type 1)}} color-adv{{else}} color-dis{{/if}}{{/if}}{{#if success}} color-adv{{/if}}{{/if}}">
{{result}}
</div>
{{#if roll.fate}}
{{#if (eq roll.fate.fateDie "Hope")}}
<div class="roll-die">
<label>{{localize "DAGGERHEART.GENERAL.hope"}}</label>
<div class="dice {{roll.fate.dice}} color-hope" data-die-index="0" data-type="hope">
{{roll.fate.value}}
</div>
</div>
{{/if}}
{{#if (eq roll.fate.fateDie "Fear")}}
<div class="roll-die">
<label>{{localize "DAGGERHEART.GENERAL.fear"}}</label>
<div class="dice {{roll.fate.dice}} color-fear" data-die-index="0" data-type="fear">
{{roll.fate.value}}
</div>
</div>
{{/if}}
{{else}}
{{#if roll.hope}}
<div class="roll-die">
<label>{{localize "DAGGERHEART.GENERAL.hope"}}</label>
<div class="dice {{roll.hope.dice}} color-hope reroll-button" data-die-index="0" data-type="hope" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerollThing" thing=(localize "DAGGERHEART.GENERAL.hope")}}">
{{#if roll.hope.rerolled.any}}<i class="fa-solid fa-dice dice-rerolled" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=roll.hope.rerolled.rerolls.length}}"></i>{{/if}}
{{roll.hope.value}}
</div>
</div>
<div class="roll-die has-plus">
<label>{{localize "DAGGERHEART.GENERAL.fear"}}</label>
<div class="dice {{roll.fear.dice}} color-fear reroll-button" data-die-index="2" data-type="fear" style="--svg-folder: 'fear';" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerollThing" thing=(localize "DAGGERHEART.GENERAL.fear")}}">
{{#if roll.fear.rerolled.any}}<i class="fa-solid fa-dice dice-rerolled" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=roll.fear.rerolled.rerolls.length}}"></i>{{/if}}
{{roll.fear.value}}
</div>
</div>
{{#if roll.advantage.type}}
<div class="roll-die has-plus">
{{#if (eq roll.advantage.type 1)}}
<label>{{localize "DAGGERHEART.GENERAL.Advantage.short"}}</label>
<div class="dice {{roll.advantage.dice}} color-adv">{{roll.advantage.value}}</div>
{{else}}
<label>{{localize "DAGGERHEART.GENERAL.Disadvantage.short"}}</label>
<div class="dice {{roll.advantage.dice}} color-dis">{{roll.advantage.value}}</div>
{{/if}}
</div>
{{/if}}
{{#if roll.rally.dice}}
<div class="roll-die has-plus">
<label>{{localize "DAGGERHEART.CLASS.Feature.short"}}</label>
<div class="dice {{roll.rally.dice}}">{{roll.rally.value}}</div>
</div>
{{/if}}
{{#each roll.extra}}
{{#each results}}
{{#unless discarded}}
<div class="roll-die has-plus">
<label></label>
<div class="dice {{../dice}}">{{result}}</div>
</div>
{{/unless}}
{{/each}}
{{/each}}
{{/each}}
{{else}}
{{#each roll.dice}}
{{#each results}}
<div class="roll-die {{#unless (or @../first discarded)}} has-plus{{/unless}}">
<div class="dice {{../dice}}{{#if discarded}} discarded{{else}}{{#if (and @../first ../../roll.advantage.type)}}{{#if (eq ../../roll.advantage.type 1)}} color-adv{{else}} color-dis{{/if}}{{/if}}{{#if success}} color-adv{{/if}}{{/if}}">
{{result}}
</div>
</div>
{{/each}}
{{/each}}
{{/if}}
{{/if}}
</div>
</div>
<div class="roll-formula">{{roll.formula}}</div>
{{#if roll.fate}}
{{else}}
<div class="roll-formula">{{roll.formula}}</div>
{{/if}}
</div>
</div>
</div>
{{/unless}}
</div>
</div>