Fix #29
This commit is contained in:
@@ -831,18 +831,19 @@ export class Hero6Actor extends Actor {
|
||||
rollPowerAttack(powerId ) {
|
||||
let power = this.items.get(powerId)
|
||||
if (power) {
|
||||
power = duplicate(power)
|
||||
power = duplicate(power)
|
||||
let rollData = this.getCommonRollData()
|
||||
if (power.system.attackvalue == "ocv") {
|
||||
rollData.roll = 11 + (Number(this.system.characteristics.ocv.value) || 0) + (Number(power.system.ocv) || 0)
|
||||
rollData.subMode = "ocv"
|
||||
} else {
|
||||
rollData.roll = 11 + (Number(this.system.characteristics.omcv.value) || 0) + (Number(power.system.omcv) || 0)
|
||||
rollData.subMode = "omcv"
|
||||
}
|
||||
rollData.mode = "powerattack"
|
||||
rollData.item = power
|
||||
rollData.img = power.img
|
||||
|
||||
if (power.system.attackvalue == "ocv") {
|
||||
rollData.item.roll = 11 + (Number(this.system.characteristics.ocv.value) || 0) + (Number(power.system.ocv) || 0)
|
||||
rollData.subMode = "ocv"
|
||||
} else {
|
||||
rollData.item.roll = 11 + (Number(this.system.characteristics.omcv.value) || 0) + (Number(power.system.omcv) || 0)
|
||||
rollData.subMode = "omcv"
|
||||
}
|
||||
this.startRoll(rollData)
|
||||
} else {
|
||||
ui.notifications.warn("Unable to find power " + power.name)
|
||||
|
@@ -359,7 +359,7 @@ export class Hero6Utility {
|
||||
target += rollData.bonusMalus
|
||||
|
||||
// Performs roll
|
||||
console.log("Roll formula", diceFormula)
|
||||
//console.log("Roll formula", diceFormula)
|
||||
let myRoll = rollData.roll
|
||||
if (!myRoll) { // New rolls only of no rerolls
|
||||
myRoll = new Roll(diceFormula).roll({ async: false })
|
||||
@@ -374,6 +374,7 @@ export class Hero6Utility {
|
||||
if (rollData.result <= target) {
|
||||
rollData.isSuccess = true
|
||||
}
|
||||
//console.log("Roll result", rollData)
|
||||
if (myRoll.terms[0].total == 3) { // Always a success
|
||||
rollData.isSuccess = true
|
||||
}
|
||||
|
Reference in New Issue
Block a user