Melee attacks
This commit is contained in:
parent
9de7b72c02
commit
5d5af7328c
5 changed files with 57 additions and 3 deletions
|
|
@ -85,7 +85,10 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
|||
case 'skills':
|
||||
this.#handleSkillAction(actor, actionId)
|
||||
break
|
||||
}
|
||||
case 'melee':
|
||||
this.#handleMeleeAction(actor, actionId)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -136,6 +139,18 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
|||
doRoll({ actor, formula, targetmods, prefix, thing, chatthing, origtarget: target, optionalArgs: opt })
|
||||
}
|
||||
|
||||
async #handleMeleeAction(actor, actionId) {
|
||||
/* Melee attacks are done using the otf method. Grab the otf and pass it to the function. */
|
||||
let GURPS = globalThis.GURPS;
|
||||
|
||||
debugger;
|
||||
let otf = actionId;
|
||||
GURPS.executeOTF(otf, actor=actor);
|
||||
|
||||
|
||||
// doRoll({ actor, formula, targetmods, prefix, thing, chatthing, origtarget: target, optionalArgs: opt })
|
||||
}
|
||||
|
||||
async #handleSkillAction(actor, actionId) {
|
||||
/* Skills are done using the otf method. Grab the otf and pass it to the function. */
|
||||
let GURPS = globalThis.GURPS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue