Merged with main

This commit is contained in:
WBHarry 2025-07-05 21:40:38 +02:00
commit b7c2d40d7f
62 changed files with 990 additions and 514 deletions

View file

@ -74,7 +74,7 @@
{{#each experience.values as |experience id|}}
<div class="experience-container">
<input class="experience-description" type="text" name="{{concat "experiences." id ".description" }}" value="{{experience.description}}" placeholder="{{localize "DAGGERHEART.CharacterCreation.NewExperience"}}" />
<div class="experience-value">{{signedNumber this.value}}</div>
<div class="experience-value">{{numberFormat this.value sign=true}}</div>
</div>
{{/each}}
</div>

View file

@ -0,0 +1,7 @@
<header class="dialog-header">
{{#if rollConfig.headerTitle}}
<h1>{{rollConfig.headerTitle}}</h1>
{{else}}
<h1>{{rollConfig.title}}</h1>
{{/if}}
</header>

View file

@ -0,0 +1,126 @@
<div>
{{#if @root.hasRoll}}
<div class="roll-dialog-container">
{{#unless @root.isLite}}
<div class="dices-section">
{{#if (eq @root.rollType 'D20Roll')}}
<div class="dice-option">
<img class="dice-icon" src="{{concat 'systems/daggerheart/assets/icons/dice/default/' @root.roll.d20.denomination '.svg'}}" alt="">
<div class="dice-select">
<select name="roll.dice.d20">
{{selectOptions diceOptions selected=@root.roll.d20.denomination}}
</select>
</div>
</div>
{{#if @root.advantage}}
{{#if (eq @root.advantage 1)}}
<div class="dice-option">
<img class="dice-icon" src="{{concat 'systems/daggerheart/assets/icons/dice/adv/' @root.roll.d20.denomination '.svg'}}" alt="">
<div class="dice-select">
<span class="label">Advantage</span>
</div>
</div>
{{else if (eq @root.advantage -1)}}
<div class="dice-option">
<img class="dice-icon" src="{{concat 'systems/daggerheart/assets/icons/dice/disadv/' @root.roll.d20.denomination '.svg'}}" alt="">
<div class="dice-select">
<span class="label">Disdvantage</span>
</div>
</div>
{{/if}}
{{/if}}
{{/if}}
{{#if (eq @root.rollType 'DualityRoll')}}
<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">Hope</span>
<select name="roll.dice.dHope">
{{selectOptions diceOptions selected=@root.roll.dHope.denomination}}
</select>
</div>
</div>
<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">Fear</span>
<select name="roll.dice.dFear">
{{selectOptions diceOptions selected=@root.roll.dFear.denomination}}
</select>
</div>
</div>
{{#if @root.advantage}}
{{#if (eq @root.advantage 1)}}
<div class="dice-option">
<img class="dice-icon" src="{{concat 'systems/daggerheart/assets/icons/dice/adv/' @root.roll.dAdvantage.denomination '.svg'}}" alt="">
<div class="dice-select">
<span class="label">Advantage</span>
</div>
</div>
{{else if (eq @root.advantage -1)}}
<div class="dice-option">
<img class="dice-icon" src="{{concat 'systems/daggerheart/assets/icons/dice/disadv/' @root.roll.dAdvantage.denomination '.svg'}}" alt="">
<div class="dice-select">
<span class="label">Disdvantage</span>
</div>
</div>
{{/if}}
{{/if}}
{{/if}}
</div>
<fieldset class="experience-container">
<legend>Experiences</legend>
{{#each experiences}}
{{#if name}}
<div class="experience-chip {{#if (includes ../selectedExperiences id)}}selected{{/if}}" data-action="selectExperience" data-key="{{id}}">
{{#if (includes ../selectedExperiences id)}}
<span><i class="fa-solid fa-circle"></i></span>
{{else}}
<span><i class="fa-regular fa-circle"></i></span>
{{/if}}
{{#if (eq @root.rollType 'D20Roll')}}
<span class="label">{{name}} +{{modifier}}</span>
{{else}}
<span class="label">{{name}} +{{value}}</span>
{{/if}}
</div>
{{/if}}
{{/each}}
</fieldset>
<fieldset class="modifier-container one-column">
<legend>Modifiers</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>
</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>
</button>
{{#unless (eq @root.rollType 'D20Roll')}}
<select name="roll.dice.advantageFaces">
{{selectOptions diceOptions selected=@root.roll.dAdvantage.denomination}}
</select>
{{/unless}}
</div>
<input type="text" value="{{extraFormula}}" name="extraFormula" placeholder="Situational Bonus">
</fieldset>
{{/unless}}
<span class="formula-label"><b>Formula:</b> {{@root.formula}}</span>
<button class="sunmit-btn" data-action="submitRoll"{{#unless canRoll}} disabled{{/unless}}>
<i class="fa-solid fa-dice"></i>
<span class="label">Roll</span>
</button>
</div>
{{/if}}
</div>

View file

@ -1,23 +0,0 @@
<div class="npc-roll-dialog-container">
<div class="selection-container">
<div class="dice-container">
<div class="dice-inner-container">
<img src="icons/svg/d20-grey.svg" />
<div class="dice-number">d20</div>
</div>
<div class="advantage-container">
<button class="advantage-button {{#if this.advantage}}active{{/if}} advantage" data-action="updateIsAdvantage" data-advantage="true">{{localize "DAGGERHEART.General.Advantage.Full"}}</button>
<button class="advantage-button {{#if (eq this.advantage false)}}active{{/if}} disadvantage" data-action="updateIsAdvantage">{{localize "DAGGERHEART.General.Disadvantage.Full"}}</button>
</div>
</div>
<div class="roll-dialog-experience-container">
{{#each this.experiences as |experience|}}
<button class="experience-chip {{#if experience.selected}}active{{/if}}" data-action="selectExperience" id="{{id}}">{{experience.name}} {{experience.value}}</button>
{{/each}}
</div>
</div>
<footer class="flexrow">
<button type="submit" class="roll-button">Roll</button>
</footer>
</div>

View file

@ -1,81 +0,0 @@
<div>
{{#if @root.hasRoll}}
<div class="roll-dialog-container">
<div class="flexcol">
<div>
{{!-- <input type="text" value="{{@root.formula}}" disabled> --}}
<div>{{@root.formula}}</div>
</div>
{{#unless @root.isLite}}
<div class="roll-dialog-experience-container">
{{#each experiences}}
{{#if name}}
<div class="roll-dialog-chip {{#if (includes ../selectedExperiences id)}}selected{{/if}}" data-action="selectExperience" data-key="{{id}}">
<span>{{name}}</span>
<span>+{{value}}</span>
</div>
{{/if}}
{{/each}}
</div>
<div class="flexrow">
<button class="disadvantage flex1 {{#if (eq advantage 1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="1">{{localize "DAGGERHEART.General.Advantage.Full"}}</button>
<button class="disadvantage flex1 {{#if (eq advantage -1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="-1">{{localize "DAGGERHEART.General.Disadvantage.Full"}}</button>
</div>
{{#if (eq @root.rollType 'D20Roll')}}
<div class="flexrow">
<select name="roll.dice.d20">
{{selectOptions diceOptions selected=@root.roll.d20.denomination}}
</select>
</div>
{{/if}}
{{#if (eq @root.rollType 'DualityRoll')}}
<div class="flexrow">
<div>Hope Dice</div>
<select name="roll.dice.dHope">
{{selectOptions diceOptions selected=@root.roll.dHope.denomination}}
</select>
</div>
<div class="flexrow">
<div>Fear Dice</div>
<select name="roll.dice.dFear">
{{selectOptions diceOptions selected=@root.roll.dFear.denomination}}
</select>
</div>
{{#if roll.advantage}}
<div class="flexrow">
<div>Adv/Disadv Dice</div>
<select name="roll.dice.advantageFaces">
{{selectOptions diceOptions selected=@root.roll.dAdvantage.denomination}}
</select>
</div>
{{/if}}
{{/if}}
<div>
<input type="text" value="{{extraFormula}}" name="extraFormula" placeholder="Situational Bonus">
</div>
{{/unless}}
{{!-- {{#if (not isNpc)}} --}}
{{!-- <div class="form-group">
<label>Hope</label>
<div class="form-fields">
<select name="hope">
{{selectOptions diceOptions selected=hope valueAttr="value" labelAttr="name" localize=true}}
</select>
</div>
</div>
<div class="form-group">
<label>Fear</label>
<div class="form-fields">
<select name="fear">
{{selectOptions diceOptions selected=fear valueAttr="value" labelAttr="name" localize=true}}
</select>
</div>
</div> --}}
{{!-- {{/if}} --}}
</div>
</div>
{{/if}}
<footer>
<button data-action="submitRoll"{{#unless canRoll}} disabled{{/unless}}>Roll</button>
</footer>
</div>

View file

@ -12,7 +12,7 @@
<div class="achievement-experience-card">
<div class="flexrow">
<input type="text" name="{{concat "levelup.levels." this.level ".achievements.experiences." this.key ".name"}}" value="{{this.name}}" placeholder="{{localize "DAGGERHEART.Application.LevelUp.summary.experiencePlaceholder"}}" />
<div class="flex0">{{signedNumber this.modifier}}</div>
<div class="flex0">{{numberFormat this.modifier sign=true}}</div>
</div>
<div class="achievement-experience-marker">
{{#if this.name}}<i class="fa-solid fa-check"></i>{{/if}}

View file

@ -48,7 +48,7 @@
<h5>{{localize "DAGGERHEART.Application.LevelUp.summary.newExperiences"}}</h5>
<div class="summary-selection-container">
{{#each this.achievements.experiences.values}}
<div class="summary-selection">{{this.name}} {{signedNumber this.modifier}}</div>
<div class="summary-selection">{{this.name}} {{numberFormat this.modifier sign=true}}</div>
{{/each}}
</div>
</div>
@ -125,7 +125,7 @@
<h5>{{localize "DAGGERHEART.Application.LevelUp.summary.experienceIncreases"}}</h5>
<div class="summary-selection-container">
{{#each this.advancements.experiences}}
<div class="summary-selection">{{this.name}} {{signedNumber this.modifier}}</div>
<div class="summary-selection">{{this.name}} {{numberFormat this.modifier sign=true}}</div>
{{/each}}
</div>
</div>

View file

@ -17,7 +17,7 @@
{{#each source.system.experiences as |experience key|}}
<div class="flexrow">
<input type="text" name="{{concat "system.experiences." key ".name"}}" value="{{experience.name}}" />
<div>{{signedNumber experience.value}}</div>
<div>{{numberFormat experience.value sign=true}}</div>
</div>
{{/each}}
</div>