0.2.0 Encumbrance
Created the items and heavy items section of the character sheet. Fixed some rounding errors.master
parent
cf8c723b63
commit
dbae5b4d35
|
@ -187,9 +187,9 @@
|
||||||
|
|
||||||
"ACKS.items.Equip": "Equip",
|
"ACKS.items.Equip": "Equip",
|
||||||
"ACKS.items.Unequip": "Unequip",
|
"ACKS.items.Unequip": "Unequip",
|
||||||
"ACKS.items.Misc": "Misc",
|
"ACKS.items.Misc": "Items",
|
||||||
"ACKS.items.Weapons": "Weapons",
|
"ACKS.items.Weapons": "Weapons",
|
||||||
"ACKS.items.Treasure": "Treasure",
|
"ACKS.items.Treasure": "Heavy Items",
|
||||||
"ACKS.items.Armors": "Armors",
|
"ACKS.items.Armors": "Armors",
|
||||||
"ACKS.items.Weight": "Wgt.",
|
"ACKS.items.Weight": "Wgt.",
|
||||||
"ACKS.items.Qualities": "Qualities",
|
"ACKS.items.Qualities": "Qualities",
|
||||||
|
|
|
@ -519,8 +519,9 @@ export class AcksActor extends Actor {
|
||||||
let hasItems = false;
|
let hasItems = false;
|
||||||
Object.values(this.data.items).forEach((item) => {
|
Object.values(this.data.items).forEach((item) => {
|
||||||
if (item.type == "item" && !item.data.treasure) {
|
if (item.type == "item" && !item.data.treasure) {
|
||||||
|
if (option === "detailed") totalWeight += 166.6;
|
||||||
|
|
||||||
hasItems = true;
|
// hasItems = true;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
item.type == "item" &&
|
item.type == "item" &&
|
||||||
|
@ -531,7 +532,7 @@ export class AcksActor extends Actor {
|
||||||
totalWeight += item.data.weight;
|
totalWeight += item.data.weight;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (option === "detailed" && hasItems) totalWeight += 80;
|
// if (option === "detailed" && hasItems) totalWeight += 166.6;
|
||||||
|
|
||||||
data.encumbrance = {
|
data.encumbrance = {
|
||||||
pct: Math.clamped(
|
pct: Math.clamped(
|
||||||
|
@ -541,7 +542,7 @@ export class AcksActor extends Actor {
|
||||||
),
|
),
|
||||||
max: data.encumbrance.max,
|
max: data.encumbrance.max,
|
||||||
encumbered: totalWeight > data.encumbrance.max,
|
encumbered: totalWeight > data.encumbrance.max,
|
||||||
value: totalWeight,
|
value: Math.round(totalWeight),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data.config.movementAuto && option != "disabled") {
|
if (data.config.movementAuto && option != "disabled") {
|
||||||
|
@ -606,7 +607,7 @@ export class AcksActor extends Actor {
|
||||||
(i) => i.type == "item" && i.data.treasure
|
(i) => i.type == "item" && i.data.treasure
|
||||||
);
|
);
|
||||||
treasure.forEach((item) => {
|
treasure.forEach((item) => {
|
||||||
total += item.data.quantity.value * item.data.cost;
|
total += item.data.quantity.value * item.data.cost
|
||||||
});
|
});
|
||||||
data.treasure = total;
|
data.treasure = total;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "acks",
|
"name": "acks",
|
||||||
"title": "Adventurer Conqueror Kings System",
|
"title": "Adventurer Conqueror Kings System",
|
||||||
"description": "Play B/X OSR modules with ACKS on Foundry VTT",
|
"description": "Play B/X OSR modules with ACKS on Foundry VTT",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"minimumCoreVersion": "0.6.2",
|
"minimumCoreVersion": "0.6.2",
|
||||||
"compatibleCoreVersion": "0.6.6",
|
"compatibleCoreVersion": "0.6.6",
|
||||||
"templateVersion": 2,
|
"templateVersion": 2,
|
||||||
|
|
|
@ -165,7 +165,7 @@
|
||||||
},
|
},
|
||||||
"treasure": false,
|
"treasure": false,
|
||||||
"cost": 0,
|
"cost": 0,
|
||||||
"weight": 167
|
"weight": 166.6
|
||||||
},
|
},
|
||||||
"weapon": {
|
"weapon": {
|
||||||
"range": {
|
"range": {
|
||||||
|
|
Loading…
Reference in New Issue