Zwergenhort vorhanden, ganz oder gar nicht verborgen?

This commit is contained in:
LeFrique 2024-01-02 16:45:19 +01:00
parent 4429252752
commit cc34a51202
8 changed files with 72 additions and 19 deletions

View File

@ -100,6 +100,7 @@
"midgard5.hoard": "aktueller Hort",
"midgard5.hoardMin": "benötigter Mindesthort",
"midgard5.hoard-next": "Hort für nächsten Grad",
"midgard5.hoarded": "Hort",
"midgard5.exp-overall": "Erfahrungsschatz",
"midgard5.exp-available": "Erfahrungspunkte",
@ -222,7 +223,7 @@
"midgard5.defensive-weapon": "Verteidigungswaffe",
"midgard5.no-skill": "Keine Fertigkeit",
"midgard5.magic": "magisch",
"midgard5.valuable": "Vermögenswert",
"midgard5.valuable": "Vermögen",
"midgard5.equipped": "Ausgerüstet",
"midgard5.active": "Aktiv",
"midgard5.rangedWeapon": "Schusswaffe",

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",

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) {
@ -179,6 +179,9 @@ export class M5Character extends Actor {
if (item.system.valuable) {
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,
@ -264,6 +268,9 @@ export class M5Character extends Actor {
if (item.system.valuable) {
label += " € ";
ret.stats.wealth += item.system.value || 0;
};
if (item.system.hoarded) {
label += " $ ";
ret.stats.hoard += item.system.value || 0;
}
@ -272,6 +279,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,
};
@ -291,6 +299,9 @@ export class M5Character extends Actor {
if (item.system.valuable) {
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,
};
@ -318,6 +330,9 @@ export class M5Character extends Actor {
if (item.system.valuable) {
label += " € ";
ret.stats.wealth += item.system.value || 0;
};
if (item.system.hoarded) {
label += " $ ";
ret.stats.hoard += item.system.value || 0;
}
@ -325,6 +340,7 @@ export class M5Character extends Actor {
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,

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": ""

View File

@ -23,6 +23,13 @@
<input id="data.valuable" type="checkbox" name="data.valuable" {{checked data.valuable}}>
<label for="data.valuable">{{localize "midgard5.valuable"}}</label>
</span>
{{#unless (eq data.info.race "Zwerg")}}
<span>
<input id="data.hoarded" type="checkbox" name="data.hoarded" {{checked data.hoarded}}>
<label for="data.hoarded">{{localize "midgard5.hoarded"}}</label>
</span>
{{/unless}}
</div>
</td>
</tr>

View File

@ -7,7 +7,7 @@
<table>
<tbody>
<tr>
<td colspan=4>
<td colspan="4">
<div class="flexrow">
<span>
<input id="data.magic" type="checkbox" name="data.magic" {{checked data.magic}}>
@ -23,6 +23,13 @@
<input id="data.valuable" type="checkbox" name="data.valuable" {{checked data.valuable}}>
<label for="data.valuable">{{localize "midgard5.valuable"}}</label>
</span>
{{#if (eq data.info.race "Zwerg")}}
<span>
<input id="data.hoarded" type="checkbox" name="data.hoarded" {{checked data.hoarded}}>
<label for="data.hoarded">{{localize "midgard5.hoarded"}}</label>
</span>
{{/if}}
</div>
</td>
</tr>

View File

@ -6,7 +6,7 @@
<div class="sheet-content">
<table>
<tr>
<td colspan=4>
<td colspan="4">
<div class="flexrow">
<span>
<input id="data.equipped" type="checkbox" name="data.equipped" {{checked data.equipped}}>
@ -20,6 +20,13 @@
<input id="data.valuable" type="checkbox" name="data.valuable" {{checked data.valuable}}>
<label for="data.valuable">{{localize "midgard5.valuable"}}</label>
</span>
{{#unless (eq data.info.race "Zwerg")}}
<span>
<input id="data.hoarded" type="checkbox" name="data.hoarded" {{checked data.hoarded}}>
<label for="data.hoarded">{{localize "midgard5.hoarded"}}</label>
</span>
{{/unless}}
</div>
</td>
</tr>

View File

@ -7,7 +7,7 @@
<table>
<tbody>
<tr>
<td colspan=4>
<td colspan="5">
<div class="flexrow">
<span>
<input id="data.magic" type="checkbox" name="data.magic" {{checked data.magic}}>
@ -28,6 +28,13 @@
<input id="data.valuable" type="checkbox" name="data.valuable" {{checked data.valuable}}>
<label for="data.valuable">{{localize "midgard5.valuable"}}</label>
</span>
{{#if (eq data.info.race "Zwerg")}}
<span>
<input id="data.hoarded" type="checkbox" name="data.hoarded" {{checked data.hoarded}}>
<label for="data.hoarded">{{localize "midgard5.hoarded"}}</label>
</span>
{{/if}}
</div>
</td>
</tr>