Add spells rolls and enhance CSS styling

This commit is contained in:
2026-01-12 10:45:20 +01:00
parent e75824cd20
commit 0bc6b43ffe
29 changed files with 2428 additions and 878 deletions
+398 -24
View File
@@ -1,33 +1,406 @@
&.fortune {
img {
border: 0px;
// Chat Message Card Styles - Applied globally for chat messages
.chat-log .message-content {
.prismrpg-chat-card {
font-family: var(--font-primary);
border-radius: 6px;
overflow: hidden;
background: linear-gradient(135deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.02) 100%);
border: 1px solid rgba(0,0,0,0.2);
margin: 2px 0;
.chat-header {
display: flex;
gap: 8px;
padding: 6px 8px;
background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
border-bottom: 1px solid #444;
.chat-portrait {
flex-shrink: 0;
width: 36px;
height: 36px;
border-radius: 50%;
overflow: hidden;
border: 2px solid #666;
box-shadow: 0 1px 4px rgba(0,0,0,0.4);
img {
width: 100%;
height: 100%;
object-fit: cover;
}
.intro-chat {
border-radius: 20px;
display: flex;
flex-direction: row;
.intro-img {
padding: 5px;
width: 80px;
align-self: center;
}
.chat-title {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
gap: 2px;
.actor-name {
font-weight: bold;
font-size: 0.95em;
color: #e0e0e0;
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
line-height: 1.1;
}
.roll-name {
font-size: 0.8em;
color: #aaa;
line-height: 1.1;
}
.roll-type-badge {
display: inline-block;
padding: 1px 6px;
border-radius: 10px;
font-size: 0.7em;
font-weight: bold;
text-transform: uppercase;
margin-top: 2px;
width: fit-content;
&.attack {
background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
color: white;
box-shadow: 0 1px 2px rgba(196, 30, 58, 0.4);
}
.intro-right {
}
.bad-result {
color: #ff6b6b;
font-size: 0.75em;
margin-top: 1px;
}
}
}
.chat-content {
padding: 6px 8px;
display: flex;
flex-direction: column;
gap: 6px;
.weapon-info-card,
.spell-info-card {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 4px;
padding: 6px;
.weapon-header,
.spell-header {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 4px;
padding-bottom: 4px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
.weapon-name,
.spell-name {
font-size: 0.95em;
color: #d4af37;
}
.badge {
padding: 1px 4px;
border-radius: 3px;
font-size: 0.65em;
font-weight: bold;
text-transform: uppercase;
&.implement {
background: #4a5cf7;
color: white;
}
&.upcast {
background: #9b59b6;
color: white;
}
}
.attribute-used {
font-size: 0.75em;
color: #999;
font-style: italic;
}
}
.weapon-stats,
.spell-stats {
display: flex;
flex-wrap: wrap;
gap: 4px;
.stat-item {
display: flex;
flex-direction: column;
.introText {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.2);
width: 210px;
text-align: center;
align-items: center;
gap: 3px;
padding: 2px 6px;
background: rgba(0, 0, 0, 0.2);
border-radius: 3px;
font-size: 0.75em;
i {
color: #888;
font-size: 0.85em;
}
&.apc {
background: rgba(255, 193, 7, 0.2);
border: 1px solid rgba(255, 193, 7, 0.4);
i { color: #ffc107; }
}
&.damage {
background: rgba(244, 67, 54, 0.2);
border: 1px solid rgba(244, 67, 54, 0.4);
i { color: #f44336; }
}
&.range {
background: rgba(76, 175, 80, 0.2);
border: 1px solid rgba(76, 175, 80, 0.4);
i { color: #4caf50; }
}
&.reload {
background: rgba(255, 152, 0, 0.2);
border: 1px solid rgba(255, 152, 0, 0.4);
i { color: #ff9800; }
}
&.mana {
background: rgba(33, 150, 243, 0.2);
border: 1px solid rgba(33, 150, 243, 0.4);
i { color: #2196f3; }
}
&.upkeep {
background: rgba(156, 39, 176, 0.2);
border: 1px solid rgba(156, 39, 176, 0.4);
i { color: #9c27b0; }
}
&.characteristic {
background: rgba(103, 58, 183, 0.2);
border: 1px solid rgba(103, 58, 183, 0.4);
i { color: #673ab7; }
}
}
}
.button.control, .fortune-accepted {
display: flex;
justify-content: center;
align-items: center;
font-size: calc(var(--font-size-standard) * 1.3);
}
.special-badge {
display: inline-block;
padding: 2px 6px;
background: linear-gradient(135deg, #ff6b6b 0%, #c92a2a 100%);
color: white;
border-radius: 3px;
font-size: 0.75em;
font-weight: bold;
width: fit-content;
box-shadow: 0 1px 2px rgba(255, 107, 107, 0.4);
}
.aiming-info {
display: flex;
align-items: center;
gap: 4px;
padding: 3px 6px;
background: rgba(76, 175, 80, 0.1);
border-left: 2px solid #4caf50;
border-radius: 3px;
font-size: 0.8em;
i {
color: #4caf50;
}
}
.formula-display {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 8px;
background: rgba(0, 0, 0, 0.3);
border-radius: 3px;
font-family: 'Courier New', monospace;
font-size: 0.85em;
border: 1px dashed rgba(255, 255, 255, 0.2);
i {
color: #888;
}
}
.modifier-info {
display: flex;
gap: 8px;
padding: 3px 6px;
background: rgba(255, 255, 255, 0.05);
border-radius: 3px;
font-size: 0.75em;
span {
color: #aaa;
}
}
.dice-breakdown {
display: flex;
align-items: center;
gap: 4px;
padding: 2px 6px;
background: rgba(255, 255, 255, 0.05);
border-radius: 3px;
font-size: 0.8em;
i {
color: #888;
}
}
.roll-damage-button {
padding: 4px 10px;
background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
color: white;
border: none;
border-radius: 4px;
font-weight: bold;
font-size: 0.85em;
cursor: pointer;
display: flex;
align-items: center;
gap: 6px;
justify-content: center;
transition: all 0.2s;
box-shadow: 0 1px 3px rgba(196, 30, 58, 0.4);
margin-top: 4px;
&:hover {
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(196, 30, 58, 0.6);
}
i {
font-size: 1em;
}
}
}
.roll-result {
padding: 8px;
background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
border-top: 1px solid rgba(212, 175, 55, 0.5);
.result-total {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
.total-label {
font-size: 0.85em;
color: #aaa;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.total-value {
font-size: 1.8em;
font-weight: bold;
color: #d4af37;
text-shadow: 0 1px 3px rgba(212, 175, 55, 0.5);
line-height: 1;
}
}
.d30-result {
margin-top: 4px;
padding: 3px 6px;
background: rgba(0, 0, 0, 0.2);
border-radius: 3px;
font-size: 0.8em;
text-align: center;
i {
color: #d4af37;
margin-right: 4px;
}
}
}
.result-badge {
padding: 6px;
text-align: center;
font-size: 0.9em;
font-weight: bold;
border-top: 1px solid;
&.success {
background: linear-gradient(135deg, rgba(76, 175, 80, 0.3) 0%, rgba(76, 175, 80, 0.1) 100%);
border-color: #4caf50;
color: #4caf50;
}
&.failure {
background: linear-gradient(135deg, rgba(244, 67, 54, 0.3) 0%, rgba(244, 67, 54, 0.1) 100%);
border-color: #f44336;
color: #f44336;
}
i {
margin-right: 6px;
font-size: 1em;
}
}
.damage-info {
padding: 6px;
background: rgba(255, 255, 255, 0.05);
border-radius: 3px;
font-size: 0.8em;
color: #aaa;
}
}
// Old fortune and ask-roll styles
&.fortune {
img {
border: 0px;
}
.intro-chat {
border-radius: 20px;
display: flex;
flex-direction: row;
.intro-img {
padding: 5px;
width: 80px;
align-self: center;
}
.intro-right {
display: flex;
flex-direction: column;
.introText {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.2);
width: 210px;
text-align: center;
}
}
}
.button.control,
.fortune-accepted {
display: flex;
justify-content: center;
align-items: center;
font-size: calc(var(--font-size-standard) * 1.3);
}
}
&.ask-roll {
@@ -37,4 +410,5 @@
justify-content: center;
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.2);
}
}
}
+2 -1
View File
@@ -13,7 +13,6 @@
@import "armor.less";
@import "spell.less";
@import "vulnerability.less";
@import "chat.less";
@import "equipment.less";
@import "shield.less";
@import "miracle.less";
@@ -24,5 +23,7 @@
@import "weapon-types-config.less";
}
@import "chat.less";
@import "roll.less";
@import "roll-dialog-modern.less";
@import "hud.less";
+305
View File
@@ -0,0 +1,305 @@
// Modern Roll Dialog Styling
// Matches the new chat message card design
.prismrpg-roll-dialog-modern {
font-family: var(--font-primary);
// Header section
.dialog-header {
background: linear-gradient(135deg, rgba(33, 33, 33, 0.95) 0%, rgba(66, 66, 66, 0.95) 100%);
border-bottom: 2px solid #d4af37;
padding: 8px 10px;
margin: -8px -8px 8px -8px;
border-radius: 4px 4px 0 0;
.character-info {
display: flex;
flex-direction: column;
gap: 4px;
.character-name {
font-size: 1em;
font-weight: bold;
color: #d4af37;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.item-name {
display: flex;
align-items: center;
gap: 4px;
font-size: 0.9em;
color: #e0e0e0;
i {
color: #d4af37;
font-size: 0.85em;
}
&.weapon i {
color: #f44336;
}
&.spell i {
color: #9c27b0;
}
}
}
}
// Content area
.dialog-content {
display: flex;
flex-direction: column;
gap: 8px;
}
// Section styling
.option-section {
background: rgba(0, 0, 0, 0.1);
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 4px;
padding: 6px 8px;
&.weapon-section {
border-left: 3px solid #f44336;
}
&.spell-section {
border-left: 3px solid #9c27b0;
}
.section-title {
display: flex;
align-items: center;
gap: 4px;
font-weight: bold;
font-size: 0.9em;
color: var(--color-dark-1);
margin-bottom: 6px;
padding-bottom: 4px;
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
i {
color: #d4af37;
font-size: 0.85em;
}
}
}
// Info displays (ranges, spell stats)
.info-display {
display: flex;
align-items: center;
gap: 4px;
padding: 4px 6px;
background: rgba(0, 0, 0, 0.15);
border-radius: 3px;
margin-bottom: 6px;
font-size: 0.8em;
color: #666;
i {
color: #4caf50;
font-size: 0.85em;
}
.info-text {
flex: 1;
}
}
// Spell info badges (like in chat)
.spell-info-display {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-bottom: 6px;
.info-badge {
display: flex;
align-items: center;
gap: 3px;
padding: 3px 6px;
border-radius: 3px;
font-size: 0.75em;
font-weight: 500;
i {
font-size: 0.85em;
}
&.characteristic {
background: rgba(103, 58, 183, 0.2);
border: 1px solid rgba(103, 58, 183, 0.4);
color: #673ab7;
i { color: #673ab7; }
}
&.mana {
background: rgba(33, 150, 243, 0.2);
border: 1px solid rgba(33, 150, 243, 0.4);
color: #2196f3;
i { color: #2196f3; }
}
&.apc {
background: rgba(255, 193, 7, 0.2);
border: 1px solid rgba(255, 193, 7, 0.4);
color: #ffc107;
i { color: #ffc107; }
}
&.upkeep {
background: rgba(156, 39, 176, 0.2);
border: 1px solid rgba(156, 39, 176, 0.4);
color: #9c27b0;
i { color: #9c27b0; }
}
}
}
// Option rows (label + control)
.option-row {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 4px;
&:last-child {
margin-bottom: 0;
}
label {
font-size: 0.85em;
font-weight: 500;
color: var(--color-dark-2);
min-width: 90px;
}
select {
flex: 1;
}
}
// Styled selects
.styled-select {
background: rgba(255, 255, 255, 0.9);
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 3px;
padding: 4px 8px;
font-size: 0.85em;
color: var(--color-dark-1);
cursor: pointer;
transition: all 0.2s ease;
&:hover {
border-color: #d4af37;
box-shadow: 0 0 4px rgba(212, 175, 55, 0.3);
}
&:focus {
outline: none;
border-color: #d4af37;
box-shadow: 0 0 6px rgba(212, 175, 55, 0.5);
}
&.advantage-select,
&.modifier-select {
text-align: center;
font-weight: 500;
}
}
// Checkbox group
.checkbox-group {
display: flex;
flex-direction: column;
gap: 3px;
margin-bottom: 6px;
.checkbox-label {
display: flex;
align-items: center;
cursor: pointer;
padding: 3px 4px;
border-radius: 3px;
transition: background 0.2s ease;
&:hover {
background: rgba(0, 0, 0, 0.05);
}
input[type="checkbox"] {
margin-right: 6px;
cursor: pointer;
width: 14px;
height: 14px;
accent-color: #d4af37;
}
.checkbox-text {
display: flex;
align-items: center;
gap: 4px;
font-size: 0.8em;
color: var(--color-dark-2);
i {
color: #888;
font-size: 0.85em;
}
}
input[type="checkbox"]:checked ~ .checkbox-text {
color: var(--color-dark-1);
font-weight: 500;
i {
color: #d4af37;
}
}
}
}
}
// Dialog application styling
.application.dialog.prismrpg {
.window-content {
background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
padding: 8px;
}
// Make buttons match the modern style
.dialog-buttons {
padding: 6px 8px;
gap: 6px;
button {
background: linear-gradient(135deg, #4a4a4a 0%, #6a6a6a 100%);
border: 1px solid #3a3a3a;
color: white;
font-weight: 600;
padding: 6px 12px;
border-radius: 4px;
transition: all 0.2s ease;
&:hover {
background: linear-gradient(135deg, #5a5a5a 0%, #7a7a7a 100%);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
transform: translateY(-1px);
}
&.default,
&[data-button="roll"] {
background: linear-gradient(135deg, #d4af37 0%, #f4cf67 100%);
border-color: #b49030;
color: #2a2a2a;
&:hover {
background: linear-gradient(135deg, #e4bf47 0%, #ffdf77 100%);
}
}
}
}
}
+54
View File
@@ -25,6 +25,30 @@
border-radius: 4px;
padding: 0.5rem;
}
.dialog-weapon-options {
margin-top: 8px;
.dialog-save {
margin: 4px 0;
label {
display: flex;
align-items: center;
cursor: pointer;
input[type="checkbox"] {
margin-right: 8px;
cursor: pointer;
}
}
select {
margin-left: 8px;
min-width: 10rem;
}
}
}
}
.prismrpg-range-defense-dialog {
@@ -156,4 +180,34 @@
font-size: calc(var(--font-size-standard) * 1);
text-shadow: 0 0 10px var(--color-shadow-primary);
}
// Roll Damage button in weapon attack messages
.damage-roll-button {
margin-top: 0.5em;
margin-bottom: 0.25em;
.roll-damage-button {
background: linear-gradient(135deg, #8b0000 0%, #dc143c 100%);
color: white;
border: 1px solid #6b0000;
border-radius: 3px;
padding: 4px 10px;
font-weight: 600;
cursor: pointer;
font-size: 0.85em;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
transition: all 0.2s ease;
&:hover {
background: linear-gradient(135deg, #a00000 0%, #ff1744 100%);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
transform: translateY(-1px);
}
i {
margin-right: 4px;
font-size: 0.9em;
}
}
}
}