Zwergenhort vorhanden, ganz oder gar nicht verborgen?

This commit is contained in:
2024-01-02 16:45:19 +01:00
parent 4429252752
commit cc34a51202
8 changed files with 72 additions and 19 deletions
+1
View File
@@ -8,6 +8,7 @@ const preloadTemplates = async (): Promise<Handlebars.TemplateDelegate<any>[]> =
const templates: Array<string> = [
"sheets/character/attribute.hbs",
"sheets/character/base_values.hbs",
"sheets/character/main.hbs",
"sheets/character/skills.hbs",
"sheets/character/gear.hbs",
"sheets/character/spells.hbs",
+27 -11
View File
@@ -145,8 +145,8 @@ export class M5Character extends Actor {
ret.stats.drinkingFW = Math.floor(ret.attributes.ko.value / 10);
ret.stats.hoardMin = M5Character.levelThreshold.at (ret.level - 1)/2;
ret.stats.hoardNext = M5Character.levelThreshold.at (ret.level)/2;
ret.stats.wealth = data.info.gold + data.info.silver/10 + data.info.copper/100 - (data.info.race === "Zwerg" ? (ret.stats.hoardMin) : 0);
ret.stats.hoard = ret.stats.wealth + (data.info.race === "Zwerg" ? (ret.stats.hoardMin) : 0);
ret.stats.wealth = data.info.gold + data.info.silver/10 + data.info.copper/100;
ret.stats.hoard = 0;
if (!skip?.mods) {
@@ -177,8 +177,11 @@ export class M5Character extends Actor {
label += "*";
};
if (item.system.valuable) {
label += "";
label += "";
ret.stats.wealth += item.system.value || 0;
};
if (item.system.hoarded) {
label += " $ ";
ret.stats.hoard += item.system.value || 0;
}
@@ -196,6 +199,7 @@ export class M5Character extends Actor {
label: label,
magic: item.system.magic,
valuable: item.system?.valuable,
hoarded: item.system?.hoarded,
calc: item.system.calc,
equipped: item.system?.equipped,
value: item.system.value || 0,
@@ -262,16 +266,20 @@ export class M5Character extends Actor {
")";
};
if (item.system.valuable) {
label += "";
ret.stats.wealth += item.system.value || 0;
label += "";
ret.stats.wealth += item.system.value || 0;
};
if (item.system.hoarded) {
label += " $ ";
ret.stats.hoard += item.system.value || 0;
}
}
ret.gear.weapons[item.id] = {
label: label,
skillId: item.system.skillId,
magic: item.system.magic,
valuable: item.system?.valuable,
hoarded: item.system?.hoarded,
value: item.system.value || 0,
calc: item.system.calc,
};
@@ -289,8 +297,11 @@ export class M5Character extends Actor {
label += "*(" + (item.system.stats.defenseBonus < 0 ? "" : "+") + item.system.stats.defenseBonus + ")";
};
if (item.system.valuable) {
label += "";
ret.stats.wealth += item.system.value || 0;
label += "";
ret.stats.wealth += item.system.value || 0;
};
if (item.system.hoarded) {
label += " $ ";
ret.stats.hoard += item.system.value || 0;
}
@@ -299,6 +310,7 @@ export class M5Character extends Actor {
skillId: item.system.skillId,
magic: item.system.magic,
valuable: item.system?.valuable,
hoarded: item.system?.hoarded,
value: item.system.value || 0,
calc: item.system.calc,
};
@@ -316,15 +328,19 @@ export class M5Character extends Actor {
label += "*";
};
if (item.system.valuable) {
label += "";
ret.stats.wealth += item.system.value || 0;
label += "";
ret.stats.wealth += item.system.value || 0;
};
if (item.system.hoarded) {
label += " $ ";
ret.stats.hoard += item.system.value || 0;
}
}
ret.gear.armor[item.id] = {
label: label,
magic: item.system.magic,
valuable: item.system?.valuable,
hoarded: item.system?.hoarded,
value: item.system.value || 0,
calc: item.system.calc,
equipped: item.system?.equipped,
+11 -4
View File
@@ -204,6 +204,10 @@
"valuable": false,
"item-wealth": true
},
"hoarded": {
"hoarded": false,
"inHoard": true
},
"physical": {
"value": 0,
"magic": false
@@ -301,7 +305,7 @@
"calc": {}
},
"item": {
"templates": ["itemDescription", "equippable", "physical","valuable"],
"templates": ["itemDescription", "equippable", "physical","valuable","hoarded"],
"rolls": {
"formulas": {},
"output": ""
@@ -319,10 +323,11 @@
"calc": {}
},
"weapon": {
"templates": ["itemDescription", "stats", "equippable", "physical","valuable"],
"templates": ["itemDescription", "stats", "equippable", "physical","valuable","hoarded"],
"special": false,
"ranged": false,
"valuable": false,
"hoarded": false,
"skillId": "",
"damageBase": "1d6",
"rolls": {
@@ -343,9 +348,10 @@
"calc": {}
},
"defensiveWeapon": {
"templates": ["itemDescription", "stats", "equippable", "physical","valuable"],
"templates": ["itemDescription", "stats", "equippable", "physical","valuable","hoarded"],
"special": false,
"valuable": false,
"hoarded": false,
"skillId": "",
"rolls": {
"formulas": {
@@ -360,10 +366,11 @@
"calc": {}
},
"armor": {
"templates": ["itemDescription", "stats", "equippable", "attributeMod", "physical","valuable"],
"templates": ["itemDescription", "stats", "equippable", "attributeMod", "physical","valuable","hoarded"],
"lpProtection": 0,
"apProtection": 0,
"valuable": false,
"hoarded": false,
"rolls": {
"formulas": {},
"output": ""