parent
6978a4df86
commit
83014281a5
|
|
@ -341,6 +341,8 @@ export class M5Item extends Item {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const roll = new M5Roll(rollData, this.actor, item.name, item.id);
|
||||||
|
if (await roll.toMessage(toggleAutomatedRoll)) {
|
||||||
if (item.type === "spell" || item.type === "kampfkunst") {
|
if (item.type === "spell" || item.type === "kampfkunst") {
|
||||||
if (this.actor["system"].ap.value >= item.system.ap) {
|
if (this.actor["system"].ap.value >= item.system.ap) {
|
||||||
this.actor["update"]({
|
this.actor["update"]({
|
||||||
|
|
@ -352,9 +354,7 @@ export class M5Item extends Item {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
const roll = new M5Roll(rollData, this.actor, item.name, item.id);
|
|
||||||
return roll.toMessage(toggleAutomatedRoll);
|
|
||||||
} else {
|
} else {
|
||||||
ChatMessage.create({
|
ChatMessage.create({
|
||||||
speaker: speaker,
|
speaker: speaker,
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,6 @@ export class M5Roll {
|
||||||
if (!this._evaluated) await this.evaluate();
|
if (!this._evaluated) await this.evaluate();
|
||||||
const faces = this.pool.dice.map((x) => x.faces);
|
const faces = this.pool.dice.map((x) => x.faces);
|
||||||
|
|
||||||
|
|
||||||
const chatData = {
|
const chatData = {
|
||||||
type: CONST.CHAT_MESSAGE_TYPES.ROLL,
|
type: CONST.CHAT_MESSAGE_TYPES.ROLL,
|
||||||
content: await this.render(),
|
content: await this.render(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue