Squashed commit of the following:

commit 0bfa224dae
Author: Byroks <byroks@gmail.com>
Date:   Mon Nov 27 19:56:05 2023 +0100

    V1.3.1 (#6)

    * v1.3.1

    * v1.3.1

    * update .gitingore

commit 35a6b0fae9
Author: Byroks <byroks@gmail.com>
Date:   Mon Nov 27 19:48:56 2023 +0100

    v1.3.1

commit db21ca93b0
Author: Byroks <byroks@gmail.com>
Date:   Sun Nov 26 13:13:13 2023 +0100

    subtract ap when casting spell

    Changes:
     + subtract AP when casting a spell
This commit is contained in:
Byroks 2023-11-27 20:05:20 +01:00
parent 7bf0fd90b0
commit e27f4209e5
5 changed files with 14 additions and 7 deletions

2
.gitignore vendored
View File

@ -5,4 +5,4 @@ package-lock.json
source/packs/ source/packs/
source/generators/ source/generators/
dist dist
midgard5*.zip *.zip

View File

@ -1,6 +1,6 @@
{ {
"name": "foundry-system-midgard5", "name": "foundry-system-midgard5",
"version": "1.3.0", "version": "1.3.1",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -215,6 +215,12 @@ export class M5Item extends Item {
} }
}); });
if (item.type === "spell" || item.type === "kampfkunst") {
if (this.actor["system"].ap.value >= item.system.ap) {
this.actor["system"].ap.value -= item.system.ap;
}
}
const roll = new M5Roll(rollData, this.actor, item.name); const roll = new M5Roll(rollData, this.actor, item.name);
return roll.toMessage(); return roll.toMessage();
} else { } else {

View File

@ -160,6 +160,7 @@ export default class M5CharacterSheet extends ActorSheet {
const context = this.actor as any; const context = this.actor as any;
const item = context.items.get(itemId) as M5Item; const item = context.items.get(itemId) as M5Item;
await item.roll(); await item.roll();
this.render();
}); });
html.find(".roll-brawl-button").on("click", async (event) => { html.find(".roll-brawl-button").on("click", async (event) => {

View File

@ -3,13 +3,13 @@
"name": "midgard5", "name": "midgard5",
"title": "Midgard 5. Edition", "title": "Midgard 5. Edition",
"description": "The German RPG Midgard 5. Edition", "description": "The German RPG Midgard 5. Edition",
"version": "1.3.0", "version": "1.3.1",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "10",
"verified": "11", "verified": "11",
"maximum": "11" "maximum": "11"
}, },
"authors": [{ "name": "Byroks" }], "authors": [{"name": "Byroks"}],
"scripts": ["bundle.js"], "scripts": ["bundle.js"],
"styles": ["bundle.css"], "styles": ["bundle.css"],
"packs": [ "packs": [
@ -89,8 +89,8 @@
"primaryTokenAttribute": "lp", "primaryTokenAttribute": "lp",
"secondaryTokenAttribute": "ap", "secondaryTokenAttribute": "ap",
"url": "https://github.com/Byroks/foundry-vtt-system-midgard5", "url": "https://github.com/Byroks/foundry-vtt-system-midgard5",
"manifest": "https://github.com/Byroks/foundry-vtt-system-midgard5/releases/download/v1.3.0/system.json", "manifest": "https://github.com/Byroks/foundry-vtt-system-midgard5/releases/download/v1.3.1/system.json",
"download": "https://github.com/Byroks/foundry-vtt-system-midgard5/releases/download/v1.3.0/midgard5-v1.3.0.zip", "download": "https://github.com/Byroks/foundry-vtt-system-midgard5/releases/download/v1.3.1/midgard5-v1.3.1.zip",
"initiative": "@c.calc.attributes.gw.value", "initiative": "@c.calc.attributes.gw.value",
"license": "LICENSE.txt" "license": "LICENSE.txt"
} }