mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
fix (#1143)
This commit is contained in:
parent
3f08741a34
commit
0bd423ef52
2 changed files with 10 additions and 5 deletions
|
|
@ -55,9 +55,14 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
get action() {
|
get action() {
|
||||||
const actionItem = this.actionItem;
|
const actionActor = this.actionActor,
|
||||||
if (!actionItem || !this.source.action) return null;
|
actionItem = this.actionItem;
|
||||||
return actionItem.system.actionsList?.find(a => a.id === this.source.action);
|
if (!this.source.action) return null;
|
||||||
|
if(actionItem)
|
||||||
|
return actionItem.system.actionsList?.find(a => a.id === this.source.action);
|
||||||
|
else if(actionActor?.system.attack?._id === this.source.action)
|
||||||
|
return actionActor.system.attack
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
get targetMode() {
|
get targetMode() {
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,8 @@ export default class DamageField extends fields.SchemaField {
|
||||||
damageConfig.source.message = config.message?._id ?? messageId;
|
damageConfig.source.message = config.message?._id ?? messageId;
|
||||||
damageConfig.directDamage = !!damageConfig.source?.message;
|
damageConfig.directDamage = !!damageConfig.source?.message;
|
||||||
|
|
||||||
if(damageConfig.source?.message && game.modules.get('dice-so-nice')?.active)
|
// if(damageConfig.source?.message && game.modules.get('dice-so-nice')?.active)
|
||||||
await game.dice3d.waitFor3DAnimationByMessageID(damageConfig.source.message);
|
// await game.dice3d.waitFor3DAnimationByMessageID(damageConfig.source.message);
|
||||||
|
|
||||||
const damageResult = await CONFIG.Dice.daggerheart.DamageRoll.build(damageConfig);
|
const damageResult = await CONFIG.Dice.daggerheart.DamageRoll.build(damageConfig);
|
||||||
if(!damageResult) return false;
|
if(!damageResult) return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue