Pack Overhaul

+ Added value to items, weapons & armor
+ Added currency to items, weapons & armor
+ Added weight to items, weapons & armor
- Added chatMessage & commented out for AP mod at heavy load (needs review)
This commit is contained in:
2024-01-14 18:04:35 +01:00
parent b026a81a9f
commit 3169bc89db
262 changed files with 313 additions and 239 deletions
+16 -2
View File
@@ -1,8 +1,6 @@
import { data } from "jquery";
import { M5Item } from "../items/M5Item";
import { M5Attribute, M5Attributes, M5CharacterCalculatedData, M5ItemMod, M5ModOperation, M5ModResult, M5RollData, M5Skill, M5SkillCalculated, M5SkillLearned, M5Stats } from "../M5Base";
import M5ModAggregate from "./M5ModAggregate";
import { info } from "console";
export class M5Character extends Actor {
// constructor(
// data: ConstructorParameters<typeof foundry.documents.BaseActor>[0],
@@ -210,6 +208,22 @@ export class M5Character extends Actor {
ret.stats.thrustLoad = M5Character.thrustLoadValue(data.attributes.st);
ret.stats.encumbrance = 0;
// let loadMessage = false;
// if (data.info.encumbrance > data.info.loadMax && !loadMessage) {
// let messageContent = `Höchstlast von ${data.info.name} überschritten: [[1d1]] AP Schaden durch Belastung alle 10 Minuten abziehen!`;
// let chatData = {
// speaker: ChatMessage.getSpeaker({actor: Actor.name}),
// content: messageContent,
// };
// ChatMessage.create(chatData, {});
// loadMessage = true;
// // ui.notifications.warn(messageContent);
// }
// if (data.info.encumbrance < data.info.loadMax && loadMessage) {
// loadMessage = false;
// }
if (!skip?.mods) {
const aggregate = new M5ModAggregate(data, ret);