diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index e6de150..a6567bb 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -41,6 +41,7 @@ export class MothershipActorSheet extends ActorSheet { data.data.system.settings.useCalm = game.settings.get("mosh", "useCalm"); data.data.system.settings.hideWeight = game.settings.get("mosh", "hideWeight"); data.data.system.settings.firstEdition = game.settings.get("mosh", "firstEdition"); + data.data.system.settings.androidPanic = game.settings.get("mosh", "androidPanic"); //SKILL XP BUTTONS @@ -356,17 +357,58 @@ export class MothershipActorSheet extends ActorSheet { this.actor.reloadWeapon(li.dataset.itemId); }); - // Rollable Item/Anything with a description that we want to click on. + // Calm - Panic Check html.find('.calm-roll').click(ev => { - const attribute = this.actor.system.other.stress; - attribute.label = "Calm"; - this.actor.rollStress(attribute); + //check if 1e + if (game.settings.get("mosh", "firstEdition")) { + //check if android + android panic enabled + if (game.settings.get("mosh", "androidPanic") && this.actor.system.class.value.toLowerCase() === 'android') { + //call rollTable for: 1e Android Panic Check Using Calm + this.actor.rollTable(`GCtYeCCQVQJ5M6SE`,null,`high`,false,false,'system.other.calm.value','>'); + //this is not android + android panic enabled + } else { + //call rollTable for: 1e Regular Panic Check Using Calm + this.actor.rollTable(`MOYI6Ntj5OVFYk06`,null,`high`,false,false,'system.other.calm.value','>'); + } + //this is 0e + } else { + //check if android + android panic enabled + if (game.settings.get("mosh", "androidPanic") && this.actor.system.class.value.toLowerCase() === 'android') { + //call rollTable for: 0e Android Panic Check Using Calm + this.actor.rollTable(`VW6HQ29T7zClNIZ6`,null,`high`,false,false,'system.other.calm.value','>'); + //this is not android + android panic enabled + } else { + //call rollTable for: 0e Regular Panic Check Using Calm + this.actor.rollTable(`kqKpQAXyLTEEyz6Z`,null,`high`,false,false,'system.other.calm.value','>'); + } + } }); - // Rollable Item/Anything with a description that we want to click on. + // Stress - Panic Check html.find('.stress-roll').click(ev => { - //call rollTable for panic check - this.actor.rollTable(`ypcoikqHLhnc9tNs`,null,`high`,false,false,'system.other.stress.value','>'); + //check if 1e + if (game.settings.get("mosh", "firstEdition")) { + //check if android + android panic enabled + if (game.settings.get("mosh", "androidPanic") && this.actor.system.class.value.toLowerCase() === 'android') { + //call rollTable for: 1e Android Panic Check Using Stress + this.actor.rollTable(`aBnY19jlhPXzibCt`,null,`high`,false,false,'system.other.stress.value','>'); + //this is not android + android panic enabled + } else { + //call rollTable for: 1e Regular Panic Check Using Stress + this.actor.rollTable(`ypcoikqHLhnc9tNs`,null,`high`,false,false,'system.other.stress.value','>'); + } + //this is 0e + } else { + //check if android + android panic enabled + if (game.settings.get("mosh", "androidPanic") && this.actor.system.class.value.toLowerCase() === 'android') { + //call rollTable for: 0e Android Panic Check Using Stress-0e + this.actor.rollTable(`egJ11m2mJM3HBd6d`,null,`high`,false,false,'system.other.stress_0e.value','>'); + //this is not android + android panic enabled + } else { + //call rollTable for: 0e Regular Panic Check Using Stress-0e + this.actor.rollTable(`1vCm4ElRPotQXgNB`,null,`high`,false,false,'system.other.stress_0e.value','>'); + } + } }); // Drag events for macros. diff --git a/module/actor/creature-sheet.js b/module/actor/creature-sheet.js index 51b6d0b..30906cc 100644 --- a/module/actor/creature-sheet.js +++ b/module/actor/creature-sheet.js @@ -72,10 +72,11 @@ export class MothershipCreatureSheet extends ActorSheet { if (data.data.system.settings == null) { data.data.system.settings = {}; - } - data.data.system.settings.useCalm = game.settings.get("mosh", "useCalm"); - data.data.system.settings.hideWeight = game.settings.get("mosh", "hideWeight"); - data.data.system.settings.firstEdition = game.settings.get("mosh", "firstEdition"); + } + data.data.system.settings.useCalm = game.settings.get("mosh", "useCalm"); + data.data.system.settings.hideWeight = game.settings.get("mosh", "hideWeight"); + data.data.system.settings.firstEdition = game.settings.get("mosh", "firstEdition"); + data.data.system.settings.androidPanic = game.settings.get("mosh", "androidPanic"); return data.data; } diff --git a/module/actor/ship-sheet.js b/module/actor/ship-sheet.js index c80b645..a1b13ff 100644 --- a/module/actor/ship-sheet.js +++ b/module/actor/ship-sheet.js @@ -41,6 +41,7 @@ export class MothershipShipSheet extends ActorSheet { superData.settings.useCalm = game.settings.get("mosh", "useCalm"); superData.settings.hideWeight = game.settings.get("mosh", "hideWeight"); superData.settings.firstEdition = game.settings.get("mosh", "firstEdition"); + superData.settings.androidPanic = game.settings.get("mosh", "androidPanic"); let maxHull = superData.supplies.hull.max; diff --git a/module/item/item-sheet.js b/module/item/item-sheet.js index b057051..e6b7024 100644 --- a/module/item/item-sheet.js +++ b/module/item/item-sheet.js @@ -39,6 +39,14 @@ export class MothershipItemSheet extends ItemSheet { } } + if (data.data.system.settings == null) { + data.data.system.settings = {}; + } + data.data.system.settings.useCalm = game.settings.get("mosh", "useCalm"); + data.data.system.settings.hideWeight = game.settings.get("mosh", "hideWeight"); + data.data.system.settings.firstEdition = game.settings.get("mosh", "firstEdition"); + data.data.system.settings.androidPanic = game.settings.get("mosh", "androidPanic"); + return data.data; } diff --git a/template.json b/template.json index 5b47740..17fbd64 100644 --- a/template.json +++ b/template.json @@ -134,8 +134,8 @@ "label" : "Stress" }, "stress_0e": { - "value": 0, - "min": 0, + "value": 2, + "min": 2, "max": 999, "label" : "Stress" }, diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html index 5d2e9d6..82b7d0f 100644 --- a/templates/actor/actor-sheet.html +++ b/templates/actor/actor-sheet.html @@ -333,7 +333,7 @@
+
-
+
{{system.stats.armor.mod}}
{{/unless}}