Fix rituals not respecting learnedDamage
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<input class="item-sheet-short-input" name="system.learnedSanity.successLoss" type="text" value="{{item.system.learnedSanity.successLoss}}" type="text" />
|
||||
/
|
||||
<input class="item-sheet-short-input" name="system.learnedSanity.failedLoss" type="text" value="{{item.system.learnedSanity.failedLoss}}" type="text" />
|
||||
<i class="fas fa-dice rollable" data-rolltype="sanity-damage"></i>
|
||||
<i class="fas fa-dice rollable" data-rolltype="sanity-damage" data-san-on-learn></i>
|
||||
</span>
|
||||
|
||||
<span class="resource-label">{{localize 'DG.ItemWindow.Ritual.ActivationSanityDamage'}}:</span>
|
||||
|
||||
Reference in New Issue
Block a user