7 Commits

Author SHA1 Message Date
dbc64121fa Fix compendiums again
All checks were successful
Release Creation / build (release) Successful in 45s
2025-06-29 22:31:34 +02:00
7118452bdf Fix compendiums again
All checks were successful
Release Creation / build (release) Successful in 49s
2025-06-29 22:27:15 +02:00
b968f99f61 Add files 2025-06-29 22:14:36 +02:00
feeb08331b Upgrade !
All checks were successful
Release Creation / build (release) Successful in 54s
2025-06-26 23:49:23 +02:00
da61e9991b Upgrade ! 2025-06-26 23:34:02 +02:00
5ba88a1ae5 Full SAN management 2025-06-15 23:02:36 +02:00
9e4d76298c Manage selective fire 2025-06-15 00:30:24 +02:00
43 changed files with 1083 additions and 147 deletions

View File

@@ -35,7 +35,7 @@ jobs:
apt update -y apt update -y
apt install -y zip apt install -y zip
- run: zip -r ./fvtt-cthulhu-eternal.zip system.json README.md LICENSE assets/ css/ fonts/ lang/ module/ packs-system/ templates/ cthulhu-eternal.mjs - run: zip -r ./fvtt-cthulhu-eternal.zip system.json README.md LICENSE assets/ css/ fonts/ lang/ module/ packs-system/ compendiums/ templates/ cthulhu-eternal.mjs
- name: setup go - name: setup go
uses: https://github.com/actions/setup-go@v4 uses: https://github.com/actions/setup-go@v4

View File

