mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
First PR
This commit is contained in:
parent
7178148c80
commit
fad34ae975
26 changed files with 688 additions and 371 deletions
|
|
@ -120,23 +120,23 @@ export default class DhpItem extends Item {
|
|||
}
|
||||
|
||||
async use(event) {
|
||||
const actions = this.system.actions;
|
||||
const actions = this.system.actions
|
||||
let response;
|
||||
if(actions?.length) {
|
||||
let action = actions[0];
|
||||
if(actions.length > 1 && !event?.shiftKey) {
|
||||
// Actions Choice Dialog
|
||||
action = await this.selectActionDialog();
|
||||
}
|
||||
if(!action) return;
|
||||
if(action) response = action.use(event);
|
||||
// Check Target
|
||||
// If action.roll => Roll Dialog
|
||||
// Else If action.cost => Cost Dialog
|
||||
// Then
|
||||
// Apply Cost
|
||||
// Apply Effect
|
||||
|
||||
return action.use(event);
|
||||
}
|
||||
// Display Item Card in chat
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue