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.
|
* Override getRollData() that's supplied to rolls.
|
||||||
*/
|
*/
|
||||||
getRollData() {
|
getRollDataPC() {
|
||||||
let data = { ...this.system };
|
let data = { ...this.system };
|
||||||
|
|
||||||
// Wand bonuses
|
// Wand bonuses
|
||||||
@ -18,6 +18,12 @@ export class KidsOnBroomsActor extends Actor {
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getRollDataNPC() {
|
||||||
|
let data = { ...this.system};
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
_getWandBonus(type) {
|
_getWandBonus(type) {
|
||||||
const bonuses = {
|
const bonuses = {
|
||||||
|
@ -40,8 +40,6 @@ async getData()
|
|||||||
|
|
||||||
// Add roll data for TinyMCE editors.
|
// Add roll data for TinyMCE editors.
|
||||||
context.rollData = context.actor.getRollData();
|
context.rollData = context.actor.getRollData();
|
||||||
// Add roll data for TinyMCE editors.
|
|
||||||
context.rollData = context.actor.getRollData();
|
|
||||||
|
|
||||||
|
|
||||||
console.log(context);
|
console.log(context);
|
||||||
@ -87,7 +85,16 @@ async getData()
|
|||||||
if (dataset.roll) {
|
if (dataset.roll) {
|
||||||
let label = dataset.label ? `${dataset.label}` : '';
|
let label = dataset.label ? `${dataset.label}` : '';
|
||||||
// Get the roll data and include wand bonuses
|
// 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;
|
let totalBonus = 0;
|
||||||
console.log(dataset.roll);
|
console.log(dataset.roll);
|
||||||
// Apply wood bonus if it matches the stat being rolled for
|
// Apply wood bonus if it matches the stat being rolled for
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kidsonbrooms",
|
"name": "kidsonbrooms",
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"description": "CSS compiler for the Kids On Brooms system",
|
"description": "CSS compiler for the Kids On Brooms system",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp build",
|
"build": "gulp build",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"id": "kidsonbrooms",
|
"id": "kidsonbrooms",
|
||||||
"title": "Kids on Brooms System",
|
"title": "Kids on Brooms System",
|
||||||
"description": "The Kids on Brooms system for FoundryVTT!",
|
"description": "The Kids on Brooms system for FoundryVTT!",
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": 12,
|
"minimum": 12,
|
||||||
"verified": 12.331
|
"verified": 12.331
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<!-- Magic rolling and input -->
|
<!-- Magic rolling and input -->
|
||||||
<Fieldset class="flexrow flex-group-center">
|
<Fieldset class="flexrow flex-group-center">
|
||||||
<legend>Magic</legend>
|
<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>
|
<i class="fas fa-dice-d20"></i>
|
||||||
</span>
|
</span>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
|
Reference in New Issue
Block a user