Fix various issues
This commit is contained in:
@@ -711,11 +711,20 @@ export class Hero6Actor extends Actor {
|
||||
rollData.title = item.name
|
||||
rollData.diceFormula = Hero6Utility.convertRollHeroSyntax(item.system.damage)
|
||||
let myRoll = new Roll(rollData.diceFormula).roll({ async: false })
|
||||
await Hero6Utility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
|
||||
//await Hero6Utility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
|
||||
|
||||
rollData.roll = myRoll
|
||||
rollData.result = myRoll.total
|
||||
rollData.bodyValue = Hero6Utility.computeBodyValue(myRoll)
|
||||
|
||||
let mult
|
||||
if (item.system.damageeffect == "killing") { // As per issue #11
|
||||
mult = new Roll("1d3").roll({ async: false })
|
||||
rollData.killingMultiplier = mult.total
|
||||
rollData.stunValue = (Number(myRoll.total) * Number(mult.total)) + (Number(item.system.stunx) || 0)
|
||||
} else {
|
||||
rollData.stunValue = myRoll.total
|
||||
}
|
||||
|
||||
let msgFlavor = await renderTemplate(`systems/fvtt-hero-system-6/templates/chat/chat-damage-result.hbs`, rollData)
|
||||
let msg = await rollData.roll.toMessage({
|
||||
@@ -723,6 +732,11 @@ export class Hero6Actor extends Actor {
|
||||
rollMode: game.settings.get("core", "rollMode"),
|
||||
flavor: msgFlavor
|
||||
})
|
||||
|
||||
if (mult) {
|
||||
await Hero6Utility.showDiceSoNice(mult, game.settings.get("core", "rollMode"))
|
||||
}
|
||||
|
||||
rollData.roll = duplicate(rollData.roll) // Convert to object
|
||||
msg.setFlag("world", "rolldata", rollData)
|
||||
console.log("Rolldata result", rollData)
|
||||
|
@@ -22,6 +22,13 @@ export const Hero6_CONFIG = {
|
||||
"pre": "Presence",
|
||||
"manual": "Manual",
|
||||
},
|
||||
damageEffect: {
|
||||
"normal": "Normal",
|
||||
"killing": "Killing",
|
||||
"stunonly": "Stun Only",
|
||||
"bodyonly": "Body Only",
|
||||
"effect": "Effect"
|
||||
},
|
||||
skillType: {
|
||||
"agility": "Agility",
|
||||
"interaction": "Interaction",
|
||||
|
Reference in New Issue
Block a user