Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 68e3d35af1 | |||
| 58fdc3482a | |||
| 236d752406 | |||
| bf9ad37d24 | |||
| 7944345c82 | |||
| 7abea8e9d4 | |||
| 31573bd522 | |||
| abea77906d |
@@ -8,3 +8,6 @@ node_modules/
|
|||||||
|
|
||||||
.history
|
.history
|
||||||
|
|
||||||
|
# GitHub/Copilot config
|
||||||
|
.github/
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,8 @@
|
|||||||
|
|
||||||
## Prism RPG RPG for Foundry Virtual TableTop
|
## Prism RPG RPG for Foundry Virtual TableTop
|
||||||
|
|
||||||
The Official game system for playing Prism RPG TTRPG: The Role Playing Game on FoundryVTT. This fully functional system is the foundational framework to build your game.
|
The Official game system for playing Prism RPG TTRPG: The Role Playing Game on FoundryVTT. This fully functional system is the foundational framework to build your game.
|
||||||
|
|
||||||
This product's format, programming code, and presentation is copyrighted by Prism RPG Games LLC.
|
This product's format, programming code, and presentation is copyrighted by Prism RPG Games LLC.
|
||||||
|
|
||||||
This system & product are used with permission granted as part of the partnership agreement between Foundry Gaming LLC and Prism RPG Games LLC. It uses the following trademarks and/or copyrights:
|
This system & product are used with permission granted as part of the partnership agreement between Foundry Gaming LLC and Prism RPG Games LLC.
|
||||||
|
|
||||||
© 2025 Prism RPG Games. Content copyright Ted McClintock, Prism RPG Games LLC. All Rights Reserved. Prism RPG® is a Registered Trademark of Prism RPG Games LLC. All Rights Reserved.
|
|
||||||
|
|
||||||
Prism RPG Games is ©2025 Prism RPG Games, LLC. All rights reserved. Prism RPG, Prism RPG Games, and their associated logos are trademarks of Prism RPG Games, LLC. https://lethalfantasy.com/
|
|
||||||
|
|
||||||
For inquiries on developing content for this ruleset please contact Lethalted@lethalfantasy.com
|
|
||||||
|
|
||||||
## Community
|
|
||||||
|
|
||||||
Please join our Discord server Prism RPG games https://discord.gg/UDvnnyvreV
|
|
||||||
|
|
||||||
It's the place to ask questions on how to use the system, make feature request and follow the development of the system.
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||||
|
<!-- Background circle -->
|
||||||
|
<circle cx="50" cy="50" r="48" fill="#f0f0f0" stroke="#333" stroke-width="2" />
|
||||||
|
|
||||||
|
<!-- Star for achievement/advancement -->
|
||||||
|
<path d="M 50 20 L 55 38 L 74 38 L 59 49 L 64 67 L 50 56 L 36 67 L 41 49 L 26 38 L 45 38 Z"
|
||||||
|
fill="#ffd700" stroke="#333" stroke-width="1.5" />
|
||||||
|
|
||||||
|
<!-- Upward arrow for progression -->
|
||||||
|
<path d="M 50 75 L 50 85" stroke="#333" stroke-width="3" stroke-linecap="round" />
|
||||||
|
<path d="M 45 78 L 50 73 L 55 78" fill="none" stroke="#333" stroke-width="3"
|
||||||
|
stroke-linecap="round" stroke-linejoin="round" />
|
||||||
|
|
||||||
|
<!-- Small accent dots for decoration -->
|
||||||
|
<circle cx="20" cy="30" r="2" fill="#666" />
|
||||||
|
<circle cx="80" cy="30" r="2" fill="#666" />
|
||||||
|
<circle cx="20" cy="70" r="2" fill="#666" />
|
||||||
|
<circle cx="80" cy="70" r="2" fill="#666" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 891 B |
@@ -1126,6 +1126,10 @@ i.prismrpg {
|
|||||||
border: 2px solid #6b6b6b;
|
border: 2px solid #6b6b6b;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
.prismrpg .character-main-v2 .character-left-column .hp-shields-section .hp-shields .hp-item.hp-temp-item .hp-value input {
|
||||||
|
background: rgba(255, 230, 160, 0.85);
|
||||||
|
border-color: #b8860b;
|
||||||
|
}
|
||||||
.prismrpg .character-main-v2 .character-left-column .character-attributes {
|
.prismrpg .character-main-v2 .character-left-column .character-attributes {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -2163,6 +2167,116 @@ i.prismrpg {
|
|||||||
.prismrpg .racial-ability-content input[type="checkbox"]:checked::after {
|
.prismrpg .racial-ability-content input[type="checkbox"]:checked::after {
|
||||||
color: rgba(0, 0, 0, 0.1);
|
color: rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
.prismrpg .ability-content {
|
||||||
|
font-family: var(--font-primary);
|
||||||
|
font-size: calc(var(--font-size-standard) * 1);
|
||||||
|
color: var(--color-dark-1);
|
||||||
|
background-image: var(--background-image-base);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content nav.tabs [data-tab] {
|
||||||
|
color: #636060;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content nav.tabs [data-tab].active {
|
||||||
|
color: #252424;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content input:disabled,
|
||||||
|
.prismrpg .ability-content select:disabled {
|
||||||
|
background-color: rgba(0, 0, 0, 0.2);
|
||||||
|
border-color: transparent;
|
||||||
|
color: var(--color-dark-3);
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content input,
|
||||||
|
.prismrpg .ability-content select {
|
||||||
|
height: 1.5rem;
|
||||||
|
background-color: rgba(0, 0, 0, 0.1);
|
||||||
|
border-color: var(--color-dark-6);
|
||||||
|
color: var(--color-dark-2);
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content input[name="name"] {
|
||||||
|
height: 2.5rem;
|
||||||
|
margin-right: 4px;
|
||||||
|
font-family: var(--font-secondary);
|
||||||
|
font-size: calc(var(--font-size-standard) * 1.2);
|
||||||
|
font-weight: bold;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content fieldset {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content .form-fields input,
|
||||||
|
.prismrpg .ability-content .form-fields select {
|
||||||
|
text-align: center;
|
||||||
|
font-size: calc(var(--font-size-standard) * 1);
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content .form-fields select {
|
||||||
|
font-family: var(--font-secondary);
|
||||||
|
font-size: calc(var(--font-size-standard) * 1);
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content legend {
|
||||||
|
font-family: var(--font-secondary);
|
||||||
|
font-size: calc(var(--font-size-standard) * 1.2);
|
||||||
|
font-weight: bold;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content .form-fields {
|
||||||
|
padding-top: 4px;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content .form-group {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content .form-group label {
|
||||||
|
align-content: center;
|
||||||
|
min-width: 10rem;
|
||||||
|
max-width: 10rem;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content .form-group select,
|
||||||
|
.prismrpg .ability-content .form-group input {
|
||||||
|
text-align: left;
|
||||||
|
min-width: 12rem;
|
||||||
|
max-width: 12rem;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content .form-group input[type="checkbox"] {
|
||||||
|
min-width: 1.2rem;
|
||||||
|
max-width: 1.2rem;
|
||||||
|
margin-right: 0.5rem;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content label {
|
||||||
|
font-family: var(--font-secondary);
|
||||||
|
font-size: calc(var(--font-size-standard) * 1);
|
||||||
|
flex: 50%;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content .align-top {
|
||||||
|
align-self: flex-start;
|
||||||
|
padding: 0.1rem;
|
||||||
|
margin-right: 0.2rem;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content .shift-right {
|
||||||
|
margin-left: 2rem;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content .header {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content .header img {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content input[type="checkbox"] {
|
||||||
|
font-size: var(--font-size-14);
|
||||||
|
width: 20px;
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content input[type="checkbox"]:checked {
|
||||||
|
background-color: rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
.prismrpg .ability-content input[type="checkbox"]:checked::after {
|
||||||
|
color: rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
.prismrpg .weapon-content {
|
.prismrpg .weapon-content {
|
||||||
font-family: var(--font-primary);
|
font-family: var(--font-primary);
|
||||||
font-size: calc(var(--font-size-standard) * 1);
|
font-size: calc(var(--font-size-standard) * 1);
|
||||||
@@ -3227,6 +3341,118 @@ i.prismrpg {
|
|||||||
.prismrpg .class-content label {
|
.prismrpg .class-content label {
|
||||||
flex: 10%;
|
flex: 10%;
|
||||||
}
|
}
|
||||||
|
.prismrpg .class-content .advancement-level {
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
padding: 0.5rem;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-level h3 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 0 0 0.5rem 0;
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-level h3 .level-title {
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-level h3 .add-advancement {
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
background: var(--color-control-bg);
|
||||||
|
border: 1px solid var(--color-border-dark);
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-level h3 .add-advancement:hover {
|
||||||
|
background: var(--color-control-bg-hover);
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-level h3 .add-advancement i {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-level .empty-advancements {
|
||||||
|
font-style: italic;
|
||||||
|
color: rgba(0, 0, 0, 0.5);
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item {
|
||||||
|
padding: 0.75rem;
|
||||||
|
background: rgba(0, 0, 0, 0.05);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item .advancement-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item .advancement-header .advancement-icon {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item .advancement-header .advancement-icon:hover {
|
||||||
|
border-color: var(--color-border-highlight);
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item .advancement-header input[type="text"] {
|
||||||
|
flex: 1;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item .advancement-header .toggle-advancement-description {
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
background: var(--color-control-bg);
|
||||||
|
border: 1px solid var(--color-border-dark);
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: 0.25rem;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item .advancement-header .toggle-advancement-description:hover {
|
||||||
|
background: var(--color-control-bg-hover);
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item .advancement-header .toggle-advancement-description i {
|
||||||
|
margin: 0;
|
||||||
|
color: rgba(0, 0, 0, 0.7);
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item .advancement-header .delete-advancement {
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
background: var(--color-control-bg);
|
||||||
|
border: 1px solid var(--color-border-dark);
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item .advancement-header .delete-advancement:hover {
|
||||||
|
background: rgba(255, 0, 0, 0.1);
|
||||||
|
border-color: rgba(255, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item .advancement-header .delete-advancement i {
|
||||||
|
margin: 0;
|
||||||
|
color: rgba(255, 0, 0, 0.7);
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item .advancement-description {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
|
||||||
|
max-height: 500px;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.prismrpg .class-content .advancement-item .advancement-description.collapsed {
|
||||||
|
max-height: 0;
|
||||||
|
opacity: 0;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
.prismrpg .character-path-content {
|
.prismrpg .character-path-content {
|
||||||
font-family: var(--font-primary);
|
font-family: var(--font-primary);
|
||||||
font-size: calc(var(--font-size-standard) * 1);
|
font-size: calc(var(--font-size-standard) * 1);
|
||||||
@@ -4102,6 +4328,179 @@ i.prismrpg {
|
|||||||
font-family: var(--font-secondary);
|
font-family: var(--font-secondary);
|
||||||
font-size: calc(var(--font-size-standard) * 1.2);
|
font-size: calc(var(--font-size-standard) * 1.2);
|
||||||
}
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card {
|
||||||
|
font-family: var(--font-primary);
|
||||||
|
border-radius: 4px;
|
||||||
|
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;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card .item-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 4px 8px;
|
||||||
|
background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
|
||||||
|
border-bottom: 1px solid #444;
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card .item-header h3 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 0.95em;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #d4af37;
|
||||||
|
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
|
||||||
|
font-family: var(--font-secondary);
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card .item-header .item-type {
|
||||||
|
padding: 1px 6px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 0.65em;
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: uppercase;
|
||||||
|
background: rgba(255, 255, 255, 0.15);
|
||||||
|
color: #fff;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||||
|
letter-spacing: 0.3px;
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card .item-image {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 6px;
|
||||||
|
background: rgba(0, 0, 0, 0.1);
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card .item-image img {
|
||||||
|
max-width: 50px;
|
||||||
|
max-height: 50px;
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid rgba(212, 175, 55, 0.3);
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||||
|
transition: transform 0.2s ease;
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card .item-image img:hover {
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card .item-description {
|
||||||
|
padding: 6px 8px;
|
||||||
|
color: #000;
|
||||||
|
font-size: 0.8em;
|
||||||
|
line-height: 1.3;
|
||||||
|
background: rgba(255, 255, 255, 0.8);
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card .item-details {
|
||||||
|
padding: 6px 8px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 3px;
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card .item-details .item-detail {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 2px 6px;
|
||||||
|
background: rgba(255, 255, 255, 0.03);
|
||||||
|
border-left: 2px solid rgba(212, 175, 55, 0.5);
|
||||||
|
border-radius: 2px;
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card .item-details .item-detail strong {
|
||||||
|
color: #d4af37;
|
||||||
|
margin-right: 6px;
|
||||||
|
min-width: 90px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card .item-details .item-detail:nth-child(even) {
|
||||||
|
background: rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card.weapon-item .item-header {
|
||||||
|
background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card.armor-item .item-header {
|
||||||
|
background: linear-gradient(135deg, #4a5cf7 0%, #2c3e9e 100%);
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card.spell-item .item-header {
|
||||||
|
background: linear-gradient(135deg, #9b59b6 0%, #6c3483 100%);
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card.skill-item .item-header {
|
||||||
|
background: linear-gradient(135deg, #16a085 0%, #0e6655 100%);
|
||||||
|
}
|
||||||
|
.chat-log .message-content .prismrpg-item-chat-card.equipment-item .item-header {
|
||||||
|
background: linear-gradient(135deg, #f39c12 0%, #b8730f 100%);
|
||||||
|
}
|
||||||
|
.new-round-message .chat-title .new-round-label {
|
||||||
|
font-size: var(--font-size-11);
|
||||||
|
font-style: italic;
|
||||||
|
color: #8a7a5a;
|
||||||
|
margin-top: 1px;
|
||||||
|
}
|
||||||
|
.new-round-message .new-round-actors {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 6px 0 2px;
|
||||||
|
}
|
||||||
|
.new-round-message .new-round-actors .new-round-restore-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
width: calc(50% - 3px);
|
||||||
|
padding: 4px 8px 4px 6px;
|
||||||
|
border: 1px solid #7a6a45;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: linear-gradient(135deg, #f5e6c8 0%, #e8d5a0 100%);
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: var(--font-size-13);
|
||||||
|
color: #3a2e1a;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.new-round-message .new-round-actors .new-round-restore-btn span {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.new-round-message .new-round-actors .new-round-restore-btn img {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
.new-round-message .new-round-actors .new-round-restore-btn:hover:not(:disabled) {
|
||||||
|
background: linear-gradient(135deg, #fdf3dc 0%, #f0e0b0 100%);
|
||||||
|
border-color: #a08040;
|
||||||
|
}
|
||||||
|
.new-round-message .new-round-actors .new-round-restore-btn:disabled,
|
||||||
|
.new-round-message .new-round-actors .new-round-restore-btn.restored {
|
||||||
|
opacity: 0.45;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.new-round-message .new-round-actors .new-round-all-btn {
|
||||||
|
width: 100%;
|
||||||
|
background: linear-gradient(135deg, #c8dff5 0%, #a0c0e8 100%);
|
||||||
|
border-color: #4a6a8a;
|
||||||
|
color: #1a2e3a;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.new-round-message .new-round-actors .new-round-all-btn:hover:not(:disabled) {
|
||||||
|
background: linear-gradient(135deg, #dcedfc 0%, #b0d0f0 100%);
|
||||||
|
border-color: #3a5a7a;
|
||||||
|
}
|
||||||
|
.palette.status-effects .status-separator {
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
width: 100%;
|
||||||
|
height: 2px;
|
||||||
|
border: none;
|
||||||
|
border-top: 2px solid rgba(255, 255, 255, 0.35);
|
||||||
|
margin: 5px 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
.application.dialog.prismrpg {
|
.application.dialog.prismrpg {
|
||||||
color: var(--color-dark-1);
|
color: var(--color-dark-1);
|
||||||
}
|
}
|
||||||
|
|||||||
+94
-2
@@ -382,6 +382,88 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Ability": {
|
||||||
|
"FIELDS": {
|
||||||
|
"description": {
|
||||||
|
"label": "Description"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Combat": {
|
||||||
|
"newRound": "New Round —",
|
||||||
|
"restoreAP": "Reset AP & +1 Mana",
|
||||||
|
"allPC": "All PC"
|
||||||
|
},
|
||||||
|
"Status": {
|
||||||
|
"Aided": "Aided",
|
||||||
|
"Alert": "Alert",
|
||||||
|
"Alkalized": "Alkalized",
|
||||||
|
"Anchored": "Anchored",
|
||||||
|
"Banished": "Banished",
|
||||||
|
"Bestowed": "Bestowed",
|
||||||
|
"Blessed": "Blessed",
|
||||||
|
"Bleed": "Bleed",
|
||||||
|
"Blind": "Blind",
|
||||||
|
"Burning": "Burning",
|
||||||
|
"Chilled": "Chilled",
|
||||||
|
"Comatose": "Comatose",
|
||||||
|
"Compulsed": "Compulsed",
|
||||||
|
"Concealed": "Concealed",
|
||||||
|
"Corroded": "Corroded",
|
||||||
|
"Cursed": "Cursed",
|
||||||
|
"Dazed": "Dazed",
|
||||||
|
"Deaf": "Deaf",
|
||||||
|
"Diseased": "Diseased",
|
||||||
|
"Distracted": "Distracted",
|
||||||
|
"Enchanted": "Enchanted",
|
||||||
|
"Enhance": "Enhance",
|
||||||
|
"Exhaustion": "Exhaustion",
|
||||||
|
"Fatigue": "Fatigue",
|
||||||
|
"Frightened": "Frightened",
|
||||||
|
"Fury": "Fury",
|
||||||
|
"Haste": "Haste",
|
||||||
|
"Heroism": "Heroism",
|
||||||
|
"Horror": "Horror",
|
||||||
|
"Inspired": "Inspired",
|
||||||
|
"Invisible": "Invisible",
|
||||||
|
"Keen": "Keen",
|
||||||
|
"LifeDrain": "Life Drain",
|
||||||
|
"Locked": "Locked",
|
||||||
|
"Madness": "Madness",
|
||||||
|
"ManaDrain": "Mana Drain",
|
||||||
|
"Marked": "Marked",
|
||||||
|
"Mute": "Mute",
|
||||||
|
"Necrosis": "Necrosis (Elemental)",
|
||||||
|
"Numbed": "Numbed",
|
||||||
|
"Paralyzed": "Paralyzed",
|
||||||
|
"Petrified": "Petrified",
|
||||||
|
"Plagued": "Plagued",
|
||||||
|
"Poison": "Poison",
|
||||||
|
"Prepared": "Prepared",
|
||||||
|
"Prone": "Prone",
|
||||||
|
"Radiated": "Radiated (Elemental)",
|
||||||
|
"Rage": "Rage",
|
||||||
|
"Regeneration": "Regeneration",
|
||||||
|
"Reinforced": "Reinforced",
|
||||||
|
"Renewed": "Renewed",
|
||||||
|
"Saturated": "Saturated",
|
||||||
|
"Sealed": "Sealed",
|
||||||
|
"Seep": "Seep",
|
||||||
|
"Shattered": "Shattered",
|
||||||
|
"Shocked": "Shocked (Elemental)",
|
||||||
|
"Sightless": "Sightless",
|
||||||
|
"Silenced": "Silenced",
|
||||||
|
"Soundless": "Soundless",
|
||||||
|
"Staggered": "Staggered",
|
||||||
|
"Stunned": "Stunned",
|
||||||
|
"Supplied": "Supplied",
|
||||||
|
"Surged": "Surged",
|
||||||
|
"Taunt": "Taunt",
|
||||||
|
"Trance": "Trance",
|
||||||
|
"Unconscious": "Unconscious",
|
||||||
|
"Warded": "Warded",
|
||||||
|
"Wounded": "Wounded"
|
||||||
|
},
|
||||||
"Label": {
|
"Label": {
|
||||||
"agility": "Dexterity",
|
"agility": "Dexterity",
|
||||||
"gotoToken": "Go to token",
|
"gotoToken": "Go to token",
|
||||||
@@ -440,6 +522,7 @@
|
|||||||
"combatDetails": "Combat details",
|
"combatDetails": "Combat details",
|
||||||
"Challenges": "Challenges",
|
"Challenges": "Challenges",
|
||||||
"HP": "HP",
|
"HP": "HP",
|
||||||
|
"HPTemp": "Temporary Hit Points",
|
||||||
"Movement": "Movement",
|
"Movement": "Movement",
|
||||||
"Saves": "Saves",
|
"Saves": "Saves",
|
||||||
"app": "APP",
|
"app": "APP",
|
||||||
@@ -471,6 +554,7 @@
|
|||||||
"equipment": "Equipment",
|
"equipment": "Equipment",
|
||||||
"experience": "Experience",
|
"experience": "Experience",
|
||||||
"racialAbilities": "Racial Abilities",
|
"racialAbilities": "Racial Abilities",
|
||||||
|
"abilities": "Abilities",
|
||||||
"grit": "Grit",
|
"grit": "Grit",
|
||||||
"gritEarned": "Grit earned",
|
"gritEarned": "Grit earned",
|
||||||
"int": "INT",
|
"int": "INT",
|
||||||
@@ -688,7 +772,13 @@
|
|||||||
"spellcastingTypeMana": "Mana",
|
"spellcastingTypeMana": "Mana",
|
||||||
"spellcastingTypeFaith": "Faith",
|
"spellcastingTypeFaith": "Faith",
|
||||||
"attributeBonuses": "Attribute Bonuses",
|
"attributeBonuses": "Attribute Bonuses",
|
||||||
"classFeatures": "Class Features"
|
"classFeatures": "Class Features",
|
||||||
|
"advancement": "Advancement",
|
||||||
|
"addAdvancement": "Add Advancement",
|
||||||
|
"deleteAdvancement": "Delete Advancement",
|
||||||
|
"advancementName": "Advancement Name",
|
||||||
|
"noAdvancements": "No advancements defined for this level",
|
||||||
|
"toggleDescription": "Toggle Description"
|
||||||
},
|
},
|
||||||
"CoreSkill": {
|
"CoreSkill": {
|
||||||
"acrobatics": "Acrobatics",
|
"acrobatics": "Acrobatics",
|
||||||
@@ -807,7 +897,8 @@
|
|||||||
"addMiracle": "Add new miracle",
|
"addMiracle": "Add new miracle",
|
||||||
"skill": "Skills list",
|
"skill": "Skills list",
|
||||||
"skills": "Skills - Your character's skills and abilities",
|
"skills": "Skills - Your character's skills and abilities",
|
||||||
"racialAbilities": "Racial Abilities from your character's race and sub-race"
|
"racialAbilities": "Racial Abilities from your character's race and sub-race",
|
||||||
|
"abilities": "Abilities acquired through class, paths, or other sources"
|
||||||
},
|
},
|
||||||
"RollSavingThrow": "Roll Saving Throw",
|
"RollSavingThrow": "Roll Saving Throw",
|
||||||
"Message": {
|
"Message": {
|
||||||
@@ -1406,6 +1497,7 @@
|
|||||||
"armor": "Armor",
|
"armor": "Armor",
|
||||||
"equipment": "Equipment",
|
"equipment": "Equipment",
|
||||||
"racial-ability": "Racial Ability",
|
"racial-ability": "Racial Ability",
|
||||||
|
"ability": "Ability",
|
||||||
"miracle": "Miracle",
|
"miracle": "Miracle",
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
"shield": "Shield",
|
"shield": "Shield",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ export { default as PrismRPGMonsterSheet } from "./sheets/monster-sheet.mjs"
|
|||||||
export { default as PrismRPGWeaponSheet } from "./sheets/weapon-sheet.mjs"
|
export { default as PrismRPGWeaponSheet } from "./sheets/weapon-sheet.mjs"
|
||||||
export { default as PrismRPGSkillSheet } from "./sheets/skill-sheet.mjs"
|
export { default as PrismRPGSkillSheet } from "./sheets/skill-sheet.mjs"
|
||||||
export { default as PrismRPGRacialAbilitySheet } from "./sheets/racial-ability-sheet.mjs"
|
export { default as PrismRPGRacialAbilitySheet } from "./sheets/racial-ability-sheet.mjs"
|
||||||
|
export { default as PrismRPGAbilitySheet } from "./sheets/ability-sheet.mjs"
|
||||||
export { default as PrismRPGVulnerabilitySheet } from "./sheets/vulnerability-sheet.mjs"
|
export { default as PrismRPGVulnerabilitySheet } from "./sheets/vulnerability-sheet.mjs"
|
||||||
export { default as PrismRPGArmorSheet } from "./sheets/armor-sheet.mjs"
|
export { default as PrismRPGArmorSheet } from "./sheets/armor-sheet.mjs"
|
||||||
export { default as PrismRPGSpellSheet } from "./sheets/spell-sheet.mjs"
|
export { default as PrismRPGSpellSheet } from "./sheets/spell-sheet.mjs"
|
||||||
|
|||||||
@@ -1,104 +1,6 @@
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
export class PrismRPGCombatTracker extends foundry.applications.sidebar.tabs.CombatTracker {
|
|
||||||
|
|
||||||
static PARTS = {
|
|
||||||
"header": {
|
|
||||||
"template": "systems/fvtt-prism-rpg/templates/combat-tracker-header-v2.hbs"
|
|
||||||
},
|
|
||||||
"tracker": {
|
|
||||||
"template": "systems/fvtt-prism-rpg/templates/combat-tracker-v2.hbs"
|
|
||||||
},
|
|
||||||
"footer": {
|
|
||||||
"template": "systems/fvtt-prism-rpg/templates/combat-tracker-footer-v2.hbs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static DEFAULT_OPTIONS = foundry.utils.mergeObject(super.DEFAULT_OPTIONS, {
|
|
||||||
actions: {
|
|
||||||
initiativePlus: PrismRPGCombatTracker.#initiativePlus,
|
|
||||||
initiativeMinus: PrismRPGCombatTracker.#initiativeMinus,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
async _prepareContext(options) {
|
|
||||||
let data = await super._prepareContext(options);
|
|
||||||
console?.log("Combat Tracker Data", data);
|
|
||||||
/*for (let u of data.turns) {
|
|
||||||
let c = game.combat.combatants.get(u.id);
|
|
||||||
u.progressionCount = c.system.progressionCount
|
|
||||||
u.isMonster = c.actor.type === "monster"
|
|
||||||
}
|
|
||||||
console.log("Combat Data", data);*/
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
static #initiativePlus(ev) {
|
|
||||||
ev.preventDefault();
|
|
||||||
let cId = ev.target.closest(".combatant").dataset.combatantId;
|
|
||||||
let c = game.combat.combatants.get(cId);
|
|
||||||
c.update({ 'initiative': c.initiative + 1 });
|
|
||||||
console.log("Initiative Plus");
|
|
||||||
}
|
|
||||||
|
|
||||||
static #initiativeMinus(ev) {
|
|
||||||
ev.preventDefault();
|
|
||||||
let cId = ev.target.closest(".combatant").dataset.combatantId;
|
|
||||||
let c = game.combat.combatants.get(cId);
|
|
||||||
let newInit = Math.max(c.initiative - 1, 0);
|
|
||||||
c.update({ 'initiative': newInit });
|
|
||||||
}
|
|
||||||
|
|
||||||
activateListeners(html) {
|
|
||||||
super.activateListeners(html);
|
|
||||||
// Display Combat settings
|
|
||||||
html.find(".initiative-plus").click(ev => {
|
|
||||||
ev.preventDefault();
|
|
||||||
let cId = ev.currentTarget.closest(".combatant").dataset.combatantId;
|
|
||||||
let c = game.combat.combatants.get(cId);
|
|
||||||
c.update({ 'initiative': c.initiative + 1 });
|
|
||||||
});
|
|
||||||
|
|
||||||
html.find(".initiative-minus").click(ev => {
|
|
||||||
ev.preventDefault();
|
|
||||||
let cId = ev.currentTarget.closest(".combatant").dataset.combatantId;
|
|
||||||
let c = game.combat.combatants.get(cId);
|
|
||||||
c.update({ 'initiative': c.initiative - 1 });
|
|
||||||
console.log("Initiative Minus");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
static get defaultOptions() {
|
|
||||||
let path = "systems/fvtt-prism-rpg/templates/combat-tracker.hbs";
|
|
||||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
|
||||||
template: path,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class PrismRPGCombat extends Combat {
|
export class PrismRPGCombat extends Combat {
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the Array of combatants sorted into initiative order, breaking ties alphabetically by name.
|
|
||||||
* @returns {Combatant[]}
|
|
||||||
*/
|
|
||||||
setupTurns() {
|
|
||||||
console?.log("Setup Turns....");
|
|
||||||
this.turns ||= [];
|
|
||||||
|
|
||||||
// Determine the turn order and the current turn
|
|
||||||
const turns = this.combatants.contents.sort(this.sortCombatantsLF);
|
|
||||||
if (this.turn !== null) this.turn = Math.clamp(this.turn, 0, turns.length - 1);
|
|
||||||
|
|
||||||
// Update state tracking
|
|
||||||
let c = turns[this.turn];
|
|
||||||
this.current = this._getCurrentState(c);
|
|
||||||
if (!this.previous) this.previous = this.current;
|
|
||||||
|
|
||||||
// Return the array of prepared turns
|
|
||||||
return this.turns = turns;
|
|
||||||
}
|
|
||||||
|
|
||||||
async rollInitiative(ids, options) {
|
async rollInitiative(ids, options) {
|
||||||
console.log("%%%%%%%%% Roll Initiative", ids, options);
|
console.log("%%%%%%%%% Roll Initiative", ids, options);
|
||||||
@@ -123,98 +25,5 @@ export class PrismRPGCombat extends Combat {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
resetProgression(cId) {
|
|
||||||
let c = this.combatants.get(cId);
|
|
||||||
c.update({ 'system.progressionCount': 0 });
|
|
||||||
}
|
|
||||||
|
|
||||||
setCasting(cId) {
|
|
||||||
let c = this.combatants.get(cId);
|
|
||||||
c.setFlag(SYSTEM.id, "casting", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
resetCasting(cId) {
|
|
||||||
let c = this.combatants.get(cId);
|
|
||||||
c.setFlag(SYSTEM.id, "casting", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
isCasting(cId) {
|
|
||||||
let c = this.combatants.get(cId);
|
|
||||||
return c.getFlag(SYSTEM.id, "casting");
|
|
||||||
}
|
|
||||||
|
|
||||||
async nextTurn() {
|
|
||||||
console.log("NEXT TURN");
|
|
||||||
|
|
||||||
let turn = this.turn ?? -1;
|
|
||||||
let skipDefeated = this.settings.skipDefeated;
|
|
||||||
|
|
||||||
// Determine the next turn number
|
|
||||||
let next = null;
|
|
||||||
for (let [i, t] of this.turns.entries()) {
|
|
||||||
console.log("Turn", t);
|
|
||||||
if (i <= turn) continue;
|
|
||||||
if (skipDefeated && t.isDefeated) continue;
|
|
||||||
next = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Maybe advance to the next round
|
|
||||||
let round = this.round;
|
|
||||||
if ((this.round === 0) || (next === null) || (next >= this.turns.length)) {
|
|
||||||
return this.nextRound();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update the document, passing data through a hook first
|
|
||||||
const updateData = { round, turn: next };
|
|
||||||
const updateOptions = { advanceTime: CONFIG.time.turnTime, direction: 1 };
|
|
||||||
Hooks.callAll("combatTurn", this, updateData, updateOptions);
|
|
||||||
return this.update(updateData, updateOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
async nextRound() {
|
|
||||||
this.turnsDone = false
|
|
||||||
|
|
||||||
let turn = this.turn === null ? null : 0; // Preserve the fact that it's no-one's turn currently.
|
|
||||||
console.log("ROUND", this);
|
|
||||||
|
|
||||||
let advanceTime = Math.max(this.turns.length - this.turn, 0) * CONFIG.time.turnTime;
|
|
||||||
advanceTime += CONFIG.time.roundTime;
|
|
||||||
let nextRound = this.round + 1;
|
|
||||||
|
|
||||||
let initOK = true;
|
|
||||||
for (let c of this.combatants) {
|
|
||||||
if (c.initiative === null) {
|
|
||||||
initOK = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!initOK) {
|
|
||||||
ui.notifications.error("All combatants must have initiative rolled before the round can advance.");
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let c of this.combatants) {
|
|
||||||
if (nextRound >= c.initiative) {
|
|
||||||
let user = game.users.find(u => u.active && u.character && u.character.id === c.actor.id);
|
|
||||||
if (user?.hasPlayerOwner) {
|
|
||||||
game.socket.emit(`system.${SYSTEM.id}`, { type: "rollProgressionDice", progressionCount: c.system.progressionCount + 1, actorId: c.actor.id, combatId: this.id, combatantId: c.id });
|
|
||||||
} else {
|
|
||||||
user = game.users.find(u => u.active && u.isGM);
|
|
||||||
c.actor.system.rollProgressionDice(this.id, c.id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update the document, passing data through a hook first
|
|
||||||
const updateData = { round: nextRound, turn };
|
|
||||||
const updateOptions = { advanceTime, direction: 1 };
|
|
||||||
Hooks.callAll("combatRound", this, updateData, updateOptions);
|
|
||||||
return this.update(updateData, updateOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
sortCombatantsLF(a, b) {
|
|
||||||
return a.initiative - b.initiative;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
import PrismRPGItemSheet from "./base-item-sheet.mjs"
|
||||||
|
|
||||||
|
export default class PrismRPGAbilitySheet extends PrismRPGItemSheet {
|
||||||
|
/** @override */
|
||||||
|
static DEFAULT_OPTIONS = {
|
||||||
|
classes: ["ability"],
|
||||||
|
position: {
|
||||||
|
width: 600,
|
||||||
|
},
|
||||||
|
window: {
|
||||||
|
contentClasses: ["ability-content"],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static PARTS = {
|
||||||
|
main: {
|
||||||
|
template: "systems/fvtt-prism-rpg/templates/ability.hbs",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
tabGroups = {
|
||||||
|
primary: "description",
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepare an array of form header tabs.
|
||||||
|
* @returns {Record<string, Partial<ApplicationTab>>}
|
||||||
|
*/
|
||||||
|
#getTabs() {
|
||||||
|
const tabs = {
|
||||||
|
description: { id: "description", group: "primary", label: "PRISMRPG.Label.description" },
|
||||||
|
effects: { id: "effects", group: "primary", label: "PRISMRPG.Label.effects" },
|
||||||
|
}
|
||||||
|
for (const v of Object.values(tabs)) {
|
||||||
|
v.active = this.tabGroups[v.group] === v.id
|
||||||
|
v.cssClass = v.active ? "active" : ""
|
||||||
|
}
|
||||||
|
return tabs
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
async _prepareContext() {
|
||||||
|
const context = await super._prepareContext()
|
||||||
|
context.tabs = this.#getTabs()
|
||||||
|
return context
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -18,10 +18,17 @@ export default class PrismRPGCharacterSheet extends PrismRPGActorSheet {
|
|||||||
rollInitiative: PrismRPGCharacterSheet.#onRollInitiative,
|
rollInitiative: PrismRPGCharacterSheet.#onRollInitiative,
|
||||||
armorHitPointsPlus: PrismRPGCharacterSheet.#onArmorHitPointsPlus,
|
armorHitPointsPlus: PrismRPGCharacterSheet.#onArmorHitPointsPlus,
|
||||||
armorHitPointsMinus: PrismRPGCharacterSheet.#onArmorHitPointsMinus,
|
armorHitPointsMinus: PrismRPGCharacterSheet.#onArmorHitPointsMinus,
|
||||||
|
armorPointsPlus: PrismRPGCharacterSheet.#onArmorPointsPlus,
|
||||||
|
armorPointsMinus: PrismRPGCharacterSheet.#onArmorPointsMinus,
|
||||||
|
actionPointsPlus: PrismRPGCharacterSheet.#onActionPointsPlus,
|
||||||
|
actionPointsMinus: PrismRPGCharacterSheet.#onActionPointsMinus,
|
||||||
manaPointsPlus: PrismRPGCharacterSheet.#onManaPointsPlus,
|
manaPointsPlus: PrismRPGCharacterSheet.#onManaPointsPlus,
|
||||||
manaPointsMinus: PrismRPGCharacterSheet.#onManaPointsMinus,
|
manaPointsMinus: PrismRPGCharacterSheet.#onManaPointsMinus,
|
||||||
hpPlus: PrismRPGCharacterSheet.#onHpPlus,
|
hpPlus: PrismRPGCharacterSheet.#onHpPlus,
|
||||||
hpMinus: PrismRPGCharacterSheet.#onHpMinus,
|
hpMinus: PrismRPGCharacterSheet.#onHpMinus,
|
||||||
|
hpTempPlus: PrismRPGCharacterSheet.#onHpTempPlus,
|
||||||
|
hpTempMinus: PrismRPGCharacterSheet.#onHpTempMinus,
|
||||||
|
postItemToChat: PrismRPGCharacterSheet.#onPostItemToChat,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,6 +114,7 @@ export default class PrismRPGCharacterSheet extends PrismRPGActorSheet {
|
|||||||
context.tab = context.tabs.skills
|
context.tab = context.tabs.skills
|
||||||
context.skills = doc.itemTypes.skill
|
context.skills = doc.itemTypes.skill
|
||||||
context.racialAbilities = doc.itemTypes["racial-ability"]
|
context.racialAbilities = doc.itemTypes["racial-ability"]
|
||||||
|
context.abilities = doc.itemTypes["ability"]
|
||||||
context.vulnerabilities = doc.itemTypes.vulnerability
|
context.vulnerabilities = doc.itemTypes.vulnerability
|
||||||
break
|
break
|
||||||
case "subattributes":
|
case "subattributes":
|
||||||
@@ -158,43 +166,225 @@ export default class PrismRPGCharacterSheet extends PrismRPGActorSheet {
|
|||||||
await this.document.system.rollInitiative()
|
await this.document.system.rollInitiative()
|
||||||
}
|
}
|
||||||
|
|
||||||
static #onArmorHitPointsPlus(event, target) {
|
static async #onArmorHitPointsPlus(event, target) {
|
||||||
let armorHP = this.actor.system.combat.armorHitPoints
|
let armorHP = this.actor.system.combat.armorHitPoints
|
||||||
armorHP += 1
|
armorHP += 1
|
||||||
this.actor.update({ "system.combat.armorHitPoints": armorHP })
|
this.actor.update({ "system.combat.armorHitPoints": armorHP })
|
||||||
}
|
}
|
||||||
|
|
||||||
static #onArmorHitPointsMinus(event, target) {
|
static async #onArmorHitPointsMinus(event, target) {
|
||||||
let armorHP = this.actor.system.combat.armorHitPoints
|
let armorHP = this.actor.system.combat.armorHitPoints
|
||||||
armorHP -= 1
|
armorHP -= 1
|
||||||
this.actor.update({ "system.combat.armorHitPoints": Math.max(armorHP, 0) })
|
this.actor.update({ "system.combat.armorHitPoints": Math.max(armorHP, 0) })
|
||||||
}
|
}
|
||||||
|
|
||||||
static #onManaPointsPlus(event, target) {
|
static async #onManaPointsPlus(event, target) {
|
||||||
let mana = this.actor.system.manaPoints.value
|
let mana = this.actor.system.manaPoints.value
|
||||||
mana += 1
|
mana += 1
|
||||||
this.actor.update({ "system.manaPoints.value": Math.min(mana, this.actor.system.manaPoints.max) })
|
this.actor.update({ "system.manaPoints.value": Math.min(mana, this.actor.system.manaPoints.max) })
|
||||||
}
|
}
|
||||||
|
|
||||||
static #onManaPointsMinus(event, target) {
|
static async #onManaPointsMinus(event, target) {
|
||||||
let mana = this.actor.system.manaPoints.value
|
let mana = this.actor.system.manaPoints.value
|
||||||
mana -= 1
|
mana -= 1
|
||||||
this.actor.update({ "system.manaPoints.value": Math.max(mana, 0) })
|
this.actor.update({ "system.manaPoints.value": Math.max(mana, 0) })
|
||||||
}
|
}
|
||||||
|
|
||||||
static #onHpPlus(event, target) {
|
static async #onArmorPointsPlus(event, target) {
|
||||||
|
let armor = this.actor.system.armorPoints.value
|
||||||
|
armor += 1
|
||||||
|
this.actor.update({ "system.armorPoints.value": Math.min(armor, this.actor.system.armorPoints.max) })
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #onArmorPointsMinus(event, target) {
|
||||||
|
let armor = this.actor.system.armorPoints.value
|
||||||
|
armor -= 1
|
||||||
|
this.actor.update({ "system.armorPoints.value": Math.max(armor, 0) })
|
||||||
|
}
|
||||||
|
|
||||||
|
static async#onActionPointsPlus(event, target) {
|
||||||
|
let actionPoints = this.actor.system.actionPoints.value
|
||||||
|
actionPoints += 1
|
||||||
|
this.actor.update({ "system.actionPoints.value": Math.min(actionPoints, this.actor.system.actionPoints.max) })
|
||||||
|
}
|
||||||
|
|
||||||
|
static async#onActionPointsMinus(event, target) {
|
||||||
|
let actionPoints = this.actor.system.actionPoints.value
|
||||||
|
actionPoints -= 1
|
||||||
|
this.actor.update({ "system.actionPoints.value": Math.max(actionPoints, 0) })
|
||||||
|
}
|
||||||
|
|
||||||
|
static async#onHpPlus(event, target) {
|
||||||
let hp = this.actor.system.hp.value
|
let hp = this.actor.system.hp.value
|
||||||
hp += 1
|
hp += 1
|
||||||
this.actor.update({ "system.hp.value": Math.min(hp, this.actor.system.hp.max) })
|
this.actor.update({ "system.hp.value": Math.min(hp, this.actor.system.hp.max) })
|
||||||
}
|
}
|
||||||
|
|
||||||
static #onHpMinus(event, target) {
|
static async#onHpMinus(event, target) {
|
||||||
let hp = this.actor.system.hp.value
|
let hp = this.actor.system.hp.value
|
||||||
hp -= 1
|
hp -= 1
|
||||||
this.actor.update({ "system.hp.value": Math.max(hp, 0) })
|
this.actor.update({ "system.hp.value": Math.max(hp, 0) })
|
||||||
}
|
}
|
||||||
|
|
||||||
static #onCreateEquipment(event, target) {
|
static async#onHpTempPlus(event, target) {
|
||||||
|
const temp = this.actor.system.hp.temp
|
||||||
|
this.actor.update({ "system.hp.temp": temp + 1 })
|
||||||
|
}
|
||||||
|
|
||||||
|
static async#onHpTempMinus(event, target) {
|
||||||
|
const temp = this.actor.system.hp.temp
|
||||||
|
this.actor.update({ "system.hp.temp": Math.max(temp - 1, 0) })
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #onCreateEquipment(event, target) {
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #onPostItemToChat(event, target) {
|
||||||
|
console.log("PRISM RPG | PostItemToChat action triggered", { event: event, target: target })
|
||||||
|
|
||||||
|
// Try to find the item element from the clicked target or its parents
|
||||||
|
let itemElement = null
|
||||||
|
|
||||||
|
// First try with the target (the actual clicked element)
|
||||||
|
if (event.target) {
|
||||||
|
itemElement = event.target.closest('[data-item-id]')
|
||||||
|
}
|
||||||
|
|
||||||
|
// If not found, try with currentTarget (the element with the action)
|
||||||
|
if (!itemElement && event.currentTarget) {
|
||||||
|
itemElement = event.currentTarget.closest('[data-item-id]')
|
||||||
|
}
|
||||||
|
|
||||||
|
// If still not found, try with the target parameter
|
||||||
|
if (!itemElement && target) {
|
||||||
|
itemElement = target.closest('[data-item-id]')
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("PRISM RPG | Found item element", { itemElement: itemElement })
|
||||||
|
|
||||||
|
if (!itemElement) {
|
||||||
|
console.warn("PRISM RPG | Could not find item element for posting to chat")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const itemId = itemElement.dataset.itemId
|
||||||
|
|
||||||
|
if (!itemId) {
|
||||||
|
console.warn("PRISM RPG | Item ID not found for posting to chat")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const item = this.actor.items.get(itemId)
|
||||||
|
|
||||||
|
if (!item) {
|
||||||
|
console.warn("PRISM RPG | Item not found for posting to chat", { itemId: itemId })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a chat message with the item data
|
||||||
|
const speaker = ChatMessage.getSpeaker({ actor: this.actor })
|
||||||
|
const content = await this.formatItemForChat(item)
|
||||||
|
|
||||||
|
await ChatMessage.create({
|
||||||
|
content: content,
|
||||||
|
speaker: speaker,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async formatItemForChat(item) {
|
||||||
|
// Format the item data for chat display
|
||||||
|
const itemTypeClass = `${item.type}-item`
|
||||||
|
let htmlContent = `
|
||||||
|
<div class="prismrpg-item-chat-card ${itemTypeClass}">
|
||||||
|
<div class="item-header">
|
||||||
|
<h3>${item.name}</h3>
|
||||||
|
<span class="item-type">${game.i18n.localize(`TYPES.Item.${item.type}`) || item.type}</span>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
|
||||||
|
// Add item image if available
|
||||||
|
if (item.img && !item.img.includes('icons/svg/mystery-man.svg')) {
|
||||||
|
htmlContent += `<div class="item-image"><img src="${item.img}" alt="${item.name}"></div>`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add item description if available
|
||||||
|
if (item.system.description && item.system.description.trim() !== '') {
|
||||||
|
const enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(item.system.description, { async: true })
|
||||||
|
htmlContent += `<div class="item-description">${enrichedDescription}</div>`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add specific item data based on item type
|
||||||
|
htmlContent += `<div class="item-details">`
|
||||||
|
|
||||||
|
switch (item.type) {
|
||||||
|
case 'weapon':
|
||||||
|
htmlContent += `
|
||||||
|
<div class="item-detail"><strong>Type:</strong> ${item.system.weaponType || 'Unknown'}</div>
|
||||||
|
<div class="item-detail"><strong>Damage:</strong> ${item.system.damage || 'N/A'}</div>
|
||||||
|
<div class="item-detail"><strong>APC:</strong> ${item.system.apc || 0}</div>
|
||||||
|
`
|
||||||
|
if (item.system.damageType) {
|
||||||
|
const damageTypes = []
|
||||||
|
if (item.system.damageType.piercing) damageTypes.push('Piercing')
|
||||||
|
if (item.system.damageType.bludgeoning) damageTypes.push('Bludgeoning')
|
||||||
|
if (item.system.damageType.slashing) damageTypes.push('Slashing')
|
||||||
|
if (damageTypes.length > 0) {
|
||||||
|
htmlContent += `<div class="item-detail"><strong>Damage Type:</strong> ${damageTypes.join('/')}</div>`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
|
||||||
|
case 'armor':
|
||||||
|
htmlContent += `
|
||||||
|
<div class="item-detail"><strong>Armor Type:</strong> ${item.system.armorType || 'Unknown'}</div>
|
||||||
|
<div class="item-detail"><strong>Armor Points:</strong> ${item.system.armorPoints || 0}</div>
|
||||||
|
<div class="item-detail"><strong>APC:</strong> ${item.system.apc || 0}</div>
|
||||||
|
`
|
||||||
|
break
|
||||||
|
|
||||||
|
case 'shield':
|
||||||
|
htmlContent += `
|
||||||
|
<div class="item-detail"><strong>Shield Type:</strong> ${item.system.shieldType || 'Unknown'}</div>
|
||||||
|
<div class="item-detail"><strong>Armor Points:</strong> ${item.system.armorPoints || 0}</div>
|
||||||
|
<div class="item-detail"><strong>APC:</strong> ${item.system.apc || 0}</div>
|
||||||
|
`
|
||||||
|
break
|
||||||
|
|
||||||
|
case 'skill':
|
||||||
|
htmlContent += `
|
||||||
|
<div class="item-detail"><strong>Modifier:</strong> ${item.system.modifier || 0}</div>
|
||||||
|
<div class="item-detail"><strong>Core Skill:</strong> ${item.system.isCoreSkill ? 'Yes' : 'No'}</div>
|
||||||
|
`
|
||||||
|
break
|
||||||
|
|
||||||
|
case 'spell':
|
||||||
|
htmlContent += `
|
||||||
|
<div class="item-detail"><strong>Level:</strong> ${item.system.level || 'Unknown'}</div>
|
||||||
|
<div class="item-detail"><strong>Mana Cost:</strong> ${item.system.manaCost || 0}</div>
|
||||||
|
<div class="item-detail"><strong>Casting Time:</strong> ${item.system.castingTime || 'N/A'}</div>
|
||||||
|
`
|
||||||
|
break
|
||||||
|
|
||||||
|
case 'miracle':
|
||||||
|
htmlContent += `
|
||||||
|
<div class="item-detail"><strong>Prayer Time:</strong> ${item.system.prayerTime || 'N/A'}</div>
|
||||||
|
`
|
||||||
|
break
|
||||||
|
|
||||||
|
case 'equipment':
|
||||||
|
htmlContent += `
|
||||||
|
<div class="item-detail"><strong>Weight:</strong> ${item.system.weight || 'N/A'}</div>
|
||||||
|
`
|
||||||
|
break
|
||||||
|
|
||||||
|
default:
|
||||||
|
// For other item types, just show basic info
|
||||||
|
htmlContent += `<div class="item-detail"><strong>Item Type:</strong> ${item.type}</div>`
|
||||||
|
}
|
||||||
|
|
||||||
|
htmlContent += `</div></div>`
|
||||||
|
|
||||||
|
return htmlContent
|
||||||
}
|
}
|
||||||
|
|
||||||
_onRender(context, options) {
|
_onRender(context, options) {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export default class PrismRPGClassSheet extends PrismRPGItemSheet {
|
|||||||
#getTabs() {
|
#getTabs() {
|
||||||
const tabs = {
|
const tabs = {
|
||||||
details: { id: "details", group: "primary", label: "PRISMRPG.Label.details" },
|
details: { id: "details", group: "primary", label: "PRISMRPG.Label.details" },
|
||||||
|
advancements: { id: "advancements", group: "primary", label: "PRISMRPG.Label.advancement" },
|
||||||
description: { id: "description", group: "primary", label: "PRISMRPG.Label.description" },
|
description: { id: "description", group: "primary", label: "PRISMRPG.Label.description" },
|
||||||
}
|
}
|
||||||
for (const v of Object.values(tabs)) {
|
for (const v of Object.values(tabs)) {
|
||||||
@@ -56,6 +57,142 @@ export default class PrismRPGClassSheet extends PrismRPGItemSheet {
|
|||||||
context.enrichedFeatures[key] = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.features[key], { async: true })
|
context.enrichedFeatures[key] = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.features[key], { async: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enrich all advancement descriptions
|
||||||
|
context.enrichedAdvancements = {}
|
||||||
|
context.advancementsByLevel = []
|
||||||
|
|
||||||
|
for (let i = 1; i <= 10; i++) {
|
||||||
|
const key = `level${i}`
|
||||||
|
const advancements = this.document.system.advancements[key] || []
|
||||||
|
context.enrichedAdvancements[key] = []
|
||||||
|
|
||||||
|
const enrichedAdvancementsList = []
|
||||||
|
for (let j = 0; j < advancements.length; j++) {
|
||||||
|
const enrichedDesc = await foundry.applications.ux.TextEditor.implementation.enrichHTML(advancements[j].description, { async: true })
|
||||||
|
const enrichedAdv = {
|
||||||
|
...advancements[j],
|
||||||
|
enrichedDescription: enrichedDesc,
|
||||||
|
index: j,
|
||||||
|
levelKey: key
|
||||||
|
}
|
||||||
|
context.enrichedAdvancements[key].push(enrichedAdv)
|
||||||
|
enrichedAdvancementsList.push(enrichedAdv)
|
||||||
|
}
|
||||||
|
|
||||||
|
context.advancementsByLevel.push({
|
||||||
|
level: i,
|
||||||
|
levelKey: key,
|
||||||
|
advancements: enrichedAdvancementsList
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return context
|
return context
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
_onRender(context, options) {
|
||||||
|
super._onRender(context, options)
|
||||||
|
|
||||||
|
// Add advancement button listeners
|
||||||
|
this.element.querySelectorAll(".add-advancement").forEach(btn => {
|
||||||
|
btn.addEventListener("click", this._onAddAdvancement.bind(this))
|
||||||
|
})
|
||||||
|
|
||||||
|
// Delete advancement button listeners
|
||||||
|
this.element.querySelectorAll(".delete-advancement").forEach(btn => {
|
||||||
|
btn.addEventListener("click", this._onDeleteAdvancement.bind(this))
|
||||||
|
})
|
||||||
|
|
||||||
|
// Edit advancement icon listeners
|
||||||
|
this.element.querySelectorAll(".advancement-icon").forEach(img => {
|
||||||
|
img.addEventListener("click", this._onEditAdvancementIcon.bind(this))
|
||||||
|
})
|
||||||
|
|
||||||
|
// Toggle advancement description listeners
|
||||||
|
this.element.querySelectorAll(".toggle-advancement-description").forEach(btn => {
|
||||||
|
btn.addEventListener("click", this._onToggleAdvancementDescription.bind(this))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle toggling advancement description visibility
|
||||||
|
* @param {Event} event
|
||||||
|
*/
|
||||||
|
_onToggleAdvancementDescription(event) {
|
||||||
|
event.preventDefault()
|
||||||
|
const button = event.currentTarget
|
||||||
|
const item = button.closest(".advancement-item")
|
||||||
|
const description = item.querySelector(".advancement-description")
|
||||||
|
const icon = button.querySelector("i")
|
||||||
|
|
||||||
|
description.classList.toggle("collapsed")
|
||||||
|
|
||||||
|
if (description.classList.contains("collapsed")) {
|
||||||
|
icon.classList.remove("fa-chevron-up")
|
||||||
|
icon.classList.add("fa-chevron-down")
|
||||||
|
} else {
|
||||||
|
icon.classList.remove("fa-chevron-down")
|
||||||
|
icon.classList.add("fa-chevron-up")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle adding a new advancement to a level
|
||||||
|
* @param {Event} event
|
||||||
|
*/
|
||||||
|
async _onAddAdvancement(event) {
|
||||||
|
event.preventDefault()
|
||||||
|
const level = event.currentTarget.dataset.level
|
||||||
|
const advancements = foundry.utils.deepClone(this.document.system.advancements[level] || [])
|
||||||
|
|
||||||
|
advancements.push({
|
||||||
|
icon: "systems/fvtt-prism-rpg/assets/icons/advancement.svg",
|
||||||
|
name: "",
|
||||||
|
description: ""
|
||||||
|
})
|
||||||
|
|
||||||
|
await this.document.update({
|
||||||
|
[`system.advancements.${level}`]: advancements
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle deleting an advancement from a level
|
||||||
|
* @param {Event} event
|
||||||
|
*/
|
||||||
|
async _onDeleteAdvancement(event) {
|
||||||
|
event.preventDefault()
|
||||||
|
const level = event.currentTarget.dataset.level
|
||||||
|
const index = parseInt(event.currentTarget.dataset.index)
|
||||||
|
|
||||||
|
const advancements = foundry.utils.deepClone(this.document.system.advancements[level] || [])
|
||||||
|
advancements.splice(index, 1)
|
||||||
|
|
||||||
|
await this.document.update({
|
||||||
|
[`system.advancements.${level}`]: advancements
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle editing an advancement icon
|
||||||
|
* @param {Event} event
|
||||||
|
*/
|
||||||
|
async _onEditAdvancementIcon(event) {
|
||||||
|
event.preventDefault()
|
||||||
|
const level = event.currentTarget.dataset.level
|
||||||
|
const index = parseInt(event.currentTarget.dataset.index)
|
||||||
|
|
||||||
|
const fp = new FilePicker({
|
||||||
|
type: "image",
|
||||||
|
current: this.document.system.advancements[level][index].icon,
|
||||||
|
callback: async (path) => {
|
||||||
|
const advancements = foundry.utils.deepClone(this.document.system.advancements[level] || [])
|
||||||
|
advancements[index].icon = path
|
||||||
|
await this.document.update({
|
||||||
|
[`system.advancements.${level}`]: advancements
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
fp.render(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
/**
|
||||||
|
* Afflictions — negative status effects (Mundane & Magic)
|
||||||
|
* @type {StatusEffectConfig[]}
|
||||||
|
*/
|
||||||
|
export const AFFLICTIONS = [
|
||||||
|
// ── Mundane ────────────────────────────────────────────────────────────────
|
||||||
|
{ id: "aff-alkalized", name: "PRISMRPG.Status.Alkalized", icon: "icons/svg/acid.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-bleed", name: "PRISMRPG.Status.Bleed", icon: "icons/svg/blood.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-blind", name: "PRISMRPG.Status.Blind", icon: "icons/svg/blind.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-deaf", name: "PRISMRPG.Status.Deaf", icon: "icons/svg/deaf.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-diseased", name: "PRISMRPG.Status.Diseased", icon: "icons/svg/biohazard.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-distracted", name: "PRISMRPG.Status.Distracted", icon: "icons/svg/daze.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-exhaustion", name: "PRISMRPG.Status.Exhaustion", icon: "icons/svg/sleep.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-frightened", name: "PRISMRPG.Status.Frightened", icon: "icons/svg/terror.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-marked", name: "PRISMRPG.Status.Marked", icon: "icons/svg/target.svg", category: "affliction", typing: "both" },
|
||||||
|
{ id: "aff-mute", name: "PRISMRPG.Status.Mute", icon: "icons/svg/silenced.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-paralyzed", name: "PRISMRPG.Status.Paralyzed", icon: "icons/svg/paralysis.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-petrified", name: "PRISMRPG.Status.Petrified", icon: "icons/svg/frozen.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-poison", name: "PRISMRPG.Status.Poison", icon: "icons/svg/poison.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-prone", name: "PRISMRPG.Status.Prone", icon: "icons/svg/falling.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-rage", name: "PRISMRPG.Status.Rage", icon: "icons/svg/fire.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-sealed", name: "PRISMRPG.Status.Sealed", icon: "icons/svg/net.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-staggered", name: "PRISMRPG.Status.Staggered", icon: "icons/svg/daze.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-stunned", name: "PRISMRPG.Status.Stunned", icon: "icons/svg/stun.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-taunt", name: "PRISMRPG.Status.Taunt", icon: "icons/svg/eye.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-unconscious",name: "PRISMRPG.Status.Unconscious",icon: "icons/svg/unconscious.svg", category: "affliction", typing: "mundane" },
|
||||||
|
{ id: "aff-wounded", name: "PRISMRPG.Status.Wounded", icon: "icons/svg/degen.svg", category: "affliction", typing: "mundane" },
|
||||||
|
// ── Magic ──────────────────────────────────────────────────────────────────
|
||||||
|
{ id: "aff-banished", name: "PRISMRPG.Status.Banished", icon: "icons/svg/wing.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-seep", name: "PRISMRPG.Status.Seep", icon: "icons/svg/acid.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-sightless", name: "PRISMRPG.Status.Sightless", icon: "icons/svg/blind.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-cursed", name: "PRISMRPG.Status.Cursed", icon: "icons/svg/sun.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-soundless", name: "PRISMRPG.Status.Soundless", icon: "icons/svg/deaf.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-plagued", name: "PRISMRPG.Status.Plagued", icon: "icons/svg/biohazard.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-compulsed", name: "PRISMRPG.Status.Compulsed", icon: "icons/svg/eye.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-fatigue", name: "PRISMRPG.Status.Fatigue", icon: "icons/svg/sleep.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-horror", name: "PRISMRPG.Status.Horror", icon: "icons/svg/terror.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-madness", name: "PRISMRPG.Status.Madness", icon: "icons/svg/daze.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-silenced", name: "PRISMRPG.Status.Silenced", icon: "icons/svg/silenced.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-locked", name: "PRISMRPG.Status.Locked", icon: "icons/svg/net.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-dazed", name: "PRISMRPG.Status.Dazed", icon: "icons/svg/daze.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-numbed", name: "PRISMRPG.Status.Numbed", icon: "icons/svg/frozen.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-comatose", name: "PRISMRPG.Status.Comatose", icon: "icons/svg/unconscious.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-shattered", name: "PRISMRPG.Status.Shattered", icon: "icons/svg/blood.svg", category: "affliction", typing: "magic" },
|
||||||
|
// ── Elemental (Magic) ──────────────────────────────────────────────────────
|
||||||
|
{ id: "aff-burning", name: "PRISMRPG.Status.Burning", icon: "icons/svg/fire.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-chilled", name: "PRISMRPG.Status.Chilled", icon: "icons/svg/frozen.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-corroded", name: "PRISMRPG.Status.Corroded", icon: "icons/svg/acid.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-necrosis", name: "PRISMRPG.Status.Necrosis", icon: "icons/svg/degen.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-radiated", name: "PRISMRPG.Status.Radiated", icon: "icons/svg/lightning.svg", category: "affliction", typing: "magic" },
|
||||||
|
{ id: "aff-shocked", name: "PRISMRPG.Status.Shocked", icon: "icons/svg/lightning.svg", category: "affliction", typing: "magic" },
|
||||||
|
]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Imbuements — positive status effects (Mundane & Magic)
|
||||||
|
* @type {StatusEffectConfig[]}
|
||||||
|
*/
|
||||||
|
export const IMBUEMENTS = [
|
||||||
|
// ── Mundane ────────────────────────────────────────────────────────────────
|
||||||
|
{ id: "imb-aided", name: "PRISMRPG.Status.Aided", icon: "icons/svg/upgrade.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-alert", name: "PRISMRPG.Status.Alert", icon: "icons/svg/eye.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-alkalized", name: "PRISMRPG.Status.Alkalized", icon: "icons/svg/acid.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-bestowed", name: "PRISMRPG.Status.Bestowed", icon: "icons/svg/angel.svg", category: "imbuement", typing: "both" },
|
||||||
|
{ id: "imb-concealed", name: "PRISMRPG.Status.Concealed", icon: "icons/svg/invisible.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-enhance", name: "PRISMRPG.Status.Enhance", icon: "icons/svg/upgrade.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-inspired", name: "PRISMRPG.Status.Inspired", icon: "icons/svg/regen.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-keen", name: "PRISMRPG.Status.Keen", icon: "icons/svg/eye.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-life-drain", name: "PRISMRPG.Status.LifeDrain", icon: "icons/svg/regen.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-madness", name: "PRISMRPG.Status.Madness", icon: "icons/svg/daze.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-prepared", name: "PRISMRPG.Status.Prepared", icon: "icons/svg/upgrade.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-rage", name: "PRISMRPG.Status.Rage", icon: "icons/svg/fire.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-reinforced", name: "PRISMRPG.Status.Reinforced", icon: "icons/svg/mage-shield.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-renewed", name: "PRISMRPG.Status.Renewed", icon: "icons/svg/regen.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-supplied", name: "PRISMRPG.Status.Supplied", icon: "icons/svg/upgrade.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-surged", name: "PRISMRPG.Status.Surged", icon: "icons/svg/lightning.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
{ id: "imb-trance", name: "PRISMRPG.Status.Trance", icon: "icons/svg/sleep.svg", category: "imbuement", typing: "mundane" },
|
||||||
|
// ── Magic ──────────────────────────────────────────────────────────────────
|
||||||
|
{ id: "imb-blessed", name: "PRISMRPG.Status.Blessed", icon: "icons/svg/angel.svg", category: "imbuement", typing: "magic" },
|
||||||
|
{ id: "imb-anchored", name: "PRISMRPG.Status.Anchored", icon: "icons/svg/net.svg", category: "imbuement", typing: "magic" },
|
||||||
|
{ id: "imb-saturated", name: "PRISMRPG.Status.Saturated", icon: "icons/svg/regen.svg", category: "imbuement", typing: "magic" },
|
||||||
|
{ id: "imb-invisible", name: "PRISMRPG.Status.Invisible", icon: "icons/svg/invisible.svg", category: "imbuement", typing: "magic" },
|
||||||
|
{ id: "imb-enchanted", name: "PRISMRPG.Status.Enchanted", icon: "icons/svg/mage-shield.svg", category: "imbuement", typing: "magic" },
|
||||||
|
{ id: "imb-heroism", name: "PRISMRPG.Status.Heroism", icon: "icons/svg/upgrade.svg", category: "imbuement", typing: "magic" },
|
||||||
|
{ id: "imb-mana-drain", name: "PRISMRPG.Status.ManaDrain", icon: "icons/svg/regen.svg", category: "imbuement", typing: "magic" },
|
||||||
|
{ id: "imb-fury", name: "PRISMRPG.Status.Fury", icon: "icons/svg/fire.svg", category: "imbuement", typing: "magic" },
|
||||||
|
{ id: "imb-warded", name: "PRISMRPG.Status.Warded", icon: "icons/svg/holy-shield.svg", category: "imbuement", typing: "magic" },
|
||||||
|
{ id: "imb-regeneration", name: "PRISMRPG.Status.Regeneration", icon: "icons/svg/regen.svg", category: "imbuement", typing: "magic" },
|
||||||
|
{ id: "imb-haste", name: "PRISMRPG.Status.Haste", icon: "icons/svg/wingfoot.svg", category: "imbuement", typing: "magic" },
|
||||||
|
]
|
||||||
@@ -36,8 +36,7 @@ export default class PrismRPGActor extends Actor {
|
|||||||
if (this.type === "character") {
|
if (this.type === "character") {
|
||||||
Object.assign(prototypeToken, {
|
Object.assign(prototypeToken, {
|
||||||
sight: { enabled: true },
|
sight: { enabled: true },
|
||||||
actorLink: true,
|
actorLink: false
|
||||||
disposition: CONST.TOKEN_DISPOSITIONS.FRIENDLY,
|
|
||||||
})
|
})
|
||||||
this.updateSource({ prototypeToken })
|
this.updateSource({ prototypeToken })
|
||||||
}
|
}
|
||||||
@@ -159,38 +158,14 @@ export default class PrismRPGActor extends Actor {
|
|||||||
case "weapon-damage-medium":
|
case "weapon-damage-medium":
|
||||||
case "weapon-attack": {
|
case "weapon-attack": {
|
||||||
let weapon = this.items.find((i) => i.type === "weapon" && i.id === rollKey)
|
let weapon = this.items.find((i) => i.type === "weapon" && i.id === rollKey)
|
||||||
let skill
|
if (!weapon) {
|
||||||
let skills = this.items.filter((i) => i.type === "skill" && i.name.toLowerCase() === weapon.name.toLowerCase())
|
console.error("Weapon not found", weapon, skill)
|
||||||
if (skills.length > 0) {
|
|
||||||
skill = this.getBestWeaponClassSkill(skills, rollType, 1.0)
|
|
||||||
} else {
|
|
||||||
skills = this.items.filter((i) => i.type === "skill" && i.name.toLowerCase().replace(" skill", "") === weapon.name.toLowerCase())
|
|
||||||
if (skills.length > 0) {
|
|
||||||
skill = this.getBestWeaponClassSkill(skills, rollType, 1.0)
|
|
||||||
} else {
|
|
||||||
skills = this.items.filter((i) => i.type === "skill" && i.system.weaponClass === weapon.system.weaponClass)
|
|
||||||
if (skills.length > 0) {
|
|
||||||
skill = this.getBestWeaponClassSkill(skills, rollType, 0.5)
|
|
||||||
} else {
|
|
||||||
skills = this.items.filter((i) => i.type === "skill" && i.system.weaponClass.includes(SYSTEM.WEAPON_CATEGORIES[weapon.system.weaponClass]))
|
|
||||||
if (skills.length > 0) {
|
|
||||||
skill = this.getBestWeaponClassSkill(skills, rollType, 0.25)
|
|
||||||
} else {
|
|
||||||
ui.notifications.warn(game.i18n.localize("PRISMRPG.Notifications.skillNotFound"))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!weapon || !skill) {
|
|
||||||
console.error("Weapon or skill not found", weapon, skill)
|
|
||||||
ui.notifications.warn(game.i18n.localize("PRISMRPG.Notifications.skillNotFound"))
|
ui.notifications.warn(game.i18n.localize("PRISMRPG.Notifications.skillNotFound"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a plain object for rollTarget to ensure weapon data is preserved
|
// Create a plain object for rollTarget to ensure weapon data is preserved
|
||||||
rollTarget = {
|
rollTarget = {
|
||||||
...skill.toObject(),
|
|
||||||
weapon: weapon.toObject(),
|
weapon: weapon.toObject(),
|
||||||
rollKey: rollKey,
|
rollKey: rollKey,
|
||||||
combat: foundry.utils.duplicate(this.system.combat),
|
combat: foundry.utils.duplicate(this.system.combat),
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@ export { default as PrismRPGSkill } from "./skill.mjs"
|
|||||||
export { default as PrismRPGArmor } from "./armor.mjs"
|
export { default as PrismRPGArmor } from "./armor.mjs"
|
||||||
export { default as PrismRPGShield } from "./shield.mjs"
|
export { default as PrismRPGShield } from "./shield.mjs"
|
||||||
export { default as PrismRPGRacialAbility } from "./racial-ability.mjs"
|
export { default as PrismRPGRacialAbility } from "./racial-ability.mjs"
|
||||||
|
export { default as PrismRPGAbility } from "./ability.mjs"
|
||||||
export { default as PrismRPGEquipment } from "./equipment.mjs"
|
export { default as PrismRPGEquipment } from "./equipment.mjs"
|
||||||
export { default as PrismRPGRace } from "./race.mjs"
|
export { default as PrismRPGRace } from "./race.mjs"
|
||||||
export { default as PrismRPGClass } from "./class.mjs"
|
export { default as PrismRPGClass } from "./class.mjs"
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
export default class PrismRPGAbility extends foundry.abstract.TypeDataModel {
|
||||||
|
static defineSchema() {
|
||||||
|
const fields = foundry.data.fields
|
||||||
|
const schema = {}
|
||||||
|
|
||||||
|
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||||
|
|
||||||
|
return schema
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static LOCALIZATION_PREFIXES = ["PRISMRPG.Ability"]
|
||||||
|
|
||||||
|
}
|
||||||
+50
-50
@@ -89,6 +89,11 @@ export default class PrismRPGCharacter extends foundry.abstract.TypeDataModel {
|
|||||||
max: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
max: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
schema.actionPoints = new fields.SchemaField({
|
||||||
|
value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||||
|
max: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||||
|
})
|
||||||
|
|
||||||
schema.biodata = new fields.SchemaField({
|
schema.biodata = new fields.SchemaField({
|
||||||
level: new fields.NumberField({ ...requiredInteger, initial: 1, min: 1 }),
|
level: new fields.NumberField({ ...requiredInteger, initial: 1, min: 1 }),
|
||||||
alignment: new fields.StringField({ required: true, nullable: false, initial: "" }),
|
alignment: new fields.StringField({ required: true, nullable: false, initial: "" }),
|
||||||
@@ -165,6 +170,21 @@ export default class PrismRPGCharacter extends foundry.abstract.TypeDataModel {
|
|||||||
prepareDerivedData() {
|
prepareDerivedData() {
|
||||||
super.prepareDerivedData();
|
super.prepareDerivedData();
|
||||||
|
|
||||||
|
// Calculate action points max based on level
|
||||||
|
const level = this.biodata.level
|
||||||
|
let actionPointsMax = 4
|
||||||
|
if (level >= 3 && level <= 5) {
|
||||||
|
actionPointsMax = 5
|
||||||
|
} else if (level >= 6 && level <= 8) {
|
||||||
|
actionPointsMax = 6
|
||||||
|
} else if (level >= 9 && level <= 10) {
|
||||||
|
actionPointsMax = 7
|
||||||
|
}
|
||||||
|
// Set max action points (but don't override if already set to a higher value)
|
||||||
|
if (this.actionPoints.max < actionPointsMax) {
|
||||||
|
this.actionPoints.max = actionPointsMax
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate sub-attributes from parent characteristics
|
// Calculate sub-attributes from parent characteristics
|
||||||
// Sub-attribute = lowest ability modifier between the two parent characteristics
|
// Sub-attribute = lowest ability modifier between the two parent characteristics
|
||||||
for (let subAttrKey in SYSTEM.SUB_ATTRIBUTES) {
|
for (let subAttrKey in SYSTEM.SUB_ATTRIBUTES) {
|
||||||
@@ -241,66 +261,46 @@ export default class PrismRPGCharacter extends foundry.abstract.TypeDataModel {
|
|||||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rolls initiative for the character: 1d20 + initiative modifier
|
||||||
|
* @param {string} combatId - Optional combat ID to update
|
||||||
|
* @param {string} combatantId - Optional combatant ID to update
|
||||||
|
* @returns {Promise<Roll|null>} The initiative roll or null if cancelled
|
||||||
|
*/
|
||||||
async rollInitiative(combatId = undefined, combatantId = undefined) {
|
async rollInitiative(combatId = undefined, combatantId = undefined) {
|
||||||
const hasTarget = false
|
// Get the initiative sub-attribute modifier
|
||||||
let actorClass = this.biodata.class;
|
const initiativeModifier = this.subAttributes.initiative.value
|
||||||
|
|
||||||
let wisDef = SYSTEM.CHARACTERISTICS_TABLES.wis.find((c) => c.value === this.characteristics.wis.value)
|
// Create the roll formula: 1d20 + initiative modifier
|
||||||
let maxInit = Number(wisDef.init_cap) || 1000
|
const formula = `1d20 + ${initiativeModifier}`
|
||||||
|
|
||||||
let roll = await PrismRPGRoll.promptInitiative({
|
// Roll the initiative
|
||||||
actorId: this.parent.id,
|
let initRoll = new Roll(formula)
|
||||||
actorName: this.parent.name,
|
await initRoll.evaluate()
|
||||||
actorImage: this.parent.img,
|
|
||||||
combatId,
|
// Create the chat message
|
||||||
combatantId,
|
let msg = await initRoll.toMessage({
|
||||||
actorClass,
|
flavor: `${game.i18n.localize("PRISMRPG.Label.initiative")} - ${this.parent.name}`,
|
||||||
maxInit,
|
speaker: ChatMessage.getSpeaker({ actor: this.parent })
|
||||||
})
|
})
|
||||||
if (!roll) return null
|
|
||||||
|
|
||||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
// Wait for 3D dice animation if enabled
|
||||||
|
if (game?.dice3d) {
|
||||||
|
await game.dice3d.waitFor3DAnimationByMessageID(msg.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
async rollProgressionDice(combatId, combatantId, rollProgressionCount) {
|
// Update the combatant's initiative if in combat
|
||||||
|
if (combatId && combatantId) {
|
||||||
// Get all weapons from the actor
|
let combat = game.combats.get(combatId)
|
||||||
let weapons = this.parent.items.filter(i => i.type === "weapon" && i.system.weaponType === "melee")
|
if (combat) {
|
||||||
let weaponsChoices = weapons.map(w => { return { id: w.id, name: `${w.name} (${w.system.combatProgressionDice.toUpperCase()})`, combatProgressionDice: w.system.combatProgressionDice.toUpperCase() } })
|
await combat.updateEmbeddedDocuments("Combatant", [{
|
||||||
let rangeWeapons = this.parent.items.filter(i => i.type === "weapon" && i.system.weaponType === "ranged")
|
_id: combatantId,
|
||||||
for (let w of rangeWeapons) {
|
initiative: initRoll.total
|
||||||
weaponsChoices.push({ id: `${w.id}simpleAim`, name: `${w.name} (Simple Aim: ${w.system.speed.simpleAim.toUpperCase()})`, combatProgressionDice: w.system.speed.simpleAim.toUpperCase() })
|
}])
|
||||||
weaponsChoices.push({ id: `${w.id}carefulAim`, name: `${w.name} (Careful Aim: ${w.system.speed.carefulAim.toUpperCase()})`, combatProgressionDice: w.system.speed.carefulAim.toUpperCase() })
|
|
||||||
weaponsChoices.push({ id: `${w.id}focusedAim`, name: `${w.name} (Focused Aim: ${w.system.speed.focusedAim.toUpperCase()})`, combatProgressionDice: w.system.speed.focusedAim.toUpperCase() })
|
|
||||||
}
|
|
||||||
if (this.biodata.magicUser || this.biodata.clericUser) {
|
|
||||||
let spells = this.parent.items.filter(i => i.type === "spell" || i.type === "miracle")
|
|
||||||
for (let s of spells) {
|
|
||||||
let title = ""
|
|
||||||
let formula = ""
|
|
||||||
if (s.type === "spell") {
|
|
||||||
let dice = PrismRPGUtils.getLethargyDice(s.system.level)
|
|
||||||
title = `${s.name} (Casting time: ${s.system.castingTime}, Lethargy: ${dice})`
|
|
||||||
formula = `${s.system.castingTime}+${dice}`
|
|
||||||
} else {
|
|
||||||
title = `${s.name} (Prayer time: ${s.system.prayerTime})`
|
|
||||||
formula = `${s.system.prayerTime}`
|
|
||||||
}
|
|
||||||
weaponsChoices.push({ id: s.id, name: title, combatProgressionDice: formula })
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let roll = await PrismRPGRoll.promptCombatAction({
|
return initRoll
|
||||||
actorId: this.parent.id,
|
|
||||||
actorName: this.parent.name,
|
|
||||||
actorImage: this.parent.img,
|
|
||||||
weaponsChoices,
|
|
||||||
combatId,
|
|
||||||
combatantId,
|
|
||||||
rollProgressionCount,
|
|
||||||
type: "progression",
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,41 @@ export default class PrismRPGClass extends foundry.abstract.TypeDataModel {
|
|||||||
level10: new fields.HTMLField({ initial: "" })
|
level10: new fields.HTMLField({ initial: "" })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Advancements (list of advancements per level with icon, name and description)
|
||||||
|
const advancementSchema = () => new fields.ArrayField(
|
||||||
|
new fields.SchemaField({
|
||||||
|
icon: new fields.StringField({
|
||||||
|
required: true,
|
||||||
|
initial: "",
|
||||||
|
label: "Icon"
|
||||||
|
}),
|
||||||
|
name: new fields.StringField({
|
||||||
|
required: true,
|
||||||
|
initial: "",
|
||||||
|
label: "Name"
|
||||||
|
}),
|
||||||
|
description: new fields.HTMLField({
|
||||||
|
required: true,
|
||||||
|
initial: "",
|
||||||
|
label: "Description"
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
{ initial: [] }
|
||||||
|
)
|
||||||
|
|
||||||
|
schema.advancements = new fields.SchemaField({
|
||||||
|
level1: advancementSchema(),
|
||||||
|
level2: advancementSchema(),
|
||||||
|
level3: advancementSchema(),
|
||||||
|
level4: advancementSchema(),
|
||||||
|
level5: advancementSchema(),
|
||||||
|
level6: advancementSchema(),
|
||||||
|
level7: advancementSchema(),
|
||||||
|
level8: advancementSchema(),
|
||||||
|
level9: advancementSchema(),
|
||||||
|
level10: advancementSchema()
|
||||||
|
})
|
||||||
|
|
||||||
// Proficiencies granted by this class
|
// Proficiencies granted by this class
|
||||||
schema.weaponProficiencies = new fields.StringField({
|
schema.weaponProficiencies = new fields.StringField({
|
||||||
required: true,
|
required: true,
|
||||||
@@ -156,4 +191,36 @@ export default class PrismRPGClass extends foundry.abstract.TypeDataModel {
|
|||||||
}
|
}
|
||||||
return features
|
return features
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current level's advancements
|
||||||
|
*/
|
||||||
|
get currentLevelAdvancements() {
|
||||||
|
return this.advancements[`level${this.level}`] || []
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all advancements up to current level
|
||||||
|
*/
|
||||||
|
get allAdvancementsUpToLevel() {
|
||||||
|
const advancements = []
|
||||||
|
for (let i = 1; i <= this.level; i++) {
|
||||||
|
const levelAdvancements = this.advancements[`level${i}`]
|
||||||
|
if (levelAdvancements && levelAdvancements.length > 0) {
|
||||||
|
advancements.push({
|
||||||
|
level: i,
|
||||||
|
advancements: levelAdvancements
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return advancements
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get advancements for a specific level
|
||||||
|
*/
|
||||||
|
getAdvancementsForLevel(level) {
|
||||||
|
if (level < 1 || level > 10) return []
|
||||||
|
return this.advancements[`level${level}`] || []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-5
@@ -13,11 +13,6 @@ export default class PrismRPGUtils {
|
|||||||
return compendiumData.filter(filter)
|
return compendiumData.filter(filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
static pushCombatOptions(html, options) {
|
|
||||||
options.push({ name: "Reset Progression", condition: true, icon: '<i class="fas fa-rotate-right"></i>', callback: target => { game.combat.resetProgression(target.data('combatant-id')); } })
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static setHookListeners() {
|
static setHookListeners() {
|
||||||
|
|
||||||
@@ -177,6 +172,11 @@ export default class PrismRPGUtils {
|
|||||||
return str ? str.toUpperCase() : '';
|
return str ? str.toUpperCase() : '';
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Handlebars.registerHelper('replace', function (str, search, replacement) {
|
||||||
|
if (!str) return '';
|
||||||
|
return str.replace(search, replacement);
|
||||||
|
})
|
||||||
|
|
||||||
Handlebars.registerHelper('isEnabled', function (configKey) {
|
Handlebars.registerHelper('isEnabled', function (configKey) {
|
||||||
return game.settings.get("bol", configKey);
|
return game.settings.get("bol", configKey);
|
||||||
})
|
})
|
||||||
@@ -265,6 +265,7 @@ export default class PrismRPGUtils {
|
|||||||
const templatePaths = [
|
const templatePaths = [
|
||||||
'systems/fvtt-prism-rpg/templates/partial-item-effects.hbs',
|
'systems/fvtt-prism-rpg/templates/partial-item-effects.hbs',
|
||||||
'systems/fvtt-prism-rpg/templates/weapon-types-config.hbs',
|
'systems/fvtt-prism-rpg/templates/weapon-types-config.hbs',
|
||||||
|
'systems/fvtt-prism-rpg/templates/chat-new-round.hbs',
|
||||||
]
|
]
|
||||||
return foundry.applications.handlebars.loadTemplates(templatePaths)
|
return foundry.applications.handlebars.loadTemplates(templatePaths)
|
||||||
}
|
}
|
||||||
|
|||||||
+79
-6
@@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { SYSTEM } from "./module/config/system.mjs"
|
import { SYSTEM } from "./module/config/system.mjs"
|
||||||
|
import { AFFLICTIONS, IMBUEMENTS } from "./module/config/effects.mjs"
|
||||||
globalThis.SYSTEM = SYSTEM // Expose the SYSTEM object to the global scope
|
globalThis.SYSTEM = SYSTEM // Expose the SYSTEM object to the global scope
|
||||||
|
|
||||||
// Import modules
|
// Import modules
|
||||||
@@ -11,7 +12,7 @@ import * as models from "./module/models/_module.mjs"
|
|||||||
import * as documents from "./module/documents/_module.mjs"
|
import * as documents from "./module/documents/_module.mjs"
|
||||||
import * as applications from "./module/applications/_module.mjs"
|
import * as applications from "./module/applications/_module.mjs"
|
||||||
|
|
||||||
import { PrismRPGCombatTracker, PrismRPGCombat } from "./module/applications/combat.mjs"
|
import { PrismRPGCombat } from "./module/applications/combat.mjs"
|
||||||
import { Macros } from "./module/macros.mjs"
|
import { Macros } from "./module/macros.mjs"
|
||||||
import { setupTextEnrichers } from "./module/enrichers.mjs"
|
import { setupTextEnrichers } from "./module/enrichers.mjs"
|
||||||
import { default as PrismRPGUtils } from "./module/utils.mjs"
|
import { default as PrismRPGUtils } from "./module/utils.mjs"
|
||||||
@@ -36,8 +37,11 @@ Hooks.once("init", function () {
|
|||||||
documents,
|
documents,
|
||||||
}
|
}
|
||||||
|
|
||||||
CONFIG.ui.combat = PrismRPGCombatTracker
|
CONFIG.Combat.documentClass = PrismRPGCombat
|
||||||
CONFIG.Combat.documentClass = PrismRPGCombat;
|
CONFIG.Combat.initiative = {
|
||||||
|
formula: "1d20 + @subAttributes.initiative.value",
|
||||||
|
decimals: 2
|
||||||
|
}
|
||||||
|
|
||||||
CONFIG.Actor.documentClass = documents.PrismRPGActor
|
CONFIG.Actor.documentClass = documents.PrismRPGActor
|
||||||
CONFIG.Actor.dataModels = {
|
CONFIG.Actor.dataModels = {
|
||||||
@@ -49,6 +53,7 @@ Hooks.once("init", function () {
|
|||||||
CONFIG.Item.dataModels = {
|
CONFIG.Item.dataModels = {
|
||||||
skill: models.PrismRPGSkill,
|
skill: models.PrismRPGSkill,
|
||||||
"racial-ability": models.PrismRPGRacialAbility,
|
"racial-ability": models.PrismRPGRacialAbility,
|
||||||
|
ability: models.PrismRPGAbility,
|
||||||
weapon: models.PrismRPGWeapon,
|
weapon: models.PrismRPGWeapon,
|
||||||
armor: models.PrismRPGArmor,
|
armor: models.PrismRPGArmor,
|
||||||
shield: models.PrismRPGShield,
|
shield: models.PrismRPGShield,
|
||||||
@@ -67,6 +72,7 @@ Hooks.once("init", function () {
|
|||||||
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ActorSheet)
|
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ActorSheet)
|
||||||
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGSkillSheet, { types: ["skill"], makeDefault: true })
|
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGSkillSheet, { types: ["skill"], makeDefault: true })
|
||||||
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGRacialAbilitySheet, { types: ["racial-ability"], makeDefault: true })
|
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGRacialAbilitySheet, { types: ["racial-ability"], makeDefault: true })
|
||||||
|
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGAbilitySheet, { types: ["ability"], makeDefault: true })
|
||||||
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGWeaponSheet, { types: ["weapon"], makeDefault: true })
|
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGWeaponSheet, { types: ["weapon"], makeDefault: true })
|
||||||
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGSpellSheet, { types: ["spell"], makeDefault: true })
|
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGSpellSheet, { types: ["spell"], makeDefault: true })
|
||||||
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGArmorSheet, { types: ["armor"], makeDefault: true })
|
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGArmorSheet, { types: ["armor"], makeDefault: true })
|
||||||
@@ -76,6 +82,13 @@ Hooks.once("init", function () {
|
|||||||
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGClassSheet, { types: ["class"], makeDefault: true })
|
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGClassSheet, { types: ["class"], makeDefault: true })
|
||||||
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGCharacterPathSheet, { types: ["character-path"], makeDefault: true })
|
foundry.documents.collections.Items.registerSheet("prismRPG", applications.PrismRPGCharacterPathSheet, { types: ["character-path"], makeDefault: true })
|
||||||
|
|
||||||
|
// Status Effects — Afflictions & Imbuements
|
||||||
|
CONFIG.statusEffects = [
|
||||||
|
{ id: "dead", name: "EFFECT.StatusDead", icon: "icons/svg/skull.svg" },
|
||||||
|
...AFFLICTIONS,
|
||||||
|
...IMBUEMENTS,
|
||||||
|
]
|
||||||
|
|
||||||
// Other Document Configuration
|
// Other Document Configuration
|
||||||
CONFIG.ChatMessage.documentClass = documents.PrismRPGChatMessage
|
CONFIG.ChatMessage.documentClass = documents.PrismRPGChatMessage
|
||||||
|
|
||||||
@@ -193,6 +206,32 @@ Hooks.on(hookName, (message, html, data) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle new round AP/mana restore buttons (GM only)
|
||||||
|
if (typeMessage === "newRound") {
|
||||||
|
$html.find(".new-round-restore-btn").click(async (event) => {
|
||||||
|
const btn = event.currentTarget
|
||||||
|
const actorId = btn.dataset.actorId
|
||||||
|
|
||||||
|
const targets = actorId === "all"
|
||||||
|
? $html.find(".new-round-restore-btn[data-actor-id!='all']").toArray().map(b => game.actors.get(b.dataset.actorId)).filter(Boolean)
|
||||||
|
: [game.actors.get(actorId)].filter(Boolean)
|
||||||
|
|
||||||
|
for (const actor of targets) {
|
||||||
|
await actor.update({
|
||||||
|
"system.actionPoints.value": actor.system.actionPoints.max,
|
||||||
|
"system.manaPoints.value": Math.min(actor.system.manaPoints.value + 1, actor.system.manaPoints.max)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actorId === "all") {
|
||||||
|
$html.find(".new-round-restore-btn").prop("disabled", true).addClass("restored")
|
||||||
|
} else {
|
||||||
|
btn.disabled = true
|
||||||
|
btn.classList.add("restored")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Handle Roll Damage button click in weapon attack messages
|
// Handle Roll Damage button click in weapon attack messages
|
||||||
$html.find(".roll-damage-button").click(async (event) => {
|
$html.find(".roll-damage-button").click(async (event) => {
|
||||||
const btn = event.currentTarget
|
const btn = event.currentTarget
|
||||||
@@ -208,10 +247,44 @@ Hooks.on(hookName, (message, html, data) => {
|
|||||||
await actor.prepareRoll("weapon-damage-medium", weaponId)
|
await actor.prepareRoll("weapon-damage-medium", weaponId)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
/**
|
||||||
|
* Send a GM-only chat message with restore buttons at the start of each new round
|
||||||
|
*/
|
||||||
|
Hooks.on("updateCombat", async (combat, change, _options, _userId) => {
|
||||||
|
if (!game.user.isGM) return
|
||||||
|
if (change.round === undefined || change.round <= 1) return
|
||||||
|
|
||||||
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
// Deduplicated character-type actors from the active combat
|
||||||
PrismRPGUtils.pushCombatOptions(html, options);
|
const seen = new Set()
|
||||||
});
|
const playerActors = combat.combatants.contents
|
||||||
|
.filter(c => c.actor?.type === "character" && !seen.has(c.actor.id) && seen.add(c.actor.id))
|
||||||
|
.map(c => ({ id: c.actor.id, name: c.actor.name, img: c.actor.img }))
|
||||||
|
|
||||||
|
if (playerActors.length === 0) return
|
||||||
|
|
||||||
|
const content = await foundry.applications.handlebars.renderTemplate(
|
||||||
|
"systems/fvtt-prism-rpg/templates/chat-new-round.hbs",
|
||||||
|
{ actors: playerActors, round: change.round }
|
||||||
|
)
|
||||||
|
await ChatMessage.create({
|
||||||
|
content,
|
||||||
|
whisper: ChatMessage.getWhisperRecipients("GM"),
|
||||||
|
flags: { prismRPG: { typeMessage: "newRound" } }
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inject a visual separator between Afflictions and Imbuements in the Token HUD status tray
|
||||||
|
*/
|
||||||
|
Hooks.on("renderTokenHUD", (_app, html) => {
|
||||||
|
const tray = html.querySelector(".status-effects")
|
||||||
|
if (!tray) return
|
||||||
|
const firstImb = tray.querySelector("[data-status-id^='imb-']")
|
||||||
|
if (!firstImb) return
|
||||||
|
const sep = document.createElement("div")
|
||||||
|
sep.className = "status-separator"
|
||||||
|
firstImb.before(sep)
|
||||||
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a macro when dropping an entity on the hotbar
|
* Create a macro when dropping an entity on the hotbar
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
.ability-content {
|
||||||
|
.sheet-common();
|
||||||
|
.item-sheet-common();
|
||||||
|
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
img {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="checkbox"] {
|
||||||
|
font-size: var(--font-size-14);
|
||||||
|
width: 20px;
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="checkbox"]:checked {
|
||||||
|
background-color: rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="checkbox"]:checked::after {
|
||||||
|
color: rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -143,6 +143,13 @@
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.hp-temp-item {
|
||||||
|
.hp-value input {
|
||||||
|
background: rgba(255, 230, 160, 0.85);
|
||||||
|
border-color: #b8860b;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -411,4 +411,227 @@
|
|||||||
font-family: var(--font-secondary);
|
font-family: var(--font-secondary);
|
||||||
font-size: calc(var(--font-size-standard) * 1.2);
|
font-size: calc(var(--font-size-standard) * 1.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Item Chat Card Styles
|
||||||
|
.prismrpg-item-chat-card {
|
||||||
|
font-family: var(--font-primary);
|
||||||
|
border-radius: 4px;
|
||||||
|
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;
|
||||||
|
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
||||||
|
|
||||||
|
.item-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 4px 8px;
|
||||||
|
background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
|
||||||
|
border-bottom: 1px solid #444;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 0.95em;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #d4af37;
|
||||||
|
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
|
||||||
|
font-family: var(--font-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-type {
|
||||||
|
padding: 1px 6px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 0.65em;
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: uppercase;
|
||||||
|
background: rgba(255, 255, 255, 0.15);
|
||||||
|
color: #fff;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||||
|
letter-spacing: 0.3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-image {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 6px;
|
||||||
|
background: rgba(0, 0, 0, 0.1);
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 50px;
|
||||||
|
max-height: 50px;
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid rgba(212, 175, 55, 0.3);
|
||||||
|
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
|
||||||
|
transition: transform 0.2s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-description {
|
||||||
|
padding: 6px 8px;
|
||||||
|
color: #000;
|
||||||
|
font-size: 0.8em;
|
||||||
|
line-height: 1.3;
|
||||||
|
background: rgba(255, 255, 255, 0.8);
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-details {
|
||||||
|
padding: 6px 8px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 3px;
|
||||||
|
|
||||||
|
.item-detail {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 2px 6px;
|
||||||
|
background: rgba(255, 255, 255, 0.03);
|
||||||
|
border-left: 2px solid rgba(212, 175, 55, 0.5);
|
||||||
|
border-radius: 2px;
|
||||||
|
font-size: 0.8em;
|
||||||
|
|
||||||
|
strong {
|
||||||
|
color: #d4af37;
|
||||||
|
margin-right: 6px;
|
||||||
|
min-width: 90px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(even) {
|
||||||
|
background: rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Special styling for weapon items
|
||||||
|
&.weapon-item {
|
||||||
|
.item-header {
|
||||||
|
background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Special styling for armor items
|
||||||
|
&.armor-item {
|
||||||
|
.item-header {
|
||||||
|
background: linear-gradient(135deg, #4a5cf7 0%, #2c3e9e 100%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Special styling for spell items
|
||||||
|
&.spell-item {
|
||||||
|
.item-header {
|
||||||
|
background: linear-gradient(135deg, #9b59b6 0%, #6c3483 100%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Special styling for skill items
|
||||||
|
&.skill-item {
|
||||||
|
.item-header {
|
||||||
|
background: linear-gradient(135deg, #16a085 0%, #0e6655 100%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Special styling for equipment items
|
||||||
|
&.equipment-item {
|
||||||
|
.item-header {
|
||||||
|
background: linear-gradient(135deg, #f39c12 0%, #b8730f 100%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// New round message
|
||||||
|
.new-round-message {
|
||||||
|
.chat-title .new-round-label {
|
||||||
|
font-size: var(--font-size-11);
|
||||||
|
font-style: italic;
|
||||||
|
color: #8a7a5a;
|
||||||
|
margin-top: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.new-round-actors {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 6px 0 2px;
|
||||||
|
|
||||||
|
.new-round-restore-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
width: calc(50% - 3px);
|
||||||
|
padding: 4px 8px 4px 6px;
|
||||||
|
border: 1px solid #7a6a45;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: linear-gradient(135deg, #f5e6c8 0%, #e8d5a0 100%);
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: var(--font-size-13);
|
||||||
|
color: #3a2e1a;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
span {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover:not(:disabled) {
|
||||||
|
background: linear-gradient(135deg, #fdf3dc 0%, #f0e0b0 100%);
|
||||||
|
border-color: #a08040;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:disabled,
|
||||||
|
&.restored {
|
||||||
|
opacity: 0.45;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.new-round-all-btn {
|
||||||
|
width: 100%;
|
||||||
|
background: linear-gradient(135deg, #c8dff5 0%, #a0c0e8 100%);
|
||||||
|
border-color: #4a6a8a;
|
||||||
|
color: #1a2e3a;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
&:hover:not(:disabled) {
|
||||||
|
background: linear-gradient(135deg, #dcedfc 0%, #b0d0f0 100%);
|
||||||
|
border-color: #3a5a7a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token HUD — separator between Afflictions and Imbuements
|
||||||
|
.palette.status-effects {
|
||||||
|
.status-separator {
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
width: 100%;
|
||||||
|
height: 2px;
|
||||||
|
border: none;
|
||||||
|
border-top: 2px solid rgba(255, 255, 255, 0.35);
|
||||||
|
margin: 5px 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,4 +13,139 @@
|
|||||||
label {
|
label {
|
||||||
flex: 10%;
|
flex: 10%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.advancement-level {
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
padding: 0.5rem;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 0 0 0.5rem 0;
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
|
.level-title {
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-advancement {
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
background: var(--color-control-bg);
|
||||||
|
border: 1px solid var(--color-border-dark);
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: var(--color-control-bg-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
i {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-advancements {
|
||||||
|
font-style: italic;
|
||||||
|
color: rgba(0, 0, 0, 0.5);
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.advancement-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.advancement-item {
|
||||||
|
padding: 0.75rem;
|
||||||
|
background: rgba(0, 0, 0, 0.05);
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.advancement-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
|
||||||
|
.advancement-icon {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-color: var(--color-border-highlight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"] {
|
||||||
|
flex: 1;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-advancement-description {
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
background: var(--color-control-bg);
|
||||||
|
border: 1px solid var(--color-border-dark);
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: 0.25rem;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: var(--color-control-bg-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
i {
|
||||||
|
margin: 0;
|
||||||
|
color: rgba(0, 0, 0, 0.7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-advancement {
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
background: var(--color-control-bg);
|
||||||
|
border: 1px solid var(--color-border-dark);
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: rgba(255, 0, 0, 0.1);
|
||||||
|
border-color: rgba(255, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
i {
|
||||||
|
margin: 0;
|
||||||
|
color: rgba(255, 0, 0, 0.7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.advancement-description {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
overflow: hidden;
|
||||||
|
transition:
|
||||||
|
max-height 0.3s ease-out,
|
||||||
|
opacity 0.3s ease-out;
|
||||||
|
max-height: 500px;
|
||||||
|
opacity: 1;
|
||||||
|
|
||||||
|
&.collapsed {
|
||||||
|
max-height: 0;
|
||||||
|
opacity: 0;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
@import "monster.less";
|
@import "monster.less";
|
||||||
@import "skill.less";
|
@import "skill.less";
|
||||||
@import "racial-ability.less";
|
@import "racial-ability.less";
|
||||||
|
@import "ability.less";
|
||||||
@import "weapon.less";
|
@import "weapon.less";
|
||||||
@import "armor.less";
|
@import "armor.less";
|
||||||
@import "spell.less";
|
@import "spell.less";
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,7 @@
|
|||||||
"download": "#{DOWNLOAD}#",
|
"download": "#{DOWNLOAD}#",
|
||||||
"url": "#{URL}#",
|
"url": "#{URL}#",
|
||||||
"license": "LICENSE",
|
"license": "LICENSE",
|
||||||
"version": "13.0.0",
|
"version": "13.0.1",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Uberwald",
|
"name": "Uberwald",
|
||||||
@@ -34,6 +34,7 @@
|
|||||||
"Item": {
|
"Item": {
|
||||||
"skill": { "htmlFields": ["description"] },
|
"skill": { "htmlFields": ["description"] },
|
||||||
"racial-ability": { "htmlFields": ["description"] },
|
"racial-ability": { "htmlFields": ["description"] },
|
||||||
|
"ability": { "htmlFields": ["description"] },
|
||||||
"weapon": { "htmlFields": ["description"] },
|
"weapon": { "htmlFields": ["description"] },
|
||||||
"armor": { "htmlFields": ["description"] },
|
"armor": { "htmlFields": ["description"] },
|
||||||
"shield": { "htmlFields": ["description"] },
|
"shield": { "htmlFields": ["description"] },
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<section>
|
||||||
|
<div class="header">
|
||||||
|
<img
|
||||||
|
class="item-img"
|
||||||
|
src="{{item.img}}"
|
||||||
|
data-edit="img"
|
||||||
|
data-action="editImage"
|
||||||
|
data-tooltip="{{item.name}}"
|
||||||
|
/>
|
||||||
|
{{formInput fields.name value=source.name}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{! Navigation des onglets }}
|
||||||
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
|
<a class="item {{tabs.description.cssClass}}" data-tab="description">{{localize "PRISMRPG.Label.description"}}</a>
|
||||||
|
<a class="item {{tabs.effects.cssClass}}" data-tab="effects">{{localize "PRISMRPG.Label.effects"}}</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{{! Onglet Description }}
|
||||||
|
<div class="tab {{tabs.description.cssClass}}" data-group="primary" data-tab="description">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize "PRISMRPG.Label.description"}}</legend>
|
||||||
|
{{formInput
|
||||||
|
systemFields.description
|
||||||
|
enriched=enrichedDescription
|
||||||
|
value=system.description
|
||||||
|
name="system.description"
|
||||||
|
toggled=true
|
||||||
|
}}
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{! Onglet Effects }}
|
||||||
|
<div class="tab {{tabs.effects.cssClass}}" data-group="primary" data-tab="effects">
|
||||||
|
{{> systems/fvtt-prism-rpg/templates/partial-item-effects.hbs}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
class="item-img"
|
class="item-img"
|
||||||
src="{{item.img}}"
|
src="{{item.img}}"
|
||||||
data-tooltip="{{item.name}}"
|
data-tooltip="{{item.name}}"
|
||||||
|
data-action="postItemToChat"
|
||||||
/>
|
/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="name" data-tooltip="{{item.system.description}}">
|
<div class="name" data-tooltip="{{item.system.description}}">
|
||||||
@@ -88,6 +89,7 @@
|
|||||||
class="item-img"
|
class="item-img"
|
||||||
src="{{item.img}}"
|
src="{{item.img}}"
|
||||||
data-tooltip="{{item.name}}"
|
data-tooltip="{{item.name}}"
|
||||||
|
data-action="postItemToChat"
|
||||||
/>
|
/>
|
||||||
<div class="name" data-tooltip="{{item.system.description}}">
|
<div class="name" data-tooltip="{{item.system.description}}">
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
@@ -137,6 +139,7 @@
|
|||||||
class="item-img"
|
class="item-img"
|
||||||
src="{{item.img}}"
|
src="{{item.img}}"
|
||||||
data-tooltip="{{item.name}}"
|
data-tooltip="{{item.name}}"
|
||||||
|
data-action="postItemToChat"
|
||||||
/>
|
/>
|
||||||
<div class="name" data-tooltip="{{item.system.description}}">
|
<div class="name" data-tooltip="{{item.system.description}}">
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="equipments">
|
<div class="equipments">
|
||||||
{{#each equipments as |item|}}
|
{{#each equipments as |item|}}
|
||||||
<div class="equipment" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
|
<div class="equipment" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
|
||||||
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" data-action="postItemToChat" />
|
||||||
<div class="name" data-tooltip="{{{item.system.description}}}">
|
<div class="name" data-tooltip="{{{item.system.description}}}">
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -64,6 +64,18 @@
|
|||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="hp-item hp-temp-item">
|
||||||
|
<div class="hp-label" data-tooltip="{{localize 'PRISMRPG.Label.HPTemp'}}">HP Tmp</div>
|
||||||
|
<a data-action="hpTempMinus"><i class="fa-solid fa-minus"></i></a>
|
||||||
|
<div class="hp-value">
|
||||||
|
{{formInput
|
||||||
|
systemFields.hp.fields.temp
|
||||||
|
value=system.hp.temp
|
||||||
|
disabled=isPlayMode
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<a data-action="hpTempPlus"><i class="fa-solid fa-plus"></i></a>
|
||||||
|
</div>
|
||||||
<div class="hp-item">
|
<div class="hp-item">
|
||||||
<div class="hp-label">MANA</div>
|
<div class="hp-label">MANA</div>
|
||||||
<a data-action="manaPointsMinus"><i class="fa-solid fa-minus"></i></a>
|
<a data-action="manaPointsMinus"><i class="fa-solid fa-minus"></i></a>
|
||||||
@@ -86,6 +98,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="hp-item">
|
<div class="hp-item">
|
||||||
<div class="hp-label">ARMOR</div>
|
<div class="hp-label">ARMOR</div>
|
||||||
|
<a data-action="armorPointsMinus"><i class="fa-solid fa-minus"></i></a>
|
||||||
<div class="hp-value">
|
<div class="hp-value">
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.armorPoints.fields.value
|
systemFields.armorPoints.fields.value
|
||||||
@@ -93,6 +106,7 @@
|
|||||||
disabled=isPlayMode
|
disabled=isPlayMode
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
<a data-action="armorPointsPlus"><i class="fa-solid fa-plus"></i></a>
|
||||||
<div class="hp-separator">/</div>
|
<div class="hp-separator">/</div>
|
||||||
<div class="hp-max">
|
<div class="hp-max">
|
||||||
{{formInput
|
{{formInput
|
||||||
@@ -102,6 +116,26 @@
|
|||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="hp-item">
|
||||||
|
<div class="hp-label" data-tooltip="Action Points">AP</div>
|
||||||
|
<a data-action="actionPointsMinus"><i class="fa-solid fa-minus"></i></a>
|
||||||
|
<div class="hp-value">
|
||||||
|
{{formInput
|
||||||
|
systemFields.actionPoints.fields.value
|
||||||
|
value=system.actionPoints.value
|
||||||
|
disabled=isPlayMode
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<a data-action="actionPointsPlus"><i class="fa-solid fa-plus"></i></a>
|
||||||
|
<div class="hp-separator">/</div>
|
||||||
|
<div class="hp-max">
|
||||||
|
{{formInput
|
||||||
|
systemFields.actionPoints.fields.max
|
||||||
|
value=system.actionPoints.max
|
||||||
|
disabled=isPlayMode
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -270,7 +304,7 @@
|
|||||||
<div class="race-content">
|
<div class="race-content">
|
||||||
{{#if race}}
|
{{#if race}}
|
||||||
<div class="race-item" data-item-id="{{race.id}}" data-item-uuid="{{race.uuid}}">
|
<div class="race-item" data-item-id="{{race.id}}" data-item-uuid="{{race.uuid}}">
|
||||||
<img class="item-img" src="{{race.img}}" data-tooltip="{{race.name}}" />
|
<img class="item-img" src="{{race.img}}" data-tooltip="{{race.name}}" data-action="postItemToChat" />
|
||||||
<div class="race-name">{{race.name}}</div>
|
<div class="race-name">{{race.name}}</div>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<a data-tooltip="{{localize 'PRISMRPG.Edit'}}" data-action="edit" data-item-id="{{race.id}}"
|
<a data-tooltip="{{localize 'PRISMRPG.Edit'}}" data-action="edit" data-item-id="{{race.id}}"
|
||||||
@@ -296,7 +330,7 @@
|
|||||||
<div class="class-content">
|
<div class="class-content">
|
||||||
{{#if classItem}}
|
{{#if classItem}}
|
||||||
<div class="class-item" data-item-id="{{classItem.id}}" data-item-uuid="{{classItem.uuid}}">
|
<div class="class-item" data-item-id="{{classItem.id}}" data-item-uuid="{{classItem.uuid}}">
|
||||||
<img class="item-img" src="{{classItem.img}}" data-tooltip="{{classItem.name}}" />
|
<img class="item-img" src="{{classItem.img}}" data-tooltip="{{classItem.name}}" data-action="postItemToChat" />
|
||||||
<div class="class-name">{{classItem.name}}</div>
|
<div class="class-name">{{classItem.name}}</div>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<a data-tooltip="{{localize 'PRISMRPG.Edit'}}" data-action="edit" data-item-id="{{classItem.id}}"
|
<a data-tooltip="{{localize 'PRISMRPG.Edit'}}" data-action="edit" data-item-id="{{classItem.id}}"
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
<div class="skill {{#if item.system.isCoreSkill}}is-core-skill{{/if}}"
|
<div class="skill {{#if item.system.isCoreSkill}}is-core-skill{{/if}}"
|
||||||
data-item-id="{{item.id}}"
|
data-item-id="{{item.id}}"
|
||||||
data-item-uuid="{{item.uuid}}">
|
data-item-uuid="{{item.uuid}}">
|
||||||
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}\nClick to post to chat" data-action="postItemToChat" />
|
||||||
<div class="name">
|
<div class="name" data-tooltip="{{item.system.description}}">
|
||||||
<a class="rollable" data-roll-type="skill" data-roll-key="{{item.id}}">
|
<a class="rollable" data-roll-type="skill" data-roll-key="{{item.id}}">
|
||||||
<i class="lf-roll-small fa-duotone fa-solid fa-dice-d10"></i>
|
<i class="lf-roll-small fa-duotone fa-solid fa-dice-d10"></i>
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
<div class="racial-abilities">
|
<div class="racial-abilities">
|
||||||
{{#each racialAbilities as |item|}}
|
{{#each racialAbilities as |item|}}
|
||||||
<div class="racial-ability " data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
|
<div class="racial-ability " data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
|
||||||
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}\nClick to post to chat" data-action="postItemToChat" />
|
||||||
<div class="name" data-tooltip="{{{item.description}}}<br><br>{{item.path}}" data-tooltip-direction="UP">
|
<div class="name" data-tooltip="{{{item.description}}}<br><br>{{item.path}}" data-tooltip-direction="UP">
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
</div>
|
</div>
|
||||||
@@ -60,5 +60,27 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend data-tooltip="{{localize 'PRISMRPG.Tooltip.abilities'}}" data-tooltip-direction="UP">
|
||||||
|
{{localize "PRISMRPG.Label.abilities"}}
|
||||||
|
</legend>
|
||||||
|
<div class="racial-abilities">
|
||||||
|
{{#each abilities as |item|}}
|
||||||
|
<div class="racial-ability" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
|
||||||
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}\nClick to post to chat" data-action="postItemToChat" />
|
||||||
|
<div class="name" data-tooltip="{{{item.description}}}" data-tooltip-direction="UP">
|
||||||
|
{{item.name}}
|
||||||
|
</div>
|
||||||
|
<div class="controls">
|
||||||
|
<a data-tooltip="{{localize 'PRISMRPG.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
|
||||||
|
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
|
||||||
|
<a data-tooltip="{{localize 'PRISMRPG.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
|
||||||
|
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="spells">
|
<div class="spells">
|
||||||
{{#each spells as |item|}}
|
{{#each spells as |item|}}
|
||||||
<div class="spell" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
|
<div class="spell" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
|
||||||
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
|
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" data-action="postItemToChat" />
|
||||||
<div class="name">
|
<div class="name">
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<div class="new-round-message prismrpg-chat-card">
|
||||||
|
<div class="chat-header">
|
||||||
|
<div class="chat-title">
|
||||||
|
<div class="roll-name">{{localize "PRISMRPG.Combat.newRound"}} {{round}}</div>
|
||||||
|
<div class="new-round-label">{{localize "PRISMRPG.Combat.restoreAP"}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="new-round-actors">
|
||||||
|
<button class="new-round-restore-btn new-round-all-btn" type="button" data-actor-id="all" data-tooltip="{{localize "PRISMRPG.Combat.allPC"}}">
|
||||||
|
<i class="fas fa-users"></i>
|
||||||
|
<span>{{localize "PRISMRPG.Combat.allPC"}}</span>
|
||||||
|
</button>
|
||||||
|
{{#each actors}}
|
||||||
|
<button class="new-round-restore-btn" type="button" data-actor-id="{{id}}" data-tooltip="{{name}}">
|
||||||
|
<img src="{{img}}" width="24" height="24" />
|
||||||
|
<span>{{name}}</span>
|
||||||
|
</button>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
+55
-1
@@ -7,6 +7,7 @@
|
|||||||
{{! Navigation des onglets }}
|
{{! Navigation des onglets }}
|
||||||
<nav class="sheet-tabs tabs" data-group="primary">
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
<a class="item {{tabs.details.cssClass}}" data-tab="details">{{localize "PRISMRPG.Label.details"}}</a>
|
<a class="item {{tabs.details.cssClass}}" data-tab="details">{{localize "PRISMRPG.Label.details"}}</a>
|
||||||
|
<a class="item {{tabs.advancements.cssClass}}" data-tab="advancements">{{localize "PRISMRPG.Label.advancement"}}</a>
|
||||||
<a class="item {{tabs.description.cssClass}}" data-tab="description">{{localize "PRISMRPG.Label.description"}}</a>
|
<a class="item {{tabs.description.cssClass}}" data-tab="description">{{localize "PRISMRPG.Label.description"}}</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
@@ -61,7 +62,7 @@
|
|||||||
<legend>{{localize "PRISMRPG.Label.classFeatures"}}</legend>
|
<legend>{{localize "PRISMRPG.Label.classFeatures"}}</legend>
|
||||||
|
|
||||||
{{#each system.features as |feature level|}}
|
{{#each system.features as |feature level|}}
|
||||||
<label>{{localize "PRISMRPG.Label.level"}} {{inc @key}}</label>
|
<label>{{localize "PRISMRPG.Label.level"}} {{replace @key "level" ""}}</label>
|
||||||
{{formInput
|
{{formInput
|
||||||
(lookup ../systemFields.features.fields @key)
|
(lookup ../systemFields.features.fields @key)
|
||||||
enriched=(lookup ../enrichedFeatures @key)
|
enriched=(lookup ../enrichedFeatures @key)
|
||||||
@@ -73,6 +74,59 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{! Onglet Advancements }}
|
||||||
|
<div class="tab {{tabs.advancements.cssClass}}" data-group="primary" data-tab="advancements">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize "PRISMRPG.Label.advancement"}}</legend>
|
||||||
|
|
||||||
|
{{#each advancementsByLevel as |levelData|}}
|
||||||
|
<div class="advancement-level">
|
||||||
|
<h3>
|
||||||
|
<span class="level-title">{{localize "PRISMRPG.Label.level"}} {{levelData.level}}</span>
|
||||||
|
<button type="button" class="add-advancement" data-level="{{levelData.levelKey}}" data-tooltip="{{localize 'PRISMRPG.Label.addAdvancement'}}">
|
||||||
|
<i class="fas fa-plus"></i>
|
||||||
|
</button>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
{{#if levelData.advancements.length}}
|
||||||
|
<div class="advancement-list">
|
||||||
|
{{#each levelData.advancements as |advancement|}}
|
||||||
|
<div class="advancement-item">
|
||||||
|
<div class="advancement-header">
|
||||||
|
<img class="advancement-icon" src="{{advancement.icon}}" data-level="{{advancement.levelKey}}" data-index="{{advancement.index}}" />
|
||||||
|
{{formInput
|
||||||
|
../../systemFields.advancements.fields.level1.element.fields.name
|
||||||
|
value=advancement.name
|
||||||
|
name=(concat "system.advancements." advancement.levelKey "." advancement.index ".name")
|
||||||
|
placeholder=(localize "PRISMRPG.Label.advancementName")
|
||||||
|
}}
|
||||||
|
<button type="button" class="toggle-advancement-description" data-tooltip="{{localize 'PRISMRPG.Label.toggleDescription'}}">
|
||||||
|
<i class="fas fa-chevron-down"></i>
|
||||||
|
</button>
|
||||||
|
<button type="button" class="delete-advancement" data-level="{{advancement.levelKey}}" data-index="{{advancement.index}}" data-tooltip="{{localize 'PRISMRPG.Label.deleteAdvancement'}}">
|
||||||
|
<i class="fas fa-trash"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="advancement-description collapsed">
|
||||||
|
{{formInput
|
||||||
|
../../systemFields.advancements.fields.level1.element.fields.description
|
||||||
|
enriched=advancement.enrichedDescription
|
||||||
|
value=advancement.description
|
||||||
|
name=(concat "system.advancements." advancement.levelKey "." advancement.index ".description")
|
||||||
|
toggled=true
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<p class="empty-advancements">{{localize "PRISMRPG.Label.noAdvancements"}}</p>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{! Onglet Description }}
|
{{! Onglet Description }}
|
||||||
<div class="tab {{tabs.description.cssClass}}" data-group="primary" data-tab="description">
|
<div class="tab {{tabs.description.cssClass}}" data-group="primary" data-tab="description">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|||||||
Reference in New Issue
Block a user