subtract ap when casting spell

Changes:
 + subtract AP when casting a spell
This commit is contained in:
2023-11-26 13:13:13 +01:00
parent 7bf0fd90b0
commit db21ca93b0
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -215,6 +215,12 @@ export class M5Item extends Item {
}
});
if (item.type === "spell" || item.type === "kampfkunst") {
if (this.actor["system"].ap.value >= item.system.ap) {
this.actor["system"].ap.value -= item.system.ap;
}
}
const roll = new M5Roll(rollData, this.actor, item.name);
return roll.toMessage();
} else {