Feature/344 bardic rally (#363)

* 2

* Dardic Rally Dice
This commit is contained in:
Dapoulp 2025-07-17 00:45:53 +02:00 committed by GitHub
parent 3176438293
commit ad9e0aa558
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 153 additions and 40 deletions

View file

@ -88,7 +88,7 @@
{{/if}}
{{/each}}
</fieldset>
<fieldset class="modifier-container one-column">
<fieldset class="modifier-container {{#if (eq @root.rollType 'DualityRoll')}}two-columns{{else}}one-column{{/if}}">
<legend>Modifiers</legend>
<div class="nest-inputs">
<button class="advantage-chip flex1 {{#if (eq advantage 1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="1">
@ -107,13 +107,27 @@
{{/if}}
<span class="label">{{localize "DAGGERHEART.GENERAL.Disadvantage.full"}}</span>
</button>
{{#unless (eq @root.rollType 'D20Roll')}}
<select name="roll.dice.advantageFaces">
</div>
{{#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>
{{/unless}}
</div>
<input type="text" value="{{extraFormula}}" name="extraFormula" placeholder="Situational Bonus">
</div>
{{/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">Situational Bonus</span>{{/if}}
<input type="text" value="{{extraFormula}}" name="extraFormula" placeholder="{{#if (eq @root.rollType 'DualityRoll')}}Ex: 1d6 + 5{{else}}Situational Bonus{{/if}}">
</fieldset>
{{/unless}}
<span class="formula-label"><b>Formula:</b> {{@root.formula}}</span>

View file

@ -16,6 +16,11 @@
{{localize "DAGGERHEART.GENERAL.Disadvantage.full"}}
</div>
{{/if}}
{{#if roll.rally.dice}}
<div class="duality-modifier">
{{localize "DAGGERHEART.CLASS.Feature.rallyDice"}} {{roll.rally.dice}}
</div>
{{/if}}
</div>
<div class="dice-result">
<div class="dice-formula">{{roll.formula}}</div>
@ -38,7 +43,7 @@
<div class="dice-title">{{localize "DAGGERHEART.GENERAL.hope"}}</div>
<div class="dice-inner-container hope" title="{{localize "DAGGERHEART.GENERAL.hope"}}">
<div class="dice-wrapper">
<img class="dice" src="../icons/svg/d12-grey.svg"/>
<img class="dice" src="../icons/svg/{{roll.hope.dice}}-grey.svg"/>
</div>
<div class="dice-value">{{roll.hope.value}}</div>
</div>
@ -49,7 +54,7 @@
<div class="dice-title">{{localize "DAGGERHEART.GENERAL.fear"}}</div>
<div class="dice-inner-container fear" title="{{localize "DAGGERHEART.GENERAL.fear"}}">
<div class="dice-wrapper">
<img class="dice" src="../icons/svg/d12-grey.svg"/>
<img class="dice" src="../icons/svg/{{roll.fear.dice}}-grey.svg"/>
</div>
<div class="dice-value">{{roll.fear.value}}</div>
</div>
@ -72,7 +77,7 @@
<div class="dice-container">
<div class="dice-inner-container {{#if (eq roll.advantage.type 1)}}advantage{{else}}disadvantage{{/if}}">
<div class="dice-wrapper">
<img class="dice" src="../icons/svg/d6-grey.svg"/>
<img class="dice" src="../icons/svg/{{roll.advantage.dice}}-grey.svg"/>
</div>
<div class="dice-value">{{roll.advantage.value}}</div>
</div>
@ -82,6 +87,30 @@
</div>
</div>
{{/if}}
{{#if roll.rally.dice}}
<div class="dice">
<header class="part-header flexrow">
<span class="part-formula">
<span>1{{roll.rally.dice}}</span>
</span>
<span class="part-total">{{roll.rally.value}}</span>
</header>
<div class="flexrow">
<ol class="dice-rolls">
<li class="roll die {{roll.rally.dice}}">
<div class="dice-container">
<div class="dice-inner-container">
<div class="dice-wrapper">
<img class="dice" src="../icons/svg/{{roll.rally.dice}}-grey.svg"/>
</div>
<div class="dice-value">{{roll.rally.value}}</div>
</div>
</div>
</li>
</ol>
</div>
</div>
{{/if}}
{{#each roll.extra as | extra | }}
<div class="dice">
<header class="part-header flexrow">