Skip to content

Commit

Permalink
weapon accuracy formula
Browse files Browse the repository at this point in the history
  • Loading branch information
Aliharu committed Jan 24, 2025
1 parent ff6661c commit 30a24c0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion module/apps/dice-roller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2521,6 +2521,12 @@ export default class RollForm extends HandlebarsApplicationMixin(ApplicationV2)
if (formula?.toLowerCase() === 'craftobjectives') {
return this.object.objectivesCompleted || 0;
}
if (formula?.toLowerCase() === 'weaponaccuracy') {
if(this.actor.type === 'npc') {
return 0;
}
return this.object.weaponAccuracy || 0;
}
if (formula?.toLowerCase() === 'itemadded' && item) {
return item.timesAdded || 0;
}
Expand Down Expand Up @@ -6640,7 +6646,7 @@ export default class RollForm extends HandlebarsApplicationMixin(ApplicationV2)
if (moteResults.feverGain) {
actorData.system.fever.value += moteResults.feverGain;
}

actorData.system.anima.value = newValue;
actorData.system.penumbra.value = Math.max(0, actorData.system.penumbra.value - this.object.cost.penumbra);
actorData.system.willpower.value = Math.max(0, actorData.system.willpower.value - this.object.cost.willpower);
Expand Down
4 changes: 2 additions & 2 deletions system.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Unofficial Exalted third edition system module for FoundryVTT! Portions of the materials are the copyrights and trademarks of Paradox Interactive AB, and are used with permission. All rights reserved. For more information please visit worldofdarkness.com.",
"url": "https://github.com/Aliharu/Foundry-Ex3",
"license": "LICENSE.txt",
"version": "3.5.6",
"version": "3.5.7",
"compatibility": {
"minimum": "12",
"verified": "12",
Expand Down Expand Up @@ -50,7 +50,7 @@
],
"relationships": [],
"manifest": "https://raw.githubusercontent.com/Aliharu/Foundry-Ex3/master/system.json",
"download": "https://github.com/Aliharu/Foundry-Ex3/releases/download/v3.5.6/release3.5.6.zip",
"download": "https://github.com/Aliharu/Foundry-Ex3/releases/download/v3.5.7/release3.5.7.zip",
"bugs": "https://github.com/Aliharu/Foundry-Ex3/issues",
"gridDistance": 5,
"gridUnits": "ft",
Expand Down

0 comments on commit 30a24c0

Please sign in to comment.