diff --git a/CHANGELOG.md b/CHANGELOG.md index 2df8c8c..2a7e0d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ### **Bug Fixes:** +- [#382](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/382) - Fix rituals not respecting damage from learning. - [#355](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/355) - Save the physical description of an agent. - [#359](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/359) - Save the profession of an NPC. - [#363](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/363) - First Aid misspelled in stat-parser-macro.js diff --git a/module/item/item-sheet.js b/module/item/item-sheet.js index 5313fbf..dd2d011 100644 --- a/module/item/item-sheet.js +++ b/module/item/item-sheet.js @@ -146,7 +146,12 @@ export default class DeltaGreenItemSheet extends foundry.appv1.sheets break; } case "sanity-damage": { - const { successLoss, failedLoss } = this.item.system.sanity; + // Applies only to rituals, as far as Jalen can tell. Tomes have "study damage", but it just uses `sanity`. + const isLearntDamage = element.hasAttribute("data-san-on-learn"); + + const { successLoss, failedLoss } = isLearntDamage + ? this.item.system.learnedSanity + : this.item.system.sanity; const combinedFormula = `{${successLoss}, ${failedLoss}}`; roll = new DGSanityDamageRoll(combinedFormula, {}, rollOptions); diff --git a/templates/item/item-ritual-sheet.html b/templates/item/item-ritual-sheet.html index 4084abe..50f49cc 100644 --- a/templates/item/item-ritual-sheet.html +++ b/templates/item/item-ritual-sheet.html @@ -88,7 +88,7 @@ / - + {{localize 'DG.ItemWindow.Ritual.ActivationSanityDamage'}}: