Encumbrance & Movement
+ Added encumbrance + Added movement decrease by encumbrance (only when sheet is reloaded) + Prepared load capacity
This commit is contained in:
parent
71b04063e7
commit
b026a81a9f
|
|
@ -43,6 +43,7 @@
|
|||
"midgard5.item-onbody": "Am Körper",
|
||||
"midgard5.item-ismagic": "Ist Magisch",
|
||||
"midgard5.item-wealth": "Vermögenswert",
|
||||
"midgard5.item-weight": "Gewicht",
|
||||
|
||||
"midgard5.actor-lp": "Lebenspunkte",
|
||||
"midgard5.actor-lp-short": "LP",
|
||||
|
|
@ -112,6 +113,7 @@
|
|||
"midgard5.heavy-load": "Schwere Last",
|
||||
"midgard5.thrust-load": "Schublast",
|
||||
"midgard5.load-max": "Höchstlast",
|
||||
"midgard5.load-capacity": "Tragkraft",
|
||||
|
||||
"midgard5.exp-overall": "Erfahrungsschatz",
|
||||
"midgard5.exp-available": "Erfahrungspunkte",
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ export class M5Character extends Actor {
|
|||
ret.stats.damageBonus = this.modResult(Math.floor(ret.attributes.st.value / 20) + Math.floor(ret.attributes.gs.value / 30) - 3);
|
||||
ret.stats.attackBonus = this.modResult(ret.attributes.gs.bonus);
|
||||
ret.stats.defenseBonus = this.modResult(ret.attributes.gw.bonus);
|
||||
ret.stats.movement = this.modResult(data.movement);
|
||||
ret.stats.movement = this.modResult(data.info.encumbrance > data.info.heavyLoad ? data.movement / 2 : data.movement);
|
||||
ret.stats.resistanceMind = this.modResult(
|
||||
(data.info.magicUsing ? 2 : 0) + ret.stats.defense.value + (data.info.race === "Mensch" ? ret.attributes.in.bonus : this.raceBonus(data.info.race))
|
||||
);
|
||||
|
|
@ -243,6 +243,9 @@ export class M5Character extends Actor {
|
|||
};
|
||||
if (item.system.hoarded) {
|
||||
ret.stats.hoard += item.system.value || 0;
|
||||
};
|
||||
if (item.system.equipped) {
|
||||
ret.stats.encumbrance += item.system.weight || 0;
|
||||
}
|
||||
|
||||
let icon = item.img;
|
||||
|
|
@ -372,6 +375,9 @@ export class M5Character extends Actor {
|
|||
};
|
||||
if (item.system.hoarded) {
|
||||
ret.stats.hoard += item.system.value || 0;
|
||||
};
|
||||
if (item.system.equipped) {
|
||||
ret.stats.encumbrance += item.system.weight || 0;
|
||||
}
|
||||
|
||||
ret.gear.weapons[item.id] = {
|
||||
|
|
@ -401,6 +407,9 @@ export class M5Character extends Actor {
|
|||
};
|
||||
if (item.system.hoarded) {
|
||||
ret.stats.hoard += item.system.value || 0;
|
||||
};
|
||||
if (item.system.equipped) {
|
||||
ret.stats.encumbrance += item.system.weight || 0;
|
||||
}
|
||||
|
||||
ret.gear.defensiveWeapons[item.id] = {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
<th class="title center">{{localize "midgard5.equipped"}}</th>
|
||||
<th class="title center">{{localize "midgard5.item-quantity"}}</th>
|
||||
<th class="title center">{{localize "midgard5.item-value"}}</th>
|
||||
<th class="title center">{{localize "midgard5.item-weight"}}</th>
|
||||
<th class="title"></th>
|
||||
<th class="title"></th>
|
||||
</tr>
|
||||
|
|
@ -66,6 +67,11 @@
|
|||
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
||||
{{/unless}}
|
||||
</td>
|
||||
<td style="text-align: start">
|
||||
{{#unless (or (eq item.weight "") (eq item.equipped?))}}
|
||||
<span class="spell-process">{{item.weight}} kg</span>
|
||||
{{/unless}}
|
||||
</td>
|
||||
<td class="fixed-value">{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
|
||||
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
||||
</tr>
|
||||
|
|
@ -85,6 +91,7 @@
|
|||
<th class="title">{{localize "TYPES.Item.container"}}</th>
|
||||
<th class="title center">{{localize "midgard5.equipped"}}</th>
|
||||
<th class="title center">{{localize "midgard5.item-value"}}</th>
|
||||
<th class="title center">{{localize "midgard5.item-weight"}}</th>
|
||||
<th class="title"></th>
|
||||
<th class="title"></th>
|
||||
</tr>
|
||||
|
|
@ -107,6 +114,11 @@
|
|||
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
||||
{{/unless}}
|
||||
</td>
|
||||
<td style="text-align: start">
|
||||
{{#unless (or (eq item.weight "") (eq item.equipped?))}}
|
||||
<span class="spell-process">{{item.weight}} kg</span>
|
||||
{{/unless}}
|
||||
</td>
|
||||
<td class="fixed-value">{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
|
||||
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
||||
</tr>
|
||||
|
|
@ -126,6 +138,7 @@
|
|||
<th class="title center">{{localize "TYPES.Item.container"}}</th>
|
||||
<th class="title center">{{localize "midgard5.item-quantity"}}</th>
|
||||
<th class="title center">{{localize "midgard5.item-value"}}</th>
|
||||
<th class="title center">{{localize "midgard5.item-weight"}}</th>
|
||||
<th class="title"></th>
|
||||
<th class="title"></th>
|
||||
</tr>
|
||||
|
|
@ -157,6 +170,11 @@
|
|||
<span class="spell-process">{{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}}</span>
|
||||
{{/unless}}
|
||||
</td>
|
||||
<td style="text-align: start">
|
||||
{{#unless (or (eq item.weight "") (eq item.equipped?))}}
|
||||
<span class="spell-process">{{item.weight}} kg</span>
|
||||
{{/unless}}
|
||||
</td>
|
||||
<td class="fixed-value">{{#if item.rollExist}}<button class="roll-button roll-consumable-item"></button>{{/if}}</td>
|
||||
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -48,6 +48,12 @@
|
|||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flexrow">
|
||||
<span>{{localize "midgard5.item-weight"}}</span>
|
||||
<input id="data.weight" type="number" name="data.weight" value="{{data.weight}}">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.defenseBonus"}}</td>
|
||||
|
|
|
|||
|
|
@ -73,6 +73,12 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flexrow">
|
||||
<span>{{localize "midgard5.item-weight"}}</span>
|
||||
<input id="data.weight" type="number" name="data.weight" value="{{data.weight}}">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,12 @@
|
|||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flexrow">
|
||||
<span>{{localize "midgard5.item-weight"}}</span>
|
||||
<input id="data.weight" type="number" name="data.weight" value="{{data.weight}}">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{localize "midgard5.base-damage"}}</td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue