This commit is contained in:
@@ -49,7 +49,19 @@ export default class FTLNomadRobot extends foundry.abstract.TypeDataModel {
|
||||
|
||||
prepareDerivedData() {
|
||||
super.prepareDerivedData();
|
||||
|
||||
let encMax = this.durability + (2 * this.skills.physical.value)
|
||||
if (encMax !== this.enc.max) {
|
||||
this.enc.max = encMax
|
||||
}
|
||||
let enc = 0
|
||||
for (let i of this.parent.items) {
|
||||
if (i.system?.enc) {
|
||||
enc += i.system.enc
|
||||
}
|
||||
}
|
||||
if (enc !== this.enc.value) {
|
||||
this.enc.value = enc
|
||||
}
|
||||
}
|
||||
|
||||
isEncumbered() {
|
||||
|
||||
Reference in New Issue
Block a user