diff --git a/assets/fonts/BebasNeue-Regular.ttf b/assets/fonts/BebasNeue-Regular.ttf new file mode 100644 index 0000000..d2190b5 Binary files /dev/null and b/assets/fonts/BebasNeue-Regular.ttf differ diff --git a/assets/fonts/CarterOne-Regular.ttf b/assets/fonts/CarterOne-Regular.ttf new file mode 100644 index 0000000..a4c553a Binary files /dev/null and b/assets/fonts/CarterOne-Regular.ttf differ diff --git a/assets/fonts/Excelsior-Normal.ttf b/assets/fonts/Excelsior-Normal.ttf new file mode 100644 index 0000000..d323aa9 Binary files /dev/null and b/assets/fonts/Excelsior-Normal.ttf differ diff --git a/assets/fonts/Georama-Regular.ttf b/assets/fonts/Georama-Regular.ttf new file mode 100644 index 0000000..decbb7a Binary files /dev/null and b/assets/fonts/Georama-Regular.ttf differ diff --git a/assets/fonts/IMFell.ttf b/assets/fonts/IMFell.ttf new file mode 100644 index 0000000..c803269 Binary files /dev/null and b/assets/fonts/IMFell.ttf differ diff --git a/assets/fonts/Luminari-Regular.ttf b/assets/fonts/Luminari-Regular.ttf new file mode 100644 index 0000000..ef2a903 Binary files /dev/null and b/assets/fonts/Luminari-Regular.ttf differ diff --git a/assets/fonts/Megrim-Regular.ttf b/assets/fonts/Megrim-Regular.ttf new file mode 100644 index 0000000..1e5a8db Binary files /dev/null and b/assets/fonts/Megrim-Regular.ttf differ diff --git a/assets/fonts/P22-Operina.ttf b/assets/fonts/P22-Operina.ttf new file mode 100644 index 0000000..96caf7b Binary files /dev/null and b/assets/fonts/P22-Operina.ttf differ diff --git a/assets/fonts/RozhaOne-Regular.ttf b/assets/fonts/RozhaOne-Regular.ttf new file mode 100644 index 0000000..300eea8 Binary files /dev/null and b/assets/fonts/RozhaOne-Regular.ttf differ diff --git a/assets/fonts/SairaStencilOne-Regular.ttf b/assets/fonts/SairaStencilOne-Regular.ttf new file mode 100644 index 0000000..5f3588d Binary files /dev/null and b/assets/fonts/SairaStencilOne-Regular.ttf differ diff --git a/assets/fonts/Seabreed.ttf b/assets/fonts/Seabreed.ttf new file mode 100644 index 0000000..354c676 Binary files /dev/null and b/assets/fonts/Seabreed.ttf differ diff --git a/assets/fonts/SigmarOne-Regular.ttf b/assets/fonts/SigmarOne-Regular.ttf new file mode 100644 index 0000000..6c57b09 Binary files /dev/null and b/assets/fonts/SigmarOne-Regular.ttf differ diff --git a/assets/fonts/SpectralSC-Regular.ttf b/assets/fonts/SpectralSC-Regular.ttf new file mode 100644 index 0000000..ac88fc0 Binary files /dev/null and b/assets/fonts/SpectralSC-Regular.ttf differ diff --git a/assets/fonts/Tangerine-Regular.ttf b/assets/fonts/Tangerine-Regular.ttf new file mode 100644 index 0000000..8f342e0 Binary files /dev/null and b/assets/fonts/Tangerine-Regular.ttf differ diff --git a/assets/fonts/Teko-Regular.ttf b/assets/fonts/Teko-Regular.ttf new file mode 100644 index 0000000..553ac65 Binary files /dev/null and b/assets/fonts/Teko-Regular.ttf differ diff --git a/assets/fonts/Top-Secret.ttf b/assets/fonts/Top-Secret.ttf new file mode 100644 index 0000000..8325b59 Binary files /dev/null and b/assets/fonts/Top-Secret.ttf differ diff --git a/assets/fonts/Trajan-Pro-Regular.ttf b/assets/fonts/Trajan-Pro-Regular.ttf new file mode 100644 index 0000000..6e646b9 Binary files /dev/null and b/assets/fonts/Trajan-Pro-Regular.ttf differ diff --git a/assets/fonts/UncialAntiqua-Regular.ttf b/assets/fonts/UncialAntiqua-Regular.ttf new file mode 100644 index 0000000..9bf2a7e Binary files /dev/null and b/assets/fonts/UncialAntiqua-Regular.ttf differ diff --git a/assets/fonts/Volkhov-Regular.ttf b/assets/fonts/Volkhov-Regular.ttf new file mode 100644 index 0000000..a8c33c0 Binary files /dev/null and b/assets/fonts/Volkhov-Regular.ttf differ diff --git a/assets/fonts/armalite.ttf b/assets/fonts/armalite.ttf new file mode 100644 index 0000000..3790b92 Binary files /dev/null and b/assets/fonts/armalite.ttf differ diff --git a/assets/fonts/dominican.ttf b/assets/fonts/dominican.ttf new file mode 100644 index 0000000..01b84e4 Binary files /dev/null and b/assets/fonts/dominican.ttf differ diff --git a/assets/icons/ucin_equipment.svg b/assets/icons/icon_equipment.svg similarity index 100% rename from assets/icons/ucin_equipment.svg rename to assets/icons/icon_equipment.svg diff --git a/assets/icons/crossed-swords.svg b/assets/icons/icon_weapon.svg similarity index 100% rename from assets/icons/crossed-swords.svg rename to assets/icons/icon_weapon.svg diff --git a/assets/ui/cover_ageofrevolution.webp b/assets/ui/cover_ageofrevolution.webp new file mode 100644 index 0000000..b41620f Binary files /dev/null and b/assets/ui/cover_ageofrevolution.webp differ diff --git a/assets/ui/cover_ageofsail.webp b/assets/ui/cover_ageofsail.webp new file mode 100644 index 0000000..914e1a9 Binary files /dev/null and b/assets/ui/cover_ageofsail.webp differ diff --git a/assets/ui/cover_classical.webp b/assets/ui/cover_classical.webp new file mode 100644 index 0000000..b3e7df2 Binary files /dev/null and b/assets/ui/cover_classical.webp differ diff --git a/assets/ui/cover_cold_war.webp b/assets/ui/cover_cold_war.webp new file mode 100644 index 0000000..07c3bf8 Binary files /dev/null and b/assets/ui/cover_cold_war.webp differ diff --git a/assets/ui/cover_future.webp b/assets/ui/cover_future.webp new file mode 100644 index 0000000..93d2370 Binary files /dev/null and b/assets/ui/cover_future.webp differ diff --git a/assets/ui/cover_jazzage.webp b/assets/ui/cover_jazzage.webp new file mode 100644 index 0000000..1c0a018 Binary files /dev/null and b/assets/ui/cover_jazzage.webp differ diff --git a/assets/ui/cover_medieval.webp b/assets/ui/cover_medieval.webp new file mode 100644 index 0000000..a34e607 Binary files /dev/null and b/assets/ui/cover_medieval.webp differ diff --git a/assets/ui/cover_modern.webp b/assets/ui/cover_modern.webp new file mode 100644 index 0000000..3fe7941 Binary files /dev/null and b/assets/ui/cover_modern.webp differ diff --git a/assets/ui/cover_victorian.webp b/assets/ui/cover_victorian.webp new file mode 100644 index 0000000..225b381 Binary files /dev/null and b/assets/ui/cover_victorian.webp differ diff --git a/assets/ui/cover_ww1.webp b/assets/ui/cover_ww1.webp new file mode 100644 index 0000000..93020da Binary files /dev/null and b/assets/ui/cover_ww1.webp differ diff --git a/assets/ui/cover_ww2.webp b/assets/ui/cover_ww2.webp new file mode 100644 index 0000000..7cd8b64 Binary files /dev/null and b/assets/ui/cover_ww2.webp differ diff --git a/css/fvtt-cthulhu-eternal.css b/css/fvtt-cthulhu-eternal.css index 1113354..99902c3 100644 --- a/css/fvtt-cthulhu-eternal.css +++ b/css/fvtt-cthulhu-eternal.css @@ -1,6 +1,86 @@ @font-face { font-family: "Georama"; - src: url("../assets/fonts/georama.woff2") format("woff2"); + src: url("../assets/fonts/Georama-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "Tangerine"; + src: url("../assets/fonts/Tangerine-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "TrajanPro"; + src: url("../assets/fonts/Trajan-Pro-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "Teko"; + src: url("../assets/fonts/Teko-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "P22Operina"; + src: url("../assets/fonts/P22-Operina.ttf") format("truetype"); +} +@font-face { + font-family: "SpectralSC"; + src: url("../assets/fonts/SpectralSC-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "RozhaOne"; + src: url("../assets/fonts/RozhaOne-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "Megrim"; + src: url("../assets/fonts/Megrim-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "Volkhov"; + src: url("../assets/fonts/Volkhov-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "IMFell"; + src: url("../assets/fonts/IMFell.ttf") format("truetype"); +} +@font-face { + font-family: "Dominican"; + src: url("../assets/fonts/dominican.ttf") format("truetype"); +} +@font-face { + font-family: "UncialAntiqua"; + src: url("../assets/fonts/UncialAntiqua-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "Luminari"; + src: url("../assets/fonts/Luminari-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "SairaStencilOne"; + src: url("../assets/fonts/SairaStencilOne-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "Armalite"; + src: url("../assets/fonts/armalite.ttf") format("truetype"); +} +@font-face { + font-family: "CarterOne"; + src: url("../assets/fonts/CarterOne-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "SigmarOne"; + src: url("../assets/fonts/SigmarOne-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "Excelsior"; + src: url("../assets/fonts/Excelsior-Normal.ttf") format("truetype"); +} +@font-face { + font-family: "TopSecret"; + src: url("../assets/fonts/Top-Secret.ttf") format("truetype"); +} +@font-face { + font-family: "BebasNeue"; + src: url("../assets/fonts/BebasNeue-Regular.ttf") format("truetype"); +} +@font-face { + font-family: "Seabreed"; + src: url("../assets/fonts/Seabreed.ttf") format("truetype"); } @font-face { font-family: "Broadway"; @@ -26,18 +106,21 @@ --font-size-standard: 0.9rem; --background-image-base: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url("../assets/ui/jazzage_background_main.webp"); /*--background-image-base: url("../assets/ui/jazzage_background_main.webp");*/ - --font-primary: "Georama"; - --font-secondary: "Georama"; + --font-primary: "RozhaOne"; + --font-secondary: "RozhaOne"; --font-title: "Broadway"; --logo-standard: url("../assets/logos/reanimated-ce-logo.webp"); --color-success: darkgreen; --color-failure: darkred; --color-critical-success: lightgreen; --color-critical-failure: lightcoral; + --img-icon-color-filter: brightness(0) saturate(100%) invert(52%) sepia(9%) saturate(2368%) hue-rotate(360deg) brightness(86%) contrast(84%); } -.era-icon-color { +.item .thumbnail, +.item-img { /*filter: invert(90%) sepia(10%) saturate(1215%) hue-rotate(55deg) brightness(93%) contrast(89%);*/ /*filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg) brightness(118%) contrast(119%);*/ + filter: var(--img-icon-color-filter); } #logo { content: var(--logo-standard); @@ -213,6 +296,31 @@ i.fvtt-cthulhu-eternal { font-size: calc(var(--font-size-standard) * 1.4); width: 400px; } +.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san input { + min-width: 2.2rem; +} +.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san .san-checkbox { + min-width: 1rem; + max-width: 1rem; +} +.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san .label-field { + flex-grow: 0; + margin-left: 4px; +} +.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san .spacing { + margin-left: 4px; +} +.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .willpower input { + min-width: 2.2rem; +} +.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .willpower .label-field { + flex-grow: 0; + margin-left: 4px; +} +.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .willpower .checkbox { + min-width: 1rem; + max-width: 1rem; +} .fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos { display: flex; flex-direction: column; @@ -296,6 +404,39 @@ i.fvtt-cthulhu-eternal { .fvtt-cthulhu-eternal .protagonist-biography prose-mirror.active { min-height: 150px; } +.fvtt-cthulhu-eternal .protagonist-biography .field-label { + margin-left: 8px; +} +.fvtt-cthulhu-eternal .protagonist-biography .biodata { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 8px; +} +.fvtt-cthulhu-eternal .protagonist-biography .motivations { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; +} +.fvtt-cthulhu-eternal .protagonist-biography .motivations .motivation { + display: flex; + align-items: center; + gap: 4px; + min-width: 14rem; + max-width: 14rem; +} +.fvtt-cthulhu-eternal .protagonist-biography .motivations .motivation .controls { + min-width: 2rem; + max-width: 2rem; +} +.fvtt-cthulhu-eternal .protagonist-biography .motivations .motivation .name { + min-width: 8rem; + max-width: 8rem; +} +.fvtt-cthulhu-eternal .protagonist-biography .motivations .motivation .item-img { + width: 32px; + height: 32px; + margin: 4px 0 0 0; +} .fvtt-cthulhu-eternal .tab.protagonist-skills { background-color: var(--color-light-1); display: grid; @@ -335,6 +476,98 @@ i.fvtt-cthulhu-eternal { height: 32px; margin: 4px 0 0 0; } +.fvtt-cthulhu-eternal .tab.protagonist-status { + background-color: var(--color-light-1); + display: grid; + grid-template-columns: 1fr; +} +.fvtt-cthulhu-eternal .tab.protagonist-status legend a { + font-size: calc(var(--font-size-standard) * 1.4); + padding-left: 5px; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .bonds { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .bonds .bond { + display: flex; + align-items: center; + gap: 4px; + min-width: 16rem; + max-width: 16rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .bonds .bond .controls { + min-width: 2rem; + max-width: 2rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .bonds .bond .name { + min-width: 12rem; + max-width: 12rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .bonds .bond .type { + min-width: 4rem; + max-width: 4rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .bonds .bond .level { + min-width: 2rem; + max-width: 2rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .bonds .bond .item-img { + width: 32px; + height: 32px; + margin: 4px 0 0 0; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .mentaldisorders { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .mentaldisorders .mentaldisorder { + display: flex; + align-items: center; + gap: 4px; + min-width: 16rem; + max-width: 16rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .mentaldisorders .mentaldisorder .controls { + min-width: 2rem; + max-width: 2rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .mentaldisorders .mentaldisorder .name { + min-width: 14rem; + max-width: 14rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .mentaldisorders .mentaldisorder .item-img { + width: 32px; + height: 32px; + margin: 4px 0 0 0; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .injuries { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .injuries .injury { + display: flex; + align-items: center; + gap: 4px; + min-width: 16rem; + max-width: 16rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .injuries .injury .controls { + min-width: 2rem; + max-width: 2rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .injuries .injury .name { + min-width: 14rem; + max-width: 14rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .injuries .injury .item-img { + width: 32px; + height: 32px; + margin: 4px 0 0 0; +} .fvtt-cthulhu-eternal .tab.protagonist-equipment { background-color: var(--color-light-1); display: grid; @@ -346,18 +579,37 @@ i.fvtt-cthulhu-eternal { } .fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons { display: grid; - grid-template-columns: repeat(4, 1fr); + grid-template-columns: repeat(2, 1fr); gap: 4px; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon { display: flex; align-items: center; gap: 4px; + min-width: 13rem; + max-width: 13srem; +} +.fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .rollable:hover, +.fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .rollable:focus { + text-shadow: 0 0 8px var(--color-shadow-primary); + cursor: pointer; +} +.fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .controls { + min-width: 2rem; + max-width: 2rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .damage { + min-width: 5rem; + max-width: 5rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .name { + min-width: 8rem; + max-width: 8rem; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .item-img { - width: 50px; - height: 50px; - margin: 5px 0 0 0; + width: 32px; + height: 32px; + margin: 4px 0 0 0; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .armors { display: grid; @@ -368,11 +620,30 @@ i.fvtt-cthulhu-eternal { display: flex; align-items: center; gap: 4px; + min-width: 13rem; + max-width: 13srem; +} +.fvtt-cthulhu-eternal .tab.protagonist-equipment .armors .armor .rollable:hover, +.fvtt-cthulhu-eternal .tab.protagonist-equipment .armors .armor .rollable:focus { + text-shadow: 0 0 8px var(--color-shadow-primary); + cursor: pointer; +} +.fvtt-cthulhu-eternal .tab.protagonist-equipment .armors .armor .controls { + min-width: 2rem; + max-width: 2rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-equipment .armors .armor .protection { + min-width: 5rem; + max-width: 5rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-equipment .armors .armor .name { + min-width: 8rem; + max-width: 8rem; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .armors .armor .item-img { - width: 50px; - height: 50px; - margin: 5px 0 0 0; + width: 32px; + height: 32px; + margin: 4px 0 0 0; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .gears { display: grid; @@ -383,11 +654,30 @@ i.fvtt-cthulhu-eternal { display: flex; align-items: center; gap: 4px; + min-width: 13rem; + max-width: 13srem; +} +.fvtt-cthulhu-eternal .tab.protagonist-equipment .gears .gear .rollable:hover, +.fvtt-cthulhu-eternal .tab.protagonist-equipment .gears .gear .rollable:focus { + text-shadow: 0 0 8px var(--color-shadow-primary); + cursor: pointer; +} +.fvtt-cthulhu-eternal .tab.protagonist-equipment .gears .gear .controls { + min-width: 2rem; + max-width: 2rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-equipment .gears .gear .damage { + min-width: 5rem; + max-width: 5rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-equipment .gears .gear .name { + min-width: 8rem; + max-width: 8rem; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .gears .gear .item-img { - width: 50px; - height: 50px; - margin: 5px 0 0 0; + width: 32px; + height: 32px; + margin: 4px 0 0 0; } .fvtt-cthulhu-eternal .tab.protagonist-equipment prose-mirror.inactive { min-height: 40px; diff --git a/cthulhu-eternal.mjs b/cthulhu-eternal.mjs index 369bd43..c2fa9ed 100644 --- a/cthulhu-eternal.mjs +++ b/cthulhu-eternal.mjs @@ -85,7 +85,9 @@ Hooks.once("init", function () { game.socket.on(`system.${SYSTEM.id}`, handleSocketEvent) setupTextEnrichers() + CthulhuEternalUtils.registerSettings() CthulhuEternalUtils.registerHandlebarsHelpers() + CthulhuEternalUtils.setupCSSRootVariables() // Gestion des jets de dés depuis les journaux document.addEventListener("click", (event) => { diff --git a/lang/en.json b/lang/en.json index f56d630..0b5e617 100644 --- a/lang/en.json +++ b/lang/en.json @@ -29,10 +29,38 @@ "WW2": "World War 2", "ColdWar": "Cold War", "Victorian": "Victorian", - "AgeOfSail": "Age of Sail" + "AgeOfSail": "Age of Sail", + "PostApo": "Post-Apocalyptic" }, "Protagonist": { "FIELDS": { + "biodata": { + "harshness": { + "label": "Harshness" + }, + "age": { + "label": "Age" + }, + "gender": { + "label": "Gender" + }, + "hair": { + "label": "Hair" + }, + "eyes": { + "label": "Eyes" + }, + "height": { + "label": "Height" + }, + "home": { + "label": "Home" + }, + "birthplace": { + "label": "Birthplace" + }, + "label": "Biodata" + }, "characteristics:": { "str": { "label": "Strength" @@ -57,6 +85,12 @@ }, "Skill": { "Unnatural": "Unnatural", + "Melee": "Melee Weapons", + "Firearms": "Firearms", + "Athletics": "Athletics", + "UnarmedCombat": "Unarmed Combat", + "RangedWeapons": "Ranged Weapons", + "FirearmsBeams": "Firearms / Beam Weapons", "FIELDS": { "settings": { "label": "Settings era" @@ -243,8 +277,6 @@ "gear": "Gear", "damage": "Damage", "resource": "Resource", - "newArmor": "New Armor", - "newWeapon": "New Weapon", "armor": "Armor", "malus": "Malus", "experience": "Experience", @@ -272,7 +304,29 @@ "criticalSuccess": "Critical Success", "criticalFailure": "Critical Failure", "Characteristic": "Characteristic", - "targetScore": "Target Score" + "targetScore": "Target Score", + "gears": "Gears", + "armors": "Armors", + "motivations": "Motivations", + "mentalDisorders": "Mental Disorders", + "bonds": "Bonds", + "arcane": "Arcane", + "archetypes": "Archetypes", + "bondType": "Bond Type", + "injuries": "Injuries", + "damageShort": "Dmg", + "status": "Status", + "mentaldisorders": "Mental Disorders", + "newBond": "New Bond", + "newMotivation": "New Motivation", + "newMentalDisorder": "New Mental Disorder", + "newWeapon": "New Weapon", + "newArmor": "New Armor", + "newInjury": "New Injury", + "newGear": "New Gear", + "newArcane": "New Arcane", + "newArchetype": "New Archetype", + "newSkill": "New Skill" }, "Edit": "Edit", "Delete": "Delete", diff --git a/module/applications/sheets/protagonist-sheet.mjs b/module/applications/sheets/protagonist-sheet.mjs index 64d73c5..b08a9a9 100644 --- a/module/applications/sheets/protagonist-sheet.mjs +++ b/module/applications/sheets/protagonist-sheet.mjs @@ -5,14 +5,21 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS static DEFAULT_OPTIONS = { classes: ["protagonist"], position: { - width: 840, + width: 848, height: 620, }, window: { contentClasses: ["protagonist-content"], }, actions: { - createEquipment: CthulhuEternalProtagonistSheet.#onCreateEquipment, + createGear: CthulhuEternalProtagonistSheet.#onCreateGear, + createArmor: CthulhuEternalProtagonistSheet.#onCreateArmor, + createWeapon: CthulhuEternalProtagonistSheet.#onCreateWeapon, + createBond: CthulhuEternalProtagonistSheet.#onCreateBond, + createInjury: CthulhuEternalProtagonistSheet.#onCreateInjury, + createMentalDisorder: CthulhuEternalProtagonistSheet.#onCreateMentalDisorder, + createMotivation: CthulhuEternalProtagonistSheet.#onCreateMotivation, + createSkill: CthulhuEternalProtagonistSheet.#onCreateSkill }, } @@ -27,6 +34,9 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS skills: { template: "systems/fvtt-cthulhu-eternal/templates/protagonist-skills.hbs", }, + status: { + template: "systems/fvtt-cthulhu-eternal/templates/protagonist-status.hbs", + }, equipment: { template: "systems/fvtt-cthulhu-eternal/templates/protagonist-equipment.hbs", }, @@ -43,10 +53,11 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS /** * Prepare an array of form header tabs. * @returns {Record>} - */ + */ #getTabs() { const tabs = { skills: { id: "skills", group: "sheet", icon: "fa-solid fa-shapes", label: "CTHULHUETERNAL.Label.skills" }, + status: { id: "status", group: "sheet", icon: "fa-solid fa-file-waveform", label: "CTHULHUETERNAL.Label.status" }, equipment: { id: "equipment", group: "sheet", icon: "fa-solid fa-shapes", label: "CTHULHUETERNAL.Label.equipment" }, biography: { id: "biography", group: "sheet", icon: "fa-solid fa-book", label: "CTHULHUETERNAL.Label.biography" }, } @@ -104,8 +115,15 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS context.armors = doc.itemTypes.armor context.gears = doc.itemTypes.gear break + case "status": + context.tab = context.tabs.status + context.injuries = doc.itemTypes.injury + context.mentaldisorders = doc.itemTypes.mentaldisorder + context.bonds = doc.itemTypes.bond + break case "biography": context.tab = context.tabs.biography + context.motivations = doc.itemTypes.motivation context.enrichedDescription = await TextEditor.enrichHTML(doc.system.description, { async: true }) context.enrichedNotes = await TextEditor.enrichHTML(doc.system.notes, { async: true }) break @@ -118,15 +136,36 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS * @param {Event} event The initiating click event. * @param {HTMLElement} target The current target of the event listener. */ - static #onCreateEquipment(event, target) { - // Création d'une armure - if (event.shiftKey) { - this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("CTHULHUETERNAL.Label.newArmor"), type: "armor" }]) - } - // Création d'une arme - else { - this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("CTHULHUETERNAL.Label.newWeapon"), type: "weapon" }]) - } + static #onCreateGear(event, target) { + this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("CTHULHUETERNAL.Label.newGear"), type: "gear" }]) + } + + static #onCreateWeapon(event, target) { + this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("CTHULHUETERNAL.Label.newWeapon"), type: "weapon" }]) + } + + static #onCreateArmor(event, target) { + this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("CTHULHUETERNAL.Label.newArmor"), type: "armor" }]) + } + + static #onCreateBond(event, target) { + this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("CTHULHUETERNAL.Label.newBond"), type: "bond" }]) + } + + static #onCreateInjury(event, target) { + this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("CTHULHUETERNAL.Label.newInjury"), type: "injury" }]) + } + + static #onCreateMentalDisorder(event, target) { + this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("CTHULHUETERNAL.Label.newMentalDisorder"), type: "mentaldisorder" }]) + } + + static #onCreateMotivation(event, target) { + this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("CTHULHUETERNAL.Label.newMotivation"), type: "motivation" }]) + } + + static #onCreateSkill(event, target) { + this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("CTHULHUETERNAL.Label.newSkill"), type: "skill" }]) } /** diff --git a/module/config/system.mjs b/module/config/system.mjs index aab0e9a..2d61256 100644 --- a/module/config/system.mjs +++ b/module/config/system.mjs @@ -5,21 +5,6 @@ import * as BOND from "./bond.mjs" export const SYSTEM_ID = "fvtt-cthulhu-eternal" -export const AVAILABLE_SETTINGS = { - common: "CTHULHUETERNAL.Settings.Common", - modern: "CTHULHUETERNAL.Settings.Modern", - jazz: "CTHULHUETERNAL.Settings.Jazz", - future: "CTHULHUETERNAL.Settings.Future", - coldwar: "CTHULHUETERNAL.Settings.ColdWar", - ww2: "CTHULHUETERNAL.Settings.WW2", - ww1: "CTHULHUETERNAL.Settings.WW1", - victorian: "CTHULHUETERNAL.Settings.Victorian", - revolution: "CTHULHUETERNAL.Settings.Revolution", - medieval: "CTHULHUETERNAL.Settings.Medieval", - ageofsail: "CTHULHUETERNAL.Settings.AgeOfSail", - classical: "CTHULHUETERNAL.Settings.Classical" -} - export const ASCII = ` ▄████▄ ▄▄▄█████▓ ██░ ██ █ ██ ██▓ ██░ ██ █ ██ ▓█████▄▄▄█████▓▓█████ ██▀███ ███▄ █ ▄▄▄ ██▓ ▒██▀ ▀█ ▓ ██▒ ▓▒▓██░ ██▒ ██ ▓██▒▓██▒ ▓██░ ██▒ ██ ▓██▒ ▓█ ▀▓ ██▒ ▓▒▓█ ▀ ▓██ ▒ ██▒ ██ ▀█ █ ▒████▄ ▓██▒ @@ -31,10 +16,155 @@ export const ASCII = ` ░ ░ ░ ░░ ░ ░░░ ░ ░ ░ ░ ░ ░░ ░ ░░░ ░ ░ ░ ░ ░ ░░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ - - ` + +export const AVAILABLE_SETTINGS = { + modern: "CTHULHUETERNAL.Settings.Modern", + jazz: "CTHULHUETERNAL.Settings.Jazz", + future: "CTHULHUETERNAL.Settings.Future", + coldwar: "CTHULHUETERNAL.Settings.ColdWar", + ww2: "CTHULHUETERNAL.Settings.WW2", + ww1: "CTHULHUETERNAL.Settings.WW1", + victorian: "CTHULHUETERNAL.Settings.Victorian", + revolution: "CTHULHUETERNAL.Settings.Revolution", + medieval: "CTHULHUETERNAL.Settings.Medieval", + ageofsail: "CTHULHUETERNAL.Settings.AgeOfSail", + classical: "CTHULHUETERNAL.Settings.Classical", + postapo: "CTHULHUETERNAL.Settings.PostApo" +} + +export const ERA_CSS = { + jazz: { primaryFont: "RozhaOne", secondaryFont: "RozhaOne", titleFont: "Broadway", imgFilter: "brightness(0) saturate(100%) invert(52%) sepia(9%) saturate(2368%) hue-rotate(360deg) brightness(86%) contrast(84%)" }, + modern: { primaryFont: "Georama", secondaryFont: "Georama", titleFont: "Georama", imgFilter: "brightness(0) saturate(100%) invert(92%) sepia(11%) saturate(1214%) hue-rotate(51deg) brightness(93%) contrast(86%)" }, + future: { primaryFont: "Megrim", secondaryFont: "Megrim", titleFont: "Seabreed", imgFilter: "brightness(0) saturate(100%) invert(83%) sepia(30%) saturate(588%) hue-rotate(168deg) brightness(105%) contrast(103%)" }, + victorian: { primaryFont: "Volkhov", secondaryFont: "Volkhov", titleFont: "Excelsior", imgFilter: "brightness(0) saturate(100%) invert(100%) sepia(59%) saturate(1894%) hue-rotate(337deg) brightness(88%) contrast(98%)" }, + coldwar: { primaryFont: "BebasNeue", secondaryFont: "BebasNeue", titleFont: "TopSecret", imgFilter: "brightness(0) saturate(100%) invert(81%) sepia(14%) saturate(2508%) hue-rotate(202deg) brightness(99%) contrast(105%)"}, + revolution: { primaryFont: "IMFell", secondaryFont: "IMFell", titleFont: "Dominican", imgFilter: "brightness(0) saturate(100%) invert(81%) sepia(25%) saturate(386%) hue-rotate(7deg) brightness(101%) contrast(84%)" }, + medieval: { primaryFont: "UncialAntiqua", secondaryFont: "UncialAntiqua", titleFont: "Luminari", imgFilter: "brightness(0) saturate(100%) invert(93%) sepia(46%) saturate(354%) hue-rotate(321deg) brightness(93%) contrast(87%)"}, + ww2: { primaryFont: "SairaStencilOne", secondaryFont: "SairaStencilOne", titleFont: "Armalite", imgFilter: "brightness(0) saturate(100%) invert(95%) sepia(9%) saturate(1471%) hue-rotate(342deg) brightness(103%) contrast(107%)"}, + ww1: { primaryFont: "CarterOne", secondaryFont: "CarterOne", titleFont: "SigmarOne", imgFilter: "brightness(0) saturate(100%) invert(90%) sepia(38%) saturate(341%) hue-rotate(21deg) brightness(105%) contrast(105%)"}, + ageofsail: { primaryFont: "Tangerine", secondaryFont: "Tangerine", titleFont: "P22Operina", imgFilter: "brightness(0) saturate(100%) invert(43%) sepia(74%) saturate(3154%) hue-rotate(336deg) brightness(95%) contrast(83%)" }, + classical: { primaryFont: "SpectralSC", secondaryFont: "SpectralSC", titleFont: "TrajanPro", imgFilter: "brightness(0) saturate(100%) invert(52%) sepia(32%) saturate(7492%) hue-rotate(265deg) brightness(89%) contrast(95%)" }, + postapo: { primaryFont: "Teko", secondaryFont: "Teko", titleFont: "Teko", imgFilter: "brightness(0) saturate(100%) invert(44%) sepia(55%) saturate(2341%) hue-rotate(329deg) brightness(122%) contrast(103%))" } +} + +export const RESOURCE_RATING = { + jazz: { + 0: {name: "Penury", description: "CTHULHUETERNAL.Resource.Penury", income: 0, assets: "CTHULHUETERNAL.Resource.NoAssets"}, + 4: {name: "Poor", description: "CTHULHUETERNAL.Resource.Poor", income: 700, assets: "CTHULHUETERNAL.Resource.PoorJazz"}, + 8: {name: "Average", description: "CTHULHUETERNAL.Resource.Average", income: 3000, assets: "CTHULHUETERNAL.Resource.AverageJazz"}, + 12: {name: "Above Average", description: "CTHULHUETERNAL.Resource.AboveAverage", income: 5000, assets: "CTHULHUETERNAL.Resource.AboveAverageJazz"}, + 16: {name: "Well Off", description: "CTHULHUETERNAL.Resource.WellOff", income: 10000, assets: "CTHULHUETERNAL.Resource.WellOffJazz"}, + 18: {name: "Rich", description: "CTHULHUETERNAL.Resource.Rich", income: 15000, assets: "CTHULHUETERNAL.Resource.RichJazz"}, + 19: {name: "Very Rich", description: "CTHULHUETERNAL.Resource.VeryRich", income: 50000, assets: "CTHULHUETERNAL.Resource.VeryRichJazz"}, + 20: {name: "Super Rich", description: "CTHULHUETERNAL.Resource.SuperRich", income: 100000, assets: "CTHULHUETERNAL.Resource.SuperRichJazz"} + }, + modern: { + 0: {name: "Penury", description: "CTHULHUETERNAL.Resource.Penury", income: 0, assets: "CTHULHUETERNAL.Resource.NoAssets"}, + 4: {name: "Poor", description: "CTHULHUETERNAL.Resource.Poor", income: 20000, assets: "CTHULHUETERNAL.Resource.PoorModern"}, + 8: {name: "Average", description: "CTHULHUETERNAL.Resource.Average", income: 50000, assets: "CTHULHUETERNAL.Resource.AverageModern"}, + 12: {name: "Above Average", description: "CTHULHUETERNAL.Resource.AboveAverage", income: 100000, assets: "CTHULHUETERNAL.Resource.AboveAverageModern"}, + 16: {name: "Well Off", description: "CTHULHUETERNAL.Resource.WellOff", income: 150000, assets: "CTHULHUETERNAL.Resource.WellOffModern"}, + 18: {name: "Rich", description: "CTHULHUETERNAL.Resource.Rich", income: 20000, assets: "CTHULHUETERNAL.Resource.RichModern"}, + 19: {name: "Very Rich", description: "CTHULHUETERNAL.Resource.VeryRich", income: 500000, assets: "CTHULHUETERNAL.Resource.VeryRichModern"}, + 20: {name: "Super Rich", description: "CTHULHUETERNAL.Resource.SuperRich", income: 1000000, assets: "CTHULHUETERNAL.Resource.SuperRichModern"} + }, + victorian: { + 0: {name: "Penury", description: "CTHULHUETERNAL.Resource.Penury", income: 0, assets: "CTHULHUETERNAL.Resource.NoAssets"}, + 4: {name: "Poor", description: "CTHULHUETERNAL.Resource.Poor", income: 30, assets: "CTHULHUETERNAL.Resource.PoorVictorian"}, + 8: {name: "Average", description: "CTHULHUETERNAL.Resource.Average", income: 90, assets: "CTHULHUETERNAL.Resource.AverageVictorian"}, + 12: {name: "Above Average", description: "CTHULHUETERNAL.Resource.AboveAverage", income: 400, assets: "CTHULHUETERNAL.Resource.AboveAverageVictorian"}, + 16: {name: "Well Off", description: "CTHULHUETERNAL.Resource.WellOff", income: 1500, assets: "CTHULHUETERNAL.Resource.WellOffVictorian"}, + 18: {name: "Rich", description: "CTHULHUETERNAL.Resource.Rich", income: 5000, assets: "CTHULHUETERNAL.Resource.RichVictorian"}, + 19: {name: "Very Rich", description: "CTHULHUETERNAL.Resource.VeryRich", income: 40000, assets: "CTHULHUETERNAL.Resource.VeryRichVictorian"}, + 20: {name: "Super Rich", description: "CTHULHUETERNAL.Resource.SuperRich", income: 200000, assets: "CTHULHUETERNAL.Resource.SuperRichVictorian"} + } +} + +export const MENTAL_ILLNESS_CURE_SKILL = { + jazz: "CTHULHUETERNAL.Skill.Psychoanalyze", + modern: "CTHULHUETERNAL.Skill.Psychoanalyze", + victorian: "CTHULHUETERNAL.Skill.Reassure", +} + +export const WEAPON_SKILL_MAPPING = { + modern: { + "melee": "CTHULHUETERNAL.Skill.Melee", + "rangedprimitive": "CTHULHUETERNAL.Skill.Firearms", + "rangedthrown": "CTHULHUETERNAL.Skill.Athletics", + "rangedfirearm": "CTHULHUETERNAL.Skill.Firearms", + "unarmed": "CTHULHUETERNAL.Skill.UnarmedCombat" + }, + jazz: { + "melee": "CTHULHUETERNAL.Skill.Melee", + "rangedprimitive": "CTHULHUETERNAL.Skill.Firearms", + "rangedthrown": "CTHULHUETERNAL.Skill.Athletics", + "rangedfirearm": "CTHULHUETERNAL.Skill.Firearms", + "unarmed": "CTHULHUETERNAL.Skill.UnarmedCombat" + }, + victorian: { + "melee": "CTHULHUETERNAL.Skill.Melee", + "rangedprimitive": "CTHULHUETERNAL.Skill.Firearms", + "rangedthrown": "CTHULHUETERNAL.Skill.Athletics", + "rangedfirearm": "CTHULHUETERNAL.Skill.Firearms", + "unarmed": "CTHULHUETERNAL.Skill.UnarmedCombat" + }, + coldwar: { + "melee": "CTHULHUETERNAL.Skill.Melee", + "rangedprimitive": "CTHULHUETERNAL.Skill.Firearms", + "rangedthrown": "CTHULHUETERNAL.Skill.Athletics", + "rangedfirearm": "CTHULHUETERNAL.Skill.Firearms", + "unarmed": "CTHULHUETERNAL.Skill.UnarmedCombat" + }, + ww1: { + "melee": "CTHULHUETERNAL.Skill.Melee", + "rangedprimitive": "CTHULHUETERNAL.Skill.Firearms", + "rangedthrown": "CTHULHUETERNAL.Skill.Athletics", + "rangedfirearm": "CTHULHUETERNAL.Skill.Firearms", + "unarmed": "CTHULHUETERNAL.Skill.UnarmedCombat" + }, + ww2: { + "melee": "CTHULHUETERNAL.Skill.Melee", + "rangedprimitive": "CTHULHUETERNAL.Skill.Firearms", + "rangedthrown": "CTHULHUETERNAL.Skill.Athletics", + "rangedfirearm": "CTHULHUETERNAL.Skill.Firearms", + "unarmed": "CTHULHUETERNAL.Skill.UnarmedCombat" + }, + future: { + "melee": "CTHULHUETERNAL.Skill.Melee", + "rangedprimitive": "CTHULHUETERNAL.Skill.FirearmsBeams", + "rangedthrown": "CTHULHUETERNAL.Skill.Athletics", + "rangedfirearm": "CTHULHUETERNAL.Skill.FirearmsBeams", + "unarmed": "CTHULHUETERNAL.Skill.UnarmedCombat" + }, + revolution: { + "melee": "CTHULHUETERNAL.Skill.Melee", + "rangedprimitive": "CTHULHUETERNAL.Skill.RangedWeapons", + "rangedthrown": "CTHULHUETERNAL.Skill.Athletics", + "rangedfirearm": "CTHULHUETERNAL.Skill.Firearms", + "unarmed": "CTHULHUETERNAL.Skill.UnarmedCombat" + }, + ageofsail: { + "melee": "CTHULHUETERNAL.Skill.Melee", + "rangedprimitive": "CTHULHUETERNAL.Skill.RangedWeapons", + "rangedthrown": "CTHULHUETERNAL.Skill.Athletics", + "rangedfirearm": "CTHULHUETERNAL.Skill.Firearms", + "unarmed": "CTHULHUETERNAL.Skill.UnarmedCombat" + }, + medieval: { + "melee": "CTHULHUETERNAL.Skill.Melee", + "rangedprimitive": "CTHULHUETERNAL.Skill.RangedWeapons", + "rangedthrown": "CTHULHUETERNAL.Skill.Athletics", + "unarmed": "CTHULHUETERNAL.Skill.UnarmedCombat" + }, + classical: { + "melee": "CTHULHUETERNAL.Skill.Melee", + "rangedprimitive": "CTHULHUETERNAL.Skill.RangedWeapons", + "rangedthrown": "CTHULHUETERNAL.Skill.Athletics", + "unarmed": "CTHULHUETERNAL.Skill.UnarmedCombat" + } +} /** * Include all constant definitions within the SYSTEM global export * @type {Object} @@ -45,7 +175,11 @@ export const SYSTEM = { HARSHNESS: PROTAGONIST.HARSHNESS, WEAPON_TYPE: WEAPON.WEAPON_TYPE, WEAPON_SUBTYPE: WEAPON.WEAPON_SUBTYPE, + WEAPON_SKILL_MAPPING, BOND_TYPE: BOND.BOND_TYPE, AVAILABLE_SETTINGS, + RESOURCE_RATING, + MENTAL_ILLNESS_CURE_SKILL, + ERA_CSS, ASCII } diff --git a/module/documents/item.mjs b/module/documents/item.mjs index 91144d7..493be60 100644 --- a/module/documents/item.mjs +++ b/module/documents/item.mjs @@ -5,7 +5,7 @@ export const defaultItemImg = { skill: "systems/fvtt-cthulhu-eternal/assets/icons/icon_skill.svg", archetype: "systems/fvtt-cthulhu-eternal/assets/icons/icon_archetype.svg", bond: "systems/fvtt-cthulhu-eternal/assets/icons/icon_bond.svg", - mentaldisorder: "systems/fvtt-cthulhu-eternal/assets/icons/icon_mentaldisorder.svg", + mentaldisorder: "systems/fvtt-cthulhu-eternal/assets/icons/icon_mental_disorder.svg", arcane: "systems/fvtt-cthulhu-eternal/assets/icons/icon_arcane.svg", injury: "systems/fvtt-cthulhu-eternal/assets/icons/icon_injury.svg", motivation: "systems/fvtt-cthulhu-eternal/assets/icons/icon_motivation.svg", diff --git a/module/documents/roll.mjs b/module/documents/roll.mjs index 23f2132..0fb8cde 100644 --- a/module/documents/roll.mjs +++ b/module/documents/roll.mjs @@ -130,6 +130,8 @@ export default class CthulhuEternalRoll extends Roll { rollItem: foundry.utils.duplicate(options.rollItem), // Object only, no class initialScore: options.initialScore, targetScore: options.initialScore, + isLowWP: options.isLowWP, + isZeroWP: options.isZeroWP, rollModes, fieldRollMode, choiceModifier, @@ -167,24 +169,23 @@ export default class CthulhuEternalRoll extends Roll { // If the user cancels the dialog, exit if (rollContext === null) return - const rollData = { - rollType: options.rollType, - rollItem: options.rollItem, - actorId: options.actorId, - actorName: options.actorName, - actorImage: options.actorImage, - rollMode: rollContext.visibility, - hasTarget: options.hasTarget, - initialScore: options.initialScore, - targetName, - targetArmor, - targetMalus, - ...rollContext, - } + let rollData = foundry.utils.mergeObject(foundry.utils.duplicate(options), rollContext) + rollData.rollMode = rollContext.visibility + rollData.targetName = targetName + rollData.targetArmor = targetArmor + rollData.targetMalus = targetMalus // Update target score + console.log(rollData) rollData.targetScore = Math.min( Math.max(options.initialScore + Number(rollData.modifier), 0), 100) - + if ( rollData.isLowWP ) { + rollData.targetScore -= 20 + } + if ( rollData.isZeroWP ) { + rollData.targetScore = 0 + } + rollData.targetScore = Math.min( Math.max(rollData.targetScore, 0), 100) + /** * A hook event that fires before the roll is made. */ @@ -270,32 +271,25 @@ export default class CthulhuEternalRoll extends Roll { * @property {string} tooltip - The tooltip text for the chat card. */ async _getChatCardData(isPrivate) { - const cardData = { - css: [SYSTEM.id, "dice-roll"], - data: this.data, - diceTotal: this.dice.reduce((t, d) => t + d.total, 0), - isGM: game.user.isGM, - rollItem: this.options.rollItem, - initialScore: this.options.initialScore, - targetScore: this.options.targetScore, - rollType: this.options.rollType, - modifier: this.options.modifier, - formula: this.formula, - total: this.total, - isSuccess: this.options.isSuccess, - isFailure: this.options.isFailure, - isCritical: this.options.isCritical, - actorId: this.actorId, - actingCharName: this.actorName, - actingCharImg: this.actorImage, - resultType: this.resultType, - hasTarget: this.hasTarget, - targetName: this.targetName, - targetArmor: this.targetArmor, - realDamage: this.realDamage, - isPrivate: isPrivate, - } + let cardData = foundry.utils.duplicate(this.options) + cardData.css = [SYSTEM.id, "dice-roll"] + cardData.data = this.data + cardData.diceTotal = this.dice.reduce((t, d) => t + d.total, 0) + cardData.isGM = game.user.isGM + cardData.formula = this.formula + cardData.total = this.total + cardData.actorId = this.actorId + cardData.actingCharName = this.actorName + cardData.actingCharImg = this.actorImage + cardData.resultType = this.resultType + cardData.hasTarget = this.hasTarget + cardData.targetName = this.targetName + cardData.targetArmor = this.targetArmor + cardData.realDamage = this.realDamage + cardData.isPrivate = isPrivate + console.log(cardData) + cardData.cssClass = cardData.css.join(" ") cardData.tooltip = isPrivate ? "" : await this.getTooltip() return cardData diff --git a/module/models/archetype.mjs b/module/models/archetype.mjs index 7e1c45a..6b876e6 100644 --- a/module/models/archetype.mjs +++ b/module/models/archetype.mjs @@ -5,7 +5,7 @@ export default class CthulhuEternalArchetype extends foundry.abstract.TypeDataMo const requiredInteger = { required: true, nullable: false, integer: true } const schema = {} - schema.settings = new fields.StringField({ required: true, initial: "common", choices: SYSTEM.AVAILABLE_SETTINGS }) + schema.settings = new fields.StringField({ required: true, initial: "modern", choices: SYSTEM.AVAILABLE_SETTINGS }) schema.description = new fields.HTMLField({ required: false, diff --git a/module/models/armor.mjs b/module/models/armor.mjs index 9051273..40203bb 100644 --- a/module/models/armor.mjs +++ b/module/models/armor.mjs @@ -6,7 +6,7 @@ export default class CthulhuEternalArmor extends foundry.abstract.TypeDataModel const requiredInteger = { required: true, nullable: false, integer: true } schema.description = new fields.HTMLField({ required: true, textSearch: true }) - schema.settings = new fields.StringField({ required: true, initial: "common", choices: SYSTEM.AVAILABLE_SETTINGS }) + schema.settings = new fields.StringField({ required: true, initial: "modern", choices: SYSTEM.AVAILABLE_SETTINGS }) schema.protection = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.resourceLevel = new fields.NumberField({ required: true, initial: 0, min: 0 }) diff --git a/module/models/gear.mjs b/module/models/gear.mjs index fe2541c..2dc050d 100644 --- a/module/models/gear.mjs +++ b/module/models/gear.mjs @@ -7,7 +7,7 @@ export default class CthulhuEternalGHear extends foundry.abstract.TypeDataModel const requiredInteger = { required: true, nullable: false, integer: true } schema.description = new fields.HTMLField({ required: true, textSearch: true }) - schema.settings = new fields.StringField({ required: true, initial: "common", choices: SYSTEM.AVAILABLE_SETTINGS }) + schema.settings = new fields.StringField({ required: true, initial: "modern", choices: SYSTEM.AVAILABLE_SETTINGS }) schema.resourceLevel = new fields.NumberField({ required: true, initial: 0, min: 0 }) return schema diff --git a/module/models/protagonist.mjs b/module/models/protagonist.mjs index 750b956..1671ab3 100644 --- a/module/models/protagonist.mjs +++ b/module/models/protagonist.mjs @@ -142,6 +142,15 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData } } + + isLowWP() { + return this.wp.value <= 2 + } + + isZeroWP() { + return this.wp.value === 0 + } + /** */ /** * Rolls a dice for a character. @@ -168,6 +177,8 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData let roll = await CthulhuEternalRoll.prompt({ rollType, rollItem, + isLowWP: this.isLowWP(), + isZeroWP: this.isZeroWP(), actorId: this.parent.id, actorName: this.parent.name, actorImage: this.parent.img, diff --git a/module/models/skill.mjs b/module/models/skill.mjs index d37fc43..1f893ef 100644 --- a/module/models/skill.mjs +++ b/module/models/skill.mjs @@ -6,9 +6,9 @@ export default class CthulhuEternalSkill extends foundry.abstract.TypeDataModel const requiredInteger = { required: true, nullable: false, integer: true } schema.description = new fields.HTMLField({ required: true, textSearch: true }) - schema.settings = new fields.StringField({ required: true, initial: "common", choices: SYSTEM.AVAILABLE_SETTINGS }) + schema.settings = new fields.StringField({ required: true, initial: "modern", choices: SYSTEM.AVAILABLE_SETTINGS }) - schema.base = new fields.StringField({ required: true, initial: "WIS" }) + schema.base = new fields.StringField({ required: true, initial: "0" }) schema.bonus = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.diceEvolved = new fields.BooleanField({ required: true, initial: true }) schema.rollFailed = new fields.BooleanField({ required: true, initial: false }) diff --git a/module/models/weapon.mjs b/module/models/weapon.mjs index 925bca4..10e4875 100644 --- a/module/models/weapon.mjs +++ b/module/models/weapon.mjs @@ -7,7 +7,7 @@ export default class LethalFantasySkill extends foundry.abstract.TypeDataModel { const requiredInteger = { required: true, nullable: false, integer: true } schema.description = new fields.HTMLField({ required: true, textSearch: true }) - schema.settings = new fields.StringField({ required: true, initial: "common", choices: SYSTEM.AVAILABLE_SETTINGS }) + schema.settings = new fields.StringField({ required: true, initial: "modern", choices: SYSTEM.AVAILABLE_SETTINGS }) schema.weaponType = new fields.StringField({ required: true, initial: "melee", choices: SYSTEM.WEAPON_TYPE }) schema.damage = new fields.StringField({required: true, initial: "1d6"}) diff --git a/module/utils.mjs b/module/utils.mjs index e40d2b0..5480542 100644 --- a/module/utils.mjs +++ b/module/utils.mjs @@ -1,6 +1,19 @@ export class CthulhuEternalUtils { + static registerSettings() { + game.settings.register("fvtt-cthulhu-eternal", "settings-era", { + name: game.i18n.localize("CHTUHLUETERNAL.Settings.era"), + hint: game.i18n.localize("CHTUHLUETERNAL.Settings.eraHint"), + default: true, + scope: "world", + type: String, + choices: SYSTEM.AVAILABLE_SETTINGS, + config: true, + onChange: _ => window.location.reload() + }); + } + static registerHandlebarsHelpers() { Handlebars.registerHelper('isNull', function (val) { @@ -153,4 +166,17 @@ export class CthulhuEternalUtils { }); } + + static setupCSSRootVariables() { + const era = game.settings.get("fvtt-cthulhu-eternal", "settings-era") + + let eraCSS = SYSTEM.ERA_CSS[era]; + if (!eraCSS) eraCSS = SYSTEM.ERA_CSS["jazz"]; + + document.documentElement.style.setProperty('--font-primary', eraCSS.primaryFont); + document.documentElement.style.setProperty('--font-secondary', eraCSS.secondaryFont); + document.documentElement.style.setProperty('--font-title', eraCSS.titleFont); + document.documentElement.style.setProperty('--img-icon-color-filter', eraCSS.imgFilter); + } + } diff --git a/styles/fonts.less b/styles/fonts.less index 314ef66..c11f753 100644 --- a/styles/fonts.less +++ b/styles/fonts.less @@ -1,6 +1,107 @@ @font-face { font-family: "Georama"; - src: url("../assets/fonts/georama.woff2") format("woff2"); + src: url("../assets/fonts/Georama-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Tangerine"; + src: url("../assets/fonts/Tangerine-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "TrajanPro"; + src: url("../assets/fonts/Trajan-Pro-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Teko"; + src: url("../assets/fonts/Teko-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "P22Operina"; + src: url("../assets/fonts/P22-Operina.ttf") format("truetype"); +} + +@font-face { + font-family: "SpectralSC"; + src: url("../assets/fonts/SpectralSC-Regular.ttf") format("truetype"); +} + + +@font-face { + font-family: "RozhaOne"; + src: url("../assets/fonts/RozhaOne-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Megrim"; + src: url("../assets/fonts/Megrim-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Volkhov"; + src: url("../assets/fonts/Volkhov-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "IMFell"; + src: url("../assets/fonts/IMFell.ttf") format("truetype"); +} + +@font-face { + font-family: "Dominican"; + src: url("../assets/fonts/dominican.ttf") format("truetype"); +} + +@font-face { + font-family: "UncialAntiqua"; + src: url("../assets/fonts/UncialAntiqua-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Luminari"; + src: url("../assets/fonts/Luminari-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "SairaStencilOne"; + src: url("../assets/fonts/SairaStencilOne-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Armalite"; + src: url("../assets/fonts/armalite.ttf") format("truetype"); +} + +@font-face { + font-family: "CarterOne"; + src: url("../assets/fonts/CarterOne-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "SigmarOne"; + src: url("../assets/fonts/SigmarOne-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Excelsior"; + src: url("../assets/fonts/Excelsior-Normal.ttf") format("truetype"); +} + +@font-face { + font-family: "TopSecret"; + src: url("../assets/fonts/Top-Secret.ttf") format("truetype"); +} + +@font-face { + font-family: "BebasNeue"; + src: url("../assets/fonts/BebasNeue-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Seabreed"; + src: url("../assets/fonts/Seabreed.ttf") format("truetype"); } @font-face { diff --git a/styles/global.less b/styles/global.less index ce6a3eb..3b43fd1 100644 --- a/styles/global.less +++ b/styles/global.less @@ -3,19 +3,22 @@ --background-image-base: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url("../assets/ui/jazzage_background_main.webp"); /*--background-image-base: url("../assets/ui/jazzage_background_main.webp");*/ - --font-primary: "Georama"; - --font-secondary: "Georama"; + --font-primary: "RozhaOne"; + --font-secondary: "RozhaOne"; --font-title: "Broadway"; --logo-standard: url("../assets/logos/reanimated-ce-logo.webp"); --color-success: darkgreen; --color-failure: darkred; --color-critical-success: lightgreen; --color-critical-failure: lightcoral; + --img-icon-color-filter: brightness(0) saturate(100%) invert(52%) sepia(9%) saturate(2368%) hue-rotate(360deg) brightness(86%) contrast(84%); } -.era-icon-color { +.item .thumbnail, +.item-img { /*filter: invert(90%) sepia(10%) saturate(1215%) hue-rotate(55deg) brightness(93%) contrast(89%);*/ /*filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(86deg) brightness(118%) contrast(119%);*/ + filter: var(--img-icon-color-filter); } #logo { diff --git a/styles/protagonist.less b/styles/protagonist.less index 8ed9c21..3240ecc 100644 --- a/styles/protagonist.less +++ b/styles/protagonist.less @@ -11,7 +11,6 @@ .protagonist-main { background-color: var(--color-light-1); display: flex; - .protagonist-pc { display: flex; @@ -67,7 +66,36 @@ width: 400px; } } + .san { + input { + min-width: 2.2rem; + } + .san-checkbox { + min-width: 1rem; + max-width: 1rem; + } + .label-field { + flex-grow: 0; + margin-left: 4px; + } + .spacing { + margin-left: 4px; + } + } + .willpower { + input { + min-width: 2.2rem; + } + .label-field { + flex-grow: 0; + margin-left: 4px; + } + .checkbox { + min-width: 1rem; + max-width: 1rem; + } + } .protagonist-infos { display: flex; flex-direction: column; @@ -154,7 +182,6 @@ .protagonist-characteristic-edit { min-width: 400px; } - } .protagonist-biography { @@ -165,6 +192,39 @@ prose-mirror.active { min-height: 150px; } + .field-label { + margin-left: 8px; + } + .biodata { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 8px; + } + .motivations { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; + .motivation { + display: flex; + align-items: center; + gap: 4px; + min-width: 14rem; + max-width: 14rem; + .controls { + min-width: 2rem; + max-width: 2rem; + } + .name { + min-width: 8rem; + max-width: 8rem; + } + .item-img { + width: 32px; + height: 32px; + margin: 4px 0 0 0; + } + } + } } .tab.protagonist-skills { @@ -198,7 +258,102 @@ } .name { min-width: 8rem; - max-width: 8rem; + max-width: 8rem; + } + .item-img { + width: 32px; + height: 32px; + margin: 4px 0 0 0; + } + } + } +} + +.tab.protagonist-status { + background-color: var(--color-light-1); + display: grid; + grid-template-columns: 1fr; + legend { + a { + font-size: calc(var(--font-size-standard) * 1.4); + padding-left: 5px; + } + } + .bonds { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; + .bond { + display: flex; + align-items: center; + gap: 4px; + min-width: 16rem; + max-width: 16rem; + .controls { + min-width: 2rem; + max-width: 2rem; + } + .name { + min-width: 12rem; + max-width: 12rem; + } + .type { + min-width: 4rem; + max-width: 4rem; + } + .level { + min-width: 2rem; + max-width: 2rem; + } + .item-img { + width: 32px; + height: 32px; + margin: 4px 0 0 0; + } + } + } + .mentaldisorders { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; + .mentaldisorder { + display: flex; + align-items: center; + gap: 4px; + min-width: 16rem; + max-width: 16rem; + .controls { + min-width: 2rem; + max-width: 2rem; + } + .name { + min-width: 14rem; + max-width: 14rem; + } + .item-img { + width: 32px; + height: 32px; + margin: 4px 0 0 0; + } + } + } + .injuries { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; + .injury { + display: flex; + align-items: center; + gap: 4px; + min-width: 16rem; + max-width: 16rem; + .controls { + min-width: 2rem; + max-width: 2rem; + } + .name { + min-width: 14rem; + max-width: 14rem; } .item-img { width: 32px; @@ -221,16 +376,35 @@ } .weapons { display: grid; - grid-template-columns: repeat(4, 1fr); + grid-template-columns: repeat(2, 1fr); gap: 4px; .weapon { display: flex; align-items: center; gap: 4px; + min-width: 13rem; + max-width: 13srem; + .rollable:hover, + .rollable:focus { + text-shadow: 0 0 8px var(--color-shadow-primary); + cursor: pointer; + } + .controls { + min-width: 2rem; + max-width: 2rem; + } + .damage { + min-width: 5rem; + max-width: 5rem; + } + .name { + min-width: 8rem; + max-width: 8rem; + } .item-img { - width: 50px; - height: 50px; - margin: 5px 0 0 0; + width: 32px; + height: 32px; + margin: 4px 0 0 0; } } } @@ -242,10 +416,29 @@ display: flex; align-items: center; gap: 4px; + min-width: 13rem; + max-width: 13srem; + .rollable:hover, + .rollable:focus { + text-shadow: 0 0 8px var(--color-shadow-primary); + cursor: pointer; + } + .controls { + min-width: 2rem; + max-width: 2rem; + } + .protection { + min-width: 5rem; + max-width: 5rem; + } + .name { + min-width: 8rem; + max-width: 8rem; + } .item-img { - width: 50px; - height: 50px; - margin: 5px 0 0 0; + width: 32px; + height: 32px; + margin: 4px 0 0 0; } } } @@ -257,10 +450,29 @@ display: flex; align-items: center; gap: 4px; + min-width: 13rem; + max-width: 13srem; + .rollable:hover, + .rollable:focus { + text-shadow: 0 0 8px var(--color-shadow-primary); + cursor: pointer; + } + .controls { + min-width: 2rem; + max-width: 2rem; + } + .damage { + min-width: 5rem; + max-width: 5rem; + } + .name { + min-width: 8rem; + max-width: 8rem; + } .item-img { - width: 50px; - height: 50px; - margin: 5px 0 0 0; + width: 32px; + height: 32px; + margin: 4px 0 0 0; } } } diff --git a/templates/arcane.hbs b/templates/arcane.hbs index 9fc4d16..9ed1504 100644 --- a/templates/arcane.hbs +++ b/templates/arcane.hbs @@ -1,6 +1,6 @@
- + {{formInput fields.name value=source.name}}
diff --git a/templates/protagonist-biography.hbs b/templates/protagonist-biography.hbs index 531d7ff..d9ac0ec 100644 --- a/templates/protagonist-biography.hbs +++ b/templates/protagonist-biography.hbs @@ -2,13 +2,43 @@
{{localize "CTHULHUETERNAL.Label.biodata"}} - {{formInput 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}} + {{formField systemFields.biodata.fields.age value=system.biodata.age name="system.biodata.age" localize=true classes="field-label"}} + {{formField systemFields.biodata.fields.gender value=system.biodata.gender name="system.biodata.gender" localize=true classes="field-label"}} + {{formField systemFields.biodata.fields.height value=system.biodata.height name="system.biodata.height" localize=true classes="field-label"}} + {{formField systemFields.biodata.fields.eyes value=system.biodata.eyes name="system.biodata.eyes" localize=true classes="field-label"}} + {{formField systemFields.biodata.fields.hair value=system.biodata.hair name="system.biodata.hair" localize=true classes="field-label"}} + {{formField systemFields.biodata.fields.gender value=system.biodata.gender name="system.biodata.gender" localize=true classes="field-label"}} + {{formField systemFields.biodata.fields.birthplace value=system.biodata.birthplace name="system.biodata.birthplace" localize=true classes="field-label"}} +
+
+ +
+ {{localize "CTHULHUETERNAL.Label.motivations"}}{{#if isEditMode}} + {{/if}} +
+ {{#each motivations as |item|}} + {{!log 'armor' this}} +
+ +
+ {{item.name}} +
+
+ + +
+
+ {{/each}} +
{{localize "CTHULHUETERNAL.Label.description"}} {{formInput systemFields.description enriched=description value=system.description name="system.description" toggled=true}}
+
{{localize "CTHULHUETERNAL.Label.notes"}} {{formInput systemFields.notes enriched=notes value=system.notes name="system.notes" toggled=true}} diff --git a/templates/protagonist-equipment.hbs b/templates/protagonist-equipment.hbs index b494281..ac70548 100644 --- a/templates/protagonist-equipment.hbs +++ b/templates/protagonist-equipment.hbs @@ -2,25 +2,28 @@
{{localize "CTHULHUETERNAL.Label.weapons"}}{{#if isEditMode}} - {{/if}} + {{/if}}
{{#each weapons as |item|}} {{!log 'weapon' this}} +
+ +
+ {{localize "CTHULHUETERNAL.Label.armors"}}{{#if isEditMode}} + {{/if}}
{{#each armors as |item|}} {{!log 'armor' this}} @@ -29,7 +32,7 @@
{{item.name}}
- {{localize "CTHULHUETERNAL.Label.armor"}} : {{item.system.protection}} + {{localize "CTHULHUETERNAL.Label.armor"}} : {{item.system.protection}}
@@ -37,7 +40,11 @@
{{/each}}
+
+
+ {{localize "CTHULHUETERNAL.Label.gears"}}{{#if isEditMode}} + {{/if}}
{{#each gears as |item|}} {{!log 'armor' this}} @@ -46,7 +53,6 @@
{{item.name}}
- {{localize "CTHULHUETERNAL.Label.gear"}} : {{item.system.protection}}
diff --git a/templates/protagonist-main.hbs b/templates/protagonist-main.hbs index 5eb7950..b2bf13b 100644 --- a/templates/protagonist-main.hbs +++ b/templates/protagonist-main.hbs @@ -29,44 +29,47 @@
-
+
{{localize "CTHULHUETERNAL.Label.SAN"}}
- {{localize "CTHULHUETERNAL.Label.current"}} {{formField systemFields.san.fields.value - value=system.san.value}} - {{localize "CTHULHUETERNAL.Label.max"}} {{formField systemFields.san.fields.max value=system.san.max - rootId=partId disabled=true}} - {{localize "CTHULHUETERNAL.Label.recovery"}} {{formField systemFields.san.fields.recovery - value=system.san.recovery disabled=true}} - {{localize "CTHULHUETERNAL.Label.breakingPoint"}} {{formField systemFields.san.fields.breakingPoint - value=system.san.breakingPoint disabled=true}} + {{localize "CTHULHUETERNAL.Label.current"}} + {{formField systemFields.san.fields.value value=system.san.value}} + {{localize "CTHULHUETERNAL.Label.max"}} + {{formField systemFields.san.fields.max value=system.san.max rootId=partId disabled=true}} + {{localize "CTHULHUETERNAL.Label.recovery"}} + {{formField systemFields.san.fields.recovery value=system.san.recovery disabled=true}} + {{localize + "CTHULHUETERNAL.Label.breakingPoint"}} + {{formField systemFields.san.fields.breakingPoint value=system.san.breakingPoint disabled=true}}
{{localize "CTHULHUETERNAL.Label.violence"}} {{#each system.san.violence as |violence idx|}} - + {{/each}} -
-
+ {{localize "CTHULHUETERNAL.Label.helplessness"}} {{#each system.san.helplessness as |helplessness idx|}} - + {{/each}}
-
+ +
{{localize "CTHULHUETERNAL.Label.willpower"}}
- {{localize "CTHULHUETERNAL.Label.current"}}{{formField systemFields.wp.fields.value value=system.wp.value}} - {{localize "CTHULHUETERNAL.Label.max"}}{{formField systemFields.wp.fields.max value=system.wp.max rootId=partId disabled=true}} - {{localize "CTHULHUETERNAL.Label.exhausted"}}{{formField systemFields.wp.fields.exhausted value=system.wp.exhausted }} + {{localize "CTHULHUETERNAL.Label.current"}} + {{formField systemFields.wp.fields.value value=system.wp.value}} + {{localize "CTHULHUETERNAL.Label.max"}} + {{formField systemFields.wp.fields.max value=system.wp.max rootId=partId disabled=true}} + {{localize "CTHULHUETERNAL.Label.exhausted"}} + {{formField systemFields.wp.fields.exhausted value=system.wp.exhausted classes=checkbox}}
-
@@ -74,37 +77,43 @@
{{localize "CTHULHUETERNAL.Label.characteristics"}}
- + {{formField systemFields.characteristics.fields.str.fields.value value=system.characteristics.str.value rootId=partId disabled=isPlayMode }} {{mul system.characteristics.str.value 5}}
- + {{formField systemFields.characteristics.fields.dex.fields.value value=system.characteristics.dex.value rootId=partId disabled=isPlayMode }} {{mul system.characteristics.dex.value 5}}
- + {{formField systemFields.characteristics.fields.con.fields.value value=system.characteristics.con.value rootId=partId disabled=isPlayMode }} {{mul system.characteristics.con.value 5}}
- + {{formField systemFields.characteristics.fields.int.fields.value value=system.characteristics.int.value rootId=partId disabled=isPlayMode }} {{mul system.characteristics.int.value 5}}
- + {{formField systemFields.characteristics.fields.pow.fields.value value=system.characteristics.pow.value rootId=partId disabled=isPlayMode }} {{mul system.characteristics.pow.value 5}}
- + {{formField systemFields.characteristics.fields.cha.fields.value value=system.characteristics.cha.value rootId=partId disabled=isPlayMode }} {{mul system.characteristics.cha.value 5}} diff --git a/templates/protagonist-status.hbs b/templates/protagonist-status.hbs new file mode 100644 index 0000000..d81e95c --- /dev/null +++ b/templates/protagonist-status.hbs @@ -0,0 +1,68 @@ +
+ +
+ {{localize "CTHULHUETERNAL.Label.bonds"}}{{#if isEditMode}} + {{/if}} +
+ {{#each bonds as |item|}} + {{!log 'weapon' this}} +
+ +
+ {{item.name}} +
+
+ {{item.system.bondType}} +
+
+ {{item.system.value}} +
+
+ + +
+
+ {{/each}} +
+
+ +
+ {{localize "CTHULHUETERNAL.Label.injuries"}}{{#if isEditMode}} + {{/if}} +
+ {{#each injuries as |item|}} +
+ +
+ {{item.name}} +
+
+ + +
+
+ {{/each}} +
+
+ +
+ {{localize "CTHULHUETERNAL.Label.mentaldisorders"}}{{#if isEditMode}} + {{/if}} +
+ {{#each mentaldisorders as |item|}} + {{!log 'armor' this}} +
+ +
+ {{item.name}} +
+
+ + +
+
+ {{/each}} +
+
+ +
\ No newline at end of file diff --git a/templates/roll-dialog.hbs b/templates/roll-dialog.hbs index b35af56..3676fb5 100644 --- a/templates/roll-dialog.hbs +++ b/templates/roll-dialog.hbs @@ -8,6 +8,13 @@ {{localize "CTHULHUETERNAL.Label.characteristic"}} {{/if}}
{{rollItem.name}} : {{initialScore}}%
+ {{#if isZeroWP}} +
Zero WP : Automatic failure (ie 0%)
+ {{else}} + {{#if isLowWP}} +
Low WP : -20%
+ {{/if}} + {{/if}}