BOL : Fix damage error, rework roll dialog and new damage targetting

This commit is contained in:
2026-03-16 20:16:58 +01:00
parent 7adc1b3f07
commit a549262d25
121 changed files with 538 additions and 408 deletions

View File

@@ -747,6 +747,12 @@ export class BoLDefaultRoll {
/* -------------------------------------------- */
async sendDamageMessage() {
let actor = BoLUtility.getActorFromRollData(this.rollData)
// If no target, collect potential targets from active scene (excluding attacker)
if (!this.rollData.targetId && game.scenes.current) {
this.rollData.potentialTargets = game.scenes.current.tokens
.filter(t => t.actor && t.actor.id !== this.rollData.actorId)
.map(t => ({ id: t.id, actorId: t.actor.id, name: t.name, img: t.texture?.src || t.actor.img }))
}
this._buildDamageChatMessage(this.rollData).then(async msgFlavor => {
let msg = await this.rollData.damageRoll.toMessage({
user: game.user.id,