@@ -170,10 +170,85 @@ i.fvtt-cthulhu-eternal {
background-position: 0%; background-position: 0%;
background-size: 100% 100%; background-size: 100% 100%;
} }
.chat-san-request ul,
.chat-lethal-damage ul {
list-style-type: none;
padding: 0;
margin: 0;
justify-content: center;
align-items: center;
}
.chat-san-request ul .result-lethal,
.chat-lethal-damage ul .result-lethal {
color: var(--color-critical-failure);
font-family: var(--font-title);
}
.chat-san-request ul .san-loose-buttons,
.chat-lethal-damage ul .san-loose-buttons {
display: flex;
justify-content: center;
align-items: center;
margin: 10px 0;
}
.chat-san-request ul .san-loose-buttons button,
.chat-lethal-damage ul .san-loose-buttons button {
margin: 0 2px;
font-family: var(--font-primary);
font-size: calc(var(--font-size-standard) * 1.1);
border: none;
padding: 2px 2px;
cursor: pointer;
transition: background-color 0.3s;
min-width: 3rem;
max-width: 3rem;
}
.chat-san-request ul .result-non-lethal,
.chat-lethal-damage ul .result-non-lethal {
color: var(--color-failure);
font-family: var(--font-title);
}
.chat-san-request ul li,
.chat-lethal-damage ul li {
margin: 0 10px;
font-family: var(--font-primary);
font-size: calc(var(--font-size-standard) * 1.02);
}
.fvtt-cthulhu-eternal .protagonist-sheet-common label { .fvtt-cthulhu-eternal .protagonist-sheet-common label {
font-family: var(--font-secondary); font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1); font-size: calc(var(--font-size-standard) * 1);
} }
.fvtt-cthulhu-eternal .protagonist-sheet-common .hp-unconscious {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
color: #b4710c;
}
.fvtt-cthulhu-eternal .protagonist-sheet-common .hp-dead {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
color: #b40000;
}
.fvtt-cthulhu-eternal .protagonist-sheet-common .protagonist-luck {
display: flex;
min-width: 8rem;
max-width: 8rem;
}
.fvtt-cthulhu-eternal .protagonist-sheet-common .protagonist-luck .rollable:hover,
.fvtt-cthulhu-eternal .protagonist-sheet-common .protagonist-luck .rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
font-size: 0.9rem;
}
.fvtt-cthulhu-eternal .protagonist-sheet-common .damage-bonus {
display: flex;
}
.fvtt-cthulhu-eternal .protagonist-sheet-common .damage-bonus label {
max-width: 5rem;
min-width: 5rem;
}
.fvtt-cthulhu-eternal .protagonist-sheet-common .damage-bonus input {
max-width: 2rem;
min-width: 2rem;
}
.fvtt-cthulhu-eternal .vehicle-sheet-common label { .fvtt-cthulhu-eternal .vehicle-sheet-common label {
font-family: var(--font-secondary); font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1); font-size: calc(var(--font-size-standard) * 1);
@@ -203,6 +278,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
overflow: scroll; overflow: scroll;
} }
.fvtt-cthulhu-eternal .protagonist-content .sheet-tabs a { .fvtt-cthulhu-eternal .protagonist-content .sheet-tabs a {
@@ -250,7 +326,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .protagonist-content legend { .fvtt-cthulhu-eternal .protagonist-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -258,6 +334,38 @@ i.fvtt-cthulhu-eternal {
font-family: var(--font-secondary); font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1); font-size: calc(var(--font-size-standard) * 1);
} }
.fvtt-cthulhu-eternal .protagonist-content .hp-unconscious {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
color: #b4710c;
}
.fvtt-cthulhu-eternal .protagonist-content .hp-dead {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
color: #b40000;
}
.fvtt-cthulhu-eternal .protagonist-content .protagonist-luck {
display: flex;
min-width: 8rem;
max-width: 8rem;
}
.fvtt-cthulhu-eternal .protagonist-content .protagonist-luck .rollable:hover,
.fvtt-cthulhu-eternal .protagonist-content .protagonist-luck .rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
font-size: 0.9rem;
}
.fvtt-cthulhu-eternal .protagonist-content .damage-bonus {
display: flex;
}
.fvtt-cthulhu-eternal .protagonist-content .damage-bonus label {
max-width: 5rem;
min-width: 5rem;
}
.fvtt-cthulhu-eternal .protagonist-content .damage-bonus input {
max-width: 2rem;
min-width: 2rem;
}
.fvtt-cthulhu-eternal .sheet-tabs { .fvtt-cthulhu-eternal .sheet-tabs {
background-color: var(--color-light-1); background-color: var(--color-light-1);
} }
@@ -295,9 +403,6 @@ i.fvtt-cthulhu-eternal {
width: 2rem; width: 2rem;
margin-left: 4px; margin-left: 4px;
} }
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-hp .damage-bonus {
font-size: calc(var(--font-size-standard) * 0.8);
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-hp .hp-separator { .fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-hp .hp-separator {
font-size: calc(var(--font-size-standard) * 1.2); font-size: calc(var(--font-size-standard) * 1.2);
display: flex; display: flex;
@@ -372,6 +477,14 @@ i.fvtt-cthulhu-eternal {
min-width: 6rem; min-width: 6rem;
flex-grow: 1; flex-grow: 1;
} }
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san .san-helplessness,
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san .san-violence {
display: flex;
flex-grow: 1;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san .label-san-type {
margin-right: 0.5rem;
}
.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san .label-bp { .fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san .label-bp {
flex-grow: 1; flex-grow: 1;
max-width: 3rem; max-width: 3rem;
@@ -867,6 +980,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
overflow: scroll; overflow: scroll;
} }
.fvtt-cthulhu-eternal .vehicle-content .sheet-tabs a { .fvtt-cthulhu-eternal .vehicle-content .sheet-tabs a {
@@ -914,7 +1028,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .vehicle-content legend { .fvtt-cthulhu-eternal .vehicle-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -1124,6 +1238,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
overflow: scroll; overflow: scroll;
} }
.fvtt-cthulhu-eternal .creature-content .sheet-tabs a { .fvtt-cthulhu-eternal .creature-content .sheet-tabs a {
@@ -1171,7 +1286,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .creature-content legend { .fvtt-cthulhu-eternal .creature-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -1782,6 +1897,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
} }
.fvtt-cthulhu-eternal .skill-content .sheet-tabs a { .fvtt-cthulhu-eternal .skill-content .sheet-tabs a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
@@ -1828,7 +1944,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .skill-content legend { .fvtt-cthulhu-eternal .skill-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -1876,6 +1992,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
} }
.fvtt-cthulhu-eternal .injury-content .sheet-tabs a { .fvtt-cthulhu-eternal .injury-content .sheet-tabs a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
@@ -1922,7 +2039,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .injury-content legend { .fvtt-cthulhu-eternal .injury-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -1970,6 +2087,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
} }
.fvtt-cthulhu-eternal .weapon-content .sheet-tabs a { .fvtt-cthulhu-eternal .weapon-content .sheet-tabs a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
@@ -2016,7 +2134,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .weapon-content legend { .fvtt-cthulhu-eternal .weapon-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -2056,6 +2174,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
} }
.fvtt-cthulhu-eternal .armor-content .sheet-tabs a { .fvtt-cthulhu-eternal .armor-content .sheet-tabs a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
@@ -2102,7 +2221,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .armor-content legend { .fvtt-cthulhu-eternal .armor-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -2142,6 +2261,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
} }
.fvtt-cthulhu-eternal .motivation-content .sheet-tabs a { .fvtt-cthulhu-eternal .motivation-content .sheet-tabs a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
@@ -2188,7 +2308,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .motivation-content legend { .fvtt-cthulhu-eternal .motivation-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -2228,6 +2348,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
} }
.fvtt-cthulhu-eternal .mentaldisorder-content .sheet-tabs a { .fvtt-cthulhu-eternal .mentaldisorder-content .sheet-tabs a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
@@ -2274,7 +2395,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .mentaldisorder-content legend { .fvtt-cthulhu-eternal .mentaldisorder-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -2314,6 +2435,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
} }
.fvtt-cthulhu-eternal .bond-content .sheet-tabs a { .fvtt-cthulhu-eternal .bond-content .sheet-tabs a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
@@ -2360,7 +2482,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .bond-content legend { .fvtt-cthulhu-eternal .bond-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -2416,6 +2538,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
} }
.fvtt-cthulhu-eternal .gear-content .sheet-tabs a { .fvtt-cthulhu-eternal .gear-content .sheet-tabs a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
@@ -2462,7 +2585,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .gear-content legend { .fvtt-cthulhu-eternal .gear-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -2502,6 +2625,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
} }
.fvtt-cthulhu-eternal .arcane-content .sheet-tabs a { .fvtt-cthulhu-eternal .arcane-content .sheet-tabs a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
@@ -2548,7 +2672,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .arcane-content legend { .fvtt-cthulhu-eternal .arcane-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -2588,6 +2712,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
} }
.fvtt-cthulhu-eternal .archetype-content .sheet-tabs a { .fvtt-cthulhu-eternal .archetype-content .sheet-tabs a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
@@ -2634,7 +2759,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .archetype-content legend { .fvtt-cthulhu-eternal .archetype-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -2674,6 +2799,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
} }
.fvtt-cthulhu-eternal .ritual-content .sheet-tabs a { .fvtt-cthulhu-eternal .ritual-content .sheet-tabs a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
@@ -2720,7 +2846,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .ritual-content legend { .fvtt-cthulhu-eternal .ritual-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -2768,6 +2894,7 @@ i.fvtt-cthulhu-eternal {
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
} }
.fvtt-cthulhu-eternal .tome-content .sheet-tabs a { .fvtt-cthulhu-eternal .tome-content .sheet-tabs a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
@@ -2814,7 +2941,7 @@ i.fvtt-cthulhu-eternal {
} }
.fvtt-cthulhu-eternal .tome-content legend { .fvtt-cthulhu-eternal .tome-content legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -2940,6 +3067,11 @@ i.fvtt-cthulhu-eternal {
margin-left: 2rem; margin-left: 2rem;
display: none; display: none;
} }
.dice-roll .intro-chat .intro-right ul .healing-roll {
font-size: calc(var(--font-size-standard) * 1);
margin-left: 2rem;
display: none;
}
.dice-roll .intro-chat .intro-right ul .roll-damage { .dice-roll .intro-chat .intro-right ul .roll-damage {
font-size: calc(var(--font-size-standard) * 1); font-size: calc(var(--font-size-standard) * 1);
margin-left: 2rem; margin-left: 2rem;

View File

@@ -94,9 +94,13 @@ Hooks.once("init", function () {
CthulhuEternalUtils.registerHandlebarsHelpers() CthulhuEternalUtils.registerHandlebarsHelpers()
CthulhuEternalUtils.setupCSSRootVariables() CthulhuEternalUtils.setupCSSRootVariables()
console.info("CTHULHU ETERNAL | System Initialized") console.info("CTHULHU ETERNAL | System Initialized")
}) })
Hooks.once('babele.init', (babele) => {
babele.setSystemTranslationsDir("compendiums");
});
/** /**
* Perform one-time configuration of system configuration objects. * Perform one-time configuration of system configuration objects.
@@ -114,22 +118,18 @@ function preLocalizeConfig() {
Hooks.once("ready", function () { Hooks.once("ready", function () {
console.info("CTHULHU ETERNAL | Ready") console.info("CTHULHU ETERNAL | Ready")
if (typeof Babele !== 'undefined') {
console.info("CTHULHU ETERNAL | Babele detected, setting up translations")
Babele.get().setSystemTranslationsDir("compendiums");
}
if (game.user.isGM) { if (game.user.isGM) {
ClassCounter.registerUsageCount("fvtt-cthulhu-eternal", {}) ClassCounter.registerUsageCount("fvtt-cthulhu-eternal", {})
} }
preLocalizeConfig() preLocalizeConfig()
if (game.user.isGM && game.i18n.lang === 'fr' && !game.modules.find(m => m.id == "babele")) { if (game.user.isGM && game.i18n.lang === 'fr' && typeof Babele === 'undefined') {
ChatMessage.create({ ChatMessage.create({
user: game.user.id, user: game.user.id,
whisper: [game.user.id], whisper: [game.user.id],
content: `<div ><span class=""> content: `<div ><span class="">
<strong>ATTENTION ! Français détecte, mais le module Babele n'est pas installé !<br>Installez Babele pour bénéficier de la traduction des compendiums` <strong>ATTENTION ! Français détecté, mais le module Babele n'est pas installé !<br>Installez Babele pour bénéficier de la traduction des compendiums`
}) })
} }
@@ -144,20 +144,27 @@ Hooks.on("renderChatMessageHTML", (message, html, data) => {
$(html).find(".damage-roll").each((i, btn) => { $(html).find(".damage-roll").each((i, btn) => {
btn.style.display = "inline" btn.style.display = "inline"
}) })
$(html).find(".healing-roll").each((i, btn) => {
btn.style.display = "inline"
})
$(html).find(".nudge-roll").click((event) => { $(html).find(".nudge-roll").click((event) => {
CthulhuEternalUtils.nudgeRoll(message) CthulhuEternalUtils.nudgeRoll(message)
}) })
$(html).find(".damage-roll").click((event) => { $(html).find(".damage-roll").click((event) => {
CthulhuEternalUtils.damageRoll(message) CthulhuEternalUtils.damageRoll(message)
}) })
$(html).find(".healing-roll").click((event) => {
CthulhuEternalUtils.healingRoll(message)
})
$(html).find(".san-loose").click((event) => {
CthulhuEternalUtils.applySANLoss(message, event)
})
$(html).find(".san-type").click((event) => {
CthulhuEternalUtils.applySANType(message, event)
})
} }
}) })
// Dice-so-nice Ready
Hooks.once("diceSoNiceReady", (dice3d) => {
//configureDiceSoNice(dice3d)
})
/** /**
* Create a macro when dropping an entity on the hotbar * Create a macro when dropping an entity on the hotbar
* Item - open roll dialog * Item - open roll dialog

View File

@@ -57,6 +57,12 @@
"label": "Storage" "label": "Storage"
} }
}, },
"hp": {
"label": "HP",
"stunned": {
"label": "Stun."
}
},
"biodata": { "biodata": {
"feature": { "feature": {
"label": "Feature" "label": "Feature"
@@ -207,6 +213,12 @@
"RangedWeapons": "Ranged Weapons", "RangedWeapons": "Ranged Weapons",
"FirearmsBeams": "Firearms / Beam Weapons", "FirearmsBeams": "Firearms / Beam Weapons",
"FIELDS": { "FIELDS": {
"isHealing": {
"label": "Healing skill"
},
"healingFormula": {
"label": "Healing PV roll"
},
"isAdversary": { "isAdversary": {
"label": "Adversary" "label": "Adversary"
}, },
@@ -278,6 +290,15 @@
"directSkillValue": { "directSkillValue": {
"label": "Direct skill value" "label": "Direct skill value"
}, },
"ammo": {
"label": "Ammo",
"value": {
"label": "Ammo value"
},
"max": {
"label": "Max ammo"
}
},
"state": { "state": {
"label": "State" "label": "State"
}, },
@@ -495,9 +516,30 @@
} }
}, },
"Label": { "Label": {
"sanLoss5": "You suffered a SAN loss of 5+ ({value}) : you suffer a temporary insanity (Flee, Submit, Struggle or understanding the Unnatural).",
"sanViolenceReset": "The violence SAN loss count has been reset.",
"sanHelplessnessReset": "The helplessness SAN loss count has been reset.",
"sanLoss": "You suffer a SAN loss",
"selectSANType": "Select the type of SAN loss with the buttons below.",
"Violence" : "Violence",
"Helplessness": "Helplessness",
"Unnatural": "Unnatural",
"sanLossViolence": "You suffered a SAN loss due to violence : violence progress path has evolved.",
"sanLossHelplessness": "You suffered a SAN loss due to helplessness : helplessness progress path has evolved.",
"adaptedToViolence": "You are now : Adapted to Violence.",
"adaptedToViolenceShort": "Adapted to Violence",
"adaptedToHelplessness": "You are now : Adapted to Helplessness.",
"adaptedToHelplessnessShort": "Adapted to Helplessness",
"SANTest": "You just rolled a SAN test : please select the SAN loss with the buttons below.",
"breakingPointReached": "Your SAN has reached your Breaking Point : you suffer a disorder (to be discussed with the GM). Reset the BP to its new value.",
"rollNudge": "Roll Nudge",
"rollDamage": "Roll Damage",
"rollHealing": "Roll Healing",
"result": "Result",
"damageMessage": "Damage to apply",
"lethalityRoll": "Lethality Roll", "lethalityRoll": "Lethality Roll",
"lethalityWounded": "The target is lethally wounded", "lethalityWounded": "The target is lethally wounded (HP = 0)",
"lethalityNotWounded": "The target is not lethally wounded", "lethalityNotWounded": "The target is not lethally wounded, apply damage",
"damageRoll": "Damage Roll", "damageRoll": "Damage Roll",
"vehicle":"Vehicle", "vehicle":"Vehicle",
"Weapon": "Weapon", "Weapon": "Weapon",
@@ -622,7 +664,21 @@
"noActorFound": "No actor found", "noActorFound": "No actor found",
"skillFailed": "Skill roll failed : the skill has been ticked for progression", "skillFailed": "Skill roll failed : the skill has been ticked for progression",
"rollProgress": "Roll Progress", "rollProgress": "Roll Progress",
"skillProgress": "Skill Progress" "skillProgress": "Skill Progress",
"unconscious": "Unconscious",
"dying": "Dying",
"stunnedWarning": "The Protagonist is stunned. He cannot act until he recovers by successfully rolling a CONx5 check.",
"deadWarning": "The Protagonist is dead. He cannot act until he is revived by a successful First Aid roll.",
"unconsciousWarning": "The Protagonist is unconscious. He cannot act until he has at least 3 HP.",
"Luck": "Luck",
"titleLuck": "Luck Roll",
"healingRoll": "Healing Roll succes, the target gains",
"healingRollFailure": "Healing roll failed ! The target looses",
"killRadius": "Kill Radius",
"killRadiusInfo": "All targets within the kill radius suffer the damage",
"ammoUsed": "Ammo used",
"lethalityLethal": "Lethal !!",
"lethalityNotLethal": "Non-Lethal"
}, },
"ChatMessage": { "ChatMessage": {
"exhausted": "Your protagonist is exhausted. He loses [[/r 1d6]] Willpower Points." "exhausted": "Your protagonist is exhausted. He loses [[/r 1d6]] Willpower Points."
@@ -651,7 +707,12 @@
"NoWeaponSkill": "No weapon skill found for this weapon. Check Weapon definition or available skills/era", "NoWeaponSkill": "No weapon skill found for this weapon. Check Weapon definition or available skills/era",
"NoWeaponType": "No weapon type found for this weapon subtype. Check Weapon definition or available skills/era", "NoWeaponType": "No weapon type found for this weapon subtype. Check Weapon definition or available skills/era",
"skillAlreadyExists": "Skill already exists", "skillAlreadyExists": "Skill already exists",
"WrongEra": "The era of the item does not match the ear of the system" "WrongEra": "The era of the item does not match the ear of the system",
"NoSelectiveFireChoices": "Not enough ammo fo Selective Fire choices for this weapon.",
"NoAmmo": "No more ammo for this weapon. ",
"noRollDataFound": "No roll data found",
"noActorFound": "No actor found for this item.",
"noSanLossFound": "No SAN loss value found."
} }
} }
} }

View File

@@ -43,6 +43,12 @@
"damageBonus": { "damageBonus": {
"label": "Bonus D." "label": "Bonus D."
}, },
"hp": {
"label": "HP",
"stunned": {
"label": "Etourdi"
}
},
"resources": { "resources": {
"permanentRating": { "permanentRating": {
"label": "Degré Permanent" "label": "Degré Permanent"
@@ -120,6 +126,18 @@
"damageBonus": { "damageBonus": {
"label": "Bonus D." "label": "Bonus D."
}, },
"hp": {
"label": "HP",
"value": {
"label": "Actuel"
},
"max": {
"label": "Max"
},
"stunned": {
"label": "Etourdi"
}
},
"resources": { "resources": {
"permanentRating": { "permanentRating": {
"label": "Valeur permanente" "label": "Valeur permanente"
@@ -207,6 +225,12 @@
"RangedWeapons": "Armes de tir", "RangedWeapons": "Armes de tir",
"FirearmsBeams": "Armes à feu / à rayons", "FirearmsBeams": "Armes à feu / à rayons",
"FIELDS": { "FIELDS": {
"isHealing": {
"label": "Compétence de soin"
},
"healingFormula": {
"label": "PV soignés"
},
"isAdversary": { "isAdversary": {
"label": "Adversaire" "label": "Adversaire"
}, },
@@ -272,6 +296,15 @@
"longspray": "Barrage long" "longspray": "Barrage long"
}, },
"FIELDS": { "FIELDS": {
"ammo": {
"label": "Munitions",
"value": {
"label": "Munitions (actuelles)"
},
"max": {
"label": "Munitions (max)"
}
},
"hasDirectSkill": { "hasDirectSkill": {
"label": "Compétence intégrée" "label": "Compétence intégrée"
}, },
@@ -495,9 +528,32 @@
} }
}, },
"Label": { "Label": {
"sanLoss5": "Perte de SAN de 5+ ({value}) : vous souffrez d'une folie temporaire (Fuite, Soumission, Lutte ou compréhension de l'Inconcevable).",
"sanViolenceReset": "Le décompte des pertes de SAN de violence a été réinitialisé.",
"sanHelplessnessReset": "Le décompte des pertes de SAN d'impuissance a été réinitialisé.",
"sanLoss": "Perte de SAN",
"noSanLoss": "Aucune perte de SAN",
"sanLossInfo": "Sélectionnez la perte de SAN à l'aide des boutons ci-dessous.",
"selectSANType": "Sélectionnez le type de perte de SAN à l'aide des boutons ci-dessous.",
"sanLossViolence": "Vous avez subi une perte de SAN due à la violence : le chemin de progression de la violence a évolué.",
"sanLossHelplessness": "Vous avez subi une perte de SAN due à l'impuissance : le chemin de progression de l'impuissance a évolué.",
"adaptedToViolence": "Vous êtes maintenant : Habitué à la violence",
"adaptedToViolenceShort": "Habitué à la violence",
"adaptedToHelplessness": "Vous êtes maintenant : Habitué à l'impuissance",
"adaptedToHelplessnessShort": "Habitué à l'impuissance",
"SANTest": "Vous venez de faire un jet de SAN : selectionnez la perte de SAN à l'aide des boutons ci-dessous.",
"breakingPointReached": "Vous avez atteint votre Point de Rupture (PR) : vous souffrez d'un trouble mental. Vous devez re-initialiser votre PR à l'aide du bouton disponible dans la section SAN de la fiche de PJ.",
"Violence" : "Violence",
"Helplessness": "Impuissance",
"Unnatural": "Inconcevable",
"rollNudge": "Modifier le jet",
"rollDamage": "Jet de dégâts",
"rollHealing": "Jet de soin",
"result": "Resultat",
"damageMessage": "Dégâts à appliquer",
"lethalityRoll": "Jet de Létalité", "lethalityRoll": "Jet de Létalité",
"lethalityWounded": "La cible est mortellement blessée", "lethalityWounded": "La cible est mortellement blessée (PV = 0)",
"lethalityNotWounded": "La cible n'est PAS mortellement blessée", "lethalityNotWounded": "La cible n'est PAS mortellement blessée, encaissement des dégâts",
"damageRoll": "Jet de dégâts", "damageRoll": "Jet de dégâts",
"vehicle":"Véhicule", "vehicle":"Véhicule",
"Weapon": "Arme", "Weapon": "Arme",
@@ -559,7 +615,7 @@
"conLong": "Constitution", "conLong": "Constitution",
"chaLong": "Charisme", "chaLong": "Charisme",
"total": "Total", "total": "Total",
"skills": "Compétence", "skills": "Compétences",
"gear": "Matériel", "gear": "Matériel",
"damage": "Dégâts", "damage": "Dégâts",
"resource": "Ressource", "resource": "Ressource",
@@ -622,7 +678,21 @@
"noActorFound": "Aucun protagoniste trouvé", "noActorFound": "Aucun protagoniste trouvé",
"skillFailed": "Jet de compétence échoué : la compétence a été marquée comme pouvant progresser.", "skillFailed": "Jet de compétence échoué : la compétence a été marquée comme pouvant progresser.",
"rollProgress": "Jet de progression", "rollProgress": "Jet de progression",
"skillProgress": "Progression de compétence" "skillProgress": "Progression de compétence",
"unconscious": "Inconscient",
"dying": "Mourant",
"stunnedWarning": "Votre protagoniste est étourdi. Il ne peut pas agir tant qu'il n'a pas réussi un test de CON x 5.",
"deadWarning": "Votre protagoniste est mourrant. Il mourra s'il n'est pas soigné dans les {con} minutes",
"unconsciousWarning": "Votre protagoniste est inconscient. Il ne peut pas agir tant qu'il n'a pas atteint 3 PV.",
"Luck": "Chance",
"titleLuck": "Jet de Chance",
"healingRoll": "Jet de soin, PV soignés",
"healingRollFailure": "Jet de soin échoué critique, PV perdus",
"killRadius": "Rayon de mortlalité",
"killRadiusInfo": "Si la cible est dans le rayon de mortalité, elle subit les dommages.",
"ammoUsed": "Munitions utilisées",
"lethalityLethal": "Létal !!",
"lethalityNotLethal": "Non létal"
}, },
"ChatMessage": { "ChatMessage": {
"exhausted": "Votre protagoniste est épuisé. Il perd [[/r 1d6]] Points de Volonté." "exhausted": "Votre protagoniste est épuisé. Il perd [[/r 1d6]] Points de Volonté."
@@ -651,7 +721,12 @@
"NoWeaponSkill": "Aucune compétence associée n'a été trouvé pour cette arme. Vérifier la définition de l'arme ainsi que l'époque configurée.", "NoWeaponSkill": "Aucune compétence associée n'a été trouvé pour cette arme. Vérifier la définition de l'arme ainsi que l'époque configurée.",
"NoWeaponType": "Aucun type d'arme trouvé pour ce sous-type. Vérifier la définition de l'arme ainsi que l'époque configurée.", "NoWeaponType": "Aucun type d'arme trouvé pour ce sous-type. Vérifier la définition de l'arme ainsi que l'époque configurée.",
"skillAlreadyExists": "La compétence existe déja", "skillAlreadyExists": "La compétence existe déja",
"WrongEra": "L'époque de l'item ne correspond pas à celle du jeu en cours." "WrongEra": "L'époque de l'item ne correspond pas à celle du jeu en cours.",
"NoSelectiveFireChoices": "Aucune option de tir sélectif n'est disponible pour cette arme : pas assez de munitions.",
"NoAmmo": "Aucune munition disponible pour cette arme.",
"noRollDataFound": "Aucune donnée de jet trouvée.",
"noActorFound": "Aucun protagoniste trouvé.",
"noSanLossFound": "Aucune valeur de perte de SAN trouvée."
} }
} }
} }

View File

@@ -61,8 +61,8 @@ export default class CthulhuEternalCreatureSheet extends CthulhuEternalActorShee
const context = await super._prepareContext() const context = await super._prepareContext()
context.tabs = this.#getTabs() context.tabs = this.#getTabs()
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true }) context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
context.enrichedNotes = await TextEditor.enrichHTML(this.document.system.notes, { async: true }) context.enrichedNotes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.notes, { async: true })
context.tooltipsCharacteristic = { context.tooltipsCharacteristic = {
str: game.i18n.localize("CTHULHUETERNAL.Characteristic.Str"), str: game.i18n.localize("CTHULHUETERNAL.Characteristic.Str"),

View File

@@ -78,6 +78,7 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true }) context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
context.enrichedNotes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.notes, { async: true }) context.enrichedNotes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.notes, { async: true })
context.isGM = game.user.isGM
context.tooltipsCharacteristic = { context.tooltipsCharacteristic = {
str: game.i18n.localize("CTHULHUETERNAL.Characteristic.Str"), str: game.i18n.localize("CTHULHUETERNAL.Characteristic.Str"),
@@ -199,7 +200,7 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
* corresponding value from the document's system and performs the roll. * corresponding value from the document's system and performs the roll.
*/ */
async _onRoll(event, target) { async _onRoll(event, target) {
const rollType = $(event.currentTarget).data("roll-type") let rollType = $(event.currentTarget).data("roll-type")
let item let item
let li let li
// Debug : console.log(">>>>", event, target, rollType) // Debug : console.log(">>>>", event, target, rollType)
@@ -231,6 +232,12 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS
item.name = game.i18n.localize("CTHULHUETERNAL.Label.SAN") item.name = game.i18n.localize("CTHULHUETERNAL.Label.SAN")
item.targetScore = item.value item.targetScore = item.value
break; break;
case "luck":
item = foundry.utils.duplicate(this.actor.system.characteristics.int)
item.name = game.i18n.localize("CTHULHUETERNAL.Label.Luck")
item.value = 10
item.targetScore = 50
break;
default: default:
throw new Error(`Unknown roll type ${rollType}`) throw new Error(`Unknown roll type ${rollType}`)
} }

View File

@@ -18,4 +18,13 @@ export default class CthulhuEternalWeaponSheet extends CthulhuEternalItemSheet {
template: "systems/fvtt-cthulhu-eternal/templates/weapon.hbs", template: "systems/fvtt-cthulhu-eternal/templates/weapon.hbs",
}, },
} }
async _prepareContext() {
let context = await super._prepareContext()
context.isFireArm = this.item.system.isFireArm()
context.isRanged = this.item.system.isRanged()
return context
}
} }

View File

@@ -31,7 +31,6 @@ export default class CthulhuEternalActor extends Actor {
} }
_onUpdate(changed, options, userId) { _onUpdate(changed, options, userId) {
// DEBUG : console.log("CthulhuEternalActor.update", changed, options, userId)
if (changed?.system?.wp?.exhausted) { if (changed?.system?.wp?.exhausted) {
ChatMessage.create({ ChatMessage.create({
user: userId, user: userId,

View File

@@ -105,6 +105,105 @@ export default class CthulhuEternalRoll extends Roll {
$(".resource-score").text(`${rating} (${options.percentScore}%)`) $(".resource-score").text(`${rating} (${options.percentScore}%)`)
} }
static buildSelectiveFireChoices(actor, weapon) {
if (!weapon || !weapon?.system?.hasSelectiveFire) {
return {}
}
// Loop thru the selective fire choices and build the choices object when enough ammo in the weapon
let choices = {}
for (let choiceKey in SYSTEM.WEAPON_SELECTIVE_FIRE_CHOICES) {
let choice = SYSTEM.WEAPON_SELECTIVE_FIRE_CHOICES[choiceKey]
if (choice.ammoUsed > 0 && choice.ammoUsed <= weapon.system.ammo.value) {
choices[choiceKey] = choice
}
}
// If no choices available, warn the user
if (Object.keys(choices).length === 0) {
ui.notifications.warn(game.i18n.localize("CTHULHUETERNAL.Notifications.NoSelectiveFireChoices"))
return {}
}
return choices
}
static async processWeaponDamage(actor, options) {
let isLethal = false
let weapon = options.rollItem
let ammoUsed = weapon.system.weaponType.includes("ranged") ? 1 : 0 // Default ammo used for melee weapons is 0
options.isNudge = false
// Selective fire management
if (weapon.system.hasSelectiveFire && weapon.selectiveFireChoice) {
let choice = SYSTEM.WEAPON_SELECTIVE_FIRE_CHOICES[weapon.selectiveFireChoice]
if (choice.ammoUsed > weapon.system.ammo.value) {
ui.notifications.warn(game.i18n.localize("CTHULHUETERNAL.Notifications.NoAmmo"))
return
}
weapon.system.selectiveFireChoiceLabel = choice.label // Store the choice in the weapon
weapon.system.lethality = choice.lethality // Override lethality
weapon.system.killRadius = choice.killRadius // Override kill radius
ammoUsed = choice.ammoUsed // Override ammo used
}
if (weapon.system.lethality > 0) {
let lethalityRoll = new Roll("1d100")
await lethalityRoll.evaluate()
let lethalScore = (options?.previousResultType === "successCritical") ? weapon.system.lethality * 2 : weapon.system.lethality
isLethal = (lethalityRoll.total <= lethalScore)
if (ammoUsed > 0) {
await actor.updateEmbeddedDocuments("Item", [{
_id: weapon._id,
"system.ammo.value": Math.max(0, weapon.system.ammo.value - ammoUsed)
}])
}
let wounds = Math.floor(lethalityRoll.total / 10) + (lethalityRoll.total % 10)
let msgData = {
weapon,
wounds,
lethalScore,
isLethal,
ammoUsed,
rollResult: lethalityRoll.total,
}
let flavor = await foundry.applications.handlebars.renderTemplate("systems/fvtt-cthulhu-eternal/templates/chat-lethal-damage.hbs", msgData)
ChatMessage.create({
user: game.user.id,
content: flavor,
speaker: ChatMessage.getSpeaker({ actor: actor }),
}, { rollMode: options.rollMode, create: true })
return
}
// If the weapon is not lethal, we can proceed with the regular damage roll
let formula = weapon.system.damage
if (weapon.system.weaponType === "melee" || weapon.system.weaponType === "unarmed") {
formula += ` + ${weapon.damageBonus}`
}
if (options?.previousResultType === "successCritical") {
formula = `( ${formula} ) * 2`
}
if (ammoUsed > 0) {
await actor.updateEmbeddedDocuments("Item", [{
_id: weapon._id,
"system.ammo.value": Math.max(0, weapon.system.ammo.value - ammoUsed)
}])
}
let damageRoll = new Roll(formula)
await damageRoll.evaluate()
let msgData = {
weapon,
formula,
ammoUsed,
rollResult: damageRoll.total,
}
let flavor = await foundry.applications.handlebars.renderTemplate("systems/fvtt-cthulhu-eternal/templates/chat-regular-damage.hbs", msgData)
ChatMessage.create({
user: game.user.id,
content: flavor,
speaker: ChatMessage.getSpeaker({ actor: actor }),
}, { rollMode: options.rollMode, create: true })
}
/** /**
* Prompt the user with a dialog to configure and execute a roll. * Prompt the user with a dialog to configure and execute a roll.
* *
@@ -124,12 +223,18 @@ export default class CthulhuEternalRoll extends Roll {
let hasModifier = true let hasModifier = true
let hasMultiplier = false let hasMultiplier = false
options.isNudge = true options.isNudge = true
let actor = game.actors.get(options.actorId)
switch (options.rollType) { switch (options.rollType) {
case "skill": case "skill":
console.log(options.rollItem) console.log(options.rollItem)
options.initialScore = options.rollItem.system.computeScore() options.initialScore = options.rollItem.system.computeScore()
break break
case "luck":
hasModifier = false
options.initialScore = 50
options.isNudge = false
break
case "san": case "san":
case "char": case "char":
options.initialScore = options.rollItem.targetScore options.initialScore = options.rollItem.targetScore
@@ -146,40 +251,8 @@ export default class CthulhuEternalRoll extends Roll {
options.rollItem.enableStorage = true options.rollItem.enableStorage = true
options.isNudge = false options.isNudge = false
break break
case "damage": { case "damage":
let isLethal = false return this.processWeaponDamage(actor, options)
options.isNudge = false
if (options.rollItem.system.lethality > 0) {
let lethalityRoll = new Roll("1d100")
await lethalityRoll.evaluate()
let lethalScore = (options?.previousResultType === "successCritical") ? options.rollItem.system.lethality * 2 : options.rollItem.system.lethality
isLethal = (lethalityRoll.total <= lethalScore)
let flavor = `${options.rollItem.name} - <strong> ${game.i18n.localize("CTHULHUETERNAL.Label.lethalityRoll")} </strong> : ${lethalityRoll.total} <= ${lethalScore} => ${isLethal}`
if (isLethal) {
flavor += `<br> ${game.i18n.localize("CTHULHUETERNAL.Label.lethalityWounded")} => HP = 0`
} else {
let wounds = Math.floor(lethalityRoll.total / 10) + (lethalityRoll.total % 10)
flavor += `<br> ${game.i18n.localize("CTHULHUETERNAL.Label.lethalityNotWounded")} => HP loss = ${wounds}`
}
await lethalityRoll.toMessage({
flavor: flavor
});
return
}
let formula = options.rollItem.system.damage
if (options.rollItem.system.weaponType === "melee" || options.rollItem.system.weaponType === "unarmed") {
formula += ` + ${options.rollItem.damageBonus}`
}
if (options?.previousResultType === "successCritical") {
formula = `( ${formula} ) * 2`
}
let damageRoll = new Roll(formula)
await damageRoll.evaluate()
await damageRoll.toMessage({
flavor: `${options.rollItem.name} - ${game.i18n.localize("CTHULHUETERNAL.Label.damageRoll")}`
});
}
return
case "weapon": { case "weapon": {
let era = game.settings.get("fvtt-cthulhu-eternal", "settings-era") let era = game.settings.get("fvtt-cthulhu-eternal", "settings-era")
if (era !== options.rollItem.system.settings) { if (era !== options.rollItem.system.settings) {
@@ -192,6 +265,11 @@ export default class CthulhuEternalRoll extends Roll {
console.log("WP Not found", era, options.rollItem.system.weaponType) console.log("WP Not found", era, options.rollItem.system.weaponType)
return return
} }
// Check if the weapon has enouth ammo in case of a firearm
if (options.rollItem.system.isFireArm() && options.rollItem.system.ammo.value <= 0) {
ui.notifications.warn(game.i18n.localize("CTHULHUETERNAL.Notifications.NoAmmo"))
return
}
options.weapon = options.rollItem options.weapon = options.rollItem
if (options.rollItem.system.hasDirectSkill) { if (options.rollItem.system.hasDirectSkill) {
let skillName = options.rollItem.name let skillName = options.rollItem.name
@@ -199,7 +277,6 @@ export default class CthulhuEternalRoll extends Roll {
options.initialScore = options.weapon.system.directSkillValue options.initialScore = options.weapon.system.directSkillValue
} else { } else {
let skillName = game.i18n.localize(SYSTEM.WEAPON_SKILL_MAPPING[era][options.rollItem.system.weaponType]) let skillName = game.i18n.localize(SYSTEM.WEAPON_SKILL_MAPPING[era][options.rollItem.system.weaponType])
let actor = game.actors.get(options.actorId)
options.rollItem = actor.items.find(i => i.type === "skill" && i.name.toLowerCase() === skillName.toLowerCase()) options.rollItem = actor.items.find(i => i.type === "skill" && i.name.toLowerCase() === skillName.toLowerCase())
if (!options.rollItem) { if (!options.rollItem) {
ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.NoWeaponSkill")) ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.NoWeaponSkill"))
@@ -215,7 +292,6 @@ export default class CthulhuEternalRoll extends Roll {
break break
} }
console.log("Roll options", CONFIG.Dice.rollModes);
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes); //Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)])) const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes); //Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
const fieldRollMode = new foundry.data.fields.StringField({ const fieldRollMode = new foundry.data.fields.StringField({
choices: rollModes, choices: rollModes,
@@ -225,7 +301,7 @@ export default class CthulhuEternalRoll extends Roll {
const choiceModifier = SYSTEM.MODIFIER_CHOICES const choiceModifier = SYSTEM.MODIFIER_CHOICES
const choiceMultiplier = SYSTEM.MULTIPLIER_CHOICES const choiceMultiplier = SYSTEM.MULTIPLIER_CHOICES
const choiceSelectiveFire = SYSTEM.WEAPON_SELECTIVE_FIRE_CHOICES const choiceSelectiveFire = this.buildSelectiveFireChoices(actor, options?.weapon)
let modifier = "+0" let modifier = "+0"
let multiplier = "5" let multiplier = "5"
@@ -318,6 +394,10 @@ export default class CthulhuEternalRoll extends Roll {
} }
rollData.targetScore = Math.min(Math.max(rollData.targetScore, 0), 100) rollData.targetScore = Math.min(Math.max(rollData.targetScore, 0), 100)
} }
if (!rollData.targetScore) {
rollData.targetScore = options.initialScore
rollData.modifier = "0"
}
if (Hooks.call("fvtt-cthulhu-eternal.preRoll", options, rollData) === false) return if (Hooks.call("fvtt-cthulhu-eternal.preRoll", options, rollData) === false) return
@@ -390,6 +470,8 @@ export default class CthulhuEternalRoll extends Roll {
*/ */
static createTitle(type, target) { static createTitle(type, target) {
switch (type) { switch (type) {
case "luck":
return `${game.i18n.localize("CTHULHUETERNAL.Label.titleLuck")}`
case "skill": case "skill":
return `${game.i18n.localize("CTHULHUETERNAL.Label.titleSkill")}` return `${game.i18n.localize("CTHULHUETERNAL.Label.titleSkill")}`
case "weapon": case "weapon":
@@ -486,7 +568,7 @@ export default class CthulhuEternalRoll extends Roll {
{ rollMode: rollMode }, { rollMode: rollMode },
) )
console.log("Roll to message", this.options, this.options.rollData, this.options.rollItem) // Manage the skill evolution if the roll is a failure
let rollData = this.options.rollData || this.options let rollData = this.options.rollData || this.options
let rollItem = this.options.rollItem let rollItem = this.options.rollItem
if (rollData.resultType.includes("failure") && rollItem.type === "skill") { if (rollData.resultType.includes("failure") && rollItem.type === "skill") {
@@ -512,6 +594,20 @@ export default class CthulhuEternalRoll extends Roll {
} }
} }
// If the roll is a SAN roll, we propose to select the SAN loss
if (rollData.rollType === "san") {
let msgData = {
rollItem: rollItem,
rollData: rollData
}
let msg = await foundry.applications.handlebars.renderTemplate("systems/fvtt-cthulhu-eternal/templates/chat-san-request.hbs", msgData)
let chatMsg = await ChatMessage.create({
user: game.user.id,
content: msg,
speaker: ChatMessage.getSpeaker({ actor: rollData.actor })
}, { rollMode: rollData.rollMode, create: true })
await chatMsg.setFlag("fvtt-cthulhu-eternal", "rollData", rollData)
}
} }
} }

View File

@@ -14,7 +14,8 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData
const characteristicField = (label) => { const characteristicField = (label) => {
const schema = { const schema = {
value: new fields.NumberField({ ...requiredInteger, initial: 3, min: 0 }), value: new fields.NumberField({ ...requiredInteger, initial: 3, min: 0 }),
feature: new fields.StringField({ required: true, nullable: false, initial: "" }) feature: new fields.StringField({ required: true, nullable: false, initial: "" }),
max: new fields.NumberField({ ...requiredInteger, initial: 3, min: 0 })
} }
return new fields.SchemaField(schema, { label }) return new fields.SchemaField(schema, { label })
} }
@@ -35,7 +36,9 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData
schema.hp = new fields.SchemaField({ schema.hp = new fields.SchemaField({
value: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), value: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
max: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), max: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
stunned: new fields.BooleanField({ required: true, initial: false }) stunned: new fields.BooleanField({ required: true, initial: false }),
unconscious: new fields.BooleanField({ required: true, initial: false }),
dead: new fields.BooleanField({ required: true, initial: false })
}) })
schema.san = new fields.SchemaField({ schema.san = new fields.SchemaField({
@@ -45,6 +48,7 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData
violence: new fields.ArrayField(new fields.BooleanField(), { required: true, initial: [false, false, false], min: 3, max: 3 }), violence: new fields.ArrayField(new fields.BooleanField(), { required: true, initial: [false, false, false], min: 3, max: 3 }),
helplessness: new fields.ArrayField(new fields.BooleanField(), { required: true, initial: [false, false, false], min: 3, max: 3 }), helplessness: new fields.ArrayField(new fields.BooleanField(), { required: true, initial: [false, false, false], min: 3, max: 3 }),
breakingPoint: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), breakingPoint: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
breakingPointReached: new fields.BooleanField({ required: true, initial: false }),
insanity: new fields.StringField({ required: true, nullable: false, initial: "none", choices: SYSTEM.INSANITY }), insanity: new fields.StringField({ required: true, nullable: false, initial: "none", choices: SYSTEM.INSANITY }),
}) })
@@ -130,6 +134,31 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData
updates[`system.damageBonus`] = dmgBonus updates[`system.damageBonus`] = dmgBonus
} }
// BP (Breaking Point) management
if (!this.san.breakingPointReached && this.san.value <= this.san.breakingPoint) {
updates[`system.san.breakingPointReached`] = true
ChatMessage.create({
content: `<p>${game.i18n.format("CTHULHUETERNAL.Label.breakingPointReached", { bp: this.san.breakingPoint, san: this.san.value })}</p>`,
speaker: ChatMessage.getSpeaker({ actor: this.parent })
})
}
// Unconsciousness management
if (!this.hp.unconscious && this.hp.value <= 2) {
updates[`system.hp.unconscious`] = true
}
if (this.hp.unconscious && this.hp.value > 2) {
updates[`system.hp.unconscious`] = false
}
// Dead management
if (!this.hp.dead && this.hp.value <= 0) {
updates[`system.hp.dead`] = true
}
if (this.hp.dead && this.hp.value > 0) {
updates[`system.hp.dead`] = false
}
// Sanity check // Sanity check
if (this.san.value > this.san.max) { if (this.san.value > this.san.max) {
updates[`system.san.value`] = this.san.max updates[`system.san.value`] = this.san.max
@@ -165,6 +194,112 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData
} }
} }
async applySANConsequences(rollData) {
// If sanType is "non", do nothing
if (rollData.sanType === "none") {
return
}
let msgData = {
sanType: rollData.sanType,
sanLoss: rollData.sanLoss,
actorId: this.parent.id,
actorName: this.parent.name,
adaptedToHelplessness: this.biodata.adaptedToHelplessness,
adaptedToViolence: this.biodata.adaptedToViolence,
... rollData
}
let updates = {}
let template = ""
// Manage temporary insanity
if (rollData.sanLoss >= 5) {
rollData.resetMsg = false
if (rollData.sanType === "violence" && !this.biodata.adaptedToViolence) {
updates[`system.san.violence`] = [false, false, false]
rollData.resetMsg = "CTHULHUETERNAL.Label.sanViolenceReset"
}
if (rollData.sanType === "helplessness" && !this.biodata.adaptedToHelplessness) {
updates[`system.san.helplessness`] = [false, false, false]
rollData.resetMsg = "CTHULHUETERNAL.Label.sanHelplessnessReset"
}
template = "systems/fvtt-cthulhu-eternal/templates/chat-san-temp-insanity.hbs"
} else if (rollData.sanLoss === 0) { // Manage if sanLoss is 0
rollData.resetMsg = false
if (rollData.sanType === "violence" && !this.biodata.adaptedToViolence) {
updates[`system.san.violence`] = [false, false, false]
rollData.resetMsg = "CTHULHUETERNAL.Label.sanViolenceReset"
}
if (rollData.sanType === "helplessness" && !this.biodata.adaptedToHelplessness) {
updates[`system.san.helplessness`] = [false, false, false]
rollData.resetMsg = "CTHULHUETERNAL.Label.sanHelplessnessReset"
}
template = "systems/fvtt-cthulhu-eternal/templates/chat-san-loss-0.hbs"
} else if (rollData.sanType === "violence" ) {
// Set the first false element of the violence array to true
let violence = this.san.violence.slice()
let index = violence.findIndex(v => !v)
if (index !== -1) {
violence[index] = true
updates[`system.san.violence`] = violence
}
template = "systems/fvtt-cthulhu-eternal/templates/chat-san-loss-1-4.hbs"
// Check if all violence elements are true, if so, set adaptedToViolence to true
if (violence.every(v => v)) {
updates[`system.biodata.adaptedToViolence`] = true
updates[`system.san.violence`] = [false, false, false]
msgData.adaptedToViolence = true
}
} else if (rollData.sanType === "helplessness" ) {
// If sanType is "helplessness" and adapted to helplessness, set the first false element of the helplessness array to true
let helplessness = this.san.helplessness.slice()
let index = helplessness.findIndex(h => !h)
if (index !== -1) {
helplessness[index] = true
updates[`system.san.helplessness`] = helplessness
}
template = "systems/fvtt-cthulhu-eternal/templates/chat-san-loss-1-4.hbs"
// Check if all helplessness elements are true, if so, set adaptedToHelplessness to true
if (helplessness.every(h => h)) {
updates[`system.biodata.adaptedToHelplessness`] = true
updates[`system.san.helplessness`] = [false, false, false]
msgData.adaptedToHelplessness = true
}
}
let content = await foundry.applications.handlebars.renderTemplate(template, msgData)
let msg = await ChatMessage.create({
content: content,
speaker: ChatMessage.getSpeaker({ actor: this.parent })
})
msg.setFlag("fvtt-cthulhu-eternal", "rollData", msgData)
if (Object.keys(updates).length > 0) {
this.parent.update(updates)
}
}
async modifySAN(rollData) {
let updates = {}
let san = Math.max(Math.min(this.san.value + rollData.sanLoss, this.san.max), 0)
if (this.san.value !== san) {
updates[`system.san.value`] = san
const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-cthulhu-eternal/templates/chat-san-type-request.hbs", rollData)
let msg = await ChatMessage.create({
content: content,
speaker: ChatMessage.getSpeaker({ actor: this.parent })
})
msg.setFlag("fvtt-cthulhu-eternal", "rollData", rollData)
}
if (Object.keys(updates).length > 0) {
this.parent.update(updates)
}
}
isStunned() {
return this.hp.stunned
}
isLowWP() { isLowWP() {
return this.wp.value <= 2 return this.wp.value <= 2
} }
@@ -193,6 +328,7 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData
let bp = Math.max(this.san.value - this.characteristics.pow.value, 0) let bp = Math.max(this.san.value - this.characteristics.pow.value, 0)
if (this.san.breakingPoint !== bp) { if (this.san.breakingPoint !== bp) {
updates[`system.san.breakingPoint`] = bp updates[`system.san.breakingPoint`] = bp
updates[`system.san.breakingPointReached`] = false // Reset breaking point reached
} }
if (Object.keys(updates).length > 0) { if (Object.keys(updates).length > 0) {
this.parent.update(updates) this.parent.update(updates)
@@ -207,6 +343,32 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData
* @returns {Promise<null>} - A promise that resolves to null if the roll is cancelled. * @returns {Promise<null>} - A promise that resolves to null if the roll is cancelled.
*/ */
async roll(rollType, rollItem) { async roll(rollType, rollItem) {
if (this.hp.dead ) {
// Warn with chat message
ChatMessage.create({
content: `<p>${game.i18n.format("CTHULHUETERNAL.Label.deadWarning", {con: this.characteristics.con.value} )}</p>`,
speaker: ChatMessage.getSpeaker({ actor: this.parent })
})
return null
}
if (this.hp.unconscious ) {
// Warn with chat message
ChatMessage.create({
content: `<p>${game.i18n.localize("CTHULHUETERNAL.Label.unconsciousWarning")}</p>`,
speaker: ChatMessage.getSpeaker({ actor: this.parent })
})
return null
}
if (this.hp.stunned && rollType === "skill") {
// Warn with chat message
ChatMessage.create({
content: `<p>${game.i18n.localize("CTHULHUETERNAL.Label.stunnedWarning")}</p>`,
speaker: ChatMessage.getSpeaker({ actor: this.parent })
})
return null
}
let opponentTarget let opponentTarget
const hasTarget = opponentTarget !== undefined const hasTarget = opponentTarget !== undefined

View File

@@ -15,6 +15,8 @@ export default class CthulhuEternalSkill extends foundry.abstract.TypeDataModel
schema.diceEvolved = new fields.BooleanField({ required: true, initial: true }) schema.diceEvolved = new fields.BooleanField({ required: true, initial: true })
schema.rollFailed = new fields.BooleanField({ required: true, initial: false }) schema.rollFailed = new fields.BooleanField({ required: true, initial: false })
schema.isAdversary = new fields.BooleanField({ required: true, initial: false }) schema.isAdversary = new fields.BooleanField({ required: true, initial: false })
schema.isHealing = new fields.BooleanField({ required: true, initial: false })
schema.healingFormula = new fields.StringField({ required: true, initial: "1d4" })
return schema return schema
} }
@@ -36,11 +38,11 @@ export default class CthulhuEternalSkill extends foundry.abstract.TypeDataModel
return `${this.base} + ${ String(this.bonus)}`; return `${this.base} + ${ String(this.bonus)}`;
} }
// Split the base value per stat : // Split the base value per stat :
let base = this.base.toLowerCase(); let base = this.base.toLowerCase();
let char = actor.system.characteristics[base]; let char = actor.system.characteristics[base];
if (!char) { if (!char) {
ui.notifications.error(`The characteristic ${base} is wrong for actor ${actor.name}`); ui.notifications.error(`The characteristic ${base} is wrong for actor ${actor.name}`);
return `${this.base } + ${ String(this.bonus)}`; return `${this.base } + ${ String(this.bonus)}`;
} }
let charValue = char.value; let charValue = char.value;

View File

@@ -25,6 +25,10 @@ export default class CthulhuEternalWeapon extends foundry.abstract.TypeDataModel
schema.armorPiercing = new fields.NumberField({ required: true, initial: 0, min: 0 }) schema.armorPiercing = new fields.NumberField({ required: true, initial: 0, min: 0 })
schema.weaponSubtype = new fields.StringField({ required: true, initial: "basicfirearm", choices: SYSTEM.WEAPON_SUBTYPE }) schema.weaponSubtype = new fields.StringField({ required: true, initial: "basicfirearm", choices: SYSTEM.WEAPON_SUBTYPE })
schema.state = new fields.StringField({ required: true, initial: "pristine", choices: SYSTEM.EQUIPMENT_STATES }) schema.state = new fields.StringField({ required: true, initial: "pristine", choices: SYSTEM.EQUIPMENT_STATES })
schema.ammo = new fields.SchemaField({
value: new fields.NumberField({ ...requiredInteger, initial: 6, min: 0 }),
max: new fields.NumberField({ ...requiredInteger, initial: 6, min: 0 })
})
schema.resourceLevel = new fields.NumberField({ required: true, initial: 0, min: 0 }) schema.resourceLevel = new fields.NumberField({ required: true, initial: 0, min: 0 })
@@ -37,4 +41,12 @@ export default class CthulhuEternalWeapon extends foundry.abstract.TypeDataModel
get weaponCategory() { get weaponCategory() {
return game.i18n.localize(CATEGORY[this.category].label) return game.i18n.localize(CATEGORY[this.category].label)
} }
isRanged() {
return this.weaponType.includes("ranged")
}
isFireArm() {
return this.weaponType === "rangedfirearm"
}
} }

