Commit 95e53691 authored by Joe Ziemba's avatar Joe Ziemba
Browse files

convert all values to numbers for to hit calc

parent 5651f7f8
......@@ -7,7 +7,9 @@ export const DisplayAttack = ({ action, id }) => {
} = useContext(StatblockContext)
let { dieNum, dmgDie, dex, reach, targets, dmgType } = action
// Get hit mod
const toHit = (dex ? abilities.dexMod : abilities.strMod) + proficiency
const toHit =
(dex ? Number(abilities.dexMod) : Number(abilities.strMod)) +
Number(proficiency)
// Get Damage Mod
let avg = (dieNum * dmgDie) / 2 + toHit
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment