Handle skills/spells in containers
This commit is contained in:
parent
fd29caa7f6
commit
e66a425e22
4 changed files with 127 additions and 62 deletions
|
|
@ -130,7 +130,6 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
|||
|
||||
if ( actionId == "WILL" ) actionId = "Will";
|
||||
if ( actionId == "PER" ) actionId = "Per";
|
||||
// debugger;
|
||||
let formula = '3d6';
|
||||
let targetmods = null;
|
||||
let prefix = "Rolls vs" // should be i18n of 'GURPS.rollVs'
|
||||
|
|
@ -148,8 +147,6 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
|||
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);
|
||||
}
|
||||
|
|
@ -157,39 +154,22 @@ Hooks.once('tokenActionHudCoreApiReady', async (coreModule) => {
|
|||
async #handleRangedAction(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;
|
||||
// actor, formula, targetmods, prefix = '', thing = '', chatthing = '', origtarget = -1, optionalArgs = {},
|
||||
|
||||
// executeOTF(inputstring, priv = false, event = null, actor = null) {
|
||||
|
||||
// debugger;
|
||||
let otf = actionId;
|
||||
GURPS.executeOTF(otf, actor=actor);
|
||||
|
||||
|
||||
// doRoll({ actor, formula, targetmods, prefix, thing, chatthing, origtarget: target, optionalArgs: opt })
|
||||
}
|
||||
|
||||
async #handleSpellAction(actor, actionId) {
|
||||
/* Spells 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);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue