mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Player query for Roll All Save
This commit is contained in:
parent
36959156d0
commit
9674b90967
7 changed files with 21 additions and 131 deletions
|
|
@ -311,18 +311,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
type: 'reaction'
|
||||
},
|
||||
data: actor.getRollData()
|
||||
})
|
||||
/* .then(async result => {
|
||||
if (result) {
|
||||
const updateMsg = this.updateChatMessage.bind(this, message, target.id, {
|
||||
result: result.roll.total,
|
||||
success: result.roll.success
|
||||
});
|
||||
if (game.modules.get('dice-so-nice')?.active)
|
||||
game.dice3d.waitFor3DAnimationByMessageID(result.message.id).then(()=> updateMsg());
|
||||
else updateMsg();
|
||||
}
|
||||
}) */;
|
||||
});
|
||||
}
|
||||
|
||||
updateSaveMessage(result, message, targetId) {
|
||||
|
|
@ -334,6 +323,15 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
game.dice3d.waitFor3DAnimationByMessageID(result.message.id).then(()=> updateMsg());
|
||||
else updateMsg();
|
||||
}
|
||||
|
||||
static rollSaveQuery({ actionId, actorId, event, message }) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const actor = await fromUuid(actorId),
|
||||
action = await fromUuid(actionId);
|
||||
if (!actor || !actor?.isOwner) reject();
|
||||
action.rollSave(actor, event, message).then(result => resolve(result));
|
||||
});
|
||||
}
|
||||
/* SAVE */
|
||||
|
||||
async updateChatMessage(message, targetId, changes, chain = true) {
|
||||
|
|
|
|||
|
|
@ -5,12 +5,14 @@ const resistanceField = (resistanceLabel, immunityLabel, reductionLabel) =>
|
|||
resistance: new foundry.data.fields.BooleanField({
|
||||
initial: false,
|
||||
label: `${resistanceLabel}.label`,
|
||||
hint: `${resistanceLabel}.hint`
|
||||
hint: `${resistanceLabel}.hint`,
|
||||
isAttributeChoice: true
|
||||
}),
|
||||
immunity: new foundry.data.fields.BooleanField({
|
||||
initial: false,
|
||||
label: `${immunityLabel}.label`,
|
||||
hint: `${immunityLabel}.hint`
|
||||
hint: `${immunityLabel}.hint`,
|
||||
isAttributeChoice: true
|
||||
}),
|
||||
reduction: new foundry.data.fields.NumberField({
|
||||
integer: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue