From 008ee88c5848b804d2baac8a5b25e77896ab9287 Mon Sep 17 00:00:00 2001 From: TheLastScrub <67403321+TheLastScrub@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:40:06 -0700 Subject: [PATCH] basics of tome and ritual item sheets done --- css/deltagreen.css | 2 +- lang/en.json | 7 +- module/item/item-sheet.js | 10 +-- template.json | 16 ++-- templates/item/item-ritual-sheet.html | 101 ++++++++++++++++++++++++++ templates/item/item-tome-sheet.html | 7 +- 6 files changed, 126 insertions(+), 17 deletions(-) diff --git a/css/deltagreen.css b/css/deltagreen.css index c2070f5..d9a0c09 100644 --- a/css/deltagreen.css +++ b/css/deltagreen.css @@ -1062,7 +1062,7 @@ input.item-sheet-short-input { .tome-sheet-handler-info-horizontal-grid-2col { display: grid; grid-template-columns: max-content auto; - align-items: left; + align-items: center; text-align: left; column-gap: 10px; row-gap: 10px; diff --git a/lang/en.json b/lang/en.json index fe603d1..76a6418 100644 --- a/lang/en.json +++ b/lang/en.json @@ -297,5 +297,10 @@ "DG.ItemWindow.Tome.UnnaturalIncrease": "Unnatural Skill Increase", "DG.ItemWindow.Tome.StudySanityDamage": "Study Sanity Damage", "DG.ItemWindow.Tome.HandlerOnlyTabHeader": "Handler Only", - "DG.ItemWindow.Tome.HandlerNotes": "Handler" + "DG.ItemWindow.Tome.HandlerNotes": "Handler Notes", + + "DG.ItemWindow.Ritual.ActivationSanityDamage": "Activation SAN Damage", + "DG.ItemWindow.Ritual.ActivationTime": "Activation Time", + "DG.ItemWindow.Ritual.ActivationCosts": "Activation Costs", + "DG.ItemWindow.Ritual.StudyTime": "Study Time" } diff --git a/module/item/item-sheet.js b/module/item/item-sheet.js index 77ed2d7..2d6776c 100644 --- a/module/item/item-sheet.js +++ b/module/item/item-sheet.js @@ -45,7 +45,7 @@ export default class DeltaGreenItemSheet extends ItemSheet { { async: true }, ); - if (data.item.type === "tome" || data.type === "ritual") { + if (data.item.type === "tome" || data.item.type === "ritual") { data.enrichedHandlerNotes = await TextEditor.enrichHTML( this.object.system.handlerNotes, { async: true }, @@ -144,10 +144,10 @@ export default class DeltaGreenItemSheet extends ItemSheet { } case "sanity-damage": { let combinedFormula; - if (this.item.type === "tome") { - const { successLoss, failedLoss } = this.item.system.sanity; - combinedFormula = `{${successLoss}, ${failedLoss}}`; - } + + const { successLoss, failedLoss } = this.item.system.sanity; + combinedFormula = `{${successLoss}, ${failedLoss}}`; + roll = new DGSanityDamageRoll(combinedFormula, {}, rollOptions); break; } diff --git a/template.json b/template.json index a38dd60..81ef08b 100644 --- a/template.json +++ b/template.json @@ -582,7 +582,7 @@ "sanity": { "notes": "", "failedLoss": "1D6", - "successLoss": "1" + "successLoss": "1D4" }, "handlerNotes": "", "revealed": false @@ -590,13 +590,17 @@ "ritual": { "templates": ["base"], "studyTime": "weeks", - "studySanCost": "1D10", - "studyUnnaturalIncrease": 1, - "activationSanCost": "1D10", + "sanity": { + "notes": "", + "failedLoss": "1D10", + "successLoss": "0" + }, + "unnaturalSkillIncrease": 1, "activationCosts": "6 WP, 0 POW, 0 HP", - "complexity": "Simple", "activationTime": "days", - "handlerNotes": "" + "complexity": "Simple", + "handlerNotes": "", + "revealed": false } } } diff --git a/templates/item/item-ritual-sheet.html b/templates/item/item-ritual-sheet.html index e69de29..70060f4 100644 --- a/templates/item/item-ritual-sheet.html +++ b/templates/item/item-ritual-sheet.html @@ -0,0 +1,101 @@ +
diff --git a/templates/item/item-tome-sheet.html b/templates/item/item-tome-sheet.html index 6d56b35..c6b491a 100644 --- a/templates/item/item-tome-sheet.html +++ b/templates/item/item-tome-sheet.html @@ -34,7 +34,7 @@ {{#if (playerHasGamemasterPrivileges)}}{{/if}} {{localize 'DG.Tome.Name'}}: - ??? + ??? Language: ??? @@ -45,7 +45,6 @@ {{/if}} - @@ -78,9 +77,9 @@ {{localize 'DG.ItemWindow.Tome.StudySanityDamage'}}: - + / - +