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

View File

@ -20,9 +20,9 @@
{{/unless}} {{/unless}}
{{/if}} {{/if}}
</td> </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> <td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
{{/unless}} {{!--{{/unless}}--}}
</tr> </tr>
{{/each}} {{/each}}
</tbody> </tbody>