diff --git a/assets/ui/jazzage_background_main.webp b/assets/ui/jazzage_background_main.webp new file mode 100644 index 0000000..77e03a2 Binary files /dev/null and b/assets/ui/jazzage_background_main.webp differ diff --git a/css/fvtt-cthulhu-eternal.css b/css/fvtt-cthulhu-eternal.css index f9f2308..fbfc0f7 100644 --- a/css/fvtt-cthulhu-eternal.css +++ b/css/fvtt-cthulhu-eternal.css @@ -1,6 +1,7 @@ :root { --font-size-standard: 0.9rem; - --background-image-base: url("../assets/parchment.jpg"); + --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"; --logo-standard: url("../assets/logos/reanimated-ce-logo.webp"); @@ -22,7 +23,7 @@ top: -45px; left: calc(50% - 96px); } -i.lethalfantasy { +i.fvtt-cthulhu-eternal { width: 36px; height: 36px; background-image: var(--logo-standard); @@ -34,21 +35,17 @@ i.lethalfantasy { filter: grayscale(1); transition: 0.3s; } -.application.dialog.lethalfantasy { +.application.dialog.fvtt-cthulhu-eternal { font-family: var(--font-primary); font-size: calc(var(--font-size-standard) * 1); background-image: var(--background-image-base); } -.application.dialog.lethalfantasy button:hover { +.application.dialog.fvtt-cthulhu-eternal button:hover { background: var(--color-dark-6); } -.application.dialog.lethalfantasy .legend { +.application.dialog.fvtt-cthulhu-eternal .legend { font-family: var(--font-primary); } -#tooltip.tooltip-avantages { - max-width: 550px; - text-align: left; -} .chat-message, .chat-message.whisper { font-family: var(--font-primary); @@ -132,12 +129,16 @@ i.lethalfantasy { font-family: var(--font-secondary); font-size: calc(var(--font-size-standard) * 1.2); } +.fvtt-cthulhu-eternal .sheet-tabs { + background-color: var(--color-light-1); +} .fvtt-cthulhu-eternal .protagonist-main { + background-color: var(--color-light-1); display: flex; } .fvtt-cthulhu-eternal .protagonist-main .protagonist-pc { display: flex; - gap: 10px; + gap: 4px; flex: 1; } .fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left { @@ -149,7 +150,7 @@ i.lethalfantasy { display: flex; justify-content: center; align-items: center; - padding-bottom: 20px; + padding-bottom: 8px; } .fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-left .protagonist-left-image .protagonist-img { height: 140px; @@ -183,7 +184,7 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos { display: flex; flex-direction: column; - gap: 10px; + gap: 4px; } .fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos label { min-width: 120px; @@ -196,7 +197,7 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos .protagonist-hp .protagonist-hp-value .form-fields input { flex: none; width: 50px; - margin-left: 10px; + margin-left: 4px; font-size: calc(var(--font-size-standard) * 1.4); } .fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .protagonist-infos .protagonist-hp .protagonist-hp-max { @@ -225,6 +226,7 @@ i.lethalfantasy { min-width: 650px; } .fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics { + background-color: var(--color-light-1); display: flex; flex-direction: column; gap: 5px; @@ -247,89 +249,14 @@ i.lethalfantasy { flex: none; width: 70px; } -.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .experience { - display: flex; - align-items: center; - gap: 10px; - margin-left: 10px; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .experience input { - display: flex; - width: 70px; - font-size: calc(var(--font-size-standard) * 1.4); - align-items: center; - justify-content: center; - padding: 0 5px 0 5px; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .experience input[type="number"] { - text-align: center; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .experience input[type="checkbox"] { - width: 20px; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .experience input[type="checkbox"]:checked { - background-color: rgba(0, 0, 0, 0.1); -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .experience input[type="checkbox"]:checked::after { - color: rgba(0, 0, 0, 0.1); -} .fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristic-play { min-width: 225px; } .fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristic-edit { min-width: 400px; } -.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources { - display: flex; - flex-direction: column; - gap: 5px; - flex: 1; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource { - display: flex; - align-items: center; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .rollable:hover, -.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .rollable:focus { - text-shadow: 0 0 8px var(--color-shadow-primary); - cursor: pointer; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .form-group { - flex: 1; - padding-left: 5px; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .form-group .form-fields { - flex: none; - width: 70px; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .protagonist-resource-edit { - display: flex; - align-items: center; - gap: 10px; - margin-left: 10px; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .protagonist-resource-edit input { - display: flex; - width: 70px; - font-size: calc(var(--font-size-standard) * 1.4); - align-items: center; - justify-content: center; - padding: 0 5px 0 5px; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .protagonist-resource-edit input[type="number"] { - text-align: center; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources .protagonist-resource .protagonist-resource-edit select { - font-family: var(--font-secondary); - font-size: calc(var(--font-size-standard) * 1.5); - text-align: center; - width: 75px; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources-play { - min-width: 235px; -} -.fvtt-cthulhu-eternal .protagonist-main .protagonist-resources-edit { - min-width: 400px; +.fvtt-cthulhu-eternal .protagonist-biography { + background-color: var(--color-light-1); } .fvtt-cthulhu-eternal .protagonist-biography prose-mirror.inactive { min-height: 40px; @@ -338,6 +265,7 @@ i.lethalfantasy { min-height: 150px; } .fvtt-cthulhu-eternal .tab.protagonist-skills { + background-color: var(--color-light-1); display: grid; grid-template-columns: 1fr; } @@ -348,19 +276,35 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .tab.protagonist-skills .skills { display: grid; grid-template-columns: repeat(3, 1fr); - gap: 10px; + gap: 4px; } .fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill { display: flex; align-items: center; - gap: 10px; + gap: 4px; + min-width: 10rem; + max-width: 10rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .rollable:hover, +.fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .rollable:focus { + text-shadow: 0 0 8px var(--color-shadow-primary); + cursor: pointer; +} +.fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .controls { + min-width: 2rem; + max-width: 2rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .name { + min-width: 8rem; + max-width: 8rem; } .fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .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 { + background-color: var(--color-light-1); display: grid; grid-template-columns: 1fr; } @@ -371,12 +315,12 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons { display: grid; grid-template-columns: repeat(4, 1fr); - gap: 10px; + gap: 4px; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon { display: flex; align-items: center; - gap: 10px; + gap: 4px; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .item-img { width: 50px; @@ -386,12 +330,12 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .tab.protagonist-equipment .armors { display: grid; grid-template-columns: repeat(3, 1fr); - gap: 10px; + gap: 4px; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .armors .armor { display: flex; align-items: center; - gap: 10px; + gap: 4px; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .armors .armor .item-img { width: 50px; @@ -401,12 +345,12 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .tab.protagonist-equipment .gears { display: grid; grid-template-columns: repeat(3, 1fr); - gap: 10px; + gap: 4px; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .gears .gear { display: flex; align-items: center; - gap: 10px; + gap: 4px; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .gears .gear .item-img { width: 50px; @@ -486,7 +430,12 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .skill-content .shift-right { margin-left: 2rem; } +.fvtt-cthulhu-eternal .skill-content fieldset { + margin-top: 8px; + background-color: var(--color-light-1); +} .fvtt-cthulhu-eternal .skill-content .header { + background-color: var(--color-light-1); display: flex; } .fvtt-cthulhu-eternal .skill-content .header img { @@ -571,7 +520,12 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .injury-content .shift-right { margin-left: 2rem; } +.fvtt-cthulhu-eternal .injury-content fieldset { + margin-top: 8px; + background-color: var(--color-light-1); +} .fvtt-cthulhu-eternal .injury-content .header { + background-color: var(--color-light-1); display: flex; } .fvtt-cthulhu-eternal .injury-content .header img { @@ -657,12 +611,17 @@ i.lethalfantasy { margin-left: 2rem; } .fvtt-cthulhu-eternal .weapon-content .header { + background-color: var(--color-light-1); display: flex; } .fvtt-cthulhu-eternal .weapon-content .header img { width: 50px; height: 50px; } +.fvtt-cthulhu-eternal .weapon-content fieldset { + margin-top: 8px; + background-color: var(--color-light-1); +} .fvtt-cthulhu-eternal .weapon-content label { flex: 10%; } @@ -733,7 +692,12 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .armor-content .shift-right { margin-left: 2rem; } +.fvtt-cthulhu-eternal .armor-content fieldset { + margin-top: 8px; + background-color: var(--color-light-1); +} .fvtt-cthulhu-eternal .armor-content .header { + background-color: var(--color-light-1); display: flex; } .fvtt-cthulhu-eternal .armor-content .header img { @@ -810,7 +774,12 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .motivation-content .shift-right { margin-left: 2rem; } +.fvtt-cthulhu-eternal .motivation-content fieldset { + margin-top: 8px; + background-color: var(--color-light-1); +} .fvtt-cthulhu-eternal .motivation-content .header { + background-color: var(--color-light-1); display: flex; } .fvtt-cthulhu-eternal .motivation-content .header img { @@ -887,7 +856,12 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .mentaldisorder-content .shift-right { margin-left: 2rem; } +.fvtt-cthulhu-eternal .mentaldisorder-content fieldset { + margin-top: 8px; + background-color: var(--color-light-1); +} .fvtt-cthulhu-eternal .mentaldisorder-content .header { + background-color: var(--color-light-1); display: flex; } .fvtt-cthulhu-eternal .mentaldisorder-content .header img { @@ -964,7 +938,12 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .bond-content .shift-right { margin-left: 2rem; } +.fvtt-cthulhu-eternal .bond-content fieldset { + margin-top: 8px; + background-color: var(--color-light-1); +} .fvtt-cthulhu-eternal .bond-content .header { + background-color: var(--color-light-1); display: flex; } .fvtt-cthulhu-eternal .bond-content .header img { @@ -982,43 +961,13 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .bond-content input[type="checkbox"]:checked::after { color: rgba(0, 0, 0, 0.1); } -.fvtt-cthulhu-eternal.fortune img { - border: 0px; -} -.fvtt-cthulhu-eternal.fortune .intro-chat { - border-radius: 20px; - display: flex; - flex-direction: row; -} -.fvtt-cthulhu-eternal.fortune .intro-chat .intro-img { - padding: 5px; - width: 80px; - align-self: center; -} -.fvtt-cthulhu-eternal.fortune .intro-chat .intro-right { - display: flex; - flex-direction: column; -} -.fvtt-cthulhu-eternal.fortune .intro-chat .intro-right .introText { - font-family: var(--font-secondary); - font-size: calc(var(--font-size-standard) * 1.2); - width: 210px; - text-align: center; -} -.fvtt-cthulhu-eternal.fortune .button.control, -.fvtt-cthulhu-eternal.fortune .fortune-accepted { - display: flex; - justify-content: center; - align-items: center; - font-size: calc(var(--font-size-standard) * 1.3); -} .fvtt-cthulhu-eternal.ask-roll { display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-secondary); - font-size: calc(var(--font-size-standard) * 1.2); + font-size: calc(var(--font-size-standard) * 1.1); } .fvtt-cthulhu-eternal .gear-content { font-family: var(--font-primary); @@ -1087,7 +1036,12 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .gear-content .shift-right { margin-left: 2rem; } +.fvtt-cthulhu-eternal .gear-content fieldset { + margin-top: 8px; + background-color: var(--color-light-1); +} .fvtt-cthulhu-eternal .gear-content .header { + background-color: var(--color-light-1); display: flex; } .fvtt-cthulhu-eternal .gear-content .header img { @@ -1166,11 +1120,16 @@ i.lethalfantasy { } .fvtt-cthulhu-eternal .arcane-content .header { display: flex; + background-color: var(--color-light-1); } .fvtt-cthulhu-eternal .arcane-content .header img { width: 50px; height: 50px; } +.fvtt-cthulhu-eternal .arcane-content fieldset { + margin-top: 8px; + background-color: var(--color-light-1); +} .fvtt-cthulhu-eternal .arcane-content label { flex: 10%; } @@ -1241,7 +1200,12 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .archetype-content .shift-right { margin-left: 2rem; } +.fvtt-cthulhu-eternal .archetype-content fieldset { + margin-top: 8px; + background-color: var(--color-light-1); +} .fvtt-cthulhu-eternal .archetype-content .header { + background-color: var(--color-light-1); display: flex; } .fvtt-cthulhu-eternal .archetype-content .header img { @@ -1251,54 +1215,38 @@ i.lethalfantasy { .fvtt-cthulhu-eternal .archetype-content label { flex: 10%; } -.application.dialog.lethalfantasy { +.application.dialog.fvtt-cthulhu-eternal { color: var(--color-dark-1); + background-color: var(--color-light-1); } -.application.dialog.lethalfantasy input, -.application.dialog.lethalfantasy select { +.application.dialog.fvtt-cthulhu-eternal button { + background-image: none; + background-color: var(--color-dark-6); + color: var(--color-light-1); +} +.application.dialog.fvtt-cthulhu-eternal input, +.application.dialog.fvtt-cthulhu-eternal select { background-color: rgba(0, 0, 0, 0.1); border-color: var(--color-dark-6); color: var(--color-dark-2); } -.lethalfantasy-roll-dialog fieldset { +.fvtt-cthulhu-eternal-roll-dialog fieldset { padding: 10px; + background-color: var(--color-light-1); } -input[name="selectAvantages"] { - border: none; -} -.dialog-aide-gene { +.dialog-modifier { display: flex; justify-content: center; align-items: center; } -.dialog-aide-gene select { +.dialog-modifier select { border: none; background-color: rgba(0, 0, 0, 0.1); color: var(--color-dark-2); width: 60px; text-align: center; } -.dialog-modificateur { - display: flex; - justify-content: center; - align-items: center; -} -.dialog-modificateur select { - border: none; - background-color: rgba(0, 0, 0, 0.1); - color: var(--color-dark-2); - width: 60px; - text-align: center; -} -.dialog-avantages #selectAvantages { - background-color: inherit; - text-align: center; - font-family: var(--font-secondary); - font-size: calc(var(--font-size-standard) * 1.2); -} -.dialog-damage, -.dialog-resource, -.dialog-save { +.dialog-damage { display: flex; justify-content: center; align-items: center; @@ -1323,6 +1271,7 @@ input[name="selectAvantages"] { border: 0px; } .dice-roll .intro-chat { + color: var(--color-dark-1); border-radius: 20px; display: flex; flex-direction: row; diff --git a/lang/en.json b/lang/en.json index 94d7679..2bf0eb4 100644 --- a/lang/en.json +++ b/lang/en.json @@ -28,7 +28,8 @@ "WW1": "World War 1", "WW2": "World War 2", "ColdWar": "Cold War", - "Victorian": "Victorian" + "Victorian": "Victorian", + "AgeOfSail": "Age of Sail" }, "Protagonist": { "FIELDS": { @@ -212,6 +213,9 @@ "community": "Community" }, "Label": { + "skill": "Skill", + "modifier": "Modifier", + "rollView": "Roll View", "protagonist": "Protagonist", "characteristics": "Characteristics", "description": "Description", @@ -245,6 +249,7 @@ "helplessness": "Helplessness", "breakingPoint": "Breaking Point", "willpower": "Willpower", + "totalScore": "Total Score", "exhausted": "Exhausted" }, "Edit": "Edit", @@ -254,10 +259,8 @@ "Dialog": { }, "Roll": { - "resource": "Jet de ressource
{resource}", - "damage": "Jet de dégâts
{item}", - "attack": "Jet d'attaque
{item}", - "roll": "Lancer" + "skill": "Skill", + "roll": "Roll" }, "Tooltip": { "sanBP": ">5 SAN lost in one roll, temporary insanity. If SAN less reaches BP = a Disorder unconscious Breaking and AND reset BP." diff --git a/module/applications/sheets/protagonist-sheet.mjs b/module/applications/sheets/protagonist-sheet.mjs index 7d79dcd..062fb49 100644 --- a/module/applications/sheets/protagonist-sheet.mjs +++ b/module/applications/sheets/protagonist-sheet.mjs @@ -5,8 +5,8 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS static DEFAULT_OPTIONS = { classes: ["protagonist"], position: { - width: 1150, - height: 780, + width: 820, + height: 620, }, window: { contentClasses: ["protagonist-content"], @@ -144,20 +144,15 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS * corresponding value from the document's system and performs the roll. */ async _onRoll(event, target) { - if (this.isEditMode) return - // Jet de sauvegarde - let elt = event.currentTarget.querySelector("input") - // Jet de ressource - if (!elt) elt = event.currentTarget.querySelector("select") - // Jet de dégâts - if (!elt) elt = event.currentTarget - const rollType = elt.dataset.rollType - let rollTarget - switch (rollType) { - default: - break + const rollType = $(event.currentTarget).data("roll-type") + let item + // Debug : console.log(">>>>", event, target, rollType) + // Deprecated : if (this.isEditMode) return + if (rollType === "skill") { + const li = $(event.currentTarget).parents(".item"); + item = this.actor.items.get(li.data("item-id")); } - await this.document.system.roll(rollType, rollTarget) + await this.document.system.roll(rollType, item) } async _onDrop(event) { diff --git a/module/config/system.mjs b/module/config/system.mjs index 56b679d..0aa6bc8 100644 --- a/module/config/system.mjs +++ b/module/config/system.mjs @@ -16,6 +16,7 @@ export const AVAILABLE_SETTINGS = { victorian: "CTHULHUETERNAL.Settings.Victorian", revolution: "CTHULHUETERNAL.Settings.Revolution", medieval: "CTHULHUETERNAL.Settings.Medieval", + ageofsail: "CTHULHUETERNAL.Settings.AgeOfSail", classical: "CTHULHUETERNAL.Settings.Classical" } diff --git a/module/documents/roll.mjs b/module/documents/roll.mjs index 07b2975..e889b56 100644 --- a/module/documents/roll.mjs +++ b/module/documents/roll.mjs @@ -22,10 +22,6 @@ export default class CthulhuEternalRoll extends Roll { return this.options.value } - get treshold() { - return this.options.treshold - } - get actorId() { return this.options.actorId } @@ -46,20 +42,16 @@ export default class CthulhuEternalRoll extends Roll { return this.options.introTextTooltip } - get aide() { - return this.options.aide + get help() { + return this.options.help } get gene() { return this.options.gene } - get modificateur() { - return this.options.modificateur - } - - get avantages() { - return this.options.avantages + get modifier() { + return this.options.modifier } get resultType() { @@ -90,10 +82,6 @@ export default class CthulhuEternalRoll extends Roll { return this.options.realDamage } - get rollAdvantage() { - return this.options.rollAdvantage - } - /** * Generates introductory text based on the roll type. * @@ -103,23 +91,11 @@ export default class CthulhuEternalRoll extends Roll { let text switch (this.type) { - case ROLL_TYPE.SAVE: - const saveLabel = game.i18n.localize(`CTHULHUETERNAL.Character.FIELDS.caracteristiques.${this.target}.valeur.label`) - text = game.i18n.format("CTHULHUETERNAL.Roll.save", { save: saveLabel }) + case "skill": + const skillLabel = game.i18n.localize(`CTHULHUETERNAL.Character.FIELDS.caracteristiques.${this.target}.valeur.label`) + text = game.i18n.format("CTHULHUETERNAL.Roll.skill", { skill: "skill" }) text = text.concat("
").concat(`Seuil : ${this.treshold}`) break - case ROLL_TYPE.RESOURCE: - const resourceLabel = game.i18n.localize(`CTHULHUETERNAL.Character.FIELDS.ressources.${this.target}.valeur.label`) - text = game.i18n.format("CTHULHUETERNAL.Roll.resource", { resource: resourceLabel }) - break - case ROLL_TYPE.DAMAGE: - const damageLabel = this.target - text = game.i18n.format("CTHULHUETERNAL.Roll.damage", { item: damageLabel }) - break - case ROLL_TYPE.ATTACK: - const attackLabel = this.target - text = game.i18n.format("CTHULHUETERNAL.Roll.attack", { item: attackLabel }) - break } return text } @@ -130,9 +106,9 @@ export default class CthulhuEternalRoll extends Roll { * @returns {string} A formatted string containing the value, help, hindrance, and modifier. */ _createIntroTextTooltip() { - let tooltip = game.i18n.format("CTHULHUETERNAL.Tooltip.saveIntroTextTooltip", { value: this.value, aide: this.aide, gene: this.gene, modificateur: this.modificateur }) + let tooltip = game.i18n.format("CTHULHUETERNAL.Tooltip.saveIntroTextTooltip", { value: this.value, help: this.help, gene: this.gene, modifier: this.modifier }) if (this.hasTarget) { - tooltip = tooltip.concat(`
Cible : ${this.targetName}`) + tooltip = tooltip.concat(`
Target : ${this.targetName}`) } return tooltip } @@ -141,29 +117,29 @@ export default class CthulhuEternalRoll extends Roll { * Prompt the user with a dialog to configure and execute a roll. * * @param {Object} options Configuration options for the roll. - * @param {string} options.rollType The type of roll being performed (e.g., RESOURCE, DAMAGE, ATTACK, SAVE). - * @param {string} options.rollValue The initial value or formula for the roll. + * @param {string} options.rollType The type of roll being performed. * @param {string} options.rollTarget The target of the roll. - * @param {"="|"+"|"++"|"-"|"--"} options.rollAdvantage If there is an avantage (+), a disadvantage (-), a double advantage (++), a double disadvantage (--) or a normal roll (=). * @param {string} options.actorId The ID of the actor performing the roll. * @param {string} options.actorName The name of the actor performing the roll. * @param {string} options.actorImage The image of the actor performing the roll. * @param {boolean} options.hasTarget Whether the roll has a target. - * @param {Object} options.target The target of the roll, if any. * @param {Object} options.data Additional data for the roll. * * @returns {Promise} The roll result or null if the dialog was cancelled. */ static async prompt(options = {}) { - let formula = options.rollValue - - // Formula for a resource roll - if (options.rollType === ROLL_TYPE.RESOURCE) { - let ressource = game.i18n.localize(`CTHULHUETERNAL.Character.FIELDS.ressources.${options.rollTarget}.valeur.label`) - if (formula === "0" || formula === "") { - ui.notifications.warn(game.i18n.format("CTHULHUETERNAL.Warning.plusDeRessource", { ressource: ressource })) - return null - } + let formula = "1d100" + switch (options.rollType) { + case "skill": + console.log(options.rollItem) + options.targetScore = options.rollItem.system.computeScore() + break + case "characteristic": + options.targetScore = options.rollItem.value * 5 + break + default: + options.targetScore = 50 + break } const rollModes = Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)])) @@ -173,94 +149,33 @@ export default class CthulhuEternalRoll extends Roll { default: "public", }) - const choiceAide = foundry.utils.mergeObject({ 0: "0" }, options.rollValue <= 10 ? { 1: "1" } : { 1: "1", 2: "2" }) - const choiceGene = { - 0: "0", - "-1": "-1", - "-2": "-2", - "-3": "-3", - "-4": "-4", - "-5": "-5", - "-6": "-6", - "-7": "-7", - "-8": "-8", - "-9": "-9", + const choiceModifier = { "-10": "-10", - } - const choiceAvantage = { normal: "Normal", avantage: "Avantage", desavantage: "Désavantage", doubleAvantage: "Double avantage", doubleDesavantage: "Double désavantage" } - const choiceModificateur = { + "-20": "-20", + "-40": "-40", 0: "0", - "-1": "-1", - "-2": "-2", - "-3": "-3", - "-4": "-4", - "-5": "-5", - "-6": "-6", - "-7": "-7", - "-8": "-8", - "-9": "-9", - "-10": "-10", + "+10": "+10", + "+20": "+20", + "+40": "+40", } - let damageDice - let damageDiceMax - let damageDiceFinal - let damageDiceLowered - - // Damage roll : check the roll is not above the maximum damage - if (options.rollType === ROLL_TYPE.DAMAGE) { - damageDice = options.rollValue - damageDiceMax = game.actors.get(options.actorId).system.dmax.valeur - damageDiceFinal = CthulhuEternalUtils.maxDamage(damageDice, damageDiceMax) - damageDiceLowered = damageDiceFinal !== damageDice - // Récupération du nom de l'objet si c'est un jet depuis la fiche de l'acteur - // Si c'est via une macro le nom est connu - options.rollTarget = game.actors.get(options.actorId).items.get(options.rollTarget).name - } - - if (options.rollType === ROLL_TYPE.ATTACK) { - damageDice = options.rollValue - } - - let malus = "0" + let modifier = "0" let targetMalus = "0" let targetName let targetArmor - const displayOpponentMalus = game.settings.get("tenebris", "displayOpponentMalus") - - if (options.rollType === ROLL_TYPE.SAVE && options.hasTarget && options.target.document.actor.type === "opponent") { - targetName = options.target.document.actor.name - if (displayOpponentMalus) malus = options.target.document.actor.system.malus.toString() - else targetMalus = options.target.document.actor.system.malus.toString() - } - - if (options.rollType === ROLL_TYPE.DAMAGE && options.hasTarget && options.target.document.actor.type === "opponent") { - targetName = options.target.document.actor.name - targetArmor = options.target.document.actor.system.armure.toString() - } let dialogContext = { - isSave: options.rollType === ROLL_TYPE.SAVE, - isResource: options.rollType === ROLL_TYPE.RESOURCE, - isDamage: options.rollType === ROLL_TYPE.DAMAGE, - isAttack: options.rollType === ROLL_TYPE.ATTACK, + rollType: options.rollType, + rollItem: foundry.utils.duplicate(options.rollItem), // Object only, no class + targetScore: options.targetScore, rollModes, fieldRollMode, - choiceAide, - choiceGene, - choiceAvantage, - choiceModificateur, - damageDice, - damageDiceMax, - damageDiceFinal, - damageDiceLowered, + choiceModifier, formula, hasTarget: options.hasTarget, - malus, + modifier, targetName, - targetArmor, - rollAdvantage: this._convertAvantages(options.rollAdvantage), - rangeAdvantage: this._convertRollAdvantageToRange(options.rollAdvantage), + targetArmor } const content = await renderTemplate("systems/fvtt-cthulhu-eternal/templates/roll-dialog.hbs", dialogContext) @@ -278,89 +193,21 @@ export default class CthulhuEternalRoll extends Roll { if (input.name) obj[input.name] = input.value return obj }, {}) - // Avantages - switch (output.avantages) { - case "1": - output.avantages = "doubleDesavantage" - break - case "2": - output.avantages = "desavantage" - break - case "3": - output.avantages = "normal" - break - case "4": - output.avantages = "avantage" - break - case "5": - output.avantages = "doubleAvantage" - break - } return output }, }, ], rejectClose: false, // Click on Close button will not launch an error render: (event, dialog) => { - const rangeInput = dialog.querySelector('input[name="avantages"]') - if (rangeInput) { - rangeInput.addEventListener("change", (event) => { - event.preventDefault() - event.stopPropagation() - const readOnly = dialog.querySelector('input[name="selectAvantages"]') - readOnly.value = this._convertAvantages(event.target.value) - }) - } }, }) // If the user cancels the dialog, exit if (rollContext === null) return - let treshold - - if (options.rollType === ROLL_TYPE.SAVE) { - const aide = rollContext.aide === "" ? 0 : parseInt(rollContext.aide, 10) - const gene = rollContext.gene === "" ? 0 : parseInt(rollContext.gene, 10) - const modificateur = rollContext.modificateur === "" ? 0 : parseInt(rollContext.modificateur, 10) - - if (options.rollType === ROLL_TYPE.SAVE) { - let dice = "1d20" - switch (rollContext.avantages) { - case "avantage": - dice = "2d20kl" - break - case "desavantage": - dice = "2d20kh" - break - case "doubleAvantage": - dice = "3d20kl" - break - case "doubleDesavantage": - dice = "3d20kh" - break - } - formula = `${dice}` - } - - treshold = options.rollValue + aide + gene + modificateur - } - - // Formula for a damage roll - if (options.rollType === ROLL_TYPE.DAMAGE) { - formula = damageDiceFinal - } - - // Formula for an attack roll - if (options.rollType === ROLL_TYPE.ATTACK) { - formula = damageDice - } - const rollData = { - type: options.rollType, - target: options.rollTarget, - value: options.rollValue, - treshold: treshold, + rollType: options.rollType, + rollItem: options.rollItem, actorId: options.actorId, actorName: options.actorName, actorImage: options.actorImage, @@ -372,48 +219,30 @@ export default class CthulhuEternalRoll extends Roll { ...rollContext, } + // Update target score + rollData.targetScore = options.targetScore + Number(rollData.modifier) + /** * A hook event that fires before the roll is made. - * @function tenebris.preRoll - * @memberof hookEvents - * @param {Object} options Options for the roll. - * @param {Object} rollData All data related to the roll. - * @returns {boolean} Explicitly return `false` to prevent roll to be made. */ - if (Hooks.call("tenebris.preRoll", options, rollData) === false) return + if (Hooks.call("fvtt-cthulhu-eternal.preRoll", options, rollData) === false) return const roll = new this(formula, options.data, rollData) - await roll.evaluate() - let resultType - if (options.rollType === ROLL_TYPE.SAVE) { - resultType = roll.total <= treshold ? "success" : "failure" - } else if (options.rollType === ROLL_TYPE.RESOURCE) { - resultType = roll.total === 1 || roll.total === 2 ? "failure" : "success" - } - - let realDamage - if (options.rollType === ROLL_TYPE.DAMAGE) { - realDamage = Math.max(0, roll.total - parseInt(targetArmor, 10)) + let resultType = "failure" + if (roll.total <= rollData.targetScore) { + resultType = "success" } roll.options.resultType = resultType - roll.options.treshold = treshold roll.options.introText = roll._createIntroText() roll.options.introTextTooltip = roll._createIntroTextTooltip() - roll.options.realDamage = realDamage /** * A hook event that fires after the roll has been made. - * @function tenebris.Roll - * @memberof hookEvents - * @param {Object} options Options for the roll. - * @param {Object} rollData All data related to the roll. - @param {CthulhuEternalRoll} roll The resulting roll. - * @returns {boolean} Explicitly return `false` to prevent roll to be made. */ - if (Hooks.call("tenebris.Roll", options, rollData, roll) === false) return + if (Hooks.call("fvtt-cthulhu-eternal.Roll", options, rollData, roll) === false) return return roll } @@ -427,14 +256,8 @@ export default class CthulhuEternalRoll extends Roll { */ static createTitle(type, target) { switch (type) { - case ROLL_TYPE.SAVE: - return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleSave")} : ${game.i18n.localize(`CTHULHUETERNAL.Manager.${target}`)}` - case ROLL_TYPE.RESOURCE: - return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleResource")} : ${game.i18n.localize(`CTHULHUETERNAL.Manager.${target}`)}` - case ROLL_TYPE.DAMAGE: - return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleDamage")} : ${target}` - case ROLL_TYPE.ATTACK: - return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleAttack")} : ${target}` + case "skill": + return `${game.i18n.localize("CTHULHUETERNAL.Dialog.titleSkill")}` default: return game.i18n.localize("CTHULHUETERNAL.Dialog.titleStandard") } @@ -457,11 +280,7 @@ export default class CthulhuEternalRoll extends Roll { * @property {boolean} isGM - Indicates if the user is a Game Master. * @property {string} formula - The formula used for the roll. * @property {number} total - The total result of the roll. - * @property {boolean} isSave - Indicates if the roll is a saving throw. - * @property {boolean} isResource - Indicates if the roll is related to a resource. - * @property {boolean} isDamage - Indicates if the roll is for damage. * @property {boolean} isFailure - Indicates if the roll is a failure. - * @property {Array} avantages - Advantages associated with the roll. * @property {string} actorId - The ID of the actor performing the roll. * @property {string} actingCharName - The name of the character performing the roll. * @property {string} actingCharImg - The image of the character performing the roll. @@ -482,13 +301,12 @@ export default class CthulhuEternalRoll extends Roll { data: this.data, diceTotal: this.dice.reduce((t, d) => t + d.total, 0), isGM: game.user.isGM, + rollItem: this.options.rollItem, + targetScore: this.options.targetScore, + rollType: this.options.rollType, formula: this.formula, total: this.total, - isSave: this.isSave, - isResource: this.isResource, - isDamage: this.isDamage, isFailure: this.isFailure, - avantages: this.avantages, actorId: this.actorId, actingCharName: this.actorName, actingCharImg: this.actorImage, @@ -501,6 +319,7 @@ export default class CthulhuEternalRoll extends Roll { realDamage: this.realDamage, isPrivate: isPrivate, } + console.log(cardData) cardData.cssClass = cardData.css.join(" ") cardData.tooltip = isPrivate ? "" : await this.getTooltip() return cardData @@ -518,12 +337,8 @@ export default class CthulhuEternalRoll extends Roll { async toMessage(messageData = {}, { rollMode, create = true } = {}) { super.toMessage( { - isSave: this.isSave, - isResource: this.isResource, - isDamage: this.isDamage, isFailure: this.resultType === "failure", - avantages: this.avantages, - introText: this.introText, + introText: this.introText, introTextTooltip: this.introTextTooltip, actingCharName: this.actorName, actingCharImg: this.actorImage, @@ -538,45 +353,4 @@ export default class CthulhuEternalRoll extends Roll { ) } - // Used in the avantages select and with the rollAdvantage parameter: convert the selected value to the corresponding string - static _convertAvantages(value) { - switch (value) { - case "1": - return game.i18n.localize("CTHULHUETERNAL.Roll.doubleDesavantage") - case "2": - return game.i18n.localize("CTHULHUETERNAL.Roll.desavantage") - case "3": - return game.i18n.localize("CTHULHUETERNAL.Roll.normal") - case "4": - return game.i18n.localize("CTHULHUETERNAL.Roll.avantage") - case "5": - return game.i18n.localize("CTHULHUETERNAL.Roll.doubleAvantage") - case "--": - return game.i18n.localize("CTHULHUETERNAL.Roll.doubleDesavantage") - case "-": - return game.i18n.localize("CTHULHUETERNAL.Roll.desavantage") - case "=": - return game.i18n.localize("CTHULHUETERNAL.Roll.normal") - case "+": - return game.i18n.localize("CTHULHUETERNAL.Roll.avantage") - case "++": - return game.i18n.localize("CTHULHUETERNAL.Roll.doubleAvantage") - } - } - - // Used in the rollAdvantage parameter: convert the selected value to the corresponding range value - static _convertRollAdvantageToRange(value) { - switch (value) { - case "--": - return 1 - case "-": - return 2 - case "=": - return 3 - case "+": - return 4 - case "++": - return 5 - } - } } diff --git a/module/models/protagonist.mjs b/module/models/protagonist.mjs index 6f6cfa4..1e3f10e 100644 --- a/module/models/protagonist.mjs +++ b/module/models/protagonist.mjs @@ -92,27 +92,18 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData await this._roll(rollType, rollTarget, rollValue, opponentTarget, rollAdvantage) } - /** - * Rolls a dice for a character. - * @param {("save"|"resource|damage")} rollType The type of the roll. - * @param {number} rollTarget The target value for the roll. Which caracteristic or resource. If the roll is a damage roll, this is the id of the item. - * @param {number} rollValue The value of the roll. If the roll is a damage roll, this is the dice to roll. - * @param {Token} opponentTarget The target of the roll : used for save rolls to get the oppponent's malus. - * @param {"="|"+"|"++"|"-"|"--"} rollAdvantage If there is an avantage (+), a disadvantage (-), a double advantage (++), a double disadvantage (--) or a normal roll (=). - * @returns {Promise} - A promise that resolves to null if the roll is cancelled. + /** Main roll function */ - async _roll(rollType, rollTarget, rollValue, opponentTarget = undefined, rollAdvantage = "=") { + async _roll(rollType, rollItem, opponentTarget = undefined) { const hasTarget = opponentTarget !== undefined let roll = await CthulhuEternalRoll.prompt({ rollType, - rollTarget, - rollValue, + rollItem, actorId: this.parent.id, actorName: this.parent.name, actorImage: this.parent.img, hasTarget, - target: opponentTarget, - rollAdvantage, + target: opponentTarget }) if (!roll) return null diff --git a/module/models/skill.mjs b/module/models/skill.mjs index 124cb1c..b0e592d 100644 --- a/module/models/skill.mjs +++ b/module/models/skill.mjs @@ -1,5 +1,5 @@ import { SYSTEM } from "../config/system.mjs" -export default class LethalFantasySkill extends foundry.abstract.TypeDataModel { +export default class CthulhuEternalSkill extends foundry.abstract.TypeDataModel { static defineSchema() { const fields = foundry.data.fields const schema = {} @@ -22,10 +22,10 @@ export default class LethalFantasySkill extends foundry.abstract.TypeDataModel { prepareDerivedData() { super.prepareDerivedData(); - this.skillTotal = this.computeBase(); + this.skillTotal = this.computeScore(); } - computeBase() { + computeScore() { let actor = this.parent?.actor; if (Number(this.base)) { return Number(this.base) + this.bonus; diff --git a/styles/arcane.less b/styles/arcane.less index 9fa6f6d..63b0456 100644 --- a/styles/arcane.less +++ b/styles/arcane.less @@ -2,13 +2,20 @@ .sheet-common(); .item-sheet-common(); + .header { display: flex; + background-color: var(--color-light-1); img { width: 50px; height: 50px; } } + + fieldset { + margin-top: 8px; + background-color: var(--color-light-1); + } label { flex: 10%; diff --git a/styles/archetype.less b/styles/archetype.less index 8891b5d..646f83a 100644 --- a/styles/archetype.less +++ b/styles/archetype.less @@ -2,7 +2,13 @@ .sheet-common(); .item-sheet-common(); + fieldset { + margin-top: 8px; + background-color: var(--color-light-1); + } + .header { + background-color: var(--color-light-1); display: flex; img { width: 50px; diff --git a/styles/armor.less b/styles/armor.less index 586adea..ffd8662 100644 --- a/styles/armor.less +++ b/styles/armor.less @@ -2,7 +2,13 @@ .sheet-common(); .item-sheet-common(); + fieldset { + margin-top: 8px; + background-color: var(--color-light-1); + } + .header { + background-color: var(--color-light-1); display: flex; img { width: 50px; diff --git a/styles/bond.less b/styles/bond.less index 10899ed..57c9642 100644 --- a/styles/bond.less +++ b/styles/bond.less @@ -2,7 +2,13 @@ .sheet-common(); .item-sheet-common(); + fieldset { + margin-top: 8px; + background-color: var(--color-light-1); + } + .header { + background-color: var(--color-light-1); display: flex; img { width: 50px; diff --git a/styles/chat.less b/styles/chat.less index 7c6ce7a..3a378c4 100644 --- a/styles/chat.less +++ b/styles/chat.less @@ -1,40 +1,8 @@ -&.fortune { - img { - border: 0px; - } - .intro-chat { - border-radius: 20px; - display: flex; - flex-direction: row; - .intro-img { - padding: 5px; - width: 80px; - align-self: center; - } - .intro-right { - display: flex; - flex-direction: column; - .introText { - font-family: var(--font-secondary); - font-size: calc(var(--font-size-standard) * 1.2); - width: 210px; - text-align: center; - } - } - } - .button.control, .fortune-accepted { - display: flex; - justify-content: center; - align-items: center; - font-size: calc(var(--font-size-standard) * 1.3); - } -} - &.ask-roll { display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-secondary); - font-size: calc(var(--font-size-standard) * 1.2); + font-size: calc(var(--font-size-standard) * 1.1); } \ No newline at end of file diff --git a/styles/gear.less b/styles/gear.less index b1fead2..0d3f15f 100644 --- a/styles/gear.less +++ b/styles/gear.less @@ -2,7 +2,13 @@ .sheet-common(); .item-sheet-common(); + fieldset { + margin-top: 8px; + background-color: var(--color-light-1); + } + .header { + background-color: var(--color-light-1); display: flex; img { width: 50px; diff --git a/styles/global.less b/styles/global.less index cee9cdc..f41f4e4 100644 --- a/styles/global.less +++ b/styles/global.less @@ -1,6 +1,8 @@ :root { --font-size-standard: 0.9rem; - --background-image-base: url("../assets/parchment.jpg"); + --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"; --logo-standard: url("../assets/logos/reanimated-ce-logo.webp"); @@ -26,7 +28,7 @@ left: calc(50% - 96px); } -i.lethalfantasy { +i.fvtt-cthulhu-eternal { width: 36px; height: 36px; background-image: var(--logo-standard); @@ -39,7 +41,7 @@ i.lethalfantasy { transition: 0.3s; } -.application.dialog.lethalfantasy { +.application.dialog.fvtt-cthulhu-eternal { font-family: var(--font-primary); font-size: calc(var(--font-size-standard) * 1.0); background-image: var(--background-image-base); @@ -51,11 +53,6 @@ i.lethalfantasy { } } -#tooltip.tooltip-avantages { - max-width: 550px; - text-align: left; -} - .chat-message, .chat-message.whisper { font-family: var(--font-primary); diff --git a/styles/injury.less b/styles/injury.less index 9f94024..d0f7bb6 100644 --- a/styles/injury.less +++ b/styles/injury.less @@ -2,7 +2,13 @@ .sheet-common(); .item-sheet-common(); + fieldset { + margin-top: 8px; + background-color: var(--color-light-1); + } + .header { + background-color: var(--color-light-1); display: flex; img { width: 50px; diff --git a/styles/mentaldisorder.less b/styles/mentaldisorder.less index 4bd58b3..f3cbdba 100644 --- a/styles/mentaldisorder.less +++ b/styles/mentaldisorder.less @@ -2,7 +2,13 @@ .sheet-common(); .item-sheet-common(); + fieldset { + margin-top: 8px; + background-color: var(--color-light-1); + } + .header { + background-color: var(--color-light-1); display: flex; img { width: 50px; diff --git a/styles/motivation.less b/styles/motivation.less index 9266264..30a5ad1 100644 --- a/styles/motivation.less +++ b/styles/motivation.less @@ -2,7 +2,13 @@ .sheet-common(); .item-sheet-common(); + fieldset { + margin-top: 8px; + background-color: var(--color-light-1); + } + .header { + background-color: var(--color-light-1); display: flex; img { width: 50px; diff --git a/styles/protagonist.less b/styles/protagonist.less index bae1a1d..d4a26c6 100644 --- a/styles/protagonist.less +++ b/styles/protagonist.less @@ -4,12 +4,18 @@ overflow: scroll; } +.sheet-tabs { + background-color: var(--color-light-1); +} + .protagonist-main { + background-color: var(--color-light-1); display: flex; + .protagonist-pc { display: flex; - gap: 10px; + gap: 4px; flex: 1; .protagonist-left { @@ -21,7 +27,7 @@ display: flex; justify-content: center; align-items: center; - padding-bottom: 20px; + padding-bottom: 8px; .protagonist-img { height: 140px; width: auto; @@ -63,7 +69,7 @@ .protagonist-infos { display: flex; flex-direction: column; - gap: 10px; + gap: 4px; label { min-width: 120px; @@ -77,7 +83,7 @@ .form-fields input { flex: none; width: 50px; - margin-left: 10px; + margin-left: 4px; font-size: calc(var(--font-size-standard) * 1.4); } } @@ -114,6 +120,7 @@ } .protagonist-characteristics { + background-color: var(--color-light-1); display: flex; flex-direction: column; gap: 5px; @@ -135,32 +142,6 @@ width: 70px; } } - .experience { - display: flex; - align-items: center; - gap: 10px; - margin-left: 10px; - input { - display: flex; - width: 70px; - font-size: calc(var(--font-size-standard) * 1.4); - align-items: center; - justify-content: center; - padding: 0 5px 0 5px; - } - input[type="number"] { - text-align: center; - } - input[type="checkbox"] { - width: 20px; - } - input[type="checkbox"]:checked { - background-color: rgba(0, 0, 0, 0.1); - } - input[type="checkbox"]:checked::after { - color: rgba(0, 0, 0, 0.1); - } - } } } @@ -172,65 +153,10 @@ min-width: 400px; } - .protagonist-resources { - display: flex; - flex-direction: column; - gap: 5px; - flex: 1; - - .protagonist-resource { - display: flex; - align-items: center; - .rollable:hover, - .rollable:focus { - text-shadow: 0 0 8px var(--color-shadow-primary); - cursor: - pointer; - } - .form-group { - flex: 1; - padding-left: 5px; - .form-fields { - flex: none; - width: 70px; - } - } - .protagonist-resource-edit { - display: flex; - align-items: center; - gap: 10px; - margin-left: 10px; - input { - display: flex; - width: 70px; - font-size: calc(var(--font-size-standard) * 1.4); - align-items: center; - justify-content: center; - padding: 0 5px 0 5px; - } - input[type="number"] { - text-align: center; - } - select { - font-family: var(--font-secondary); - font-size: calc(var(--font-size-standard) * 1.5); - text-align: center; - width: 75px; - } - } - } - } - - .protagonist-resources-play { - min-width: 235px; - } - - .protagonist-resources-edit { - min-width: 400px; - } } .protagonist-biography { + background-color: var(--color-light-1); prose-mirror.inactive { min-height: 40px; } @@ -240,6 +166,7 @@ } .tab.protagonist-skills { + background-color: var(--color-light-1); display: grid; grid-template-columns: 1fr; legend { @@ -251,21 +178,37 @@ .skills { display: grid; grid-template-columns: repeat(3, 1fr); - gap: 10px; + gap: 4px; .skill { display: flex; align-items: center; - gap: 10px; + gap: 4px; + min-width: 10rem; + max-width: 10rem; + .rollable:hover, + .rollable:focus { + text-shadow: 0 0 8px var(--color-shadow-primary); + cursor: pointer; + } + .controls { + min-width: 2rem; + max-width: 2rem; + } + .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; } } } } .tab.protagonist-equipment { + background-color: var(--color-light-1); display: grid; grid-template-columns: 1fr; legend { @@ -277,11 +220,11 @@ .weapons { display: grid; grid-template-columns: repeat(4, 1fr); - gap: 10px; + gap: 4px; .weapon { display: flex; align-items: center; - gap: 10px; + gap: 4px; .item-img { width: 50px; height: 50px; @@ -292,11 +235,11 @@ .armors { display: grid; grid-template-columns: repeat(3, 1fr); - gap: 10px; + gap: 4px; .armor { display: flex; align-items: center; - gap: 10px; + gap: 4px; .item-img { width: 50px; height: 50px; @@ -307,11 +250,11 @@ .gears { display: grid; grid-template-columns: repeat(3, 1fr); - gap: 10px; + gap: 4px; .gear { display: flex; align-items: center; - gap: 10px; + gap: 4px; .item-img { width: 50px; height: 50px; diff --git a/styles/roll.less b/styles/roll.less index 25c8925..01ce4d8 100644 --- a/styles/roll.less +++ b/styles/roll.less @@ -1,5 +1,12 @@ -.application.dialog.lethalfantasy { +.application.dialog.fvtt-cthulhu-eternal { color: var(--color-dark-1); + background-color: var(--color-light-1); + + button { + background-image: none; + background-color: var(--color-dark-6); + color: var(--color-light-1); + } input, select { @@ -9,17 +16,14 @@ } } -.lethalfantasy-roll-dialog { +.fvtt-cthulhu-eternal-roll-dialog { fieldset { padding: 10px; + background-color: var(--color-light-1); } } -input[name="selectAvantages"] { - border: none; -} - -.dialog-aide-gene { +.dialog-modifier { display: flex; justify-content: center; align-items: center; @@ -32,31 +36,8 @@ input[name="selectAvantages"] { } } -.dialog-modificateur { - display: flex; - justify-content: center; - align-items: center; - select { - border: none; - background-color: rgba(0, 0, 0, 0.1); - color: var(--color-dark-2); - width: 60px; - text-align: center; - } -} -.dialog-avantages { - #selectAvantages { - background-color: inherit; - text-align: center; - font-family: var(--font-secondary); - font-size: calc(var(--font-size-standard) * 1.2); - } -} - -.dialog-damage, -.dialog-resource, -.dialog-save { +.dialog-damage { display: flex; justify-content: center; align-items: center; @@ -82,6 +63,7 @@ input[name="selectAvantages"] { border: 0px; } .intro-chat { + color:var(--color-dark-1); border-radius: 20px; display: flex; flex-direction: row; diff --git a/styles/skill.less b/styles/skill.less index 7e9e1df..1e8e65a 100644 --- a/styles/skill.less +++ b/styles/skill.less @@ -2,7 +2,13 @@ .sheet-common(); .item-sheet-common(); + fieldset { + margin-top: 8px; + background-color: var(--color-light-1); + } + .header { + background-color: var(--color-light-1); display: flex; img { width: 50px; diff --git a/styles/weapon.less b/styles/weapon.less index e4db43f..06d9f8d 100644 --- a/styles/weapon.less +++ b/styles/weapon.less @@ -3,13 +3,19 @@ .item-sheet-common(); .header { + background-color: var(--color-light-1); display: flex; img { width: 50px; height: 50px; } } - + + fieldset { + margin-top: 8px; + background-color: var(--color-light-1); + } + label { flex: 10%; } diff --git a/templates/archetype.hbs b/templates/archetype.hbs index 539457d..fcd19d2 100644 --- a/templates/archetype.hbs +++ b/templates/archetype.hbs @@ -4,7 +4,9 @@ {{formInput fields.name value=source.name}} - {{formField systemFields.settings value=system.settings localize=true}} +
+ {{formField systemFields.settings value=system.settings localize=true}} +
{{localize "CTHULHUETERNAL.Label.description"}} diff --git a/templates/armor.hbs b/templates/armor.hbs index c17f72c..05cb2de 100644 --- a/templates/armor.hbs +++ b/templates/armor.hbs @@ -2,20 +2,23 @@
{{formInput fields.name value=source.name}} -
+ + +
+ {{formField systemFields.settings value=system.settings localize=true}} + {{formField systemFields.protection value=system.protection}} + {{formField systemFields.resourceLevel value=system.resourceLevel}} +
- {{formField systemFields.settings value=system.settings localize=true}} - {{formField systemFields.protection value=system.protection}} - {{formField systemFields.resourceLevel value=system.resourceLevel}}
{{localize "CTHULHUETERNAL.Label.description"}} {{formInput - systemFields.description - enriched=description - value=system.description - name="system.description" - toggled="false" + systemFields.description + enriched=description + value=system.description + name="system.description" + toggled="false" }}
\ No newline at end of file diff --git a/templates/bond.hbs b/templates/bond.hbs index 0470c06..9bc6353 100644 --- a/templates/bond.hbs +++ b/templates/bond.hbs @@ -2,14 +2,17 @@
{{formInput fields.name value=source.name}} -
+ - {{formField systemFields.bondType value=system.bondType localize=true}} - {{formField systemFields.value value=system.value}} +
+ {{formField systemFields.bondType value=system.bondType localize=true}} + {{formField systemFields.value value=system.value}} +
{{localize "CTHULHUETERNAL.Label.description"}} - {{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}} + {{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" + toggled=true}}
\ No newline at end of file diff --git a/templates/chat-message.hbs b/templates/chat-message.hbs index b444886..7816ea0 100644 --- a/templates/chat-message.hbs +++ b/templates/chat-message.hbs @@ -1,43 +1,18 @@ {{!log 'chat-message' this}}
- {{#if (ne actingCharImg "icons/svg/mystery-man.svg")}} -
- -
- {{else}} -
- {{/if}} +
+ +

{{{introText}}} - {{#if isSave}} -
- {{#if (eq avantages "avantage")}} {{localize "TENEBRIS.Roll.avantage"}}{{/if}} - {{#if (eq avantages "desavantage")}} {{localize "TENEBRIS.Roll.desavantage"}}{{/if}} - {{#if (eq avantages "doubleAvantage")}} {{localize "TENEBRIS.Roll.doubleAvantage"}}{{/if}} - {{#if (eq avantages "doubleDesavantage")}} {{localize "TENEBRIS.Roll.doubleDesavantage"}}{{/if}} + {{#if (eq rollType "skill")}} + {{rollItem.name}} : {{targetScore}} + Modifier : {{modifier}} {{/if}}

- {{#if isSave}} -
- {{#if (eq resultType "success")}} - {{#if isPrivate}}?{{else}}{{localize "TENEBRIS.Roll.success"}}{{/if}} - {{else}} - {{#if isPrivate}}?{{else}}{{localize "TENEBRIS.Roll.failure"}}{{/if}} - {{/if}} -
- {{/if}} - {{#if isResource}} -
- {{#if (eq resultType "success")}} - {{#if isPrivate}}?{{else}}{{localize "TENEBRIS.Roll.success"}}{{/if}} - {{else}} - {{#if isPrivate}}?{{else}}{{localize "TENEBRIS.Roll.failure"}}{{#if isFailure}} ({{localize "TENEBRIS.Roll.resourceLost"}}){{/if}}{{/if}} - {{/if}} -
- {{/if}} {{#if isDamage}}
{{#if (and isGM hasTarget)}} diff --git a/templates/gear.hbs b/templates/gear.hbs index 7c47df9..414da67 100644 --- a/templates/gear.hbs +++ b/templates/gear.hbs @@ -2,14 +2,17 @@
{{formInput fields.name value=source.name}} -
- - {{formField systemFields.settings value=system.settings localize=true}} - {{formField systemFields.resourceLevel value=system.resourceLevel}} +
+ +
+ {{formField systemFields.settings value=system.settings localize=true}} + {{formField systemFields.resourceLevel value=system.resourceLevel}} +
{{localize "CTHULHUETERNAL.Label.description"}} - {{formInput systemFields.description enriched=description value=system.description name="system.description" toggled=true}} + {{formInput systemFields.description enriched=description value=system.description name="system.description" + toggled=true}}
\ No newline at end of file diff --git a/templates/protagonist-main.hbs b/templates/protagonist-main.hbs index f0d7575..3a6231e 100644 --- a/templates/protagonist-main.hbs +++ b/templates/protagonist-main.hbs @@ -111,7 +111,4 @@
-
-
- \ No newline at end of file diff --git a/templates/protagonist-skills.hbs b/templates/protagonist-skills.hbs index a40ddb1..a6bc3b5 100644 --- a/templates/protagonist-skills.hbs +++ b/templates/protagonist-skills.hbs @@ -4,10 +4,12 @@ {{localize "CTHULHUETERNAL.Label.skills"}}
{{#each skills as |item|}} -
+
-
{{item.name}} - {{item.system.skillTotal}} +
{{item.name}} +
+
+ {{item.system.skillTotal}}
diff --git a/templates/roll-dialog.hbs b/templates/roll-dialog.hbs index 494f675..2866228 100644 --- a/templates/roll-dialog.hbs +++ b/templates/roll-dialog.hbs @@ -1,59 +1,20 @@ {{log "roll-dialog" this}} -
- {{#if isSave}} +
+ {{#if (eq rollType "skill")}}
- {{localize "TENEBRIS.Label.sauvegarde"}} -
{{formula}}
+ {{localize "CTHULHUETERNAL.Label.skill"}} +
{{rollItem.name}} : {{targetScore}}
-
- {{localize "TENEBRIS.Roll.avantagesDesavantages"}} - - -
-
-
- {{localize "TENEBRIS.Roll.aide"}} - -
-
- {{localize "TENEBRIS.Roll.gene"}} - -
-
-
- {{localize "TENEBRIS.Roll.adversite"}} - + {{selectOptions choiceModifier selected=modifier}}
{{/if}} - {{#if (or isDamage isAttack)}} -
- {{localize "TENEBRIS.Label.degats"}} -
{{damageDice}} {{#if damageDiceLowered}}limités par les dégâts max à {{damageDiceFinal}} {{/if}}
-
- {{/if}} - {{#if isResource}} -
- {{localize "TENEBRIS.Label.ressource"}} -
{{formula}}
-
- {{/if}} +
- {{localize "TENEBRIS.Roll.visibilite"}} + {{localize "CTHULHUETERNAL.Label.rollView"}} diff --git a/templates/skill.hbs b/templates/skill.hbs index ea7b89c..7624e96 100644 --- a/templates/skill.hbs +++ b/templates/skill.hbs @@ -1,25 +1,29 @@
- + {{formInput fields.name value=source.name}} -
- - {{formField systemFields.settings value=system.settings localize=true}} - {{formField systemFields.base value=system.base}} - {{formField systemFields.bonus value=system.bonus}} - {{formField systemFields.diceEvolved value=system.diceEvolved}} - {{#if system.diceEvolved}} - {{formField systemFields.rollFailed value=system.rollFailed}} - {{/if}} - -
- {{localize "CTHULHUETERNAL.Label.total"}} - {{system.skillTotal}}
+
+ {{formField systemFields.settings value=system.settings localize=true}} + {{formField systemFields.base value=system.base}} + {{formField systemFields.bonus value=system.bonus}} +
+ {{localize "CTHULHUETERNAL.Label.totalScore"}} + {{system.skillTotal}} +
+ {{formField systemFields.diceEvolved value=system.diceEvolved}} + {{#if system.diceEvolved}} + {{formField systemFields.rollFailed value=system.rollFailed}} + {{/if}} +
+ +
{{localize "CTHULHUETERNAL.Label.description"}} - {{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}} + {{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" + toggled=true}}
\ No newline at end of file diff --git a/templates/weapon.hbs b/templates/weapon.hbs index 225f41d..160d788 100644 --- a/templates/weapon.hbs +++ b/templates/weapon.hbs @@ -4,22 +4,24 @@ {{formInput fields.name value=source.name}}
- {{formField systemFields.settings value=system.settings localize=true}} - {{formField systemFields.weaponType value=system.weaponType localize=true}} - {{#if (eq system.weaponType "rangedfirearm")}} +
+ {{formField systemFields.settings value=system.settings localize=true}} + {{formField systemFields.weaponType value=system.weaponType localize=true}} + {{#if (eq system.weaponType "rangedfirearm")}} {{formField systemFields.weaponSubtype value=system.weaponSubtype localize=true}} - {{/if}} + {{/if}} - {{formField systemFields.damage value=system.damage}} - {{formField systemFields.baseRange value=system.baseRange}} - {{formField systemFields.rangeUnit value=system.rangeUnit localize=true}} - {{formField systemFields.lethality value=system.lethality}} - {{formField systemFields.killRadius value=system.killRadius}} + {{formField systemFields.damage value=system.damage}} + {{formField systemFields.baseRange value=system.baseRange}} + {{formField systemFields.rangeUnit value=system.rangeUnit localize=true}} + {{formField systemFields.lethality value=system.lethality}} + {{formField systemFields.killRadius value=system.killRadius}} + + {{formField systemFields.armorPiercing value=system.armorPiercing}} + + {{formField systemFields.resourceLevel value=system.resourceLevel}} +
- {{formField systemFields.armorPiercing value=system.armorPiercing}} - - {{formField systemFields.resourceLevel value=system.resourceLevel}} -
{{localize "CTHULHUETERNAL.Label.description"}} {{formInput