View File

@@ -180,6 +180,79 @@ export default class CthulhuEternalUtils {
}); });
} }
static async applySANType(rollMessage, event) {
let rollData = rollMessage.getFlag("fvtt-cthulhu-eternal", "rollData")
if (!rollData) {
ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.noRollDataFound"))
return
}
let actor = game.actors.get(rollData.actorId)
if (!actor) {
ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.noActorFound"))
return
}
let sanType = event.currentTarget.dataset.sanType;
if (!sanType) {
ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.noSanTypeFound"))
return
}
// If the sanType is "none", we don't apply any SAN processing
if (sanType === "none") {
ui.notifications.info(game.i18n.localize("CTHULHUETERNAL.Notifications.noSanLossApplied"))
return
}
rollData.sanType = sanType
await actor.system.applySANConsequences(rollData)
// Delete the roll message
await rollMessage.delete()
}
static async applySANLoss(rollMessage, event) {
let rollData = rollMessage.getFlag("fvtt-cthulhu-eternal", "rollData")
if (!rollData) {
ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.noRollDataFound"))
return
}
let actor = game.actors.get(rollData.actorId)
if (!actor) {
ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.noActorFound"))
return
}
// Get the san loss from the event : data-san-value
let sanLoss = event.currentTarget.dataset.sanValue
let r = new Roll(sanLoss.toString())
await r.evaluate()
rollData.sanLoss = -r.total
await actor.system.modifySAN(rollData)
// Delete the roll message
await rollMessage.delete()
}
static async healingRoll(rollMessage) {
let rollData = rollMessage.rolls[0]?.options?.rollData
let healingFormula = rollData.rollItem.system.healingFormula
let healingMsg = "CTHULHUETERNAL.Label.healingRoll"
if (rollData.resultType === "successCritical") {
healingFormula += " * 2"
}
if (rollData.resultType === "failureCritical") {
healingMsg = "CTHULHUETERNAL.Label.healingRollFailure"
}
// Now display the result in chat message
let roll = new Roll(healingFormula)
await roll.evaluate()
roll.toMessage({
speaker: ChatMessage.getSpeaker({ actor: rollData.actorId }),
flavor: `${game.i18n.localize(healingMsg)} : ${roll.total}`,
rolls: [roll],
options: {
rollData: rollData,
resultType: rollData.resultType
}
})
}
static async damageRoll(rollMessage) { static async damageRoll(rollMessage) {
let rollData = rollMessage.rolls[0]?.options?.rollData let rollData = rollMessage.rolls[0]?.options?.rollData
let actor = game.actors.get(rollData.actorId) let actor = game.actors.get(rollData.actorId)
@@ -187,7 +260,9 @@ export default class CthulhuEternalUtils {
ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Label.noActorFound")) ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Label.noActorFound"))
return return
} }
console.log("Damage roll data", rollData)
rollData.weapon.resultType = rollData.resultType // Keep the result type from the roll message rollData.weapon.resultType = rollData.resultType // Keep the result type from the roll message
rollData.weapon.selectiveFireChoice = rollData.selectiveFireChoice // Keep the selected fire choice from the roll message
actor.system.roll("damage", rollData.weapon) actor.system.roll("damage", rollData.weapon)
} }

