mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 16:09:03 +01:00
[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:
parent
3103a40c26
commit
9d75157e17
38 changed files with 1166 additions and 258 deletions
|
|
@ -1,17 +1,32 @@
|
|||
<div class="daggerheart chat downtime">
|
||||
<ul class="downtime-moves-list">
|
||||
<details class="downtime-move">
|
||||
<summary class="downtime-label">
|
||||
<img class="downtime-image" src="{{this.img}}" />
|
||||
<div class="daggerheart chat death-moves">
|
||||
<ul class="death-moves-list">
|
||||
<details class="death-move" {{this.open}}>
|
||||
<summary class="death-label">
|
||||
<img class="death-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}}}
|
||||
</div>
|
||||
</details>
|
||||
</ul>
|
||||
<div class="result">
|
||||
{{{this.result}}}
|
||||
</div>
|
||||
{{#if this.showRiskItAllButton}}
|
||||
<div>
|
||||
<button class="risk-it-all-button" data-resource-value="{{this.riskItAllHope}}" data-actor-id="{{this.actorId}}">
|
||||
<span>
|
||||
{{this.riskItAllButtonLabel}}
|
||||
</span>
|
||||
</button>
|
||||
<div>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue