Skill & Sheets Update #88

Merged
Le-Frique merged 2 commits from diverses into develop 2024-03-14 20:58:53 +01:00
2 changed files with 36 additions and 36 deletions
Showing only changes of commit b62be8fb3a - Show all commits

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) { //
Le-Frique marked this conversation as resolved Outdated

Sollte vor dem CONST stehen, das könnte auch die fehler beheben.

Sollte vor dem CONST stehen, das könnte auch die fehler beheben.
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>