Fix #103 size warning
This commit is contained in:
parent
be83dbd055
commit
7fcb5c36b6
@ -1922,9 +1922,14 @@ export class PegasusActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
processSizeBonus(rollData) {
|
processSizeBonus(rollData) {
|
||||||
if (rollData.defenderTokenId) {
|
if (rollData.defenderTokenId) {
|
||||||
this.system.biodata.sizenum = this.system.biodata?.sizenum?? 0
|
let diffSize = 0
|
||||||
this.system.biodata.sizebonus = this.system.biodata?.sizebonus?? 0
|
if ( this.type == "character") {
|
||||||
let diffSize = rollData.defenderSize - this.system.biodata.sizenum + this.system.biodata.sizebonus
|
this.system.biodata.sizenum = this.system.biodata?.sizenum?? 0
|
||||||
|
this.system.biodata.sizebonus = this.system.biodata?.sizebonus?? 0
|
||||||
|
diffSize = rollData.defenderSize - this.system.biodata.sizenum + this.system.biodata.sizebonus
|
||||||
|
} else {
|
||||||
|
diffSize = rollData.defenderSize - this.system.statistics.hr.size
|
||||||
|
}
|
||||||
//console.log("Diffsize", diffSize)
|
//console.log("Diffsize", diffSize)
|
||||||
if (rollData.subKey == "melee-atk" || rollData.subKey == "ranged-atk") {
|
if (rollData.subKey == "melee-atk" || rollData.subKey == "ranged-atk") {
|
||||||
if (diffSize > 0) {
|
if (diffSize > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user