Feature/200 beastform (#255)

* Temp

* Dialog setup

* Fixed basic beastform

* Reworked beastform to hold it's data entirely in the beastformEffect

* UpdateActorTokens fix

* Removed hardcoded tierlimit on beastform

* PR fixes
This commit is contained in:
WBHarry 2025-07-04 02:02:14 +02:00 committed by GitHub
parent c4448226e0
commit d071fadf7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 1102 additions and 298 deletions

View file

@ -227,7 +227,7 @@ div.daggerheart.views.multiclass {
filter: invert(0%) sepia(100%) saturate(0%) hue-rotate(21deg) brightness(17%) contrast(103%);
}
}
#roll-selection-costSelection footer {
display: none;
}
@ -372,7 +372,6 @@ div.daggerheart.views.multiclass {
}
}
.roll-dialog-experience-container {
display: flex;
align-items: flex-start;
@ -509,6 +508,34 @@ div.daggerheart.views.multiclass {
}
}
.hint-group {
display: flex;
flex-direction: column;
align-items: end;
.form-fields {
width: 100%;
display: flex;
align-items: center;
label {
flex: 1;
}
input,
select {
flex: 3;
}
}
.hint {
margin: 4px 0 0 0;
font-size: 12px;
font-style: italic;
opacity: 0.6;
}
}
.data-form-array {
border: 1px solid var(--color-fieldset-border);
padding: 0.5rem;

View file

@ -2329,6 +2329,29 @@ div.daggerheart.views.multiclass {
width: 1.5rem;
height: 1.5rem;
}
.daggerheart.views.action .action-category .action-category-data .hint-group {
display: flex;
flex-direction: column;
align-items: end;
}
.daggerheart.views.action .action-category .action-category-data .hint-group .form-fields {
width: 100%;
display: flex;
align-items: center;
}
.daggerheart.views.action .action-category .action-category-data .hint-group .form-fields label {
flex: 1;
}
.daggerheart.views.action .action-category .action-category-data .hint-group .form-fields input,
.daggerheart.views.action .action-category .action-category-data .hint-group .form-fields select {
flex: 3;
}
.daggerheart.views.action .action-category .action-category-data .hint-group .hint {
margin: 4px 0 0 0;
font-size: 12px;
font-style: italic;
opacity: 0.6;
}
.daggerheart.views.action .action-category .action-category-data .data-form-array {
border: 1px solid var(--color-fieldset-border);
padding: 0.5rem;
@ -5003,6 +5026,53 @@ div.daggerheart.views.multiclass {
color: light-dark(#18162e50, #efe6d850);
font-family: 'Montserrat', sans-serif;
}
.theme-light .application.daggerheart.dh-style.views.beastform-selection .beastforms-container .beastforms-tier .beastform-container .beastform-title {
background-image: url('../assets/parchments/dh-parchment-dark.png');
}
.application.daggerheart.dh-style.views.beastform-selection .beastforms-container {
display: flex;
flex-direction: column;
gap: 4px;
}
.application.daggerheart.dh-style.views.beastform-selection .beastforms-container .beastforms-tier {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
gap: 4px;
}
.application.daggerheart.dh-style.views.beastform-selection .beastforms-container .beastforms-tier .beastform-container {
position: relative;
display: flex;
justify-content: center;
border: 1px solid light-dark(#18162e, #f3c267);
border-radius: 6px;
cursor: pointer;
}
.application.daggerheart.dh-style.views.beastform-selection .beastforms-container .beastforms-tier .beastform-container.inactive {
opacity: 0.4;
}
.application.daggerheart.dh-style.views.beastform-selection .beastforms-container .beastforms-tier .beastform-container img {
width: 100%;
border-radius: 6px;
}
.application.daggerheart.dh-style.views.beastform-selection .beastforms-container .beastforms-tier .beastform-container .beastform-title {
position: absolute;
top: 4px;
display: flex;
flex-wrap: wrap;
font-size: 16px;
margin: 0 4px;
border: 1px solid light-dark(#18162e, #f3c267);
border-radius: 6px;
color: light-dark(#efe6d8, #222);
background-image: url('../assets/parchments/dh-parchment-light.png');
}
.application.daggerheart.dh-style.views.beastform-selection footer {
margin-top: 8px;
display: flex;
}
.application.daggerheart.dh-style.views.beastform-selection footer button {
flex: 1;
}
.application.sheet.daggerheart.actor.dh-style.companion .companion-header-sheet {
display: flex;
flex-direction: column;
@ -5418,6 +5488,20 @@ div.daggerheart.views.multiclass {
font-family: 'Montserrat', sans-serif;
opacity: 0.8;
}
/**
* Applies theme-specific styles.
* @param {Rules} @darkRules - Styles to apply when `.theme-dark` is present
* @param {Rules} @lightRules - Styles to apply when `.theme-light` is present
*/
.themed.theme-dark .application.sheet.dh-style,
.themed.theme-dark.application.sheet.dh-style {
background: rgba(24, 22, 46, 0.33);
backdrop-filter: blur(9px);
}
.themed.theme-light .application.sheet.dh-style,
.themed.theme-light.application.sheet.dh-style {
background: url('../assets/parchments/dh-parchment-light.png') no-repeat center;
}
.application.sheet.dh-style {
border-radius: 10px;
}
@ -5463,15 +5547,6 @@ div.daggerheart.views.multiclass {
.application.sheet.dh-style:not(.minimized) .window-content {
opacity: 1;
}
.themed.theme-dark .application.sheet.dh-style,
.themed.theme-dark.application.sheet.dh-style {
background: rgba(24, 22, 46, 0.33);
backdrop-filter: blur(9px);
}
.themed.theme-light .application.sheet.dh-style,
.themed.theme-light.application.sheet.dh-style {
background: url('../assets/parchments/dh-parchment-light.png') no-repeat center;
}
.themed.theme-dark .application.sheet.dh-style.dialog,
.themed.theme-dark.application.sheet.dh-style.dialog {
background-image: url('../assets/parchments/dh-parchment-dark.png');
@ -5973,6 +6048,44 @@ div.daggerheart.views.multiclass {
justify-content: center;
gap: 10px;
}
.sheet.daggerheart.dh-style .tab.features .features-list {
display: flex;
flex-direction: column;
list-style: none;
padding: 0;
margin: 0;
width: 100%;
gap: 5px;
}
.sheet.daggerheart.dh-style .tab.features .features-list .feature-item {
display: grid;
align-items: center;
grid-template-columns: 1fr 4fr 1fr;
cursor: pointer;
}
.sheet.daggerheart.dh-style .tab.features .features-list .feature-item img {
height: 40px;
width: 40px;
object-fit: cover;
border-radius: 3px;
}
.sheet.daggerheart.dh-style .tab.features .features-list .feature-item h4 {
font-family: 'Montserrat', sans-serif;
font-weight: lighter;
color: #efe6d8;
}
.sheet.daggerheart.dh-style .tab.features .features-list .feature-item .image {
height: 40px;
width: 40px;
object-fit: cover;
border-radius: 6px;
border: none;
}
.sheet.daggerheart.dh-style .tab.features .features-list .feature-item .controls {
display: flex;
justify-content: center;
gap: 10px;
}
.sheet.daggerheart.dh-style .tab.effects .effects-list {
display: flex;
flex-direction: column;

View file

@ -40,6 +40,8 @@
@import './less/applications/environment-settings/actions.less';
@import './less/applications/environment-settings/adversaries.less';
@import './less/applications//beastform.less';
@import './less/actors/companion/header.less';
@import './less/actors/companion/details.less';
@import './less/actors/companion/sheet.less';
@ -60,13 +62,14 @@
@import './less/global/tab-navigation.less';
@import './less/global/tab-form-footer.less';
@import './less/global/tab-actions.less';
@import './less/global/tab-features.less';
@import './less/global/tab-effects.less';
@import './less/global/item-header.less';
@import './less/global/feature-section.less';
@import './less/global/inventory-item.less';
@import './less/global/inventory-fieldset-items.less';
@import './less/global/prose-mirror.less';
@import "./less/global/filter-menu.less";
@import './less/global/filter-menu.less';
@import '../node_modules/@yaireo/tagify/dist/tagify.css';

View file

@ -1,197 +1,197 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.companion {
.companion-header-sheet {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
.profile {
height: 235px;
width: 100%;
object-fit: cover;
cursor: pointer;
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
}
.actor-name {
display: flex;
align-items: center;
position: relative;
top: -30px;
gap: 20px;
padding: 0 20px;
margin-bottom: -30px;
input[type='text'] {
font-size: 24px;
height: 32px;
text-align: center;
border: 1px solid transparent;
outline: 2px solid transparent;
transition: all 0.3s ease;
&:hover {
outline: 2px solid light-dark(@dark, @golden);
}
}
}
.status-section {
display: flex;
gap: 5px;
justify-content: center;
.status-number {
justify-items: center;
.status-value {
position: relative;
display: flex;
width: 50px;
height: 40px;
border: 1px solid light-dark(@dark-blue, @golden);
border-bottom: none;
border-radius: 6px 6px 0 0;
padding: 0 6px;
font-size: 1.5rem;
align-items: center;
justify-content: center;
background: light-dark(transparent, @dark-blue);
z-index: 2;
&.armor-slots {
width: 80px;
height: 30px;
}
}
.status-label {
padding: 2px 10px;
width: 100%;
border-radius: 3px;
background: light-dark(@dark-blue, @golden);
h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
font-size: 12px;
color: light-dark(@beige, @dark-blue);
}
}
}
.status-bar {
position: relative;
width: 100px;
height: 40px;
justify-items: center;
.status-label {
position: relative;
top: 40px;
height: 22px;
width: 79px;
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
background: light-dark(@dark-blue, @golden);
h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
color: light-dark(@beige, @dark-blue);
}
}
.status-value {
position: absolute;
display: flex;
padding: 0 6px;
font-size: 1.5rem;
align-items: center;
width: 100px;
height: 40px;
justify-content: center;
text-align: center;
z-index: 2;
color: @beige;
input[type='number'] {
background: transparent;
font-size: 1.5rem;
width: 40px;
height: 30px;
text-align: center;
border: none;
outline: 2px solid transparent;
color: @beige;
&.bar-input {
padding: 0;
color: @beige;
backdrop-filter: none;
background: transparent;
transition: all 0.3s ease;
&:hover,
&:focus {
background: @semi-transparent-dark-blue;
backdrop-filter: blur(9.5px);
}
}
}
.bar-label {
width: 40px;
}
}
.progress-bar {
position: absolute;
appearance: none;
width: 100px;
height: 40px;
border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 6px;
z-index: 1;
background: @dark-blue;
&::-webkit-progress-bar {
border: none;
background: @dark-blue;
border-radius: 6px;
}
&::-webkit-progress-value {
background: @gradient-hp;
border-radius: 6px;
}
&.stress-color::-webkit-progress-value {
background: @gradient-stress;
border-radius: 6px;
}
&::-moz-progress-bar {
background: @gradient-hp;
border-radius: 6px;
}
&.stress-color::-moz-progress-bar {
background: @gradient-stress;
border-radius: 6px;
}
}
}
.level-up-label {
font-size: 24px;
padding-top: 8px;
}
}
.companion-navigation {
display: flex;
gap: 8px;
align-items: center;
width: 100%;
}
}
}
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.companion {
.companion-header-sheet {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
.profile {
height: 235px;
width: 100%;
object-fit: cover;
cursor: pointer;
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
}
.actor-name {
display: flex;
align-items: center;
position: relative;
top: -30px;
gap: 20px;
padding: 0 20px;
margin-bottom: -30px;
input[type='text'] {
font-size: 24px;
height: 32px;
text-align: center;
border: 1px solid transparent;
outline: 2px solid transparent;
transition: all 0.3s ease;
&:hover {
outline: 2px solid light-dark(@dark, @golden);
}
}
}
.status-section {
display: flex;
gap: 5px;
justify-content: center;
.status-number {
justify-items: center;
.status-value {
position: relative;
display: flex;
width: 50px;
height: 40px;
border: 1px solid light-dark(@dark-blue, @golden);
border-bottom: none;
border-radius: 6px 6px 0 0;
padding: 0 6px;
font-size: 1.5rem;
align-items: center;
justify-content: center;
background: light-dark(transparent, @dark-blue);
z-index: 2;
&.armor-slots {
width: 80px;
height: 30px;
}
}
.status-label {
padding: 2px 10px;
width: 100%;
border-radius: 3px;
background: light-dark(@dark-blue, @golden);
h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
font-size: 12px;
color: light-dark(@beige, @dark-blue);
}
}
}
.status-bar {
position: relative;
width: 100px;
height: 40px;
justify-items: center;
.status-label {
position: relative;
top: 40px;
height: 22px;
width: 79px;
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
background: light-dark(@dark-blue, @golden);
h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
color: light-dark(@beige, @dark-blue);
}
}
.status-value {
position: absolute;
display: flex;
padding: 0 6px;
font-size: 1.5rem;
align-items: center;
width: 100px;
height: 40px;
justify-content: center;
text-align: center;
z-index: 2;
color: @beige;
input[type='number'] {
background: transparent;
font-size: 1.5rem;
width: 40px;
height: 30px;
text-align: center;
border: none;
outline: 2px solid transparent;
color: @beige;
&.bar-input {
padding: 0;
color: @beige;
backdrop-filter: none;
background: transparent;
transition: all 0.3s ease;
&:hover,
&:focus {
background: @semi-transparent-dark-blue;
backdrop-filter: blur(9.5px);
}
}
}
.bar-label {
width: 40px;
}
}
.progress-bar {
position: absolute;
appearance: none;
width: 100px;
height: 40px;
border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 6px;
z-index: 1;
background: @dark-blue;
&::-webkit-progress-bar {
border: none;
background: @dark-blue;
border-radius: 6px;
}
&::-webkit-progress-value {
background: @gradient-hp;
border-radius: 6px;
}
&.stress-color::-webkit-progress-value {
background: @gradient-stress;
border-radius: 6px;
}
&::-moz-progress-bar {
background: @gradient-hp;
border-radius: 6px;
}
&.stress-color::-moz-progress-bar {
background: @gradient-stress;
border-radius: 6px;
}
}
}
.level-up-label {
font-size: 24px;
padding-top: 8px;
}
}
.companion-navigation {
display: flex;
gap: 8px;
align-items: center;
width: 100%;
}
}
}

View file

@ -1,4 +1,3 @@
// Theme header backgrounds
.appTheme({
@ -12,7 +11,6 @@
});
.application.sheet.daggerheart.actor.dh-style.companion {
// .profile {
// height: 80px;
// width: 80px;

View file

@ -12,7 +12,6 @@
});
.application.sheet.daggerheart.actor.dh-style.environment {
.tab {
max-height: 300px;
overflow-y: auto;

View file

@ -0,0 +1,59 @@
.theme-light .application.daggerheart.dh-style.views.beastform-selection {
.beastforms-container .beastforms-tier .beastform-container .beastform-title {
background-image: url('../assets/parchments/dh-parchment-dark.png');
}
}
.application.daggerheart.dh-style.views.beastform-selection {
.beastforms-container {
display: flex;
flex-direction: column;
gap: 4px;
.beastforms-tier {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
gap: 4px;
.beastform-container {
position: relative;
display: flex;
justify-content: center;
border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 6px;
cursor: pointer;
&.inactive {
opacity: 0.4;
}
img {
width: 100%;
border-radius: 6px;
}
.beastform-title {
position: absolute;
top: 4px;
display: flex;
flex-wrap: wrap;
font-size: 16px;
margin: 0 4px;
border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 6px;
color: light-dark(@beige, @dark);
background-image: url('../assets/parchments/dh-parchment-light.png');
}
}
}
}
footer {
margin-top: 8px;
display: flex;
button {
flex: 1;
}
}
}

View file

@ -1,43 +1,43 @@
@import '../utils/colors.less';
@import '../utils/fonts.less';
.appTheme({
&.dialog {
background-image: url('../assets/parchments/dh-parchment-dark.png');
background-repeat: no-repeat;
background-position: center;
}
}, {
&.dialog {
background-image: url('../assets/parchments/dh-parchment-light.png');
background-repeat: no-repeat;
background-position: center;
}
});
.application.dialog.dh-style {
border: none;
.window-header {
background: transparent;
border-bottom: none;
color: light-dark(@dark-blue, @beige);
h1 {
color: light-dark(@dark-blue, @beige);
font-family: @font-body;
}
button {
color: light-dark(@dark-blue, @beige);
background: light-dark(transparent, @deep-black);
border: 1px solid light-dark(@dark-blue, transparent);
padding: 0;
&:hover {
border: 1px solid light-dark(@dark-blue, @golden);
color: light-dark(@dark-blue, @golden);
}
}
}
}
@import '../utils/colors.less';
@import '../utils/fonts.less';
.appTheme({
&.dialog {
background-image: url('../assets/parchments/dh-parchment-dark.png');
background-repeat: no-repeat;
background-position: center;
}
}, {
&.dialog {
background-image: url('../assets/parchments/dh-parchment-light.png');
background-repeat: no-repeat;
background-position: center;
}
});
.application.dialog.dh-style {
border: none;
.window-header {
background: transparent;
border-bottom: none;
color: light-dark(@dark-blue, @beige);
h1 {
color: light-dark(@dark-blue, @beige);
font-family: @font-body;
}
button {
color: light-dark(@dark-blue, @beige);
background: light-dark(transparent, @deep-black);
border: 1px solid light-dark(@dark-blue, transparent);
padding: 0;
&:hover {
border: 1px solid light-dark(@dark-blue, @golden);
color: light-dark(@dark-blue, @golden);
}
}
}
}

View file

@ -0,0 +1,50 @@
@import '../utils/colors.less';
@import '../utils/fonts.less';
.sheet.daggerheart.dh-style {
.tab.features {
.features-list {
display: flex;
flex-direction: column;
list-style: none;
padding: 0;
margin: 0;
width: 100%;
gap: 5px;
.feature-item {
display: grid;
align-items: center;
grid-template-columns: 1fr 4fr 1fr;
cursor: pointer;
img {
height: 40px;
width: 40px;
object-fit: cover;
border-radius: 3px;
}
h4 {
font-family: @font-body;
font-weight: lighter;
color: @beige;
}
.image {
height: 40px;
width: 40px;
object-fit: cover;
border-radius: 6px;
border: none;
}
.controls {
display: flex;
justify-content: center;
gap: 10px;
}
}
}
}
}

View file

@ -4,15 +4,15 @@
* @param {Rules} @lightRules - Styles to apply when `.theme-light` is present
*/
.appTheme(@darkRules, @lightRules) {
.themed {
&.theme-dark .application.sheet.dh-style,
&.theme-dark.application.sheet.dh-style {
@darkRules();
}
.themed {
&.theme-dark .application.sheet.dh-style,
&.theme-dark.application.sheet.dh-style {
@darkRules();
}
&.theme-light .application.sheet.dh-style,
&.theme-light.application.sheet.dh-style {
@lightRules();
&.theme-light .application.sheet.dh-style,
&.theme-light.application.sheet.dh-style {
@lightRules();
}
}
}
}