diff --git a/scripts/document/actor.js b/scripts/document/actor.js index f755707..62041fa 100644 --- a/scripts/document/actor.js +++ b/scripts/document/actor.js @@ -233,7 +233,7 @@ export class WrathAndGloryActor extends WNGDocumentMixin(Actor) { let testData = { title: ability.name, speaker: this.speakerData(), - itemId: ability.id, + itemId: ability.uuid, damage: {}, ed: {}, ap: {} diff --git a/scripts/hooks/combat.js b/scripts/hooks/combat.js index 238e9b8..8ae1e7a 100644 --- a/scripts/hooks/combat.js +++ b/scripts/hooks/combat.js @@ -1,6 +1,6 @@ export default function() { Hooks.on("updateCombat", (combat, data) => { - if (combat.current.round == 1 && combat.current.turn == 0) + if (combat.current.round == 1 && !combat.current.turn) { let chatData = { content : `

New Combat - Battlecries

` @@ -15,6 +15,16 @@ export default function() { chatData.content += `
${combatant.name} - ${battlecries.map(i => i.name).join(", ")}` postMessage = true; } + battlecries.forEach(async b => { + if (b.hasTest) + { + let test = await combatant.actor.setupAbilityRoll(b); + if (test) + { + test.rollTest(); + } + } + }) } chatData.content += "
" diff --git a/scripts/model/item/archetype.js b/scripts/model/item/archetype.js index ee1569d..0c29e72 100644 --- a/scripts/model/item/archetype.js +++ b/scripts/model/item/archetype.js @@ -14,7 +14,7 @@ export class ArchetypeModel extends BaseItemModel schema.journal = new fields.StringField({}); schema.species = new fields.EmbeddedDataField(SingletonItemModel); schema.faction = new fields.EmbeddedDataField(SingletonItemModel); - schema.influence = new fields.NumberField({min : 0, initial : 0}); + schema.influence = new fields.NumberField({initial : 0}); schema.cost = new fields.NumberField({min : 0, initial : 0}); schema.keywords = new fields.ArrayField(new fields.StringField()); schema.attributes = Attributes(); diff --git a/scripts/model/item/components/base.js b/scripts/model/item/components/base.js index ba4d56b..50c32af 100644 --- a/scripts/model/item/components/base.js +++ b/scripts/model/item/components/base.js @@ -101,7 +101,7 @@ export class BaseItemModel extends foundry.abstract.DataModel data.traits = {list : data.traits}; } - if (hasProperty(data, "dn") && hasProperty(data, "type") && hasProperty(data, "specification")) + if (!data.test && hasProperty(data, "dn") && hasProperty(data, "type") && hasProperty(data, "specification")) { data.test = { dn : data.dn, @@ -135,8 +135,6 @@ export class BaseItemModel extends foundry.abstract.DataModel data.damage.otherDamage = data.otherDamage; delete data.otherDamage; } - - delete data.ed; } } diff --git a/scripts/sheet/actor/base.js b/scripts/sheet/actor/base.js index 0265c49..9c15c58 100644 --- a/scripts/sheet/actor/base.js +++ b/scripts/sheet/actor/base.js @@ -231,7 +231,6 @@ export class BaseWnGActorSheet extends ActorSheet { test = await this.actor.setupAbilityRoll(item) await test.rollTest(); - test.sendToChat() } else this._dropdownRightClick(ev) diff --git a/scripts/sheet/actor/standard.js b/scripts/sheet/actor/standard.js index d3e062a..b7774dc 100644 --- a/scripts/sheet/actor/standard.js +++ b/scripts/sheet/actor/standard.js @@ -177,7 +177,6 @@ export class StandardActorSheet extends BaseWnGActorSheet { test = await this.actor.setupAbilityRoll(item) await test.rollTest(); - test.sendToChat() } else this._dropdownRightClick(ev) diff --git a/static/template/actor/vehicle.hbs b/static/template/actor/vehicle.hbs index fd93b78..bc70256 100644 --- a/static/template/actor/vehicle.hbs +++ b/static/template/actor/vehicle.hbs @@ -28,7 +28,7 @@
- +
diff --git a/system.json b/system.json index a3d408e..989c557 100644 --- a/system.json +++ b/system.json @@ -3,7 +3,7 @@ "name" : "wrath-and-glory", "title": "Warhammer 40,000: Wrath & Glory", "description": "The official system for Warhammer 40,000 Roleplay: Wrath & Glory! Time is running out in the 41st Millennium. This accursed age needs heroes more than ever before. Will you answer the call?", - "version": "5.1.4", + "version": "5.1.5", "minimumCoreVersion" : 11, "compatibility" : { "minimum" : 11, @@ -55,7 +55,7 @@ "url": "https://github.com/moo-man/WrathAndGlory-FoundryVTT", "socket": true, "manifest": "https://github.com/moo-man/WrathAndGlory-FoundryVTT/releases/latest/download/system.json", - "download": "https://github.com/moo-man/WrathAndGlory-FoundryVTT/releases/download/5.1.4/wrath-and-glory.zip", + "download": "https://github.com/moo-man/WrathAndGlory-FoundryVTT/releases/download/5.1.5/wrath-and-glory.zip", "license": "LICENSE.txt" }