Belastung CleanUp

- Belastungseffect deactivated
This commit is contained in:
LeFrique 2024-03-14 15:54:13 +01:00
parent 2b8f2da7d8
commit b62be8fb3a
2 changed files with 36 additions and 36 deletions

View File

@ -464,39 +464,39 @@ export class M5Character extends Actor {
};
});
const item = context.items.filter((x) => x.name === "Belastung");
if (item.length === 0) {
this.createEffect("Belastung", [
{ id: "movement", operation: M5ModOperation.DIVISION, type: M5ModType.STAT, value: 2 },
{ id: "attackBonus", operation: M5ModOperation.SUBTRACT, type: M5ModType.STAT, value: 4 },
{ id: "defenseBonus", operation: M5ModOperation.SUBTRACT, type: M5ModType.STAT, value: 4 }
]);
} else if (item.length === 2) {
item[1]?.delete();
}
if (item.length === 1) {
item[0]?.update({
img: "icons/containers/bags/sack-simple-leather-orange.webp" });
}
if (ret.stats.encumbrance <= ret.stats.heavyLoad) {
item[0]?.update({
data: {
equipped: false,
}
});
}
if (!skip?.encumbrance) {
if (ret.stats.encumbrance > ret.stats.heavyLoad) {
item[0].update({
data: {
equipped: true,
},
});
}
}
//if (!skip?.encumbrance) {
//const item = context.items.filter((x) => x.name === "Belastung");
//if (item.length === 0) {
// this.createEffect("Belastung", [
// { id: "movement", operation: M5ModOperation.DIVISION, type: M5ModType.STAT, value: 2 },
// { id: "attackBonus", operation: M5ModOperation.SUBTRACT, type: M5ModType.STAT, value: 4 },
// { id: "defenseBonus", operation: M5ModOperation.SUBTRACT, type: M5ModType.STAT, value: 4 }
// ]);
//} else if (item.length === 2) {
// item[1]?.delete();
//}
//
//if (item.length === 1) {
// item[0]?.update({
// img: "icons/containers/bags/sack-simple-leather-orange.webp" });
// }
//
//if (ret.stats.encumbrance <= ret.stats.heavyLoad) {
// item[0]?.update({
// data: {
// equipped: false,
// }
// });
// }
//
//if (ret.stats.encumbrance > ret.stats.heavyLoad) {
// item[0].update({
// data: {
// equipped: true,
// },
// });
// }
//}
}
if (!skip?.effects) {

View File

@ -20,9 +20,9 @@
{{/unless}}
{{/if}}
</td>
{{#unless (eq item.label "Belastung")}}
{{!--{{#unless (eq item.label "Belastung")}}--}}
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
{{/unless}}
{{!--{{/unless}}--}}
</tr>
{{/each}}
</tbody>