Add a macro to perform generic checks

This commit is contained in:
Johannes Loher 2021-05-13 21:39:42 +02:00
parent 441e907b8a
commit 24725c15f9
9 changed files with 138 additions and 29 deletions

View file

@ -1,7 +1,9 @@
import { rollCheck } from "./roll-check";
import { rollGenericCheck } from "./roll-generic-check";
import { rollItem } from "./roll-item";
export const macros = {
rollCheck,
rollGenericCheck,
rollItem,
};

View file

@ -0,0 +1,13 @@
import notifications from "../ui/notifications";
import { getActiveActor } from "./helpers";
/**
* Executes the roll generic check macro.
*/
export async function rollGenericCheck(): Promise<void> {
const actor = getActiveActor();
if (!actor) {
return notifications.warn(game.i18n.localize("DS4.WarningMustControlActorToUseRollCheckMacro"));
}
return actor.rollGenericCheck();
}