diff --git a/images/icons/icon_ability.webp b/images/icons/icon_ability.webp new file mode 100644 index 0000000..65e6fe5 Binary files /dev/null and b/images/icons/icon_ability.webp differ diff --git a/modules/pegasus-combat.js b/modules/pegasus-combat.js index cc64c21..6d4274d 100644 --- a/modules/pegasus-combat.js +++ b/modules/pegasus-combat.js @@ -5,14 +5,13 @@ export class PegasusCombat extends Combat { /* -------------------------------------------- */ async rollInitiative(ids, formula = undefined, messageOptions = {} ) { - console.log("Initiative is requested !!!"); - ids = typeof ids === "string" ? [ids] : ids; const currentId = this.combatant._id; for (let cId = 0; cId < ids.length; cId++) { - const c = this.getCombatant(ids[cId]); + const c = this.combatants.get(ids[cId]); let initBonus = c.actor ? c.actor.getInitiativeScore() : 0; - await this.updateEmbeddedEntity("Combatant", { _id: c._id, initiative: initBonus }); + let id = c._id || c.id; + await this.updateEmbeddedDocuments("Combatant", { _id: id, initiative: initBonus }); } return this; diff --git a/modules/pegasus-main.js b/modules/pegasus-main.js index daafd04..f3d49d2 100644 --- a/modules/pegasus-main.js +++ b/modules/pegasus-main.js @@ -94,6 +94,12 @@ Hooks.once("ready", function () { user: game.user._id }); } + + // CSS patch for v9 + if (game.version) { + let sidebar = document.getElementById("sidebar"); + sidebar.style.width = "min-content"; + } welcomeMessage(); }); diff --git a/system.json b/system.json index 58f9462..d267756 100644 --- a/system.json +++ b/system.json @@ -1,6 +1,6 @@ { "author": "Uberwald", - "compatibleCoreVersion": "0.8.9", + "compatibleCoreVersion": "9", "description": "Pegasus RPG system for FoundryVTT", "download": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg/fvtt-pegasus-rpg.zip", "esmodules": [ @@ -50,9 +50,9 @@ "styles": [ "styles/simple.css" ], - "templateVersion": 20, + "templateVersion": 21, "title": "Pegasus RPG", "url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg", - "version": "0.0.20", + "version": "0.0.21", "background" : "./images/ui/pegasus_welcome_page.webp" } \ No newline at end of file diff --git a/template.json b/template.json index f20006e..abc774b 100644 --- a/template.json +++ b/template.json @@ -314,6 +314,7 @@ "range": "", "action": "", "type": "", + "powersource": "", "effects": "", "purchasedeffects": "" }, diff --git a/templates/item-power-sheet.html b/templates/item-power-sheet.html index df3b34d..98f60e7 100644 --- a/templates/item-power-sheet.html +++ b/templates/item-power-sheet.html @@ -27,16 +27,14 @@