diff --git a/src/cljc/orcpub/dnd/e5/display.cljc b/src/cljc/orcpub/dnd/e5/display.cljc index 4b8354a62..395d19941 100644 --- a/src/cljc/orcpub/dnd/e5/display.cljc +++ b/src/cljc/orcpub/dnd/e5/display.cljc @@ -69,7 +69,7 @@ (or (:name (equipment-map equipment-kw)) (if (string? equipment-kw) equipment-kw - (common/kw-to-name equipment-kw)))) + (common/kw-to-name equipment-kw true)))) (defn unit-amount-description [{:keys [units amount singular plural] :or {amount 1 plural (plural-map units)}}] (str amount " " (if (not= 1 amount) diff --git a/src/cljs/orcpub/character_builder.cljs b/src/cljs/orcpub/character_builder.cljs index f117411b0..a798ee3d1 100644 --- a/src/cljs/orcpub/character_builder.cljs +++ b/src/cljs/orcpub/character_builder.cljs @@ -1219,7 +1219,8 @@ [:th.p-5 "Base"] [:th.p-5 "Con"] [:th.p-5 "Misc"] - [:th.p-5 "Total"]]) + [:th.p-5 "Total"] + [:th.p-5 ""]]) (defn hp-selection-name-level [selection] (let [[_ class-kw _ level-kw _] (::entity/path selection) @@ -1319,7 +1320,8 @@ [:td.p-5 first-class-hit-die] [:td.p-5 con-bonus-str] [:td.p-5 (common/bonus-str (+ misc-bonus cls-level-bonus))] - [:td.p-5 (+ (:hit-die first-class) level-bonus)]]) + [:td.p-5 (+ (:hit-die first-class) level-bonus)] + [:td.p5]]) (doall (map-indexed (fn [j level-value] @@ -1337,14 +1339,20 @@ :value (:value level-value)}]] [:td.p-5 con-bonus-str] [:td.p-5 (common/bonus-str (+ misc-bonus cls-level-bonus))] - [:td.p-5 (+ (:value level-value) level-bonus)]]) + [:td.p-5 (+ (:value level-value) level-bonus)] + [:td.p-5 [:button.roll-button + {:on-click (fn [e] + (let [value (js/parseInt (dice/die-roll (-> levels cls :hit-die)))] + (dispatch [:set-level-hit-points built-template character level-value value])))} + "d" (-> levels cls :hit-die)]]]) level-values)) [:tr [:td.p-5 "Total"] [:td.p-5 total-base-hps] [:td.p-5 (common/bonus-str total-con-bonus)] [:td.p-5 (common/bonus-str total-misc-bonus)] - [:td.p-5 (+ total-base-hps total-con-bonus total-misc-bonus)]]]]])) + [:td.p-5 (+ total-base-hps total-con-bonus total-misc-bonus)] + [:td.p-5]]]]])) classes)) (if (> (count classes) 1) [:div.m-t-20 @@ -1357,7 +1365,8 @@ [:td.p-5 total-base-hps] [:td.p-5 (common/bonus-str total-con-bonus)] [:td.p-5 (common/bonus-str total-misc-bonus)] - [:td.p-5 total-hps]]]]])])) + [:td.p-5 total-hps] + [:td.p-5]]]]])])) (defn remaining-adjustments-fn [built-template character] #(Math/abs (entity/count-remaining built-template character %))) diff --git a/src/cljs/orcpub/dnd/e5/views.cljs b/src/cljs/orcpub/dnd/e5/views.cljs index f6ba1d712..87128ac08 100644 --- a/src/cljs/orcpub/dnd/e5/views.cljs +++ b/src/cljs/orcpub/dnd/e5/views.cljs @@ -3016,8 +3016,8 @@ none-item (map (fn [[key]] - (let [{:keys [name]} (all-armor-map key)] - {:title name + (let [{:keys [name] :as item} (all-armor-map key)] + {:title (weapon-name item) :value key})) carried-armor)) :value (or worn-armor (-> best-armor-combo :armor :key)) @@ -3029,8 +3029,8 @@ none-item (map (fn [[key]] - (let [{:keys [name]} (all-armor-map key)] - {:title name + (let [{:keys [name] :as item} (all-armor-map key)] + {:title (weapon-name item) :value key})) carried-shields)) :value (or wielded-shield (-> best-armor-combo :shield :key)) @@ -3048,8 +3048,8 @@ none-item (map (fn [[key]] - (let [{:keys [name]} (all-weapons-map key)] - {:title name + (let [{:keys [name] :as item} (all-weapons-map key)] + {:title (weapon-name item) :value key})) carried-weapons)) :value main-hand-weapon-kw @@ -3070,28 +3070,28 @@ dual-wield-weapon?))) (map (fn [[key]] - (let [{:keys [name]} (all-weapons-map key)] - {:title name + (let [{:keys [name] :as item} (all-weapons-map key)] + {:title (weapon-name item) :value key})))) carried-weapons)) :value off-hand-weapon-kw :on-change (wield-handler ::char/wield-off-hand-weapon id)}]) #_[:div.flex.flex-wrap - [equipped-section-dropdown - "Attuned Magic Item 1" - {:items [none-item] - :value nil - :on-change (fn [])}] - [equipped-section-dropdown - "Attuned Magic Item 2" - {:items [none-item] - :value nil - :on-change (fn [])}] - [equipped-section-dropdown - "Attuned Magic Item 3" - {:items [none-item] - :value nil - :on-change (fn [])}]]])]]) + [equipped-section-dropdown + "Attuned Magic Item 1" + {:items [none-item] + :value nil + :on-change (fn [])}] + [equipped-section-dropdown + "Attuned Magic Item 2" + {:items [none-item] + :value nil + :on-change (fn [])}] + [equipped-section-dropdown + "Attuned Magic Item 3" + {:items [none-item] + :value nil + :on-change (fn [])}]]])]]) (defn combat-details [num-columns id] (let [weapon-profs @(subscribe [::char/weapon-profs id])