Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f8a66c78a | ||
|
|
4af976cac7 | ||
|
|
efa4ac6457 | ||
|
|
c1a962e3b8 | ||
|
|
2eac4210e6 | ||
|
|
beb4322917 | ||
|
|
d18c52ac54 | ||
|
|
21d17ba037 | ||
|
|
917bd6456d | ||
|
|
943e2c5185 | ||
|
|
c112950a3e | ||
|
|
0ad5baa341 | ||
|
|
b9b014d59f | ||
|
|
a514ad4367 | ||
|
|
1ec482a98f | ||
|
|
cc49017b3f | ||
|
|
e928c253eb | ||
|
|
f81fcb6111 | ||
|
|
de8b7ec38a | ||
|
|
36a506b338 | ||
|
|
2294addb8a | ||
|
|
6fe30953cc | ||
|
|
90f4d79e48 | ||
|
|
aff0d5ffbe |
@@ -7,7 +7,7 @@ export class KidsOnBroomsActor extends Actor {
|
||||
/**
|
||||
* Override getRollData() that's supplied to rolls.
|
||||
*/
|
||||
getRollData() {
|
||||
getRollDataPC() {
|
||||
let data = { ...this.system };
|
||||
|
||||
// Wand bonuses
|
||||
@@ -18,6 +18,12 @@ export class KidsOnBroomsActor extends Actor {
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
getRollDataNPC() {
|
||||
let data = { ...this.system};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
_getWandBonus(type) {
|
||||
const bonuses = {
|
||||
|
||||
@@ -40,8 +40,6 @@ async getData()
|
||||
|
||||
// Add roll data for TinyMCE editors.
|
||||
context.rollData = context.actor.getRollData();
|
||||
// Add roll data for TinyMCE editors.
|
||||
context.rollData = context.actor.getRollData();
|
||||
|
||||
|
||||
console.log(context);
|
||||
@@ -87,7 +85,16 @@ async getData()
|
||||
if (dataset.roll) {
|
||||
let label = dataset.label ? `${dataset.label}` : '';
|
||||
// Get the roll data and include wand bonuses
|
||||
let rollData = this.actor.getRollData();
|
||||
|
||||
let rollData;
|
||||
if(this.actor.type == "character") {
|
||||
rollData = this.actor.getRollDataPC();
|
||||
} else if (this.actor.type == "npc") {
|
||||
rollData = this.actor.getRollDataNPC();
|
||||
} else {
|
||||
console.log("ERROR: UNKNOWN AUTHOR TYPE");
|
||||
return;
|
||||
}
|
||||
let totalBonus = 0;
|
||||
console.log(dataset.roll);
|
||||
// Apply wood bonus if it matches the stat being rolled for
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kidsonbrooms",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1.5",
|
||||
"description": "CSS compiler for the Kids On Brooms system",
|
||||
"scripts": {
|
||||
"build": "gulp build",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"id": "kidsonbrooms",
|
||||
"title": "Kids on Brooms System",
|
||||
"description": "The Kids on Brooms system for FoundryVTT!",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1.5",
|
||||
"compatibility": {
|
||||
"minimum": 12,
|
||||
"verified": 12.331
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<!-- Magic rolling and input -->
|
||||
<Fieldset class="flexrow flex-group-center">
|
||||
<legend>Magic</legend>
|
||||
<span class="ability-mod rollable" data-roll="1{{stat.value}}x+1d4+{{stat.stat}}" data-label="Magic Roll for {{key}}" data-key="{{key}}">
|
||||
<span class="ability-mod rollable" data-roll="1{{stat.value}}x+1d4x+{{stat.stat}}" data-label="Magic Roll for {{key}}" data-key="{{key}}">
|
||||
<i class="fas fa-dice-d20"></i>
|
||||
</span>
|
||||
</Fieldset>
|
||||
|
||||
Reference in New Issue
Block a user