subtract ap when casting spell
Changes: + subtract AP when casting a spell
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user