mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
ActiveEffect values can now specify ORIGIN. to grab the value from the origin (#534)
This commit is contained in:
parent
ee5c3a9322
commit
5757db3f49
3 changed files with 42 additions and 23 deletions
|
|
@ -69,7 +69,6 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
|||
getTargetList() {
|
||||
const targets = this.system.hitTargets;
|
||||
return targets.map(target => game.canvas.tokens.documentCollection.find(t => t.actor.uuid === target.actorId));
|
||||
|
||||
}
|
||||
|
||||
async onDamage(event) {
|
||||
|
|
@ -77,7 +76,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
|||
const targets = this.getTargetList();
|
||||
|
||||
if (this.system.onSave) {
|
||||
const pendingingSaves = this.system.hitTargets.filter(t => t.saved.success === null);
|
||||
const pendingingSaves = this.system.hitTargets.filter(t => t.saved.success === null);
|
||||
if (pendingingSaves.length) {
|
||||
const confirm = await foundry.applications.api.DialogV2.confirm({
|
||||
window: { title: 'Pending Reaction Rolls found' },
|
||||
|
|
@ -112,6 +111,17 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
|||
}
|
||||
}
|
||||
|
||||
getAction(actor, itemId, actionId) {
|
||||
const item = actor.items.get(itemId),
|
||||
action =
|
||||
actor.system.attack?._id === actionId
|
||||
? actor.system.attack
|
||||
: item.system.attack?._id === actionId
|
||||
? item.system.attack
|
||||
: item?.system?.actions?.get(actionId);
|
||||
return action;
|
||||
}
|
||||
|
||||
async onApplyEffect(event) {
|
||||
event.stopPropagation();
|
||||
const actor = await foundry.utils.fromUuid(this.system.source.actor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue