Merge branch 'develop' of https://git.byroks.de/MidgardVTT-Entwicklung/foundry-vtt-system-midgard5 into develop
This commit is contained in:
commit
08ca1cedce
|
|
@ -461,58 +461,55 @@ export class M5Character extends Actor {
|
|||
};
|
||||
});
|
||||
|
||||
if (!skip?.encumbrance) {
|
||||
const item = context.items.filter((x) => x.name === "Belastung");
|
||||
if (ret.stats.encumbrance > ret.stats.heavyLoad) {
|
||||
if (item.length === 0) {
|
||||
this.createEffect("Belastung", [{ id: "movement", operation: M5ModOperation.DIVISION, type: M5ModType.STAT, value: 2 }]);
|
||||
} else if (item.length === 1) {
|
||||
item[0].update({
|
||||
data: {
|
||||
equipped: true,
|
||||
},
|
||||
});
|
||||
} else if (item.length === 2) {
|
||||
item[1]?.delete();
|
||||
}
|
||||
} else if (ret.stats.encumbrance <= ret.stats.heavyLoad) {
|
||||
if (item.length === 1) {
|
||||
item[0].update({
|
||||
data: {
|
||||
equipped: false,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (!skip?.encumbrance) {
|
||||
// const item = context.items.filter((x) => x.name === "Belastung");
|
||||
// if (ret.stats.encumbrance > ret.stats.heavyLoad) {
|
||||
// if (item.length === 0) {
|
||||
// this.createEffect("Belastung", [{ id: "movement", operation: M5ModOperation.DIVISION, type: M5ModType.STAT, value: 2 }]);
|
||||
// } else if (item.length === 1) {
|
||||
// item[0].update({
|
||||
// data: {
|
||||
// equipped: true,
|
||||
// },
|
||||
// });
|
||||
// } else if (item.length === 2) {
|
||||
// item[1]?.delete();
|
||||
// }
|
||||
// } else if (ret.stats.encumbrance <= ret.stats.heavyLoad) {
|
||||
// if (item.length === 1) {
|
||||
// item[0]?.update({
|
||||
// data: {
|
||||
// equipped: false,
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
if (!skip?.encumbrance) {
|
||||
const item = context.items.filter((x) => x.name === "Höchstlast");
|
||||
if (ret.stats.encumbrance > ret.stats.loadMax) {
|
||||
if (item.length === 0) {
|
||||
let messageContent = `Höchstlast wurde überschritten: 1 AP Schaden durch Belastung alle 10 Minuten abziehen!`;
|
||||
let chatData = {
|
||||
speaker: ChatMessage.getSpeaker({ actor: Actor.name }),
|
||||
content: messageContent,
|
||||
};
|
||||
ChatMessage.create(chatData, {});
|
||||
ui.notifications.warn(messageContent);
|
||||
this.createEffect("Höchstlast", [{ id: "ap", operation: M5ModOperation.SUBTRACT, type: M5ModType.STAT, value: 1 }]);
|
||||
} else if (item.length === 2) {
|
||||
item[1]?.delete();
|
||||
} else if (item.length === 1) {
|
||||
item[0].update({
|
||||
data: {
|
||||
equipped: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
} else if (ret.stats.encumbrance < ret.stats.loadMax) {
|
||||
if (item.length === 1) {
|
||||
item[0]?.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (!skip?.encumbrance) {
|
||||
// const item = context.items.filter((x) => x.name === "Höchstlast");
|
||||
// if (ret.stats.encumbrance > ret.stats.loadMax) {
|
||||
// if (item.length === 0) {
|
||||
// this.createEffect("Höchstlast", [{ id: "ap", operation: M5ModOperation.SUBTRACT, type: M5ModType.STAT, value: 1 }]);
|
||||
// } else if (item.length === 1) {
|
||||
// item[0].update({
|
||||
// data: {
|
||||
// equipped: true,
|
||||
// },
|
||||
// });
|
||||
// } else if (item.length === 2) {
|
||||
// item[1]?.delete();
|
||||
// }
|
||||
// } else if (ret.stats.encumbrance <= ret.stats.loadMax) {
|
||||
// if (item.length === 1) {
|
||||
// item[0]?.update({
|
||||
// data: {
|
||||
// equipped: false,
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
if (!skip?.effects) {
|
||||
|
|
@ -555,7 +552,7 @@ export class M5Character extends Actor {
|
|||
// Adjust attribute Aussehen based on Athletik skill
|
||||
if (item.name === "Athletik") {
|
||||
ret.attributes.au.value += Math.floor(item.system.fw / 3);
|
||||
};
|
||||
}
|
||||
|
||||
// Adjust stat Bewegungsweite based on Laufen skill
|
||||
if (item.name === "Laufen") {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<tbody>
|
||||
<tr height = 10px></tr>
|
||||
<tr>
|
||||
<td class="fixed-value"><input type="number" name="data.info.wealth" value="{{data.calc.stats.wealth}}"></td>
|
||||
<td class="fixed-value"><input type="number" disabled="true" name="data.info.wealth" value="{{data.calc.stats.wealth}}"></td>
|
||||
<td class="fixed-value"><input type="number" name="data.info.gold" value="{{data.info.gold}}"></td>
|
||||
<td class="fixed-value"><input type="number" name="data.info.silver" value="{{data.info.silver}}"></td>
|
||||
<td class="fixed-value"><input type="number" name="data.info.copper" value="{{data.info.copper}}"></td>
|
||||
|
|
@ -47,11 +47,11 @@
|
|||
<tfoot>
|
||||
<tr height = 10px></tr>
|
||||
<tr>
|
||||
<td class="fixed-value"><input type="number" name="data.info.load" value="{{data.calc.stats.load}}"></td>
|
||||
<td class="fixed-value"><input type="number" name="data.info.heavyLoad" value="{{data.calc.stats.heavyLoad}}"></td>
|
||||
<td class="fixed-value"><input type="number" name="data.info.loadMax" value="{{data.calc.stats.loadMax}}"></td>
|
||||
<td class="fixed-value"><input type="number" name="data.info.thrustLoad" value="{{data.calc.stats.thrustLoad}}"></td>
|
||||
<td class="fixed-value"><input type="number" name="data.info.encumbrance" value="{{data.calc.stats.encumbrance}}"></td>
|
||||
<td class="fixed-value"><input type="number" disabled="true" name="data.info.load" value="{{data.calc.stats.load}}"></td>
|
||||
<td class="fixed-value"><input type="number" disabled="true" {{#if (gte data.calc.stats.encumbrance data.calc.stats.heavyLoad) }}style="background:#FF6666"{{/if}} name="data.info.heavyLoad" value="{{data.calc.stats.heavyLoad}}"></td>
|
||||
<td class="fixed-value"><input type="number" disabled="true" {{#if (gte data.calc.stats.encumbrance data.calc.stats.loadMax) }}style="background:#FF6666"{{/if}} name="data.info.loadMax" value="{{data.calc.stats.loadMax}}"></td>
|
||||
<td class="fixed-value"><input type="number" disabled="true" {{#if (gte data.calc.stats.encumbrance data.calc.stats.thrustLoad) }}style="background:#FF6666"{{/if}} name="data.info.thrustLoad" value="{{data.calc.stats.thrustLoad}}"></td>
|
||||
<td class="fixed-value"><input type="number" disabled="true" name="data.info.encumbrance" value="{{data.calc.stats.encumbrance}}"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Reference in New Issue