Fix & Bonus

+ Fixed wrong calculation for PP
+ Added defensiveWeapon for PP
+ Added Musizieren skills as on KOD S. 118
- Deleted thaumagraphie as spellprocess in de.json because its a skill
This commit is contained in:
2024-03-24 15:01:07 +01:00
parent 34e8998305
commit e59352cc3f
3 changed files with 19 additions and 4 deletions
+9 -1
View File
@@ -89,7 +89,7 @@ export class M5Roll {
this.data.res.label = this.label;
if ((game as Game).settings.get("midgard5", "automatedPP")) {
if ((this.data.i.type === "language" || this.data.i.type === "general") && this.data.rolls[0].dice[0] >= 0) {
if ((this.data.i.type === "language" || this.data.i.type === "general") && this.data.rolls[0].dice[0] >= 16) {
this.actor.items.get(this.id).update({
system: {
pp: this.data.i.pp + 1,
@@ -111,6 +111,14 @@ export class M5Roll {
pp: skill.system.pp + 1,
},
});
} else if (this.data.iType === "defensiveWeapon") {
// Rolling through defensiveWeapon Item
const skill = this.actor.items.get(this.data.i.skillId);
skill.update({
system: {
pp: skill.system.pp + 1,
},
});
} else if (this.data.iType === "spell") {
// Rolling through Spell Item
const klasse = this.actor.items.find((x) => x.type === "class" && x.system.equipped);