View File

@@ -1 +1 @@
MANIFEST-000081 MANIFEST-000167

View File

@@ -1,7 +1,7 @@
2025/06/12-21:40:36.466688 7f13a0ff96c0 Recovering log #79 2025/06/29-22:25:29.091880 7fda6d9f96c0 Recovering log #165
2025/06/12-21:40:36.523036 7f13a0ff96c0 Delete type=3 #77 2025/06/29-22:25:29.103184 7fda6d9f96c0 Delete type=3 #163
2025/06/12-21:40:36.523080 7f13a0ff96c0 Delete type=0 #79 2025/06/29-22:25:29.103305 7fda6d9f96c0 Delete type=0 #165
2025/06/12-22:19:34.910570 7f139fbff6c0 Level-0 table #84: started 2025/06/29-22:26:56.370766 7fda5bbff6c0 Level-0 table #170: started
2025/06/12-22:19:34.910598 7f139fbff6c0 Level-0 table #84: 0 bytes OK 2025/06/29-22:26:56.370832 7fda5bbff6c0 Level-0 table #170: 0 bytes OK
2025/06/12-22:19:34.968716 7f139fbff6c0 Delete type=0 #82 2025/06/29-22:26:56.379673 7fda5bbff6c0 Delete type=0 #168
2025/06/12-22:19:35.027464 7f139fbff6c0 Manual compaction at level-0 from '!items!4oyPRBWPBWAChrJP' @ 72057594037927935 : 1 .. '!items!zVFfp3o0G0Zg3Ia4' @ 0 : 0; will stop at (end) 2025/06/29-22:26:56.380010 7fda5bbff6c0 Manual compaction at level-0 from '!items!4oyPRBWPBWAChrJP' @ 72057594037927935 : 1 .. '!items!zVFfp3o0G0Zg3Ia4' @ 0 : 0; will stop at (end)

