mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Fixed Hope&Fear (#538)
This commit is contained in:
parent
7ead70b723
commit
6ef28abd03
3 changed files with 30 additions and 9 deletions
|
|
@ -223,7 +223,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
||||||
if (!confirmed) return;
|
if (!confirmed) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const target = event.target.closest('button[data-die-index]');
|
const target = event.target.closest('[data-die-index]');
|
||||||
let originalRoll_parsed = message.rolls.map(roll => JSON.parse(roll))[0];
|
let originalRoll_parsed = message.rolls.map(roll => JSON.parse(roll))[0];
|
||||||
const rollClass =
|
const rollClass =
|
||||||
game.system.api.dice[
|
game.system.api.dice[
|
||||||
|
|
|
||||||
|
|
@ -467,14 +467,25 @@
|
||||||
> :last-child {
|
> :last-child {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.roll-die {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.dice-rerolled {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
font-size: 10px;
|
||||||
|
z-index: 2;
|
||||||
|
filter: drop-shadow(0 0 3px black);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.roll-result-container {
|
.roll-result-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-family: 'Cinzel', sans-serif;
|
font-family: 'Cinzel', sans-serif;
|
||||||
|
|
@ -486,6 +497,10 @@
|
||||||
.roll-result-desc {
|
.roll-result-desc {
|
||||||
font-size: var(--font-size-16);
|
font-size: var(--font-size-16);
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
|
|
||||||
|
span {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,18 +4,18 @@
|
||||||
<span class="roll-result-value">{{roll.total}}</span>
|
<span class="roll-result-value">{{roll.total}}</span>
|
||||||
<span class="roll-result-desc">
|
<span class="roll-result-desc">
|
||||||
{{#if roll.isCritical}}
|
{{#if roll.isCritical}}
|
||||||
{{localize "DAGGERHEART.GENERAL.criticalShort"}}
|
<span>{{localize "DAGGERHEART.GENERAL.criticalShort"}}</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if roll.result}}
|
{{#if roll.result}}
|
||||||
{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}
|
<span>{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{#if roll.difficulty}}<span class="roll-difficulty{{#unless roll.success}} is-miss{{/unless}}">difficulty {{roll.difficulty}}</span>{{/if}}
|
{{#if roll.difficulty}}<span class="roll-difficulty{{#unless roll.success}} is-miss{{/unless}}">{{localize "DAGGERHEART.GENERAL.difficulty"}} {{roll.difficulty}}</span>{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="dice-roll" data-action="expandRoll">
|
<div class="dice-roll" data-action="expandRoll">
|
||||||
<div class="roll-part-header"><div><span>Formula</span></div></div>
|
<div class="roll-part-header"><div><span>{{localize "DAGGERHEART.GENERAL.formula"}}</span></div></div>
|
||||||
<div class="roll-part-content dice-result">
|
<div class="roll-part-content dice-result">
|
||||||
<div class="dice-tooltip">
|
<div class="dice-tooltip">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
@ -23,7 +23,10 @@
|
||||||
{{#if roll.hope}}
|
{{#if roll.hope}}
|
||||||
<div class="roll-die">
|
<div class="roll-die">
|
||||||
<label>{{localize "DAGGERHEART.GENERAL.hope"}}</label>
|
<label>{{localize "DAGGERHEART.GENERAL.hope"}}</label>
|
||||||
<div class="dice {{roll.hope.dice}} color-hope">{{roll.hope.value}}</div>
|
<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>
|
||||||
<div class="roll-die">
|
<div class="roll-die">
|
||||||
<label></label>
|
<label></label>
|
||||||
|
|
@ -31,7 +34,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="roll-die">
|
<div class="roll-die">
|
||||||
<label>{{localize "DAGGERHEART.GENERAL.fear"}}</label>
|
<label>{{localize "DAGGERHEART.GENERAL.fear"}}</label>
|
||||||
<div class="dice {{roll.fear.dice}} color-fear" style="--svg-folder: 'fear';">{{roll.fear.value}}</div>
|
<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>
|
</div>
|
||||||
{{#if roll.advantage.type}}
|
{{#if roll.advantage.type}}
|
||||||
<div class="roll-die">
|
<div class="roll-die">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue