Compare commits

..

No commits in common. "e529dd0f883c3bdd21eb6f7abd8913e7146779cb" and "58824d5bbff69bda2a3438631630e67de1b1f111" have entirely different histories.

12 changed files with 134 additions and 195 deletions

View file

@ -175,14 +175,14 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
this.disadvantage = advantage === -1; this.disadvantage = advantage === -1;
this.config.roll.advantage = this.config.roll.advantage === advantage ? 0 : advantage; this.config.roll.advantage = this.config.roll.advantage === advantage ? 0 : advantage;
if (this.config.roll.advantage === 0) return this.render();
const defaultFaces = if (this.config.roll.advantage === 1 && this.config.data.rules.roll.defaultAdvantageDice) {
this.config.roll.advantage === 1 const faces = Number.parseInt(this.config.data.rules.roll.defaultAdvantageDice);
? this.config.data.rules.roll.defaultAdvantageDice this.roll.advantageFaces = Number.isNaN(faces) ? this.roll.advantageFaces : faces;
: this.config.data.rules.roll.defaultDisadvantageDice; } else if (this.config.roll.advantage === -1 && this.config.data.rules.roll.defaultDisadvantageDice) {
const faces = Number.parseInt(defaultFaces); const faces = Number.parseInt(this.config.data.rules.roll.defaultDisadvantageDice);
this.roll.advantageFaces = Number.isNaN(faces) ? this.roll.advantageFaces : faces; this.roll.advantageFaces = Number.isNaN(faces) ? this.roll.advantageFaces : faces;
}
this.render(); this.render();
} }

View file