View File

@@ -1,7 +1,7 @@
2025/06/12-20:37:22.833913 7f13a0ff96c0 Recovering log #75 2025/06/29-22:24:52.674663 7fda6c9f76c0 Recovering log #161
2025/06/12-20:37:22.843981 7f13a0ff96c0 Delete type=3 #73 2025/06/29-22:24:52.733389 7fda6c9f76c0 Delete type=3 #159
2025/06/12-20:37:22.844063 7f13a0ff96c0 Delete type=0 #75 2025/06/29-22:24:52.733531 7fda6c9f76c0 Delete type=0 #161
2025/06/12-20:52:48.559109 7f139fbff6c0 Level-0 table #80: started 2025/06/29-22:25:23.612345 7fda5bbff6c0 Level-0 table #166: started
2025/06/12-20:52:48.559156 7f139fbff6c0 Level-0 table #80: 0 bytes OK 2025/06/29-22:25:23.612406 7fda5bbff6c0 Level-0 table #166: 0 bytes OK
2025/06/12-20:52:48.723881 7f139fbff6c0 Delete type=0 #78 2025/06/29-22:25:23.683484 7fda5bbff6c0 Delete type=0 #164
2025/06/12-20:52:48.724064 7f139fbff6c0 Manual compaction at level-0 from '!items!4oyPRBWPBWAChrJP' @ 72057594037927935 : 1 .. '!items!zVFfp3o0G0Zg3Ia4' @ 0 : 0; will stop at (end) 2025/06/29-22:25:23.834365 7fda5bbff6c0 Manual compaction at level-0 from '!items!4oyPRBWPBWAChrJP' @ 72057594037927935 : 1 .. '!items!zVFfp3o0G0Zg3Ia4' @ 0 : 0; will stop at (end)

View File

@@ -1 +1 @@
MANIFEST-000249 MANIFEST-000336

View File

@@ -1,7 +1,7 @@
2025/06/12-21:40:36.410156 7f13a17fa6c0 Recovering log #247 2025/06/29-22:25:29.069935 7fda6d1f86c0 Recovering log #334
2025/06/12-21:40:36.461712 7f13a17fa6c0 Delete type=3 #245 2025/06/29-22:25:29.081064 7fda6d1f86c0 Delete type=3 #332
2025/06/12-21:40:36.461765 7f13a17fa6c0 Delete type=0 #247 2025/06/29-22:25:29.081192 7fda6d1f86c0 Delete type=0 #334
2025/06/12-22:19:34.795093 7f139fbff6c0 Level-0 table #252: started 2025/06/29-22:26:56.360514 7fda5bbff6c0 Level-0 table #339: started
2025/06/12-22:19:34.795129 7f139fbff6c0 Level-0 table #252: 0 bytes OK 2025/06/29-22:26:56.360577 7fda5bbff6c0 Level-0 table #339: 0 bytes OK
2025/06/12-22:19:34.852214 7f139fbff6c0 Delete type=0 #250 2025/06/29-22:26:56.370559 7fda5bbff6c0 Delete type=0 #337
2025/06/12-22:19:35.027439 7f139fbff6c0 Manual compaction at level-0 from '!folders!5PrT9QmN1cFPzDFP' @ 72057594037927935 : 1 .. '!items!zvoUByzWSWZ87fxA' @ 0 : 0; will stop at (end) 2025/06/29-22:26:56.379992 7fda5bbff6c0 Manual compaction at level-0 from '!folders!5PrT9QmN1cFPzDFP' @ 72057594037927935 : 1 .. '!items!zvoUByzWSWZ87fxA' @ 0 : 0; will stop at (end)

View File

@@ -1,7 +1,7 @@
2025/06/12-20:37:22.815373 7f13a1ffb6c0 Recovering log #242 2025/06/29-22:24:52.606734 7fda6d9f96c0 Recovering log #330
2025/06/12-20:37:22.826434 7f13a1ffb6c0 Delete type=3 #240 2025/06/29-22:24:52.662677 7fda6d9f96c0 Delete type=3 #328
2025/06/12-20:37:22.826479 7f13a1ffb6c0 Delete type=0 #242 2025/06/29-22:24:52.662873 7fda6d9f96c0 Delete type=0 #330
2025/06/12-20:52:48.502299 7f139fbff6c0 Level-0 table #248: started 2025/06/29-22:25:23.549590 7fda5bbff6c0 Level-0 table #335: started
2025/06/12-20:52:48.502341 7f139fbff6c0 Level-0 table #248: 0 bytes OK 2025/06/29-22:25:23.549651 7fda5bbff6c0 Level-0 table #335: 0 bytes OK
2025/06/12-20:52:48.558859 7f139fbff6c0 Delete type=0 #246 2025/06/29-22:25:23.612061 7fda5bbff6c0 Delete type=0 #333
2025/06/12-20:52:48.724054 7f139fbff6c0 Manual compaction at level-0 from '!folders!5PrT9QmN1cFPzDFP' @ 72057594037927935 : 1 .. '!items!zvoUByzWSWZ87fxA' @ 0 : 0; will stop at (end) 2025/06/29-22:25:23.834320 7fda5bbff6c0 Manual compaction at level-0 from '!folders!5PrT9QmN1cFPzDFP' @ 72057594037927935 : 1 .. '!items!zvoUByzWSWZ87fxA' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

View File

@@ -5,4 +5,4 @@
justify-content: center; justify-content: center;
font-family: var(--font-secondary); font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.1); font-size: calc(var(--font-size-standard) * 1.1);
} }

View File

@@ -85,3 +85,44 @@ i.fvtt-cthulhu-eternal {
background-position: 0%; background-position: 0%;
background-size: 100% 100%; background-size: 100% 100%;
} }
.chat-san-request,
.chat-lethal-damage {
ul {
list-style-type: none;
padding: 0;
margin: 0;
justify-content: center;
align-items: center;
.result-lethal {
color: var(--color-critical-failure);
font-family: var(--font-title);
}
.san-loose-buttons {
display: flex;
justify-content: center;
align-items: center;
margin: 10px 0;
button {
margin: 0 2px;
font-family: var(--font-primary);
font-size: calc(var(--font-size-standard) * 1.1);
border: none;
padding: 2px 2px;
cursor: pointer;
transition: background-color 0.3s;
min-width: 3.0rem;
max-width: 3.0rem;
}
}
.result-non-lethal {
color: var(--color-failure);
font-family: var(--font-title);
}
li {
margin: 0 10px;
font-family: var(--font-primary);
font-size: calc(var(--font-size-standard) * 1.02);
}
}
}

View File

