mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Feature/chat message styles (#514)
* style items and action chat messages * enhance death move chat message and fix border bottom from title actions * fix padding bottom * Added basic chat-message.hbs * . * style remaing chat messages * style action messages * remove console log * add colapsable descriptions in chat messages * inital style for message rolls * fix deal damage button style * add new partchments * Roll Chat message new design template * j * l * p * y * fix _getTags type error and add a alias label for non base messages * Fix damage & healing roll * Fix conflict * Deleting old templates * Good for now * fix labels in duality rolls messages and style experience and effects messages --------- Co-authored-by: WBHarry <williambjrklund@gmail.com> Co-authored-by: Dapoolp <elcatnet@gmail.com>
This commit is contained in:
parent
a4b1130142
commit
74df2c4e87
72 changed files with 1661 additions and 996 deletions
|
|
@ -8,7 +8,7 @@
|
|||
<input name="uses.enabled" type="checkbox"{{#if uses.enabled}} checked{{/if}}>
|
||||
<label for="uses.enabled">Uses</label>
|
||||
</div>
|
||||
</div>{{log @root}}
|
||||
</div>
|
||||
<label class="modifier-label">{{uses.value}}/{{formulaValue uses.max @root.rollConfig.data}}</label>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,19 @@
|
|||
<div class="daggerheart chat domain-card">
|
||||
<div class="domain-card-title">
|
||||
<h2>{{name}}</h2>
|
||||
</div>
|
||||
<img src="{{img}}" />
|
||||
<div>{{{description}}}</div>
|
||||
<img class="card-img" src="{{item.img}}" />
|
||||
<details class="domain-card-move">
|
||||
<summary class="domain-card-header">
|
||||
<div class="domain-label">
|
||||
<h2 class="title">{{item.name}}</h2>
|
||||
<ul class="tags">
|
||||
{{#each item.tags as |tag|}}
|
||||
<li class="tag">{{tag}}</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
<i class="fa-solid fa-chevron-down"></i>
|
||||
</summary>
|
||||
<div class="description">{{{description}}}</div>
|
||||
</details>
|
||||
<footer class="ability-card-footer">
|
||||
{{#each actions as |action index|}}
|
||||
<button class="ability-use-button" data-index="{{index}}">
|
||||
|
|
|
|||
13
templates/ui/chat/action.hbs
Normal file
13
templates/ui/chat/action.hbs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<div class="daggerheart chat action">
|
||||
<details class="action-move">
|
||||
<summary class="action-section">
|
||||
<img class="action-img" src="{{action.img}}" />
|
||||
<div class="action-header">
|
||||
<h2 class="title">{{action.name}}</h2>
|
||||
<span class="label">{{itemOrigin.name}}</span>
|
||||
</div>
|
||||
<i class="fa-solid fa-chevron-down"></i>
|
||||
</summary>
|
||||
<div class="description">{{{description}}}</div>
|
||||
</details>
|
||||
</div>
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
<div class="dice-roll daggerheart chat roll" data-action="expandRoll">
|
||||
<div class="dice-flavor">{{localize "DAGGERHEART.UI.Chat.attackRoll.title" attack=this.title}}</div>
|
||||
<div class="dice-result">
|
||||
<div class="dice-formula">{{roll.formula}}</div>
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
<section class="tooltip-part">
|
||||
<div class="dice">
|
||||
{{#each dice}}
|
||||
<header class="part-header flexrow">
|
||||
<span class="part-formula">{{number}}{{denomination}}</span>
|
||||
<span class="part-total">{{total}}</span>
|
||||
</header>
|
||||
<div class="flexrow">
|
||||
<ol class="dice-rolls">
|
||||
{{#each results}}
|
||||
<li class="roll die {{../denomination}}{{#if discarded}} discarded{{/if}} min">{{result}}</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
<div class="attack-roll-advantage-container">{{#if ../advantageState}}{{localize "DAGGERHEART.GENERAL.Advantage.full"}}{{/if}}{{#if (eq ../advantageState false)}}{{localize "DAGGERHEART.GENERAL.Disadvantage.full"}}{{/if}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dice-total">
|
||||
<div class="dice-total-value">{{roll.total}}</div>
|
||||
</div>
|
||||
{{#if (gt targets.length 0)}}
|
||||
<div class="target-section">
|
||||
{{#each targets as |target|}}
|
||||
<div class="dice-total target-container {{#if target.hit}}hit{{else}}miss{{/if}}" data-token="{{target.id}}">
|
||||
<img src="{{target.img}}" />
|
||||
<div class="target-inner-container">
|
||||
{{#if target.hit}}{{localize "Hit"}}{{else}}{{localize "Miss"}}{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="flexrow">
|
||||
<button class="duality-action" data-value="{{roll.total}}"><span>{{localize "DAGGERHEART.GENERAL.rollDamage"}}</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
<div class="dice-roll daggerheart chat roll" data-action="expandRoll">
|
||||
<div class="dice-flavor">{{title}}</div>
|
||||
<div class="dice-result">
|
||||
<div class="dice-formula">{{roll.formula}}</div>
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
<section class="tooltip-part">
|
||||
<div class="dice">
|
||||
{{#each roll.dice as | dice index |}}
|
||||
<header class="part-header flexrow">
|
||||
<span class="part-formula">{{formula}}</span>
|
||||
<span class="part-total">{{total}}</span>
|
||||
</header>
|
||||
<div class="flexrow">
|
||||
<ol class="dice-rolls rerollable">
|
||||
{{#if dice.rerolled.any}}
|
||||
<i class="fa-solid fa-dice dice-rerolled" title="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=dice.rerolled.rerolls.length}}"></i>
|
||||
{{/if}}
|
||||
<button type="checkbox" class="reroll-button" data-die-index="0" data-tooltip="{{localize "DAGGERHEART.GENERAL.reroll"}}">
|
||||
{{#each results as |result index|}}
|
||||
<li class="roll die {{../dice}}{{#if discarded}} discarded{{/if}} min">{{result.result}}</li>
|
||||
{{/each}}
|
||||
</button>
|
||||
</ol>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dice-total">
|
||||
<div class="dice-total-value">{{roll.total}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset class="dice-roll daggerheart chat roll expanded{{#unless damage.roll}} hidden{{/unless}}" data-action="expandRoll">
|
||||
<legend class="dice-flavor">{{localize "DAGGERHEART.GENERAL.damage"}}</legend>
|
||||
<div class="dice-result">
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
{{> 'systems/daggerheart/templates/ui/chat/parts/damage-chat.hbs' damage=damage noTitle=true}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{> 'systems/daggerheart/templates/ui/chat/parts/target-chat.hbs'}}
|
||||
{{#if hasDamage}}
|
||||
<div class="dice-roll daggerheart chat roll">
|
||||
<div class="dice-result">
|
||||
{{#if damage.roll}}
|
||||
<div class="dice-actions">
|
||||
<button class="damage-button">{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamage"}}</button>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="flexrow">
|
||||
<button class="duality-action duality-action-damage" data-value="{{roll.total}}"><span>{{localize "DAGGERHEART.UI.Chat.damageRoll.rollDamage"}}</span></button>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
45
templates/ui/chat/chat-message.hbs
Normal file
45
templates/ui/chat/chat-message.hbs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<li class="chat-message message flexcol {{cssClass}}" data-message-id="{{message._id}}"
|
||||
{{#if borderColor}}style="border-color:{{borderColor}}"{{/if}}>
|
||||
<header class="message-header flexrow">
|
||||
<div class="message-header-main">
|
||||
<img class="actor-img" src="{{actor.img}}" />
|
||||
{{#if (eq message.type 'base')}}
|
||||
<div class="message-sub-header-container">
|
||||
<h4>{{actor.name}}</h4>
|
||||
<div>{{author.name}}</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="message-sub-header-container">
|
||||
<h4>{{ifThen message.title message.title alias}}</h4>
|
||||
<div>{{actor.name}} {{#if author.isGM}}(GM){{/if}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="message-header-metadata">
|
||||
<span class="message-metadata">
|
||||
<time class="message-timestamp">{{timeSince message.timestamp}}</time>
|
||||
{{#if canDelete}}
|
||||
<a aria-label="{{localize 'Delete'}}" class="message-delete" data-action="deleteMessage">
|
||||
<i class="fa-solid fa-trash" inert></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if canClose}}
|
||||
<a aria-label="{{ localize "CHAT.Dismiss" }}" class="message-dismiss" data-action="dismissMessage">
|
||||
<i class="fa-solid fa-xmark" inert></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
</span>
|
||||
|
||||
{{#if isWhisper}}
|
||||
<span class="whisper-to">{{localize 'CHAT.To'}}: {{whisperTo}}</span>
|
||||
{{/if}}
|
||||
|
||||
{{#if message.flavor}}
|
||||
<span class="flavor-text">{{{message.flavor}}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
</header>
|
||||
<div class="message-content">
|
||||
{{{message.content}}}
|
||||
</div>
|
||||
</li>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{{!-- TO DO DELETE ? --}}
|
||||
{{> 'systems/daggerheart/templates/ui/chat/parts/damage-chat.hbs' damage=this}}
|
||||
{{> 'systems/daggerheart/templates/ui/chat/parts/target-chat.hbs'}}
|
||||
<div class="dice-roll daggerheart chat roll">
|
||||
<div class="dice-result">
|
||||
<div class="dice-actions">
|
||||
<button class="damage-button" data-target-hit="true" {{#if (eq targets.length 0)}}disabled{{/if}}>{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamageToTargets"}}</button>
|
||||
<button class="damage-button">{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamage"}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,8 +1,17 @@
|
|||
<div class="daggerheart chat downtime">
|
||||
<h2 class="downtime-title-container">
|
||||
<div>{{this.player}} {{localize "DAGGERHEART.UI.Chat.deathMove.title"}}</div>
|
||||
<div class="downtime-subtitle">{{this.title}}</div>
|
||||
</h2>
|
||||
<img class="downtime-image" src="{{this.img}}" />
|
||||
<div>{{{this.description}}}</div>
|
||||
<ul class="downtime-moves-list">
|
||||
<details class="downtime-move">
|
||||
<summary class="downtime-label">
|
||||
<img class="downtime-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>
|
||||
</summary>
|
||||
<div class="description">
|
||||
{{{this.description}}}
|
||||
</div>
|
||||
</details>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -1,13 +1,22 @@
|
|||
<div class="daggerheart chat downtime">
|
||||
<h2 class="downtime-title-container">
|
||||
<div>{{title}}</div>
|
||||
</h2>
|
||||
{{#each moves as | move index |}}
|
||||
<strong>{{move.name}}</strong>
|
||||
<img class="downtime-image" src="{{move.img}}" />
|
||||
<div>{{{move.description}}}</div>
|
||||
{{#each move.actions as | action index |}}
|
||||
<button class="action-use-button" data-move-index="{{@../key}}" data-action-index="{{index}}">{{localize action.name}}</button>
|
||||
<ul class="downtime-moves-list">
|
||||
{{#each moves as | move index |}}
|
||||
<details class="downtime-move">
|
||||
<summary class="downtime-label">
|
||||
<img class="downtime-image" src="{{move.img}}" />
|
||||
<div class="header-label">
|
||||
<h2 class="title">{{move.name}}</h2>
|
||||
<span class="label">{{localize 'DAGGERHEART.GENERAL.Bonuses.rest.downtimeAction'}}</span>
|
||||
</div>
|
||||
<i class="fa-solid fa-chevron-down"></i>
|
||||
</summary>
|
||||
<div class="description">
|
||||
{{{move.description}}}
|
||||
</div>
|
||||
</details>
|
||||
{{#each move.actions as | action index |}}
|
||||
<button class="action-use-button" data-move-index="{{@../key}}" data-action-index="{{index}}">{{localize action.name}}</button>
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -1,227 +0,0 @@
|
|||
<div class="dice-roll daggerheart chat roll" data-action="expandRoll">
|
||||
<div class="dice-flavor" data-action="expandRoll">{{title}}</div>
|
||||
<div class="duality-modifiers" data-action="expandRoll">
|
||||
{{#each roll.modifiers}}
|
||||
<div class="duality-modifier">
|
||||
{{localize label}} {{#if (gte value 0)}}+{{/if}}{{value}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#if (eq roll.advantage.type 1)}}
|
||||
<div class="duality-modifier">
|
||||
{{localize "DAGGERHEART.GENERAL.Advantage.full"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (eq roll.advantage.type -1)}}
|
||||
<div class="duality-modifier">
|
||||
{{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" data-action="expandRoll">{{roll.formula}}</div>
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
<section class="tooltip-part">
|
||||
<div class="dice" data-action="expandRoll">
|
||||
<header class="part-header flexrow">
|
||||
<span class="part-formula">
|
||||
<span>1{{roll.hope.dice}}</span>
|
||||
|
|
||||
<span>1{{roll.fear.dice}}</span>
|
||||
</span>
|
||||
<span class="part-total">{{roll.result.total}}</span>
|
||||
</header>
|
||||
<div class="flexrow">
|
||||
<ol class="dice-rolls duality">
|
||||
<li class="roll die {{roll.hope.dice}}">
|
||||
<div class="dice-container">
|
||||
<div class="dice-title">{{localize "DAGGERHEART.GENERAL.hope"}}</div>
|
||||
{{#if roll.hope.rerolled.any}}<i class="fa-solid fa-dice dice-rerolled" title="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=roll.hope.rerolled.rerolls.length}}"></i>{{/if}}
|
||||
<div class="dice-inner-container hope" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerollThing" thing=(localize "DAGGERHEART.GENERAL.hope")}}">
|
||||
<button type="checkbox" class="reroll-button" data-die-index="0" data-type="hope">
|
||||
<div class="dice-wrapper">
|
||||
<img class="dice" src="../icons/svg/{{roll.hope.dice}}-grey.svg"/>
|
||||
</div>
|
||||
<div class="dice-value">{{roll.hope.value}}</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="roll die {{roll.fear.dice}}">
|
||||
<div class="dice-container">
|
||||
<div class="dice-title">{{localize "DAGGERHEART.GENERAL.fear"}}</div>
|
||||
{{#if roll.fear.rerolled.any}}<i class="fa-solid fa-dice dice-rerolled" title="{{localize "DAGGERHEART.UI.Tooltip.diceIsRerolled" times=roll.fear.rerolled.rerolls.length}}"></i>{{/if}}
|
||||
<div class="dice-inner-container fear" data-tooltip="{{localize "DAGGERHEART.GENERAL.rerollThing" thing=(localize "DAGGERHEART.GENERAL.fear")}}">
|
||||
<button type="checkbox" class="reroll-button" data-die-index="2" data-type="fear">
|
||||
<div class="dice-wrapper">
|
||||
<img class="dice" src="../icons/svg/{{roll.fear.dice}}-grey.svg"/>
|
||||
</div>
|
||||
<div class="dice-value">{{roll.fear.value}}</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
{{#if roll.advantage.type}}
|
||||
<div class="dice" data-action="expandRoll">
|
||||
<header class="part-header flexrow">
|
||||
<span class="part-formula">
|
||||
<span>1{{roll.advantage.dice}}</span>
|
||||
</span>
|
||||
<span class="part-total">{{roll.advantage.value}}</span>
|
||||
</header>
|
||||
<div class="flexrow">
|
||||
<ol class="dice-rolls">
|
||||
<li class="roll die {{roll.advantage.dice}}">
|
||||
<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/{{roll.advantage.dice}}-grey.svg"/>
|
||||
</div>
|
||||
<div class="dice-value">{{roll.advantage.value}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</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" data-action="expandRoll">
|
||||
<header class="part-header flexrow">
|
||||
<span class="part-formula">
|
||||
<span>1{{extra.dice}}</span>
|
||||
</span>
|
||||
<span class="part-total">{{extra.value}}</span>
|
||||
</header>
|
||||
<div class="flexrow">
|
||||
<ol class="dice-rolls">
|
||||
<li class="roll die {{extra.dice}}">
|
||||
<div class="dice-container">
|
||||
<div class="dice-inner-container">
|
||||
<div class="dice-wrapper">
|
||||
<img class="dice" src="../icons/svg/{{extra.dice}}-grey.svg"/>
|
||||
</div>
|
||||
<div class="dice-value">{{extra.value}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#if roll.modifierTotal}}<div class="duality-modifier">{{#if (gt roll.modifierTotal 0)}}+{{/if}}{{roll.modifierTotal}}</div>{{/if}}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dice-total duality {{#if (eq roll.result.duality 1)}}hope{{else}}{{#if (eq roll.result.duality -1)}}fear{{else}}critical{{/if}}{{/if}}">
|
||||
<div class="dice-total-label">
|
||||
{{#unless (eq _source.roll.success undefined)}}
|
||||
{{#if _source.roll.success}}
|
||||
{{localize "DAGGERHEART.GENERAL.success"}} {{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}
|
||||
{{else}}
|
||||
{{localize "DAGGERHEART.GENERAL.failure"}} {{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{roll.result.label}}
|
||||
{{/unless}}
|
||||
</div>
|
||||
<div class="dice-total-value">
|
||||
{{roll.total}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset class="dice-roll daggerheart chat roll expanded{{#unless damage.roll}} hidden{{/unless}}" data-action="expandRoll">
|
||||
<legend class="dice-flavor">
|
||||
{{#if hasHealing}}
|
||||
{{localize "DAGGERHEART.GENERAL.healing"}}
|
||||
{{else}}
|
||||
{{localize "DAGGERHEART.GENERAL.damage"}}
|
||||
{{/if}}
|
||||
</legend>
|
||||
<div class="dice-result">
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
{{> 'systems/daggerheart/templates/ui/chat/parts/damage-chat.hbs' damage=damage noTitle=true}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{> 'systems/daggerheart/templates/ui/chat/parts/target-chat.hbs'}}
|
||||
<div class="dice-roll daggerheart chat roll">
|
||||
<div class="dice-result">
|
||||
<div class="dice-actions{{#unless (or hasDamage hasHealing)}} duality-alone{{/unless}}">
|
||||
{{#if (or hasDamage hasHealing)}}
|
||||
{{#if damage.roll}}
|
||||
<button class="duality-action damage-button" data-target-hit="true" data-value="{{roll.total}}"><span>
|
||||
{{#if hasHealing}}
|
||||
{{localize "DAGGERHEART.UI.Chat.healingRoll.applyHealing"}}
|
||||
{{else}}
|
||||
{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamage"}}
|
||||
{{/if}}
|
||||
</span></button>
|
||||
{{else}}
|
||||
<button class="duality-action duality-action-damage" data-value="{{roll.total}}"><span>
|
||||
{{#if hasHealing}}
|
||||
{{localize "DAGGERHEART.UI.Chat.attackRoll.rollHealing"}}
|
||||
{{else}}
|
||||
{{localize "DAGGERHEART.UI.Chat.attackRoll.rollDamage"}}
|
||||
{{/if}}
|
||||
</span></button>
|
||||
{{/if}}
|
||||
{{!-- {{else}}
|
||||
{{#if hasHealing}}
|
||||
<button class="duality-action duality-action-healing" data-value="{{roll.total}}"><span>{{localize "DAGGERHEART.UI.Chat.attackRoll.rollHealing"}}</span></button>
|
||||
{{/if}} --}}
|
||||
{{/if}}
|
||||
{{#if hasEffect}}
|
||||
<button class="duality-action-effect" data-value="{{roll.total}}"><span>{{localize "DAGGERHEART.UI.Chat.attackRoll.applyEffect"}}</span></button>
|
||||
{{/if}}
|
||||
<div class="duality-result">
|
||||
<div>{{roll.total}}
|
||||
{{#if (eq roll.result.duality 1)}}
|
||||
{{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.hope")}}
|
||||
{{else}}
|
||||
{{#if (eq roll.result.duality -1)}}
|
||||
{{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.fear")}}
|
||||
{{else}}
|
||||
{{localize "DAGGERHEART.GENERAL.criticalSuccess"}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
14
templates/ui/chat/foundryRoll.hbs
Normal file
14
templates/ui/chat/foundryRoll.hbs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<div class="dice-roll" data-action="expandRoll">
|
||||
{{#if flavor}}
|
||||
<div class="dice-flavor">{{flavor}}</div>
|
||||
{{/if}}
|
||||
<div class="dice-result">
|
||||
<div class="dice-formula">{{formula}}</div>
|
||||
{{{tooltip}}}
|
||||
<h4 class="dice-total">{{total}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="roll-buttons">
|
||||
<button class="simple-roll-button">{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamage"}}</button>
|
||||
<button class="simple-roll-button" data-type="healing">{{localize "DAGGERHEART.UI.Chat.healingRoll.applyHealing"}}</button>
|
||||
</div>
|
||||
19
templates/ui/chat/foundryRollTooltip.hbs
Normal file
19
templates/ui/chat/foundryRollTooltip.hbs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{{#if parts.length}}
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
<fieldset>
|
||||
<legend>
|
||||
{{localize "DAGGERHEART.UI.Chat.dicePool.title"}}
|
||||
</legend>
|
||||
<div class="roll-dice">
|
||||
{{#each parts}}
|
||||
{{#each rolls}}
|
||||
<div class="roll-die">
|
||||
<div class="dice {{classes}}">{{result}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
<div class="dice-roll daggerheart chat roll" data-action="expandRoll">
|
||||
<div class="dice-flavor">{{title}}</div>
|
||||
<div class="dice-result">
|
||||
{{#each roll as | resource index | }}
|
||||
<div class="dice-formula">{{resource.formula}}</div>
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
{{#each resource.parts}}
|
||||
<section class="tooltip-part">
|
||||
<div class="dice">
|
||||
<header class="part-header flexrow">
|
||||
<span class="part-formula">{{formula}}</span>
|
||||
<span class="part-total">{{total}}</span>
|
||||
</header>
|
||||
<ol class="dice-rolls">
|
||||
{{#each dice}}
|
||||
{{#each results}}
|
||||
<li class="roll die {{../dice}} min">{{result}}</li>
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
||||
</section>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="dice-total">{{resource.total}}</div>
|
||||
{{/each}}
|
||||
<div class="flexrow">
|
||||
<button class="healing-button"><span>{{localize "DAGGERHEART.UI.Chat.healingRoll.heal"}}</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
17
templates/ui/chat/parts/button-part.hbs
Normal file
17
templates/ui/chat/parts/button-part.hbs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<div class="roll-buttons">
|
||||
{{#if hasDamage}}
|
||||
{{#unless (empty damage)}}
|
||||
<button class="duality-action damage-button">{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamage"}}</button>
|
||||
{{else}}
|
||||
<button class="duality-action duality-action-damage">{{localize "DAGGERHEART.UI.Chat.attackRoll.rollDamage"}}</button>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#if hasHealing}}
|
||||
{{#unless (empty damage)}}
|
||||
<button class="duality-action damage-button">{{localize "DAGGERHEART.UI.Chat.healingRoll.applyHealing"}}</button>
|
||||
{{else}}
|
||||
<button class="duality-action duality-action-damage">{{localize "DAGGERHEART.UI.Chat.attackRoll.rollHealing"}}</button>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#if hasEffect}}<button class="duality-action-effect">{{localize "DAGGERHEART.UI.Chat.attackRoll.applyEffect"}}</button>{{/if}}
|
||||
</div>
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
<div class="dice-roll daggerheart chat roll" data-action="expandRoll">
|
||||
{{#unless noTitle}}<div class="dice-flavor">{{damage.title}}</div>{{/unless}}
|
||||
<div class="dice-result">
|
||||
{{#each damage.roll as | roll index | }}
|
||||
<div class="dice-flavor">{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')}}</div>
|
||||
<div class="dice-formula">{{roll.formula}}</div>
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
{{#each roll.parts}}
|
||||
<section class="tooltip-part">
|
||||
<div class="dice">
|
||||
<header class="part-header flexrow">
|
||||
<span class="part-formula">{{formula}}</span>
|
||||
<span class="part-total">{{total}}</span>
|
||||
</header>
|
||||
<ol class="dice-rolls">
|
||||
{{#each dice}}
|
||||
{{#each results}}
|
||||
<li class="roll die {{../dice}} min">{{result}}</li>
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
||||
{{#if modifierTotal}}<div class="duality-modifier">{{#if (gt modifierTotal 0)}}+{{/if}}{{modifierTotal}}</div>{{/if}}
|
||||
<div class="duality-result">{{localize "DAGGERHEART.GENERAL.total"}}: {{total}}</div>
|
||||
</section>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="dice-total">{{roll.total}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
69
templates/ui/chat/parts/damage-part.hbs
Normal file
69
templates/ui/chat/parts/damage-part.hbs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<div class="roll-part damage-section dice-roll" data-action="expandRoll">
|
||||
<div class="roll-part-header"><div><span>Damage</span></div></div>
|
||||
<div class="roll-part-extra on-reduced">
|
||||
<div class="wrapper">
|
||||
{{#each damage as | roll index | }}
|
||||
<div class="roll-formula">{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')}}: {{total}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="roll-part-content dice-result">
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
{{#each damage as | roll index | }}
|
||||
<fieldset>
|
||||
<legend>
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')}} <div class="roll-formula">{{localize "DAGGERHEART.GENERAL.total"}}: {{roll.total}}</div>
|
||||
</legend>
|
||||
{{#each roll.parts}}
|
||||
{{#if damageTypes.length}}
|
||||
<label class="roll-part-header"><span>
|
||||
{{#each damageTypes}}
|
||||
{{localize (concat 'DAGGERHEART.CONFIG.ArmorFeature.' this '.name')}}
|
||||
{{#unless @last}}/{{/unless}}
|
||||
{{/each}}
|
||||
<div class="roll-formula">{{total}}</div></span></label>
|
||||
{{/if}}
|
||||
<div class="roll-dice">
|
||||
{{#each dice}}
|
||||
{{#each results}}
|
||||
{{#unless discarded}}
|
||||
<div class="roll-die">
|
||||
<div class="dice {{../dice}}">{{result}}</div>
|
||||
</div>
|
||||
{{#unless @last}}
|
||||
<div class="roll-die">
|
||||
<div class="font-20">+</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{#unless @last}}
|
||||
<div class="roll-die">
|
||||
<div class="font-20">+</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{#if modifierTotal}}
|
||||
{{#if (gt modifierTotal 0)}}
|
||||
<div class="roll-die">
|
||||
<div class="font-20">+</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="roll-die">
|
||||
<div class="font-20">{{modifierTotal}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#unless dice.length}}
|
||||
<div class="roll-die">
|
||||
<div class="font-20">{{total}}</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</fieldset>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
102
templates/ui/chat/parts/roll-part.hbs
Normal file
102
templates/ui/chat/parts/roll-part.hbs
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<div class="roll-part roll-section">
|
||||
<div class="roll-part-content">
|
||||
<div class="roll-result-container">
|
||||
<span class="roll-result-value">{{roll.total}}</span>
|
||||
<span class="roll-result-desc">
|
||||
{{#if roll.isCritical}}
|
||||
{{localize "DAGGERHEART.GENERAL.criticalShort"}}
|
||||
{{else}}
|
||||
{{#if roll.result}}
|
||||
{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</span>
|
||||
</div>
|
||||
{{#if roll.difficulty}}<span class="roll-difficulty{{#unless roll.success}} is-miss{{/unless}}">difficulty {{roll.difficulty}}</span>{{/if}}
|
||||
</div>
|
||||
<div class="dice-roll" data-action="expandRoll">
|
||||
<div class="roll-part-header"><div><span>Formula</span></div></div>
|
||||
<div class="roll-part-content dice-result">
|
||||
<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">{{roll.hope.value}}</div>
|
||||
</div>
|
||||
<div class="roll-die">
|
||||
<label></label>
|
||||
<div class="font-20">+</div>
|
||||
</div>
|
||||
<div class="roll-die">
|
||||
<label>{{localize "DAGGERHEART.GENERAL.fear"}}</label>
|
||||
<div class="dice {{roll.fear.dice}} color-fear" style="--svg-folder: 'fear';">{{roll.fear.value}}</div>
|
||||
</div>
|
||||
{{#if roll.advantage.type}}
|
||||
<div class="roll-die">
|
||||
<label></label>
|
||||
<div class="font-20">+</div>
|
||||
</div>
|
||||
<div class="roll-die">
|
||||
{{#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">
|
||||
<label></label>
|
||||
<div class="font-20">+</div>
|
||||
</div>
|
||||
<div class="roll-die">
|
||||
<label>{{localize "DAGGERHEART.GENERAL.fear"}}</label>
|
||||
<div class="dice {{roll.rally.dice}}">{{roll.rally.value}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#each roll.extra}}
|
||||
<div class="roll-die">
|
||||
<label></label>
|
||||
<div class="font-20">+</div>
|
||||
</div>
|
||||
<div class="roll-die">
|
||||
<label></label>
|
||||
<div class="dice {{dice}}">{{value}}</div>
|
||||
</div>
|
||||
{{#unless @last}}
|
||||
<div class="roll-die">
|
||||
<label></label>
|
||||
<div class="font-20">+</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{else}}
|
||||
{{#each roll.dice}}
|
||||
{{#each results}}
|
||||
<div class="roll-die">
|
||||
<div class="dice {{../dice}}{{#if discarded}} discarded{{else}}{{#if (and (eq @index 0) ../../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>
|
||||
{{#unless (or @last (not discarded))}}
|
||||
<div class="roll-die">
|
||||
<div class="font-20">+</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{#unless @last}}
|
||||
<div class="roll-die">
|
||||
<div class="font-20">+</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="roll-formula">{{roll.formula}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
{{#if (gt currentTargets.length 0)}}
|
||||
<fieldset class="dice-roll daggerheart chat roll expanded" data-action="expandRoll">
|
||||
<legend class="dice-flavor">{{localize "DAGGERHEART.GENERAL.Target.plural"}}</legend>
|
||||
<div class="dice-result">
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
<div class="target-selection">
|
||||
<label class="button-target-selection{{#if @root.targetSelection}} target-selected{{/if}}" data-target-hit="true">{{localize "DAGGERHEART.UI.Chat.damageRoll.hitTarget"}}</label>
|
||||
<label class="button-target-selection{{#unless @root.targetSelection}} target-selected{{/unless}}">{{localize "DAGGERHEART.UI.Chat.damageRoll.selectedTarget"}}</label>
|
||||
</div>
|
||||
{{#if (and hasSave @root.targetSelection @root.hasHitTarget)}}
|
||||
<button class="inner-button inner-button-right roll-all-save-button">{{localize "DAGGERHEART.GENERAL.rollAll"}} <i class="fa-solid fa-shield"></i></button>
|
||||
{{/if}}
|
||||
<div class="target-section">
|
||||
{{#each currentTargets as |target|}}
|
||||
<div class="dice-total target-container {{#if target.hit}}hit{{else}}{{#if (not ../total.alternate)}}miss{{/if}}{{/if}}" data-token="{{target.id}}">
|
||||
<img src="{{target.img}}" />
|
||||
<div class="target-inner-container">
|
||||
{{#if (or ../directDamage (not @root.targetSelection))}}
|
||||
<div data-perm-id="{{target.actorId}}"><span>{{target.name}}</span></div>
|
||||
{{else}}
|
||||
{{#if target.hit}}{{localize "Hit"}}{{else}}{{#if (not ../total.alternate)}}{{localize "Miss"}}{{else}}?{{/if}}{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if (and ../hasSave target.hit @root.targetSelection)}}
|
||||
<button class="target-save-container{{#if target.saved.result includeZero=true}} is-rolled{{/if}}" data-perm-id="{{target.actorId}}">
|
||||
<i class="fa-solid {{#if target.saved.result includeZero=true}}{{#if target.saved.success}}fa-check{{else}}fa-xmark{{/if}}{{else}}fa-shield{{/if}}">
|
||||
</i>
|
||||
</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
55
templates/ui/chat/parts/target-part.hbs
Normal file
55
templates/ui/chat/parts/target-part.hbs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<div class="roll-part target-section dice-roll" data-action="expandRoll">
|
||||
<div class="roll-part-header"><div><span>Target</span></div></div>
|
||||
{{#if (and targets.length (or (or (gt targetShort.hit 0) (gt targetShort.miss 0)) (and hasSave pendingSaves)))}}
|
||||
<div class="roll-part-extra on-reduced">
|
||||
<div class="wrapper">
|
||||
{{#if (or (gt targetShort.hit 0) (gt targetShort.miss 0))}}
|
||||
<div class="target-hit-status">{{targetShort.hit}} {{#if (gt targetShort.hit 1)}}{{localize "DAGGERHEART.GENERAL.hit.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.hit.plural"}}{{/if}}</div>
|
||||
<div class="target-hit-status is-miss">{{targetShort.miss}} {{#if (gt targetShort.miss 1)}}{{localize "DAGGERHEART.GENERAL.miss.single"}}{{else}}{{localize "DAGGERHEART.GENERAL.miss.plural"}}{{/if}}</div>
|
||||
{{/if}}
|
||||
{{#if (and hasSave pendingSaves)}}<div class="target-pending-saves{{#if hasRoll}} is-absolute{{/if}}" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.pendingSaves"}}" data-tooltip-direction="UP"><i class="fa-solid fa-shield fa-lg fa-beat"></i></div>{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="roll-part-content dice-result">
|
||||
<div class="dice-tooltip">
|
||||
<div class="wrapper">
|
||||
{{#if targets.length}}
|
||||
<div class="target-selector">
|
||||
<div class="roll-part-header"><div></div></div>
|
||||
<div class="target-choice">
|
||||
<div class="button-target-selection{{#if targetSelection}} target-selected{{/if}}" data-target-hit="true">{{localize "DAGGERHEART.UI.Chat.damageRoll.hitTarget"}}</div>
|
||||
<div class="button-target-selection{{#unless targetSelection}} target-selected{{/unless}}">{{localize "DAGGERHEART.UI.Chat.damageRoll.currentTarget"}}</div>
|
||||
</div>
|
||||
<div class="roll-part-header"><div></div></div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (and hasSave @root.targetSelection pendingSaves)}}<div class="roll-part-extra roll-all-save-button">Reaction Roll All Targets<i class="fa-solid fa-shield fa-lg"></i></div>{{/if}}
|
||||
{{#each currentTargets}}
|
||||
<div class="roll-target" data-token="{{id}}">
|
||||
<img class="target-img" src="{{img}}">
|
||||
<div class="target-data">
|
||||
<div class="target-name" data-perm-id="{{actorId}}">{{name}}</div>
|
||||
{{#if (and ../targetSelection ../hasRoll)}}
|
||||
<div class="target-hit-status {{#if hit}}is-hit{{else}}is-miss{{/if}}">
|
||||
{{#if hit}}
|
||||
{{localize "DAGGERHEART.GENERAL.hit.single"}}
|
||||
{{else}}
|
||||
{{localize "DAGGERHEART.GENERAL.miss.single"}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if (and ../hasSave hit @root.targetSelection)}}
|
||||
<div class="target-save{{#if saved.result includeZero=true}} is-rolled{{/if}}" data-perm-id="{{actorId}}">
|
||||
<i class="fa-solid {{#if saved.result includeZero=true}}{{#if saved.success}}fa-check{{else}}fa-xmark{{/if}}{{else}}fa-shield{{/if}} fa-lg"></i>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
<i>{{localize "DAGGERHEART.GENERAL.noTarget"}}</i>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
8
templates/ui/chat/roll.hbs
Normal file
8
templates/ui/chat/roll.hbs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<div class="chat-roll">
|
||||
<div class="roll-part-header"><span>{{title}}</span></div>
|
||||
{{#if hasRoll}}{{> 'systems/daggerheart/templates/ui/chat/parts/roll-part.hbs'}}{{/if}}
|
||||
{{#if (and (not (empty damage)) (or hasDamage hasHealing))}}{{> 'systems/daggerheart/templates/ui/chat/parts/damage-part.hbs'}}{{/if}}
|
||||
{{#if hasTarget}}{{> 'systems/daggerheart/templates/ui/chat/parts/target-part.hbs'}}{{/if}}
|
||||
<div class="roll-part-header"><div></div></div>
|
||||
</div>
|
||||
{{> 'systems/daggerheart/templates/ui/chat/parts/button-part.hbs'}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue