daggerheart/templates/ui/chat/groupRoll.hbs
WBHarry 261a3a68b0
[PR] [Feature] Party Sheet (#1230)
* start development

* finish party members tab

* start resources tab

* finish resources tab

* finish inventory tab and add inital template to projects tab

* add resource buttons actions methods

* add group roll dialog

* Main implementation

* Fixed costs

* Minor fixes and tweaks for the party sheet (#1239)

* Minor fixes and tweaks for the party sheet

* Fix scroll restoration for party sheet tabs

* Finished GroupRoll

* Removed/commented-out not yet implemented things

* Commented out Difficulty since it's not used yet

* Re-render party when members update (#1242)

* Fixed so style applies in preview chat message

* Added the clown car

* Fixed so items can be dropped into the Party sheet

* Added delete icon to inventory

* Fixed TokenHUD token property useage. Fixed skipping roll message

* Added visible modifier to GroupRoll leader result

* Leader roll displays the large result display right away after rolling

* Corrected tokenHUD for non-player-tokens

* Fixed clowncar tokenData

* Fixed TagTeam roll message and sound

* Removed final TagTeamRoll roll sound

* [PR] [Party Sheets] Sidebar character sheet changes (#1249)

* Something experimenting

* I am silly (wearning Dunce hat)

* Stressful task

* Armor functional to be hit

* CSS Changes to accomadate pip boy

* last minute change to resource section for better visual feeling

* restoring old css for toggle

* Added setting to toggle pip/number display

* toggle functionality added

* Fixed light-mode in characterSheet

* Fixed multi-row resource pips display for character

* Fixed separators

* Added pip-display to Adversary and Companion. Some fixing on armor display

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>

* Fixed party height and resource armor update

* Fixed deletebutton padding

* Only showing expand-me icon on InventoryItem if there is a description to show

* .

* Fixed menu icon to be beige instead of white in dark mode

---------

Co-authored-by: moliloo <dev.murilobrito@gmail.com>
Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
Co-authored-by: Nikhil Nagarajan <potter.nikhil@gmail.com>
2025-11-11 16:02:45 +01:00

124 lines
No EOL
7.6 KiB
Handlebars

<div class="group-roll">
<div class="group-roll-section">
<h4 class="divider group-roll-header first">
<label>{{localize "DAGGERHEART.UI.Chat.groupRoll.leader"}}</label>
</h4>
<div class="group-roll-content {{#if system.leader.result}}finished{{/if}}">
<div class="group-roll-member">
<div class="group-roll-data">
<img src="{{system.leader.actor.img}}" />
<div class="group-roll-label-container">
<div>{{system.leader.actor.name}}</div>
<div class="group-roll-label-inner-container">
{{#unless (isNullish system.leader.manualSuccess)}}
<label class="group-roll-modifier {{#unless system.leader.manualSuccess}}failure{{/unless}}">{{#if system.leader.manualSuccess}}{{localize "DAGGERHEART.GENERAL.hit.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.miss.single"}}{{/if}}</label>
{{/unless}}
<div class="group-roll-trait">{{localize (concat "DAGGERHEART.CONFIG.Traits." system.leader.trait ".name")}}</div>
</div>
</div>
</div>
{{#unless system.leader.result}}
<div class="group-roll-rolling">
<a class="group-roll-button" data-path="leader"><img class="dice-icon normal" src="{{concat 'systems/daggerheart/assets/icons/dice/default/d20.svg'}}" alt=""></a>
</div>
{{else}}
<div class="roll-results {{#if system.leader.result}}finished{{/if}}">
{{#if (isNullish system.leader.manualSuccess)}}
<div class="reroll-result-container">
<a class="group-roll-success success" data-success="true" data-path="leader"><i class="fa-solid fa-check"></i></a>
<a class="group-roll-success failure" data-path="leader"><i class="fa-solid fa-xmark"></i></a>
</div>
<a class="group-roll-reroll" data-path="leader" data-tooltip="{{localize "DAGGERHEART.UI.Chat.groupRoll.rerollTooltip"}}">
<img class="dice-icon normal" src="{{concat 'systems/daggerheart/assets/icons/dice/default/d20.svg'}}" alt=""></img>
<i class="fa-solid fa-arrow-rotate-left reroll-icon"></i>
</a>
{{else}}
<div class="reroll-result-container">
{{#if system.leader.manualSuccess}}
<i class="fa-solid fa-check success"></i>
{{else}}
<i class="fa-solid fa-xmark failure"></i>
{{/if}}
</div>
{{/if}}
</div>
{{/unless}}
</div>
{{#if system.leader.result}}
<div class="group-roll-main-roll">
<h4 class="divider">
{{localize "DAGGERHEART.UI.Chat.dualityRoll.abilityCheckTitle" ability=(localize (concat "DAGGERHEART.CONFIG.Traits." system.leader.trait ".name"))}}
</h4>
<span class="main-roll-content">
<span class="main-value">
{{system.leader.result.total}}
{{#unless (isNullish system.totalModifier)}}
{{#if (gte system.totalModifier 0)}}+{{else}}-{{/if}}
{{positive system.totalModifier}} = {{add system.leader.result.total system.totalModifier}}
{{/unless}}
</span>
<span class="main-text">{{localize "DAGGERHEART.GENERAL.withThing" thing=system.leader.result.result.label}}</span>
</span>
</div>
{{/if}}
</div>
</div>
<div class="group-roll-section">
<h4 class="divider group-roll-header">
<a class="group-roll-header-expand-section">
<i class="fa-solid fa-angle-down"></i>
<label>{{localize "DAGGERHEART.UI.Chat.groupRoll.team"}}</label>
<i class="fa-solid fa-angle-down"></i>
</a>
</h4>
<div class="group-roll-content">
{{#each system.members as |member index|}}
<div class="group-roll-member">
<div class="group-roll-data">
<img src="{{member.actor.img}}" />
<div class="group-roll-label-container">
<div>{{member.actor.name}}</div>
<div class="group-roll-label-inner-container">
{{#unless (isNullish member.manualSuccess)}}
<label class="group-roll-modifier {{#unless member.manualSuccess}}failure{{/unless}}">{{#if member.manualSuccess}}+1{{else}}-1{{/if}}</label>
{{/unless}}
<div class="group-roll-trait">{{localize (concat "DAGGERHEART.CONFIG.Traits." member.trait ".name")}}</div>
</div>
</div>
</div>
{{#unless member.result}}
<div class="group-roll-rolling">
<a class="group-roll-button" data-path="{{concat "members." index}}"><img class="dice-icon normal" src="{{concat 'systems/daggerheart/assets/icons/dice/default/d20.svg'}}" alt=""></a>
</div>
{{else}}
<div class="roll-results">
{{#if (isNullish member.manualSuccess)}}
<div class="reroll-result-container">
<span class="label">{{member.result.total}}</span>
<a class="group-roll-success success" data-success="true" data-path="{{concat "members." index}}"><i class="fa-solid fa-check"></i></a>
<a class="group-roll-success failure" data-path="{{concat "members." index}}"><i class="fa-solid fa-xmark"></i></a>
</div>
<a class="group-roll-reroll" data-path="{{concat "members." index}}" data-tooltip="{{localize "DAGGERHEART.UI.Chat.groupRoll.rerollTooltip"}}">
<img class="dice-icon normal" src="{{concat 'systems/daggerheart/assets/icons/dice/default/d20.svg'}}" alt=""></img>
<i class="fa-solid fa-arrow-rotate-left reroll-icon"></i>
</a>
{{else}}
<div class="reroll-result-container">
<span class="label">{{member.result.total}}</span>
{{#if member.manualSuccess}}
<i class="fa-solid fa-check success"></i>
{{else}}
<i class="fa-solid fa-xmark failure"></i>
{{/if}}
</div>
{{/if}}
</div>
{{/unless}}
</div>
{{/each}}
</div>
</div>
</div>