HERO6 - First import

This commit is contained in:
2022-12-15 22:12:28 +01:00
parent ecef402160
commit 2f48669c85
5 changed files with 57 additions and 48 deletions

View File

@ -10,11 +10,11 @@ const __saveFirstToKey = { r: "reflex", f: "fortitude", w: "willpower"}
export class Hero6Commands {
static init() {
if (!game.system.Hero6.commands) {
const Hero6Commands = new Hero6Commands();
Hero6Commands.registerCommand({ path: ["/rtarget"], func: (content, msg, params) => Hero6Commands.rollTarget(msg, params), descr: "Launch the target roll window" });
Hero6Commands.registerCommand({ path: ["/rsave"], func: (content, msg, params) => Hero6Commands.rollSave(msg, params), descr: "Performs a save roll" });
game.system.Hero6.commands = Hero6Commands;
if (!game.system.hero6.commands) {
const hero6Commands = new Hero6Commands();
hero6Commands.registerCommand({ path: ["/rtarget"], func: (content, msg, params) => Hero6Commands.rollTarget(msg, params), descr: "Launch the target roll window" });
hero6Commands.registerCommand({ path: ["/rsave"], func: (content, msg, params) => Hero6Commands.rollSave(msg, params), descr: "Performs a save roll" });
game.system.hero6.commands = hero6Commands;
}
}

View File

@ -59,10 +59,8 @@ export class Hero6ItemSheet extends ItemSheet {
name: this.object.name,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
weaponSkills: Hero6Utility.getWeaponSkills(),
shieldSkills: Hero6Utility.getShieldSkills(),
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
config: game.system.Hero6.config,
config: game.system.hero6.config,
system: objectData,
limited: this.object.limited,
options: this.options,
@ -70,6 +68,13 @@ export class Hero6ItemSheet extends ItemSheet {
isGM: game.user.isGM
}
// Specific skill processing
if( this.object.type == "skill") {
if (objectData.characteristic != "manual") {
//objectData.system.base = 9
}
}
this.options.editable = !(this.object.origin == "embeddedItem");
console.log("ITEM DATA", formData, this);
return formData;

View File

@ -28,7 +28,7 @@ Hooks.once("init", async function () {
console.log(`Initializing Hero6 RPG`);
game.system.Hero6 = {
game.system.hero6 = {
Hero6Commands,
config: Hero6_CONFIG
}
@ -109,7 +109,7 @@ Hooks.on("chatMessage", (html, content, msg) => {
if (content[0] == '/') {
let regExp = /(\S+)/g;
let commands = content.match(regExp);
if (game.system.cruciblerpg.commands.processChatCommand(commands, content, msg)) {
if (game.system.hero6.commands.processChatCommand(commands, content, msg)) {
return false;
}
}