Feature/635 allow weapon direct damage (#657)

* #635 & #637

* #653
This commit is contained in:
Dapoulp 2025-08-06 20:28:53 +02:00 committed by GitHub
parent cf571aa2a5
commit bcedc74bf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 57 additions and 156 deletions

View file

@ -194,8 +194,11 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
event.stopPropagation();
const item = await foundry.utils.fromUuid(message.system.origin);
const action = item.system.actions.get(event.currentTarget.id);
await item.use(action);
const action = item.system.attack?.id === event.currentTarget.id ? item.system.attack : item.system.actions.get(event.currentTarget.id);
if(event.currentTarget.dataset.directDamage)
action.use(event, { byPassRoll: true })
else
action.use(event);
}
async actionUseButton(event, message) {