@ -148,22 +148,14 @@ export default class DualityRoll extends D20Roll {
} }
applyAdvantage() { applyAdvantage() {
const advDieClass = this.hasAdvantage if (this.hasAdvantage || this.hasDisadvantage) {
? game.system.api.dice.diceTypes.AdvantageDie const dieFaces = this.advantageFaces,
: this.hasDisadvantage advDie = new foundry.dice.terms.Die({ faces: dieFaces, number: this.advantageNumber });
? game.system.api.dice.diceTypes.DisadvantageDie if (this.advantageNumber > 1) advDie.modifiers = ['kh'];
: null; this.terms.push(
if (advDieClass) { new foundry.dice.terms.OperatorTerm({ operator: this.hasDisadvantage ? '-' : '+' }),
const advDie = new advDieClass({ faces: this.advantageFaces, number: this.advantageNumber }); advDie
if (this.terms.length < 4) { );
if (this.advantageNumber > 1) advDie.modifiers = ['kh'];
this.terms.push(
new foundry.dice.terms.OperatorTerm({ operator: this.hasDisadvantage ? '-' : '+' }),
advDie
);
} else {
this.terms[4] = advDie;
}
} }
if (this.rallyFaces) if (this.rallyFaces)
this.terms.push( this.terms.push(

View file

@ -1,5 +1,3 @@
@import '../../utils/mixin.less';
.theme-light .daggerheart.dialog.dh-style.views.tag-team-dialog { .theme-light .daggerheart.dialog.dh-style.views.tag-team-dialog {
.initialization-container .members-container .member-container { .initialization-container .members-container .member-container {
.member-name { .member-name {
@ -64,7 +62,17 @@
color: var(--color-text-primary); color: var(--color-text-primary);
text-shadow: 1px 1px 2px var(--shadow-color), 0 0 10px var(--shadow-color); text-shadow: 1px 1px 2px var(--shadow-color), 0 0 10px var(--shadow-color);
.smooth-gradient-ease-in-out(background-image, to bottom, var(--shadow-color), 100%);
// Basic "scrim" gradient
background-image: linear-gradient(
to top,
var(--shadow-color),
rgba(from var(--shadow-color) r g b / 0.834) 10.6%,
rgba(from var(--shadow-color) r g b / 0.541) 34%,
rgba(from var(--shadow-color) r g b / 0.382) 47%,
rgba(from var(--shadow-color) r g b / 0.194) 65%,
transparent 100%
);
} }
img { img {

View file

@ -34,7 +34,7 @@
.attribution-header-label { .attribution-header-label {
font-style: italic; font-style: italic;
font-family: @font-body; font-family: @font-body;
color: @color-text-subtle; color: light-dark(@chat-blue-bg, @beige-50);
} }
.tab.inventory { .tab.inventory {

View file

@ -11,7 +11,7 @@
.profile { .profile {
height: 235px; height: 235px;
cursor: pointer; cursor: pointer;
.smooth-gradient-ease-in-out(mask-image, to top, black, 2.25rem); mask-image: linear-gradient(0deg, transparent 0%, black 10%);
} }
.actor-name { .actor-name {
@ -24,16 +24,11 @@
margin-bottom: -30px; margin-bottom: -30px;
input[type='text'] { input[type='text'] {
backdrop-filter: none;
border: none;
font-family: @font-title;
font-size: var(--font-size-24); font-size: var(--font-size-24);
outline: 2px solid transparent; height: 32px;
box-shadow: unset;
text-shadow: 0 0 4px light-dark(white, @dark-80), 0 0 8px light-dark(white, @dark-80), 0 0 14px light-dark(white, @dark-80);
height: 2rem;
text-align: center; text-align: center;
border: 1px solid transparent;
outline: 2px solid transparent;
transition: all 0.3s ease; transition: all 0.3s ease;
&:hover { &:hover {
@ -248,7 +243,7 @@
.companion-navigation { .companion-navigation {
display: flex; display: flex;
gap: 8px; gap: 8px;
align-items: baseline; align-items: center;
width: 100%; width: 100%;
} }
} }

View file

@ -1,6 +1,5 @@
@import '../../../utils/colors.less'; @import '../../../utils/colors.less';
@import '../../../utils/fonts.less'; @import '../../../utils/fonts.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.environment { .application.sheet.daggerheart.actor.dh-style.environment {
.environment-header-sheet { .environment-header-sheet {
@ -11,83 +10,60 @@
.profile { .profile {
height: 235px; height: 235px;
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
cursor: pointer; cursor: pointer;
.smooth-gradient-ease-in-out(mask-image, to top, black, 3.5rem);
} }
.item-container { .item-container {
display: grid; display: flex;
grid-auto-flow: row;
grid-template-columns: 1fr min-content;
align-items: center; align-items: center;
position: relative; position: relative;
top: -36px; top: -45px;
gap: 0 var(--spacer-12); gap: 20px;
padding: 0 20px; padding: 0 20px;
margin-bottom: -26px; margin-bottom: -30px;
.item-name input[type='text'] { .item-info {
backdrop-filter: none;
border: none;
font-family: @font-title;
font-size: var(--font-size-32);
text-align: start;
transition: all 0.3s ease;
outline: 2px solid transparent;
box-shadow: none;
text-shadow: 0 0 4px light-dark(white, @dark-80), 0 0 8px light-dark(white, @dark-80), 0 0 14px light-dark(white, @dark-80);
padding-left: 0;
height: 2.625rem;
&:hover[type='text'],
&:focus[type='text'] {
box-shadow: none;
outline: 2px solid light-dark(@dark-blue, @golden);
}
}
.flexrow {
align-items: baseline;
grid-column: span 2;
}
.tags {
display: flex; display: flex;
gap: 10px; flex-direction: column;
padding-bottom: 0; gap: 8px;
flex: 0;
.tag { .tags {
display: flex; display: flex;
flex-direction: row; gap: 10px;
justify-content: center; padding-bottom: 0;
align-items: center;
padding: 3px 5px;
font-size: var(--font-size-12);
font: @font-body;
white-space: nowrap;
background: light-dark(@dark-15, @beige-15); .tag {
border: 1px solid light-dark(@dark, @beige); display: flex;
border-radius: 3px; flex-direction: row;
justify-content: center;
align-items: center;
padding: 3px 5px;
font-size: var(--font-size-12);
font: @font-body;
background: light-dark(@dark-15, @beige-15);
border: 1px solid light-dark(@dark, @beige);
border-radius: 3px;
}
.label {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
font-size: var(--font-size-12);
}
} }
.label { .attribution-header-label {
display: flex; text-align: left;
flex-direction: row; position: relative;
justify-content: center; top: 4px;
align-items: center; margin-bottom: -6px;
font-size: var(--font-size-12);
} }
} }
.attribution-header-label {
text-align: right;
position: relative;
}
.status-number { .status-number {
display: flex; display: flex;
align-items: center; align-items: center;
@ -105,7 +81,7 @@
font-size: 1.2rem; font-size: 1.2rem;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: light-dark(#e8e6e3, @dark-blue); background: light-dark(transparent, @dark-blue);
z-index: 2; z-index: 2;
&.armor-slots { &.armor-slots {
@ -117,7 +93,7 @@
.status-label { .status-label {
padding: 2px 10px; padding: 2px 10px;
width: 100%; width: 100%;
border-radius: 0 0 3px 3px; border-radius: 3px;
background: light-dark(@dark-blue, @golden); background: light-dark(@dark-blue, @golden);
h4 { h4 {
@ -129,23 +105,37 @@
} }
} }
} }
.item-name {
input[type='text'] {
font-size: var(--font-size-32);
height: 42px;
text-align: start;
transition: all 0.3s ease;
outline: 2px solid transparent;
border: 1px solid transparent;
&:hover[type='text'],
&:focus[type='text'] {
box-shadow: none;
outline: 2px solid light-dark(@dark-blue, @golden);
}
}
}
} }
.environment-info { .environment-info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: var(--spacer-8); gap: 12px;
padding: 10px 20px; padding: 10px 20px;
} }
.environment-navigation { .environment-navigation {
display: flex; display: flex;
gap: 20px; gap: 20px;
align-items: baseline; align-items: center;
padding: 0 20px; padding: 0 20px;
.tab-navigation {
margin-top: 0;
}
} }
} }
} }

View file

@ -5,6 +5,10 @@
.appTheme({ .appTheme({
&.environment { &.environment {
background-image: url('../assets/parchments/dh-parchment-dark.png'); background-image: url('../assets/parchments/dh-parchment-dark.png');
.attribution-header-label {
background-image: url('../assets/parchments/dh-parchment-dark.png');
}
} }
}, { }, {
&.environment { &.environment {

View file

@ -1,6 +1,5 @@
@import '../../../utils/colors.less'; @import '../../../utils/colors.less';
@import '../../../utils/fonts.less'; @import '../../../utils/fonts.less';
@import '../../../utils/mixin.less';
.party-header-sheet { .party-header-sheet {
display: flex; display: flex;
@ -10,30 +9,26 @@
.profile { .profile {
height: 235px; height: 235px;
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
cursor: pointer; cursor: pointer;
.smooth-gradient-ease-in-out(mask-image, to top, black, 3.5rem);
} }
.item-container { .item-container {
margin-top: -2rem; .item-name {
z-index: 1; padding: 0 20px;
input.item-name[type='text'] { input[type='text'] {
backdrop-filter: none; font-size: 32px;
border: none; height: 42px;
font-family: @font-title; text-align: center;
font-size: var(--font-size-32); transition: all 0.3s ease;
outline: 2px solid transparent; outline: 2px solid transparent;
box-shadow: unset; border: 1px solid transparent;
text-shadow: 0 0 4px light-dark(white, @dark-80), 0 0 8px light-dark(white, @dark-80), 0 0 14px light-dark(white, @dark-80);
text-align: center; &:hover[type='text'],
transition: all 0.3s ease; &:focus[type='text'] {
width: calc(100% - 40px); box-shadow: none;
height: 2.625rem; outline: 2px solid light-dark(@dark-blue, @golden);
}
&:hover[type='text'],
&:focus[type='text'] {
outline: 2px solid light-dark(@dark-blue, @golden);
} }
} }

View file

@ -83,8 +83,6 @@
--gradient-stress: linear-gradient(15deg, rgb(130, 59, 1) 0%, rgb(252, 142, 69) 65%, rgb(190, 0, 0) 100%); --gradient-stress: linear-gradient(15deg, rgb(130, 59, 1) 0%, rgb(252, 142, 69) 65%, rgb(190, 0, 0) 100%);
--primary-color-fear: rgba(9, 71, 179, 0.75); --primary-color-fear: rgba(9, 71, 179, 0.75);
--dh-color-text-subtle: light-dark(#555, #a29086);
} }
@primary-blue: var(--primary-blue, #1488cc); @primary-blue: var(--primary-blue, #1488cc);
@ -192,5 +190,3 @@
box-shadow: 0 0 2px 2px @dark-blue; box-shadow: 0 0 2px 2px @dark-blue;
} }
} }
@color-text-subtle: var(--dh-color-text-subtle);

View file

@ -114,48 +114,3 @@
font-family: @font-body; font-family: @font-body;
} }
} }
// A simple ease-out mask
.smooth-gradient-ease-out(@param, @to, @destination, @length) {
@{param}+: linear-gradient(
@to,
transparent 0%,
rgb(from @destination r g b / ~"calc(alpha * 0.013)") calc(0.008 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.049)") calc(0.029 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.104)") calc(0.064 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.259)") calc(0.166 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.45)") calc(0.304 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.741)") calc(0.554 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.825)") calc(0.644 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.896)") calc(0.735 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.951)") calc(0.825 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.987)") calc(0.914 * @length),
@destination @length
);
}
/**
* A simple ease in and out mask.
* @param - the parameter to add to
* @param - direction, such as "to top"
* @destination - the color at the destination. The origin is always transparent
* @length - the value at the destination
*/
.smooth-gradient-ease-in-out(@param, @to, @destination, @length: 100%) {
@{param}+: linear-gradient(
@to,
transparent 0%,
rgb(from @destination r g b / ~"calc(alpha * 0.013)") calc(0.081 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.049)") calc(0.155 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.104)") calc(0.225 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.259)") calc(0.353 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.45)") calc(0.471 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.741)") calc(0.647 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.825)") calc(0.71 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.896)") calc(0.775 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.951)") calc(0.845 * @length),
rgb(from @destination r g b / ~"calc(alpha * 0.987)") calc(0.914 * @length),
@destination @length
);
}

View file

@ -1,7 +1,28 @@
<header class='environment-header-sheet'> <header class='environment-header-sheet'>
<img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' /> <img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' />
<div class='item-container'> <div class='item-container'>
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1> <div class="item-info">
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
<div class="flexcol">
<div class="tags">
<div class="tag">
<span>
{{localize (concat 'DAGGERHEART.GENERAL.Tiers.' source.system.tier)}}
</span>
</div>
{{#if source.system.type}}
<div class="tag">
<span>
{{localize (concat 'DAGGERHEART.CONFIG.EnvironmentType.' source.system.type '.label')}}
</span>
</div>
{{/if}}
</div>
{{#if (and showAttribution document.system.attributionLabel)}}
<label class="attribution-header-label">{{document.system.attributionLabel}}</label>
{{/if}}
</div>
</div>
<div class="status-number"> <div class="status-number">
<div class='status-value armor-slots'> <div class='status-value armor-slots'>
{{#if source.system.difficulty}} {{#if source.system.difficulty}}
@ -14,25 +35,6 @@
<h4>{{localize "DAGGERHEART.GENERAL.difficulty"}}</h4> <h4>{{localize "DAGGERHEART.GENERAL.difficulty"}}</h4>
</div> </div>
</div> </div>
<div class="flexrow">
<div class="tags">
<div class="tag">
<span>
{{localize (concat 'DAGGERHEART.GENERAL.Tiers.' source.system.tier)}}
</span>
</div>
{{#if source.system.type}}
<div class="tag">
<span>
{{localize (concat 'DAGGERHEART.CONFIG.EnvironmentType.' source.system.type '.label')}}
</span>
</div>
{{/if}}
</div>
{{#if (and showAttribution document.system.attributionLabel)}}
<label class="attribution-header-label">{{document.system.attributionLabel}}</label>
{{/if}}
</div>
</div> </div>
<line-div></line-div> <line-div></line-div>
<div class="environment-info"> <div class="environment-info">

View file

@ -2,7 +2,9 @@
<img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' /> <img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' />
<div class='item-container'> <div class='item-container'>
<div class="item-info"> <div class="item-info">
<input class="item-name" type='text' name='name' value='{{source.name}}' autocomplete="off" spellcheck="false"/> <h1 class='item-name'>
<input type='text' name='name' value='{{source.name}}' autocomplete="off" spellcheck="false"/>
</h1>
</div> </div>
</div> </div>
</header> </header>