Merge branch 'develop' into Vereinfachter-NPC/Kreaturen-Bogen

This commit is contained in:
2024-05-06 13:55:45 +02:00
12 changed files with 96 additions and 31 deletions
+5
View File
@@ -280,6 +280,7 @@ export class M5Character extends Actor {
if (!!item.system.containerId) {
ret.gear.containers[item.system.containerId].weight += parseFloat((item.system.weight * item.system.quantity).toPrecision(4));
ret.gear.containers[item.system.containerId].value += parseFloat(this.calculateValue(item.system.value * item.system.quantity, item.system.currency).toPrecision(3));
if (ret.gear.containers[item.system.containerId].equipped) {
ret.stats.encumbrance += item.system.weight * item.system.quantity;
}
@@ -302,6 +303,7 @@ export class M5Character extends Actor {
label: label,
icon: icon,
magic: item.system.magic,
abw: item.system.abw || 0,
calc: item.system.calc,
equipped: item.system?.equipped,
valuable: item.system?.valuable,
@@ -352,6 +354,7 @@ export class M5Character extends Actor {
icon: item.img,
skillId: item.system.skillId,
magic: item.system.magic,
abw: item.system.abw || 0,
valuable: item.system?.valuable,
hoarded: item.system?.hoarded,
value: item.system.value || 0,
@@ -395,6 +398,7 @@ export class M5Character extends Actor {
icon: item.img,
skillId: item.system.skillId,
magic: item.system.magic,
abw: item.system.abw || 0,
valuable: item.system?.valuable,
hoarded: item.system?.hoarded,
value: item.system.value || 0,
@@ -438,6 +442,7 @@ export class M5Character extends Actor {
label: label,
icon: item.img,
magic: item.system.magic,
abw: item.system.abw || 0,
valuable: item.system?.valuable,
hoarded: item.system?.hoarded,
value: item.system.value || 0,
+7 -1
View File
@@ -343,7 +343,13 @@ 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;
this.actor["update"]({
data: {
ap: {
value: this.actor["system"].ap.value - item.system.ap,
},
},
});
}
}