@@ -5,10 +5,11 @@
background-image: var(--background-image-base); background-image: var(--background-image-base);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
--input-height: 1.4rem;
.sheet-tabs { .sheet-tabs {
a { a {
color: rgba(32, 31, 31, 0.8); color: rgba(32, 31, 31, 0.8);
} }
} }
@@ -62,7 +63,7 @@
legend { legend {
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.1);
font-weight: bold; font-weight: bold;
letter-spacing: 1px; letter-spacing: 1px;
} }
@@ -73,6 +74,38 @@
font-family: var(--font-secondary); font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1); font-size: calc(var(--font-size-standard) * 1);
} }
.hp-unconscious {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
color: #b4710c;
}
.hp-dead {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
color: #b40000;
}
.protagonist-luck {
display: flex;
min-width: 8rem;
max-width: 8rem;
.rollable:hover,
.rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
font-size: 0.9rem;
}
}
.damage-bonus {
display: flex;
label {
max-width: 5rem;
min-width: 5rem;
}
input {
max-width: 2rem;
min-width: 2rem;
}
}
} }
.vehicle-sheet-common { .vehicle-sheet-common {
@@ -90,7 +123,6 @@
} }
.item-sheet-common { .item-sheet-common {
.form-fields { .form-fields {
padding-top: 4px; padding-top: 4px;
} }

View File

@@ -42,9 +42,6 @@
width: 2rem; width: 2rem;
margin-left: 4px; margin-left: 4px;
} }
.damage-bonus {
font-size: calc(var(--font-size-standard) * 0.8);
}
.hp-separator { .hp-separator {
font-size: calc(var(--font-size-standard) * 1.2); font-size: calc(var(--font-size-standard) * 1.2);
display: flex; display: flex;
@@ -126,6 +123,14 @@
min-width: 6rem; min-width: 6rem;
flex-grow: 1; flex-grow: 1;
} }
.san-helplessness,
.san-violence {
display: flex;
flex-grow: 1;
}
.label-san-type {
margin-right: 0.5rem;
}
.label-bp { .label-bp {
flex-grow: 1; flex-grow: 1;
max-width: 3rem; max-width: 3rem;

View File

@@ -98,6 +98,11 @@
margin-left: 2rem; margin-left: 2rem;
display: none; display: none;
} }
.healing-roll {
font-size: calc(var(--font-size-standard) * 1.0);
margin-left: 2rem;
display: none;
}
.roll-damage { .roll-damage {
font-size: calc(var(--font-size-standard) * 1.0); font-size: calc(var(--font-size-standard) * 1.0);
margin-left: 2rem; margin-left: 2rem;

View File

@@ -0,0 +1,31 @@
<div class="{{cssClass}}">
<div class="chat-lethal-damage">
<ul>
<li><strong>{{weapon.name}} : {{localize "CTHULHUETERNAL.Label.lethalityRoll"}}</strong></li>
<li>{{localize "CTHULHUETERNAL.Label.result"}} :{{rollResult}} ({{lethalScore}})</li>
{{#if weapon.system.selectiveFireChoice}}
<li>{{weapon.system.selectiveFireChoiceLabel}}</li>
{{/if}}
{{#if weapon.system.killRadius}}
<li>{{localize "CTHULHUETERNAL.Label.killRadius"}} : {{weapon.system.killRadius}} {{weapon.system.rangeUnit}}</li>
<li>{{localize "CTHULHUETERNAL.Label.killRadiusInfo"}}</li>
{{/if}}
{{#if ammoUsed}}
<li>{{localize "CTHULHUETERNAL.Label.ammoUsed"}}: {{ammoUsed}} / {{weapon.system.ammo.value}}</li>
{{/if}}
{{#if isLethal}}
<li class="result-lethal">{{localize "CTHULHUETERNAL.Label.lethalityLethal"}}</li>
<li class="result-lethal">{{localize "CTHULHUETERNAL.Label.lethalityWounded"}}</li>
{{else}}
<li class="result-non-lethal">{{localize "CTHULHUETERNAL.Label.lethalityNotLethal"}}</li>
<li class="result-non-lethal">{{localize "CTHULHUETERNAL.Label.lethalityNotWounded"}}: <strong>{{wounds}}</strong></li>
{{/if}}
</ul>
</div>
</div>

View File

@@ -51,30 +51,54 @@
{{#if isCritical}} {{#if isCritical}}
<li class="result-critical-success">{{localize "CTHULHUETERNAL.Label.criticalSuccess"}} <li class="result-critical-success">{{localize "CTHULHUETERNAL.Label.criticalSuccess"}}
{{#if (eq rollType "weapon")}} {{#if (eq rollType "weapon")}}
<a class="damage-roll"><i class="fa-solid fa-sword"></i></a> {{#if (eq weapon.system.weaponType "rangedfirearm")}}
<a class="damage-roll" data-tooltip="{{localize "CTHULHUETERNAL.Label.rollDamage"}}"><i class="fa-solid fa-gun"></i></a>
{{else}}
<a class="damage-roll" data-tooltip="{{localize "CTHULHUETERNAL.Label.rollDamage"}}"><i class="fa-solid fa-sword"></i></a>
{{/if}}
{{/if}} {{/if}}
{{#if (eq rollType "skill") }}
{{#if rollItem.system.isHealing}}
<a class="healing-roll" data-tooltip="{{localize "CTHULHUETERNAL.Label.rollHealing"}}"><i class="fa-solid fa-heart"></i></a>
{{/if}}
{{/if}}
</li> </li>
{{else}} {{else}}
<li class="result-success"> <li class="result-success">
{{localize "CTHULHUETERNAL.Label.success"}} {{localize "CTHULHUETERNAL.Label.success"}}
{{#if isNudge}} {{#if isNudge}}
<a class="nudge-roll"><i class="fa-solid fa-circle-sort-down"></i></a> <a class="nudge-roll" data-tooltip="{{localize "CTHULHUETERNAL.Label.rollNudge"}}"><i class="fa-solid fa-circle-sort-down"></i></a>
{{/if}} {{/if}}
{{#if (eq rollType "weapon")}} {{#if (eq weapon.system.weaponType "rangedfirearm")}}
<a class="damage-roll"><i class="fa-solid fa-sword"></i></a> <a class="damage-roll" data-tooltip="{{localize "CTHULHUETERNAL.Label.rollDamage"}}"><i class="fa-solid fa-gun"></i></a>
{{else}}
<a class="damage-roll" data-tooltip="{{localize "CTHULHUETERNAL.Label.rollDamage"}}"><i class="fa-solid fa-sword"></i></a>
{{/if}}
{{#if (eq rollType "skill") }}
{{#if rollItem.system.isHealing}}
<a class="healing-roll" data-tooltip="{{localize "CTHULHUETERNAL.Label.rollHealing"}}"><i class="fa-solid fa-heart"></i></a>
{{/if}}
{{/if}} {{/if}}
</li> </li>
{{/if}} {{/if}}
{{/if}} {{/if}}
{{#if isFailure}} {{#if isFailure}}
{{#if isCritical}} {{#if isCritical}}
<li class="result-critical-failure">{{localize "CTHULHUETERNAL.Label.criticalFailure"}}</li> <li class="result-critical-failure">{{localize "CTHULHUETERNAL.Label.criticalFailure"}}
{{#if (eq rollType "skill") }}
{{#if rollItem.system.isHealing}}
<a class="healing-roll" data-tooltip="{{localize "CTHULHUETERNAL.Label.rollHealing"}}"><i class="fa-solid fa-heart"></i></a>
{{/if}}
{{/if}}
</li>
{{else}} {{else}}
<li class="result-failure"> <li class="result-failure">
{{localize "CTHULHUETERNAL.Label.failure"}} {{localize "CTHULHUETERNAL.Label.failure"}}
{{#if isNudge}} {{#if isNudge}}
<a class="nudge-roll"><i class="fa-solid fa-circle-sort-down"></i></a> <a class="nudge-roll" data-tooltip="{{localize "CTHULHUETERNAL.Label.rollNudge"}}"><i class="fa-solid fa-circle-sort-down"></i></a>
{{/if}} {{/if}}
</li> </li>
{{/if}} {{/if}}

View File

@@ -0,0 +1,20 @@
<div class="{{cssClass}}">
<div class="chat-lethal-damage">
<ul>
<li><strong>{{weapon.name}} : {{localize "CTHULHUETERNAL.Label.damageRoll"}}</strong></li>
<li>{{localize "CTHULHUETERNAL.Label.result"}} :{{rollResult}} ({{formula}})</li>
{{#if weapon.system.killRadius}}
<li>{{localize "CTHULHUETERNAL.Label.killRadius"}} : {{weapon.system.killRadius}} {{weapon.system.rangeUnit}}</li>
<li>{{localize "CTHULHUETERNAL.Label.killRadiusInfo"}}</li>
{{/if}}
{{#if ammoUsed}}
<li>{{localize "CTHULHUETERNAL.Label.ammoUsed"}}: {{ammoUsed}} / {{weapon.system.ammo.value}}</li>
{{/if}}
<li class="result-non-lethal">{{localize "CTHULHUETERNAL.Label.damageMessage"}}: <strong>{{rollResult}}</strong></li>
</ul>
</div>
</div>

View File

@@ -0,0 +1,11 @@
<div class="{{cssClass}}">
<div class="chat-san-request">
<ul>
<li><strong>{{localize "CTHULHUETERNAL.Label.noSanLoss"}}</strong></li>
{{#if resetMsg}}
<li><strong>{{localize resetMsg}}</strong></li>
{{/if}}
</ul>
</div>
</div>

View File

@@ -0,0 +1,24 @@
<div class="{{cssClass}}">
<div class="chat-san-request">
<ul>
<li><strong>{{localize "CTHULHUETERNAL.Label.sanLoss"}}</strong></li>
{{#if (eq sanType "violence")}}
{{#if adaptedToViolence}}
<li class="orange-warning">{{localize "CTHULHUETERNAL.Label.adaptedToViolence"}}</li>
{{else}}
<li>{{localize "CTHULHUETERNAL.Label.sanLossViolence"}}</li>
{{/if}}
{{/if}}
{{#if (eq sanType "helplessness")}}
{{#if adaptedToHelplessness}}
<li class="orange-warning">{{localize "CTHULHUETERNAL.Label.adaptedToHelplessness"}}</li>
{{else}}
<li>{{localize "CTHULHUETERNAL.Label.sanLossHelplessness"}}</li>
{{/if}}
{{/if}}
</ul>
</div>
</div>

View File

@@ -0,0 +1,25 @@
<div class="{{cssClass}}">
<div class="chat-san-request">
<ul>
<li><strong>{{localize "CTHULHUETERNAL.Label.SANTest"}}</strong></li>
<li class="san-loose-buttons">
<button class="san-loose" data-san-value="0">0</button>
<button class="san-loose" data-san-value="1">1</button>
<button class="san-loose" data-san-value="2">2</button>
<button class="san-loose" data-san-value="3">3</button>
<button class="san-loose" data-san-value="4">4</button>
</li>
<li class="san-loose-buttons">
<button class="san-loose" data-san-value="1d4">1d4</button>
<button class="san-loose" data-san-value="1d6">1d6</button>
<button class="san-loose" data-san-value="1d8">1d8</button>
<button class="san-loose" data-san-value="1d10">1d10</button>
<button class="san-loose" data-san-value="1d12">1d12</button>
</li>
</ul>
</div>
</div>

View File

@@ -0,0 +1,12 @@
<div class="{{cssClass}}">
<div class="chat-san-request">
<ul>
<li><strong>{{localize "CTHULHUETERNAL.Label.sanLoss5"}}</strong></li>
{{#if resetMsg}}
<li class="orange-warning">{{localize resetMsg}}</li>
{{/if}}
</ul>
</div>
</div>

View File

@@ -0,0 +1,19 @@
<div class="{{cssClass}}">
<div class="chat-san-request">
<ul>
<li><strong>{{localize "CTHULHUETERNAL.Label.sanLoss"}} : {{sanLoss}}</strong></li>
<li><strong>{{localize "CTHULHUETERNAL.Label.selectSANType"}}</strong></li>
<li class="san-type-buttons">
<button class="san-type" data-san-value="{{sanLoss}}" data-san-type="violence">{{localize "CTHULHUETERNAL.Label.Violence"}}</button>
<button class="san-type" data-san-value="{{sanLoss}}" data-san-type="helplessness">{{localize "CTHULHUETERNAL.Label.Helplessness"}}</button>
</li>
<li class="san-type-buttons">
<button class="san-type" data-san-value="{{sanLoss}}" data-san-type="unnatural">{{localize "CTHULHUETERNAL.Label.Unnatural"}}</button>
<button class="san-type" data-san-value="{{sanLoss}}" data-san-type="none">{{localize "CTHULHUETERNAL.Label.None"}}</button>
</li>
</ul>
</div>
</div>

View File

@@ -11,7 +11,7 @@
data-name="checks" {{#if check}} checked {{/if}} {{#if (gte @index @root.system.resources.nbValidChecks)}} disabled {{/if}}> data-name="checks" {{#if check}} checked {{/if}} {{#if (gte @index @root.system.resources.nbValidChecks)}} disabled {{/if}}>
{{/each}} {{/each}}
</div> </div>
<button class="resource-roll rollable" data-roll-type="resource"><img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />Resource roll</button> <button class="resource-roll rollable" data-roll-type="resource"><img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />{{localize "CTHULHUETERNAL.Label.titleResource"}}</button>
{{formField systemFields.resources.fields.hand value=system.resources.hand name="system.resources.hand" localize=true disabled=true}} {{formField systemFields.resources.fields.hand value=system.resources.hand name="system.resources.hand" localize=true disabled=true}}
{{formField systemFields.resources.fields.stowed value=system.resources.stowed name="system.resources.stowed" localize=true disabled=true}} {{formField systemFields.resources.fields.stowed value=system.resources.stowed name="system.resources.stowed" localize=true disabled=true}}
{{formField systemFields.resources.fields.storage value=system.resources.storage name="system.resources.storage" localize=true disabled=true}} {{formField systemFields.resources.fields.storage value=system.resources.storage name="system.resources.storage" localize=true disabled=true}}
@@ -21,8 +21,13 @@
<fieldset> <fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.biodata"}}</legend> <legend>{{localize "CTHULHUETERNAL.Label.biodata"}}</legend>
<div class="adapted"> <div class="adapted">
{{#if isGM}}
{{formField systemFields.biodata.fields.adaptedToViolence value=system.biodata.adaptedToViolence name="system.biodata.adaptedToViolence" localize=true}} {{formField systemFields.biodata.fields.adaptedToViolence value=system.biodata.adaptedToViolence name="system.biodata.adaptedToViolence" localize=true}}
{{formField systemFields.biodata.fields.adaptedToHelplessness value=system.biodata.adaptedToHelplessness name="system.biodata.adaptedToHelplessness" localize=true}} {{formField systemFields.biodata.fields.adaptedToHelplessness value=system.biodata.adaptedToHelplessness name="system.biodata.adaptedToHelplessness" localize=true}}
{{else}}
{{formField systemFields.biodata.fields.adaptedToViolence value=system.biodata.adaptedToViolence name="system.biodata.adaptedToViolence" localize=true disabled=true}}
{{formField systemFields.biodata.fields.adaptedToHelplessness value=system.biodata.adaptedToHelplessness name="system.biodata.adaptedToHelplessness" localize=true disabled=true}}
{{/if}}
</div> </div>
<div class="biodata"> <div class="biodata">
{{formField systemFields.biodata.fields.harshness value=system.biodata.harshness name="system.biodata.harshness" localize=true}} {{formField systemFields.biodata.fields.harshness value=system.biodata.harshness name="system.biodata.harshness" localize=true}}

View File

@@ -10,14 +10,20 @@
data-tooltip="{{actor.name}}" /> data-tooltip="{{actor.name}}" />
</div> </div>
<fieldset class="protagonist-hp"> <fieldset class="protagonist-hp">
<legend>{{localize "CTHULHUETERNAL.Label.HP"}}</legend> {{#if system.hp.dead}}
<legend class="hp-dead">{{localize "CTHULHUETERNAL.Label.HP"}} {{localize "CTHULHUETERNAL.Label.dying"}}</legend>
{{else}}
{{#if system.hp.unconscious}}
<legend class="hp-unconscious">{{localize "CTHULHUETERNAL.Label.HP"}} {{localize "CTHULHUETERNAL.Label.unconscious"}}</legend>
{{else}}
<legend>{{localize "CTHULHUETERNAL.Label.HP"}}</legend>
{{/if}}
{{/if}}
<div class="flexrow"> <div class="flexrow">
{{formField systemFields.hp.fields.value value=system.hp.value}} {{formField systemFields.hp.fields.value value=system.hp.value}}
<span class="hp-separator">/</span> <span class="hp-separator">/</span>
{{formField systemFields.hp.fields.max value=system.hp.max rootId=partId disabled=true}} {{formField systemFields.hp.fields.max value=system.hp.max rootId=partId disabled=true}}
</div> {{formField systemFields.hp.fields.stunned value=system.hp.stunned classes="stunned"}}
<div class="flexrow ">
{{formField systemFields.damageBonus value=system.damageBonus classes="damage-bonus"}}
</div> </div>
</fieldset> </fieldset>
@@ -70,17 +76,29 @@
</div> </div>
<div class="flexrow"> <div class="flexrow">
<span class="label-field">{{localize "CTHULHUETERNAL.Label.violence"}}</span> <div class="san-violence">
{{#each system.san.violence as |violence idx|}} {{#if system.biodata.adaptedToViolence}}
<input class="san-checkbox" type="checkbox" data-action="updateCheckboxArray" data-index="{{@index}}" <span class="">{{localize "CTHULHUETERNAL.Label.adaptedToViolenceShort"}}</span>
data-name="violence" {{#if violence}} checked {{/if}}> {{else}}
{{/each}} <span class="label-field label-san-type">{{localize "CTHULHUETERNAL.Label.violence"}}</span>
{{#each system.san.violence as |violence idx|}}
<input class="san-checkbox" type="checkbox" data-action="updateCheckboxArray" data-index="{{@index}}"
data-name="violence" {{#if violence}} checked {{/if}}>
{{/each}}
{{/if}}
</div>
<span class="label-field">{{localize "CTHULHUETERNAL.Label.helplessness"}}</span> <div class="san-helplessness">
{{#each system.san.helplessness as |helplessness idx|}} {{#if system.biodata.adaptedToHelplessness}}
<input class="san-checkbox" type="checkbox" data-action="updateCheckboxArray" data-index="{{@index}}" <span class="">{{localize "CTHULHUETERNAL.Label.adaptedToHelplessnessShort"}}</span>
data-name="helplessness" {{#if helplessness}} checked {{/if}}> {{else}}
{{/each}} <span class="label-field label-san-type">{{localize "CTHULHUETERNAL.Label.helplessness"}}</span>
{{#each system.san.helplessness as |helplessness idx|}}
<input class="san-checkbox" type="checkbox" data-action="updateCheckboxArray" data-index="{{@index}}"
data-name="helplessness" {{#if helplessness}} checked {{/if}}>
{{/each}}
{{/if}}
</div>
</div> </div>
@@ -158,6 +176,17 @@
rootId=partId disabled=isPlayMode }} rootId=partId disabled=isPlayMode }}
<label class="char-text">{{mul system.characteristics.cha.value 5}}</label> <label class="char-text">{{mul system.characteristics.cha.value 5}}</label>
</div> </div>
<div class="protagonist-luck">
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<label class="rollable" data-roll-type="luck" data-char-id="luck"
data-tooltip="{{system.Label.Luck}}">{{localize
"CTHULHUETERNAL.Label.Luck"}} (50)</label>
</div>
<div class="damage-bonus">
{{formField systemFields.damageBonus value=system.damageBonus tooltip="Etourdi" }}
</div>
</fieldset> </fieldset>
</section> </section>

View File

@@ -14,6 +14,10 @@
{{system.skillTotal}} {{system.skillTotal}}
</div> </div>
{{#if isGM}} {{#if isGM}}
{{formField systemFields.isHealing value=system.isHealing}}
{{#if system.isHealing}}
{{formField systemFields.healingFormula value=system.healingFormula}}
{{/if}}
{{formField systemFields.isAdversary value=system.isAdversary }} {{formField systemFields.isAdversary value=system.isAdversary }}
{{formField systemFields.diceEvolved value=system.diceEvolved}} {{formField systemFields.diceEvolved value=system.diceEvolved}}
@@ -21,6 +25,10 @@
{{formField systemFields.rollFailed value=system.rollFailed}} {{formField systemFields.rollFailed value=system.rollFailed}}
{{/if}} {{/if}}
{{else}} {{else}}
{{formField systemFields.isHealing value=system.isHealing disabled=true}}
{{#if system.isHealing}}
{{formField systemFields.healingFormula value=system.healingFormula disabled=true}}
{{/if}}
{{formField systemFields.isAdversary value=system.isAdversary disabled=true}} {{formField systemFields.isAdversary value=system.isAdversary disabled=true}}
{{formField systemFields.diceEvolved value=system.diceEvolved disabled=true}} {{formField systemFields.diceEvolved value=system.diceEvolved disabled=true}}

View File

@@ -8,7 +8,7 @@
{{formField systemFields.settings value=system.settings localize=true}} {{formField systemFields.settings value=system.settings localize=true}}
{{formField systemFields.weaponType value=system.weaponType localize=true}} {{formField systemFields.weaponType value=system.weaponType localize=true}}
{{#if (eq system.weaponType "rangedfirearm")}} {{#if (eq system.weaponType "rangedfirearm")}}
{{formField systemFields.weaponSubtype value=system.weaponSubtype localize=true}} {{formField systemFields.weaponSubtype value=system.weaponSubtype localize=true}}
{{/if}} {{/if}}
{{formField systemFields.state value=system.state localize=true}} {{formField systemFields.state value=system.state localize=true}}
@@ -18,12 +18,20 @@
{{formField systemFields.directSkillValue value=system.directSkillValue }} {{formField systemFields.directSkillValue value=system.directSkillValue }}
{{/if}} {{/if}}
{{formField systemFields.hasSelectiveFire value=system.hasSelectiveFire}}
{{formField systemFields.applyDamageBonus value=system.applyDamageBonus}} {{formField systemFields.applyDamageBonus value=system.applyDamageBonus}}
{{formField systemFields.damage value=system.damage}} {{formField systemFields.damage value=system.damage}}
{{formField systemFields.baseRange value=system.baseRange}} {{#if isRanged}}
{{formField systemFields.rangeUnit value=system.rangeUnit localize=true}} {{formField systemFields.baseRange value=system.baseRange}}
{{formField systemFields.rangeUnit value=system.rangeUnit localize=true}}
{{/if}}
{{#if isFireArm}}
{{formField systemFields.hasSelectiveFire value=system.hasSelectiveFire}}
{{formField systemFields.ammo.fields.value value=system.ammo.value}}
{{formField systemFields.ammo.fields.max value=system.ammo.max}}
{{/if}}
{{formField systemFields.lethality value=system.lethality}} {{formField systemFields.lethality value=system.lethality}}
{{formField systemFields.killRadius value=system.killRadius}} {{formField systemFields.killRadius value=system.killRadius}}