Skip to content

Commit

Permalink
Merge pull request #483 from datdamnzotz/#482-weapons-modifers-not-di…
Browse files Browse the repository at this point in the history
…splaying-correctly

Fix for weapons buttons not displaying correctly.
  • Loading branch information
datdamnzotz authored Nov 25, 2020
2 parents d5528a8 + aab4d07 commit f5ce20a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cljc/orcpub/dice.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
sides (or (parse-int sides-str))
plus-minus (if (= "-" plus-minus-str)
-1
1)
raw-mod (or (parse-int mod-str) 0)
+1)
raw-mod (or (parse-int mod-str) +0)
mod (* raw-mod plus-minus)
rolls (roll-n num sides)
total (apply + mod rolls)]
Expand Down
4 changes: 2 additions & 2 deletions src/cljs/orcpub/dnd/e5/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -2239,7 +2239,7 @@
(if (boolean show-button)
(roll-button
(str title " check: ")
(str "1d20" v)
(str "1d20" (common/mod-str v))
:text v
:style {:font-size "24px" :padding "2px 8px"})
v)]]])
Expand Down Expand Up @@ -2809,7 +2809,7 @@
[:td (roll-button
(str name " attack: ")
(str "1d20" (common/mod-str (weapon-attack-modifier weapon)))
:text (str "1d20" (common/bonus-str (weapon-attack-modifier weapon))))]
:text (str "1d20" (common/mod-str (weapon-attack-modifier weapon))))]
[:td (roll-button
(str name " damage: ")
(str damage-die-count "d" damage-die (common/mod-str (weapon-damage-modifier weapon)))
Expand Down

0 comments on commit f5ce20a

Please sign in to comment.