Squashed commit of the following:
commit0bfa224daeAuthor: 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 commit35a6b0fae9Author: Byroks <byroks@gmail.com> Date: Mon Nov 27 19:48:56 2023 +0100 v1.3.1 commitdb21ca93b0Author: 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:
parent
7bf0fd90b0
commit
e27f4209e5
|
|
@ -5,4 +5,4 @@ package-lock.json
|
|||
source/packs/
|
||||
source/generators/
|
||||
dist
|
||||
midgard5*.zip
|
||||
*.zip
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "foundry-system-midgard5",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
return roll.toMessage();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ export default class M5CharacterSheet extends ActorSheet {
|
|||
const context = this.actor as any;
|
||||
const item = context.items.get(itemId) as M5Item;
|
||||
await item.roll();
|
||||
this.render();
|
||||
});
|
||||
|
||||
html.find(".roll-brawl-button").on("click", async (event) => {
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
"name": "midgard5",
|
||||
"title": "Midgard 5. Edition",
|
||||
"description": "The German RPG Midgard 5. Edition",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"compatibility": {
|
||||
"minimum": "10",
|
||||
"verified": "11",
|
||||
"maximum": "11"
|
||||
},
|
||||
"authors": [{ "name": "Byroks" }],
|
||||
"authors": [{"name": "Byroks"}],
|
||||
"scripts": ["bundle.js"],
|
||||
"styles": ["bundle.css"],
|
||||
"packs": [
|
||||
|
|
@ -89,8 +89,8 @@
|
|||
"primaryTokenAttribute": "lp",
|
||||
"secondaryTokenAttribute": "ap",
|
||||
"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",
|
||||
"download": "https://github.com/Byroks/foundry-vtt-system-midgard5/releases/download/v1.3.0/midgard5-v1.3.0.zip",
|
||||
"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.1/midgard5-v1.3.1.zip",
|
||||
"initiative": "@c.calc.attributes.gw.value",
|
||||
"license": "LICENSE.txt"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue