Fix AP Abzug bei Zauber
und ein bisschen linter
This commit is contained in:
@@ -341,20 +341,20 @@ export class M5Item extends Item {
|
||||
}
|
||||
});
|
||||
|
||||
if (item.type === "spell" || item.type === "kampfkunst") {
|
||||
if (this.actor["system"].ap.value >= item.system.ap) {
|
||||
this.actor["update"]({
|
||||
data: {
|
||||
ap: {
|
||||
value: this.actor["system"].ap.value - item.system.ap,
|
||||
const roll = new M5Roll(rollData, this.actor, item.name, item.id);
|
||||
if (await roll.toMessage(toggleAutomatedRoll)) {
|
||||
if (item.type === "spell" || item.type === "kampfkunst") {
|
||||
if (this.actor["system"].ap.value >= item.system.ap) {
|
||||
this.actor["update"]({
|
||||
data: {
|
||||
ap: {
|
||||
value: this.actor["system"].ap.value - item.system.ap,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const roll = new M5Roll(rollData, this.actor, item.name, item.id);
|
||||
return roll.toMessage(toggleAutomatedRoll);
|
||||
} else {
|
||||
ChatMessage.create({
|
||||
speaker: speaker,
|
||||
|
||||
Reference in New Issue
Block a user