diff --git a/css/fvtt-cthulhu-eternal.css b/css/fvtt-cthulhu-eternal.css index 82f2a94..6e9f4b9 100644 --- a/css/fvtt-cthulhu-eternal.css +++ b/css/fvtt-cthulhu-eternal.css @@ -170,6 +170,7 @@ i.fvtt-cthulhu-eternal { background-position: 0%; background-size: 100% 100%; } +.chat-san-request ul, .chat-lethal-damage ul { list-style-type: none; padding: 0; @@ -177,14 +178,36 @@ i.fvtt-cthulhu-eternal { justify-content: center; align-items: center; } +.chat-san-request ul .result-lethal, .chat-lethal-damage ul .result-lethal { color: var(--color-critical-failure); font-family: var(--font-title); } +.chat-san-request ul .san-loose-buttons, +.chat-lethal-damage ul .san-loose-buttons { + display: flex; + justify-content: center; + align-items: center; + margin: 10px 0; +} +.chat-san-request ul .san-loose-buttons button, +.chat-lethal-damage ul .san-loose-buttons button { + margin: 0 2px; + font-family: var(--font-primary); + font-size: calc(var(--font-size-standard) * 1.1); + border: none; + padding: 2px 2px; + cursor: pointer; + transition: background-color 0.3s; + min-width: 3rem; + max-width: 3rem; +} +.chat-san-request ul .result-non-lethal, .chat-lethal-damage ul .result-non-lethal { color: var(--color-failure); font-family: var(--font-title); } +.chat-san-request ul li, .chat-lethal-damage ul li { margin: 0 10px; font-family: var(--font-primary); @@ -454,6 +477,14 @@ i.fvtt-cthulhu-eternal { min-width: 6rem; flex-grow: 1; } +.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san .san-helplessness, +.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san .san-violence { + display: flex; + flex-grow: 1; +} +.fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san .label-san-type { + margin-right: 0.5rem; +} .fvtt-cthulhu-eternal .protagonist-main .protagonist-pc .protagonist-right .san .label-bp { flex-grow: 1; max-width: 3rem; diff --git a/cthulhu-eternal.mjs b/cthulhu-eternal.mjs index b59828b..9992065 100644 --- a/cthulhu-eternal.mjs +++ b/cthulhu-eternal.mjs @@ -156,14 +156,15 @@ Hooks.on("renderChatMessageHTML", (message, html, data) => { $(html).find(".healing-roll").click((event) => { CthulhuEternalUtils.healingRoll(message) }) + $(html).find(".san-loose").click((event) => { + CthulhuEternalUtils.applySANLoss(message, event) + }) + $(html).find(".san-type").click((event) => { + CthulhuEternalUtils.applySANType(message, event) + }) } }) -// Dice-so-nice Ready -Hooks.once("diceSoNiceReady", (dice3d) => { - //configureDiceSoNice(dice3d) -}) - /** * Create a macro when dropping an entity on the hotbar * Item - open roll dialog diff --git a/lang/en.json b/lang/en.json index 629e152..99ff463 100644 --- a/lang/en.json +++ b/lang/en.json @@ -516,6 +516,22 @@ } }, "Label": { + "sanLoss5": "You suffered a SAN loss of 5+ ({value}) : you suffer a temporary insanity (Flee, Submit, Struggle or understanding the Unnatural).", + "sanViolenceReset": "The violence SAN loss count has been reset.", + "sanHelplessnessReset": "The helplessness SAN loss count has been reset.", + "sanLoss": "You suffer a SAN loss", + "selectSANType": "Select the type of SAN loss with the buttons below.", + "Violence" : "Violence", + "Helplessness": "Helplessness", + "Unnatural": "Unnatural", + "sanLossViolence": "You suffered a SAN loss due to violence : violence progress path has evolved.", + "sanLossHelplessness": "You suffered a SAN loss due to helplessness : helplessness progress path has evolved.", + "adaptedToViolence": "You are now : Adapted to Violence.", + "adaptedToViolenceShort": "Adapted to Violence", + "adaptedToHelplessness": "You are now : Adapted to Helplessness.", + "adaptedToHelplessnessShort": "Adapted to Helplessness", + "SANTest": "You just rolled a SAN test : please select the SAN loss with the buttons below.", + "breakingPointReached": "Your SAN has reached your Breaking Point : you suffer a disorder (to be discussed with the GM). Reset the BP to its new value.", "rollNudge": "Roll Nudge", "rollDamage": "Roll Damage", "rollHealing": "Roll Healing", @@ -693,7 +709,10 @@ "skillAlreadyExists": "Skill already exists", "WrongEra": "The era of the item does not match the ear of the system", "NoSelectiveFireChoices": "Not enough ammo fo Selective Fire choices for this weapon.", - "NoAmmo": "No more ammo for this weapon. " + "NoAmmo": "No more ammo for this weapon. ", + "noRollDataFound": "No roll data found", + "noActorFound": "No actor found for this item.", + "noSanLossFound": "No SAN loss value found." } } } diff --git a/lang/fr.json b/lang/fr.json index 4524ecc..2ae3c4b 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -516,6 +516,24 @@ } }, "Label": { + "sanLoss5": "Perte de SAN de 5+ ({value}) : vous souffrez d'une folie temporaire (Fuite, Soumission, Lutte ou compréhension de l'Inconcevable).", + "sanViolenceReset": "Le décompte des pertes de SAN de violence a été réinitialisé.", + "sanHelplessnessReset": "Le décompte des pertes de SAN d'impuissance a été réinitialisé.", + "sanLoss": "Perte de SAN", + "noSanLoss": "Aucune perte de SAN", + "sanLossInfo": "Sélectionnez la perte de SAN à l'aide des boutons ci-dessous.", + "selectSANType": "Sélectionnez le type de perte de SAN à l'aide des boutons ci-dessous.", + "sanLossViolence": "Vous avez subi une perte de SAN due à la violence : le chemin de progression de la violence a évolué.", + "sanLossHelplessness": "Vous avez subi une perte de SAN due à l'impuissance : le chemin de progression de l'impuissance a évolué.", + "adaptedToViolence": "Vous êtes maintenant : Habitué à la violence", + "adaptedToViolenceShort": "Habitué à la violence", + "adaptedToHelplessness": "Vous êtes maintenant : Habitué à l'impuissance", + "adaptedToHelplessnessShort": "Habitué à l'impuissance", + "SANTest": "Vous venez de faire un jet de SAN : selectionnez la perte de SAN à l'aide des boutons ci-dessous.", + "breakingPointReached": "Vous avez atteint votre Point de Rupture (PR) : vous souffrez d'un trouble mental. Vous devez re-initialiser votre PR à l'aide du bouton disponible dans la section SAN de la fiche de PJ.", + "Violence" : "Violence", + "Helplessness": "Impuissance", + "Unnatural": "Inconcevable", "rollNudge": "Modifier le jet", "rollDamage": "Jet de dégâts", "rollHealing": "Jet de soin", @@ -693,7 +711,10 @@ "skillAlreadyExists": "La compétence existe déja", "WrongEra": "L'époque de l'item ne correspond pas à celle du jeu en cours.", "NoSelectiveFireChoices": "Aucune option de tir sélectif n'est disponible pour cette arme : pas assez de munitions.", - "NoAmmo": "Aucune munition disponible pour cette arme." + "NoAmmo": "Aucune munition disponible pour cette arme.", + "noRollDataFound": "Aucune donnée de jet trouvée.", + "noActorFound": "Aucun protagoniste trouvé.", + "noSanLossFound": "Aucune valeur de perte de SAN trouvée." } } } diff --git a/module/applications/sheets/protagonist-sheet.mjs b/module/applications/sheets/protagonist-sheet.mjs index f517e5b..1eeebcb 100644 --- a/module/applications/sheets/protagonist-sheet.mjs +++ b/module/applications/sheets/protagonist-sheet.mjs @@ -78,6 +78,7 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true }) context.enrichedNotes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.notes, { async: true }) + context.isGM = game.user.isGM context.tooltipsCharacteristic = { str: game.i18n.localize("CTHULHUETERNAL.Characteristic.Str"), diff --git a/module/documents/roll.mjs b/module/documents/roll.mjs index 23b8dde..1422832 100644 --- a/module/documents/roll.mjs +++ b/module/documents/roll.mjs @@ -568,7 +568,7 @@ export default class CthulhuEternalRoll extends Roll { { rollMode: rollMode }, ) - console.log("Roll to message", this.options, this.options.rollData, this.options.rollItem) + // Manage the skill evolution if the roll is a failure let rollData = this.options.rollData || this.options let rollItem = this.options.rollItem if (rollData.resultType.includes("failure") && rollItem.type === "skill") { @@ -594,6 +594,20 @@ export default class CthulhuEternalRoll extends Roll { } } + // If the roll is a SAN roll, we propose to select the SAN loss + if (rollData.rollType === "san") { + let msgData = { + rollItem: rollItem, + rollData: rollData + } + let msg = await foundry.applications.handlebars.renderTemplate("systems/fvtt-cthulhu-eternal/templates/chat-san-request.hbs", msgData) + let chatMsg = await ChatMessage.create({ + user: game.user.id, + content: msg, + speaker: ChatMessage.getSpeaker({ actor: rollData.actor }) + }, { rollMode: rollData.rollMode, create: true }) + await chatMsg.setFlag("fvtt-cthulhu-eternal", "rollData", rollData) + } } } diff --git a/module/models/protagonist.mjs b/module/models/protagonist.mjs index be0bd60..5c53a74 100644 --- a/module/models/protagonist.mjs +++ b/module/models/protagonist.mjs @@ -14,7 +14,8 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData const characteristicField = (label) => { const schema = { value: new fields.NumberField({ ...requiredInteger, initial: 3, min: 0 }), - feature: new fields.StringField({ required: true, nullable: false, initial: "" }) + feature: new fields.StringField({ required: true, nullable: false, initial: "" }), + max: new fields.NumberField({ ...requiredInteger, initial: 3, min: 0 }) } return new fields.SchemaField(schema, { label }) } @@ -47,6 +48,7 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData violence: new fields.ArrayField(new fields.BooleanField(), { required: true, initial: [false, false, false], min: 3, max: 3 }), helplessness: new fields.ArrayField(new fields.BooleanField(), { required: true, initial: [false, false, false], min: 3, max: 3 }), breakingPoint: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), + breakingPointReached: new fields.BooleanField({ required: true, initial: false }), insanity: new fields.StringField({ required: true, nullable: false, initial: "none", choices: SYSTEM.INSANITY }), }) @@ -132,6 +134,15 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData updates[`system.damageBonus`] = dmgBonus } + // BP (Breaking Point) management + if (!this.san.breakingPointReached && this.san.value <= this.san.breakingPoint) { + updates[`system.san.breakingPointReached`] = true + ChatMessage.create({ + content: `
${game.i18n.format("CTHULHUETERNAL.Label.breakingPointReached", { bp: this.san.breakingPoint, san: this.san.value })}
`, + speaker: ChatMessage.getSpeaker({ actor: this.parent }) + }) + } + // Unconsciousness management if (!this.hp.unconscious && this.hp.value <= 2) { updates[`system.hp.unconscious`] = true @@ -183,6 +194,108 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData } } + async applySANConsequences(rollData) { + // If sanType is "non", do nothing + if (rollData.sanType === "none") { + return + } + let msgData = { + sanType: rollData.sanType, + sanLoss: rollData.sanLoss, + actorId: this.parent.id, + actorName: this.parent.name, + adaptedToHelplessness: this.biodata.adaptedToHelplessness, + adaptedToViolence: this.biodata.adaptedToViolence, + ... rollData + } + let updates = {} + let template = "" + // Manage temporary insanity + if (rollData.sanLoss >= 5) { + rollData.resetMsg = false + if (rollData.sanType === "violence" && !this.biodata.adaptedToViolence) { + updates[`system.san.violence`] = [false, false, false] + rollData.resetMsg = "CTHULHUETERNAL.Label.sanViolenceReset" + } + if (rollData.sanType === "helplessness" && !this.biodata.adaptedToHelplessness) { + updates[`system.san.helplessness`] = [false, false, false] + rollData.resetMsg = "CTHULHUETERNAL.Label.sanHelplessnessReset" + } + template = "systems/fvtt-cthulhu-eternal/templates/chat-san-temp-insanity.hbs" + + } else if (rollData.sanLoss === 0) { // Manage if sanLoss is 0 + rollData.resetMsg = false + if (rollData.sanType === "violence" && !this.biodata.adaptedToViolence) { + updates[`system.san.violence`] = [false, false, false] + rollData.resetMsg = "CTHULHUETERNAL.Label.sanViolenceReset" + } + if (rollData.sanType === "helplessness" && !this.biodata.adaptedToHelplessness) { + updates[`system.san.helplessness`] = [false, false, false] + rollData.resetMsg = "CTHULHUETERNAL.Label.sanHelplessnessReset" + } + template = "systems/fvtt-cthulhu-eternal/templates/chat-san-loss-0.hbs" + + } else if (rollData.sanType === "violence" ) { + // Set the first false element of the violence array to true + let violence = this.san.violence.slice() + let index = violence.findIndex(v => !v) + if (index !== -1) { + violence[index] = true + updates[`system.san.violence`] = violence + } + template = "systems/fvtt-cthulhu-eternal/templates/chat-san-loss-1-4.hbs" + // Check if all violence elements are true, if so, set adaptedToViolence to true + if (violence.every(v => v)) { + updates[`system.biodata.adaptedToViolence`] = true + updates[`system.san.violence`] = [false, false, false] + msgData.adaptedToViolence = true + } + } else if (rollData.sanType === "helplessness" ) { + // If sanType is "helplessness" and adapted to helplessness, set the first false element of the helplessness array to true + let helplessness = this.san.helplessness.slice() + let index = helplessness.findIndex(h => !h) + if (index !== -1) { + helplessness[index] = true + updates[`system.san.helplessness`] = helplessness + } + template = "systems/fvtt-cthulhu-eternal/templates/chat-san-loss-1-4.hbs" + // Check if all helplessness elements are true, if so, set adaptedToHelplessness to true + if (helplessness.every(h => h)) { + updates[`system.biodata.adaptedToHelplessness`] = true + updates[`system.san.helplessness`] = [false, false, false] + msgData.adaptedToHelplessness = true + } + } + + let content = await foundry.applications.handlebars.renderTemplate(template, msgData) + let msg = await ChatMessage.create({ + content: content, + speaker: ChatMessage.getSpeaker({ actor: this.parent }) + }) + msg.setFlag("fvtt-cthulhu-eternal", "rollData", msgData) + if (Object.keys(updates).length > 0) { + this.parent.update(updates) + } + + } + + async modifySAN(rollData) { + let updates = {} + let san = Math.max(Math.min(this.san.value + rollData.sanLoss, this.san.max), 0) + if (this.san.value !== san) { + updates[`system.san.value`] = san + const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-cthulhu-eternal/templates/chat-san-type-request.hbs", rollData) + let msg = await ChatMessage.create({ + content: content, + speaker: ChatMessage.getSpeaker({ actor: this.parent }) + }) + msg.setFlag("fvtt-cthulhu-eternal", "rollData", rollData) + } + if (Object.keys(updates).length > 0) { + this.parent.update(updates) + } + } + isStunned() { return this.hp.stunned } @@ -215,6 +328,7 @@ export default class CthulhuEternalProtagonist extends foundry.abstract.TypeData let bp = Math.max(this.san.value - this.characteristics.pow.value, 0) if (this.san.breakingPoint !== bp) { updates[`system.san.breakingPoint`] = bp + updates[`system.san.breakingPointReached`] = false // Reset breaking point reached } if (Object.keys(updates).length > 0) { this.parent.update(updates) diff --git a/module/utils.mjs b/module/utils.mjs index 444608e..5963bcf 100644 --- a/module/utils.mjs +++ b/module/utils.mjs @@ -180,6 +180,55 @@ export default class CthulhuEternalUtils { }); } + static async applySANType(rollMessage, event) { + let rollData = rollMessage.getFlag("fvtt-cthulhu-eternal", "rollData") + if (!rollData) { + ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.noRollDataFound")) + return + } + let actor = game.actors.get(rollData.actorId) + if (!actor) { + ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.noActorFound")) + return + } + let sanType = event.currentTarget.dataset.sanType; + if (!sanType) { + ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.noSanTypeFound")) + return + } + // If the sanType is "none", we don't apply any SAN processing + if (sanType === "none") { + ui.notifications.info(game.i18n.localize("CTHULHUETERNAL.Notifications.noSanLossApplied")) + return + } + rollData.sanType = sanType + await actor.system.applySANConsequences(rollData) + // Delete the roll message + await rollMessage.delete() + } + + static async applySANLoss(rollMessage, event) { + let rollData = rollMessage.getFlag("fvtt-cthulhu-eternal", "rollData") + if (!rollData) { + ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.noRollDataFound")) + return + } + let actor = game.actors.get(rollData.actorId) + if (!actor) { + ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.noActorFound")) + return + } + // Get the san loss from the event : data-san-value + let sanLoss = event.currentTarget.dataset.sanValue + let r = new Roll(sanLoss.toString()) + await r.evaluate() + rollData.sanLoss = -r.total + + await actor.system.modifySAN(rollData) + // Delete the roll message + await rollMessage.delete() + } + static async healingRoll(rollMessage) { let rollData = rollMessage.rolls[0]?.options?.rollData let healingFormula = rollData.rollItem.system.healingFormula diff --git a/packs-system/rituals/000132.log b/packs-system/rituals/000145.log similarity index 100% rename from packs-system/rituals/000132.log rename to packs-system/rituals/000145.log diff --git a/packs-system/rituals/CURRENT b/packs-system/rituals/CURRENT index d5731e9..f52d399 100644 --- a/packs-system/rituals/CURRENT +++ b/packs-system/rituals/CURRENT @@ -1 +1 @@ -MANIFEST-000131 +MANIFEST-000143 diff --git a/packs-system/rituals/LOG b/packs-system/rituals/LOG index 6dc438c..b082057 100644 --- a/packs-system/rituals/LOG +++ b/packs-system/rituals/LOG @@ -1,3 +1,7 @@ -2025/06/14-23:45:33.918294 7f78d8df86c0 Recovering log #129 -2025/06/14-23:45:34.040033 7f78d8df86c0 Delete type=3 #127 -2025/06/14-23:45:34.040084 7f78d8df86c0 Delete type=0 #129 +2025/06/15-20:50:32.407889 7f78d9dfa6c0 Recovering log #141 +2025/06/15-20:50:32.419111 7f78d9dfa6c0 Delete type=3 #139 +2025/06/15-20:50:32.419180 7f78d9dfa6c0 Delete type=0 #141 +2025/06/15-23:02:15.291797 7f78d37fe6c0 Level-0 table #146: started +2025/06/15-23:02:15.291843 7f78d37fe6c0 Level-0 table #146: 0 bytes OK +2025/06/15-23:02:15.346613 7f78d37fe6c0 Delete type=0 #144 +2025/06/15-23:02:15.442962 7f78d37fe6c0 Manual compaction at level-0 from '!items!4oyPRBWPBWAChrJP' @ 72057594037927935 : 1 .. '!items!zVFfp3o0G0Zg3Ia4' @ 0 : 0; will stop at (end) diff --git a/packs-system/rituals/LOG.old b/packs-system/rituals/LOG.old index 383bb1a..ac565fb 100644 --- a/packs-system/rituals/LOG.old +++ b/packs-system/rituals/LOG.old @@ -1,7 +1,7 @@ -2025/06/14-13:49:17.890351 7f78d8df86c0 Recovering log #125 -2025/06/14-13:49:17.899990 7f78d8df86c0 Delete type=3 #123 -2025/06/14-13:49:17.900040 7f78d8df86c0 Delete type=0 #125 -2025/06/14-16:21:28.823932 7f78d37fe6c0 Level-0 table #130: started -2025/06/14-16:21:28.823960 7f78d37fe6c0 Level-0 table #130: 0 bytes OK -2025/06/14-16:21:28.831212 7f78d37fe6c0 Delete type=0 #128 -2025/06/14-16:21:28.848927 7f78d37fe6c0 Manual compaction at level-0 from '!items!4oyPRBWPBWAChrJP' @ 72057594037927935 : 1 .. '!items!zVFfp3o0G0Zg3Ia4' @ 0 : 0; will stop at (end) +2025/06/15-20:45:20.732548 7f78d95f96c0 Recovering log #137 +2025/06/15-20:45:20.795953 7f78d95f96c0 Delete type=3 #135 +2025/06/15-20:45:20.796016 7f78d95f96c0 Delete type=0 #137 +2025/06/15-20:50:27.656562 7f78d37fe6c0 Level-0 table #142: started +2025/06/15-20:50:27.656587 7f78d37fe6c0 Level-0 table #142: 0 bytes OK +2025/06/15-20:50:27.663159 7f78d37fe6c0 Delete type=0 #140 +2025/06/15-20:50:27.663295 7f78d37fe6c0 Manual compaction at level-0 from '!items!4oyPRBWPBWAChrJP' @ 72057594037927935 : 1 .. '!items!zVFfp3o0G0Zg3Ia4' @ 0 : 0; will stop at (end) diff --git a/packs-system/rituals/MANIFEST-000131 b/packs-system/rituals/MANIFEST-000143 similarity index 73% rename from packs-system/rituals/MANIFEST-000131 rename to packs-system/rituals/MANIFEST-000143 index d76a4e8..e220dfd 100644 Binary files a/packs-system/rituals/MANIFEST-000131 and b/packs-system/rituals/MANIFEST-000143 differ diff --git a/packs-system/skills/000301.log b/packs-system/skills/000314.log similarity index 100% rename from packs-system/skills/000301.log rename to packs-system/skills/000314.log diff --git a/packs-system/skills/CURRENT b/packs-system/skills/CURRENT index 16abe4a..16e7795 100644 --- a/packs-system/skills/CURRENT +++ b/packs-system/skills/CURRENT @@ -1 +1 @@ -MANIFEST-000300 +MANIFEST-000312 diff --git a/packs-system/skills/LOG b/packs-system/skills/LOG index 3318fbd..251a5fb 100644 --- a/packs-system/skills/LOG +++ b/packs-system/skills/LOG @@ -1,3 +1,7 @@ -2025/06/14-23:45:33.811724 7f78d9dfa6c0 Recovering log #298 -2025/06/14-23:45:33.914052 7f78d9dfa6c0 Delete type=3 #296 -2025/06/14-23:45:33.914134 7f78d9dfa6c0 Delete type=0 #298 +2025/06/15-20:50:32.394511 7f78d95f96c0 Recovering log #310 +2025/06/15-20:50:32.404291 7f78d95f96c0 Delete type=3 #308 +2025/06/15-20:50:32.404388 7f78d95f96c0 Delete type=0 #310 +2025/06/15-23:02:15.346748 7f78d37fe6c0 Level-0 table #315: started +2025/06/15-23:02:15.346777 7f78d37fe6c0 Level-0 table #315: 0 bytes OK +2025/06/15-23:02:15.368088 7f78d37fe6c0 Delete type=0 #313 +2025/06/15-23:02:15.442974 7f78d37fe6c0 Manual compaction at level-0 from '!folders!5PrT9QmN1cFPzDFP' @ 72057594037927935 : 1 .. '!items!zvoUByzWSWZ87fxA' @ 0 : 0; will stop at (end) diff --git a/packs-system/skills/LOG.old b/packs-system/skills/LOG.old index a335865..a5970ff 100644 --- a/packs-system/skills/LOG.old +++ b/packs-system/skills/LOG.old @@ -1,7 +1,7 @@ -2025/06/14-13:49:17.875545 7f78d95f96c0 Recovering log #294 -2025/06/14-13:49:17.886122 7f78d95f96c0 Delete type=3 #292 -2025/06/14-13:49:17.886173 7f78d95f96c0 Delete type=0 #294 -2025/06/14-16:21:28.817422 7f78d37fe6c0 Level-0 table #299: started -2025/06/14-16:21:28.817477 7f78d37fe6c0 Level-0 table #299: 0 bytes OK -2025/06/14-16:21:28.823801 7f78d37fe6c0 Delete type=0 #297 -2025/06/14-16:21:28.848912 7f78d37fe6c0 Manual compaction at level-0 from '!folders!5PrT9QmN1cFPzDFP' @ 72057594037927935 : 1 .. '!items!zvoUByzWSWZ87fxA' @ 0 : 0; will stop at (end) +2025/06/15-20:45:20.673899 7f78d9dfa6c0 Recovering log #306 +2025/06/15-20:45:20.728664 7f78d9dfa6c0 Delete type=3 #304 +2025/06/15-20:45:20.728753 7f78d9dfa6c0 Delete type=0 #306 +2025/06/15-20:50:27.650512 7f78d37fe6c0 Level-0 table #311: started +2025/06/15-20:50:27.650541 7f78d37fe6c0 Level-0 table #311: 0 bytes OK +2025/06/15-20:50:27.656452 7f78d37fe6c0 Delete type=0 #309 +2025/06/15-20:50:27.663286 7f78d37fe6c0 Manual compaction at level-0 from '!folders!5PrT9QmN1cFPzDFP' @ 72057594037927935 : 1 .. '!items!zvoUByzWSWZ87fxA' @ 0 : 0; will stop at (end) diff --git a/packs-system/skills/MANIFEST-000300 b/packs-system/skills/MANIFEST-000312 similarity index 71% rename from packs-system/skills/MANIFEST-000300 rename to packs-system/skills/MANIFEST-000312 index 86c4df1..18c5df2 100644 Binary files a/packs-system/skills/MANIFEST-000300 and b/packs-system/skills/MANIFEST-000312 differ diff --git a/styles/global.less b/styles/global.less index 86d1e7f..c21a984 100644 --- a/styles/global.less +++ b/styles/global.less @@ -86,6 +86,7 @@ i.fvtt-cthulhu-eternal { background-size: 100% 100%; } +.chat-san-request, .chat-lethal-damage { ul { list-style-type: none; @@ -97,6 +98,23 @@ i.fvtt-cthulhu-eternal { color: var(--color-critical-failure); font-family: var(--font-title); } + .san-loose-buttons { + display: flex; + justify-content: center; + align-items: center; + margin: 10px 0; + button { + margin: 0 2px; + font-family: var(--font-primary); + font-size: calc(var(--font-size-standard) * 1.1); + border: none; + padding: 2px 2px; + cursor: pointer; + transition: background-color 0.3s; + min-width: 3.0rem; + max-width: 3.0rem; + } + } .result-non-lethal { color: var(--color-failure); font-family: var(--font-title); diff --git a/styles/protagonist.less b/styles/protagonist.less index 9d6bdaa..80a4243 100644 --- a/styles/protagonist.less +++ b/styles/protagonist.less @@ -123,6 +123,14 @@ min-width: 6rem; flex-grow: 1; } + .san-helplessness, + .san-violence { + display: flex; + flex-grow: 1; + } + .label-san-type { + margin-right: 0.5rem; + } .label-bp { flex-grow: 1; max-width: 3rem; diff --git a/templates/chat-san-loss-0.hbs b/templates/chat-san-loss-0.hbs new file mode 100644 index 0000000..2832b05 --- /dev/null +++ b/templates/chat-san-loss-0.hbs @@ -0,0 +1,11 @@ +