Auto-jump to monster token when activated

This commit is contained in:
2025-04-22 16:28:10 +02:00
parent a2364e1252
commit ccebf8dc1f
21 changed files with 73 additions and 48 deletions

View File

@ -257,6 +257,11 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
let message = game.i18n.format("LETHALFANTASY.Notifications.messageProgressionOKMonster", { isMonster: true, name: this.parent.name, weapon: attack.name, roll: roll.total })
ChatMessage.create({ content: message, speaker: ChatMessage.getSpeaker({ actor: this.parent }) })
this.prepareMonsterRoll("monster-attack", key)
let token = combatant?.token
if ( token?.object ) {
token.object?.control({releaseOthers: true});
return canvas.animatePan(token.object.center);
}
}
}
if (!hasAttack) {