Review range + display raw armor result

This commit is contained in:
2022-08-26 13:23:06 +02:00
parent b84f34d560
commit fa501abbd5
6 changed files with 30 additions and 9 deletions

View File

@ -640,10 +640,10 @@ export class CrucibleActor extends Actor {
if ( !rollData.forceDisadvantage) { // This is an attack, check if disadvantaged
rollData.forceDisadvantage = this.isAttackDisadvantage()
}
if (rollData.weapon.system.isranged && rollData.tokensDistance > CrucibleUtility.getWeaponMaxRange(rollData.weapon) ) {
/*if (rollData.weapon.system.isranged && rollData.tokensDistance > CrucibleUtility.getWeaponMaxRange(rollData.weapon) ) {
ui.notifications.warn(`Your target is out of range of your weapon (max: ${CrucibleUtility.getWeaponMaxRange(rollData.weapon)} - current : ${rollData.tokensDistance})` )
return
}
}*/
this.startRoll(rollData)
} else {
ui.notifications.warn("Unable to find the relevant skill for weapon " + weapon.name)
@ -691,7 +691,7 @@ export class CrucibleActor extends Actor {
rollData.sizeDice = CrucibleUtility.getSizeDice( this.system.biodata.size )
rollData.effectiveRange = CrucibleUtility.getWeaponRange(attackRollData.weapon)
rollData.tokensDistance = attackRollData.tokensDistance // QoL copy
rollData.distanceBonusDice = Math.max(0, Math.floor((rollData.tokensDistance - rollData.effectiveRange) + 0.5))
rollData.distanceBonusDice = 0 //Math.max(0, Math.floor((rollData.tokensDistance - rollData.effectiveRange) + 0.5))
rollData.hasCover = "none"
rollData.situational = "none"
rollData.useshield = false
@ -770,7 +770,7 @@ export class CrucibleActor extends Actor {
ChatMessage.create( { content: "Armor result : " + armorValue } )
}
messages.push( "Armor result : " + armorValue)
return { armorIgnored: false, nbSuccess: armorValue, messages: messages }
return { armorIgnored: false, nbSuccess: armorValue, rawArmor: armorResult.text, messages: messages }
}
return { armorIgnored: true, nbSuccess: 0, messages: ["No armor equipped."] }
}