[Feature] Death moves and Fate rolls (#1463)

* Update the death move descriptions

* Renamed to DhDeathMove

* Partial Fate Roll creation and Fate Roll Enricher (/fr)

* Hide stuff not required for fate roll

* Hide formula display; code removal; start to add Fear die as a choice for Fate roll

* Fix chat message display; start moving towards supporting Hope and Fear for Fate roll

* /fr now supports type=X, where X is Hope or Fear, if not supplied, defaults to Hope

* Fixed DSN rolling; removed console messages; chat message clean up

* Add localisation entry

* Trying to sort out the button for the fate roll

* Style the fate message based on Hope/Fear colors.

* Partial improvement on the fate template buttons - chat display is correct, but the roll dialog is wrong

* Fixed enricher button; localization fixes; debug cleanup

* Error checking for the fate type parsing in all potential problem locations

* Added localization for the fate type parsing error

* Start on Avoid Death death move

* debug stuff

* More death moves setup/testing

* Avoid fate scars update in place, with scars migrating to an integer value.

* Remove some debug code; add Blaze Of Glory shell

* Start on Guaranteed Critical for Blaze of Glory

* Partial implementation of Blaze of Glory

* Dice/critical checks/tests

* Moved detection of guaranteed critical to before the roll dialog is created, so it can be skipped; removed debug code

* Remove debug

* Update Blaze of Glory effect description

* Risk It All - critical roll - clear all stress and HP

* Auto remove all marked stress and HP for Risk It All, if Hope value rolled covers it.

* Display the Death Move description in chat expanded if the appropriate config setting is on

* Made the Blaze of Glory ActiveEffect image use configured version

* Update the current Hope value if the scar value change affects it

* Scars management in the Character details editor

* Separate less file for the Death Moves instead of reusing Downtime

* Added result messages to the Death Move chat output and removed debug statements

* Some localization, style and smaller changes

* Fixed RiskItAll resource handling method

* Risk It All success chat message start

* [Add] Hope/Scar Interplay (#1531)

* Migrated character.maxHope to homebrew settings

* Added a visual for scars

* .

* .

* Pass the hope value in the button data; skeleton risk it all dialog to fill out.

* Start on risk it dialog

* More dialog stuff

* Remove non-existent field

* Dialog templating and logic

* .

* Ensure effect is Applied to Actor (#1547)

Co-authored-by: Chris Ryan <chrisr@blackhole>

* [Fix] 1548 - Standalone Item Add Actions (#1549)

* Fixed so that items not on an actor don't error out on creating actions

* Fixed deletion of items error

* Raised version

* Fix the sliders to do the correct maximums

* Pass the actor id through the button; fix /dr and /fr flavor text

* Remove debug message

---------

Co-authored-by: Chris Ryan <chrisr@blackhole>
Co-authored-by: WBHarry <williambjrklund@gmail.com>
Co-authored-by: WBHarry <89362246+WBHarry@users.noreply.github.com>
This commit is contained in:
Chris Ryan 2026-01-18 00:11:50 +10:00 committed by GitHub
parent 3103a40c26
commit 9d75157e17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 1166 additions and 258 deletions

View file

@ -68,95 +68,127 @@
{{/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 hasSelectedEffects}}
<fieldset class="experience-container">
<legend>{{localize "DAGGERHEART.GENERAL.Effect.plural"}}</legend>
{{#if (ne @root.rollType 'FateRoll')}}
{{#if hasSelectedEffects}}
<fieldset class="experience-container">
<legend>{{localize "DAGGERHEART.GENERAL.Effect.plural"}}</legend>
{{#each selectedEffects as |effect id|}}
<div class="experience-chip {{#if effect.selected}}selected{{/if}}" data-action="toggleSelectedEffect" data-key="{{id}}" data-tooltip="{{this.description}}">
<span><i class="{{ifThen effect.selected "fa-solid" "fa-regular"}} fa-circle"></i></span>
<span class="label">{{effect.name}}</span>
</div>
{{/each}}
</fieldset>
{{/if}}
{{#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>
{{#each selectedEffects as |effect id|}}
<div class="experience-chip {{#if effect.selected}}selected{{/if}}" data-action="toggleSelectedEffect" data-key="{{id}}" data-tooltip="{{this.description}}">
<span><i class="{{ifThen effect.selected "fa-solid" "fa-regular"}} fa-circle"></i></span>
<span class="label">{{effect.name}}</span>
</div>
{{/if}}
{{/each}}
</fieldset>
{{/if}}
{{/each}}
</fieldset>
{{/if}}
<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

@ -0,0 +1,39 @@
<div>
<div class="risk-it-all-container">
<header>{{localize "DAGGERHEART.APPLICATIONS.RiskItAllDialog.subtitle"}}</header>
<div class="remaining-section">
<label class="section-label">{{localize "DAGGERHEART.APPLICATIONS.RiskItAllDialog.remainingTitle"}}</label>
<div>{{this.remainingResource}}</div>
</div>
<div class="resource-section">
<div class="resource-container">
<label>{{localize "DAGGERHEART.APPLICATIONS.RiskItAllDialog.clearResource" resource=(localize "DAGGERHEART.GENERAL.HitPoints.short")}}: {{this.choices.hitPoints}}</label>
<input type="range" step="1" min="0" max="{{this.maxHitPointsValue}}" value="{{this.choices.hitPoints}}" name="choices.hitPoints" data-choice="hitPoints" />
</div>
<div class="resource-container">
<label>{{localize "DAGGERHEART.APPLICATIONS.RiskItAllDialog.clearResource" resource=(localize "DAGGERHEART.GENERAL.stress")}}: {{this.choices.stress}}</label>
<input type="range" step="1" min="0" max="{{this.maxStressValue}}" value="{{this.choices.stress}}" name="choices.stress" data-choice="stress" />
</div>
</div>
<div class="final-section">
<label class="section-label">{{localize "DAGGERHEART.APPLICATIONS.RiskItAllDialog.finalTitle"}}</label>
<div class="final-section-values-container">
<div class="final-section-value-container">
<label>{{localize "DAGGERHEART.GENERAL.HitPoints.plural"}}</label>
<span>{{this.final.hitPoints.value}}/{{this.final.hitPoints.max}}</span>
</div>
<div class="final-section-value-container">
<label>{{localize "DAGGERHEART.GENERAL.stress"}}</label>
<span>{{this.final.stress.value}}/{{this.final.stress.max}}</span>
</div>
</div>
</div>
<footer>
<button type="button" data-action="finish" {{disabled this.unfinished}}>{{localize "Submit"}}</button>
</footer>
</div>
</div>