0.1.7 - Foundry 0.9 Compatibility
This commit is contained in:
@@ -179,7 +179,6 @@ export class MothershipActorSheet extends ActorSheet {
|
||||
const attribute = this.actor.data.data.stats[statName];
|
||||
var shifted = false;
|
||||
if (ev.shiftKey) shifted = true;
|
||||
|
||||
this.actor.rollStat(attribute, shifted);
|
||||
});
|
||||
|
||||
|
||||
+5
-11
@@ -147,6 +147,7 @@ export class MothershipActor extends Actor {
|
||||
}
|
||||
|
||||
rollWeapon(itemId, options = { event: null }) {
|
||||
|
||||
let item = duplicate(this.getEmbeddedDocument("Item",itemId));
|
||||
|
||||
console.log(item);
|
||||
@@ -333,22 +334,17 @@ export class MothershipActor extends Actor {
|
||||
// Roll
|
||||
let diceformular = (isStress ? "2d10" : "1d100");
|
||||
|
||||
|
||||
console.log(attribute);
|
||||
|
||||
// if (advantage != undefined && advantage != NaN && advantage != 0) {
|
||||
// diceformular = diceformular + "+" + advantage + "d6kh";
|
||||
// }
|
||||
let r = new Roll(diceformular, {});
|
||||
r.roll();
|
||||
|
||||
console.log(r);
|
||||
r.evaluate({async: false});
|
||||
|
||||
let rSplit = ("" + r._total).split("");
|
||||
|
||||
//Advantage roll
|
||||
let a = new Roll(diceformular, {});
|
||||
a.roll();
|
||||
a.evaluate({async: false});
|
||||
|
||||
if (r._total == 100) {
|
||||
r.results[0] = 0;
|
||||
@@ -363,7 +359,7 @@ export class MothershipActor extends Actor {
|
||||
let damageRoll = 0;
|
||||
if (item.type == "weapon") {
|
||||
damageRoll = new Roll(item.data.damage);
|
||||
damageRoll.roll();
|
||||
damageRoll.evaluate({async: false});
|
||||
console.log(damageRoll);
|
||||
}
|
||||
|
||||
@@ -395,8 +391,6 @@ export class MothershipActor extends Actor {
|
||||
resultText = (r._total < targetValue ? "Success" : "Failure");
|
||||
}
|
||||
|
||||
console.log(attribute.value + attribute.mod);
|
||||
|
||||
var templateData = {
|
||||
actor: this,
|
||||
stat: {
|
||||
@@ -538,7 +532,7 @@ export class MothershipActor extends Actor {
|
||||
|
||||
if(item.data.roll){
|
||||
let r = new Roll(item.data.roll, {});
|
||||
r.roll();
|
||||
r.evaluate({async: false});
|
||||
|
||||
rollInsert = '\
|
||||
<div class="rollh2" style="text-transform: lowercase;">'+item.data.roll+'</div>\
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@ Hooks.once('init', async function () {
|
||||
};
|
||||
|
||||
// Define custom Entity classes
|
||||
CONFIG.Actor.entityClass = MothershipActor;
|
||||
CONFIG.Item.entityClass = MothershipItem;
|
||||
CONFIG.Actor.documentClass = MothershipActor;
|
||||
CONFIG.Item.documentClass = MothershipItem;
|
||||
|
||||
|
||||
// Register sheet application classes
|
||||
|
||||
+39
-5
@@ -1,13 +1,35 @@
|
||||
export const registerSettings = function () {
|
||||
game.settings.register('mosh', 'useCalm', {
|
||||
name: "Use Calm?",
|
||||
hint: "Uses the traaa.sh Calm system instead of Stress.",
|
||||
default: false,
|
||||
game.settings.register('mosh', 'newArmor', {
|
||||
name: "1e Armor System",
|
||||
hint: "[COMING SOON] Use the 1st edition Armor system.",
|
||||
default: true,
|
||||
scope: 'world',
|
||||
type: Boolean,
|
||||
config: true,
|
||||
onChange: value => { // A callback function which triggers when the setting is changed
|
||||
console.log("useCalm set to " + value)
|
||||
console.log("newArmorandCombat set to " + value)
|
||||
}
|
||||
});
|
||||
game.settings.register('mosh', 'newStress', {
|
||||
name: "1e Stress System",
|
||||
hint: "[COMING SOON] Use the 1st edition stress system with the roll under d20 and stress table.",
|
||||
default: true,
|
||||
scope: 'world',
|
||||
type: Boolean,
|
||||
config: true,
|
||||
onChange: value => { // A callback function which triggers when the setting is changed
|
||||
console.log("newStress set to " + value)
|
||||
}
|
||||
});
|
||||
game.settings.register('mosh', 'newWounds', {
|
||||
name: "1e Wound System",
|
||||
hint: "[COMING SOON] Instead of the 0e health system, use the 1e wounds and health system.",
|
||||
default: true,
|
||||
scope: 'world',
|
||||
type: Boolean,
|
||||
config: true,
|
||||
onChange: value => { // A callback function which triggers when the setting is changed
|
||||
console.log("newWounds set to " + value)
|
||||
}
|
||||
});
|
||||
game.settings.register('mosh', 'hideWeight', {
|
||||
@@ -21,4 +43,16 @@ export const registerSettings = function () {
|
||||
console.log("hideWeight set to " + value)
|
||||
}
|
||||
});
|
||||
game.settings.register('mosh', 'useCalm', {
|
||||
name: "Use Calm?",
|
||||
hint: "Uses the traaa.sh Calm system instead of Stress.",
|
||||
default: false,
|
||||
scope: 'world',
|
||||
type: Boolean,
|
||||
config: true,
|
||||
onChange: value => { // A callback function which triggers when the setting is changed
|
||||
console.log("useCalm set to " + value)
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
"name": "mosh",
|
||||
"title": "MoSh - Unofficial Mothership",
|
||||
"description": "The unofficial Mothership system for FoundryVTT.",
|
||||
"version": "0.1.6",
|
||||
"version": "0.1.7",
|
||||
"minimumCoreVersion": "0.8.6",
|
||||
"compatibleCoreVersion": "0.8.9",
|
||||
"compatibleCoreVersion": "0.9.0",
|
||||
"templateVersion": 2,
|
||||
"author": "Futilrevenge",
|
||||
"esmodules": ["module/mosh.js"],
|
||||
|
||||
Reference in New Issue
Block a user