Fix AC calculations
parent
810e1b7c53
commit
c9d111023b
|
@ -725,14 +725,14 @@ export class AcksActor extends Actor {
|
||||||
const data = this.data.data;
|
const data = this.data.data;
|
||||||
data.aac.naked = baseAac + data.scores.dex.mod;
|
data.aac.naked = baseAac + data.scores.dex.mod;
|
||||||
data.ac.naked = baseAc - data.scores.dex.mod;
|
data.ac.naked = baseAc - data.scores.dex.mod;
|
||||||
const armors = this.data.items.filter((i) => i.type == "armor");
|
const armors = this.data.items.filter((i) => i.data.type == "armor");
|
||||||
armors.forEach((a) => {
|
armors.forEach((a) => {
|
||||||
if (a.data.equipped && a.data.type != "shield") {
|
if (a.data.data.equipped && a.data.type != "shield") {
|
||||||
baseAc = a.data.ac.value;
|
baseAc = a.data.data.ac;
|
||||||
baseAac = a.data.aac.value;
|
baseAac = a.data.data.aac.value;
|
||||||
} else if (a.data.equipped && a.data.type == "shield") {
|
} else if (a.data.data.equipped && a.data.type == "shield") {
|
||||||
AcShield = a.data.ac.value;
|
AcShield = a.data.data.ac;
|
||||||
AacShield = a.data.aac.value;
|
AacShield = a.data.data.aac.value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
data.aac.value = baseAac + data.scores.dex.mod + AacShield + data.aac.mod;
|
data.aac.value = baseAac + data.scores.dex.mod + AacShield + data.aac.mod;
|
||||||
|
|
Loading…
Reference in New Issue