                     (when (< count min-count)
                       [:span.invalid (str "(minimum " min-count ")")])])
                  (let [inf (influence-count deck)
-                       limit (influencelimit identity)]
+                       limit (deck-inf-limit deck)]
                    [:div "Influence: "
                     [:span {:class (when (> inf limit) "invalid")} inf]
                     "/" (if (= INFINITY limit) "∞" limit)])

      (merge-with - infmap singledinfmap))
      infmap)))

(defn influence-count [deck]
  "Returns sum of influence count used by a deck"
  (apply + (vals (influence deck))))

(defn card-count [cards]
  (reduce #(+ %1 (:qty %2)) 0 cards))

        str (reduce #(str %1 (:qty %2) " " (get-in %2 [:card :title]) "\n") "" cards)]
    (om/set-state! owner :deck-edit str)))

(defn mostwanted
  "Returns a map of faction keywords to number of MWL restricted cards from the faction's cards."
  [deck]
  (let [cards (:cards deck)
        mwlhelper (fn [currmap line]
                    (let [card (:card line)]
                      (if (mostwanted? card)
                        (update-in currmap [(keyword (faction-label card))]
                                   (fnil (fn [curmwl] (+ curmwl (:qty line))) 0))
                        currmap)))]
    (reduce mwlhelper {} cards)))

(defn influence
  "Returns a map of faction keywords to influence values from the faction's cards."
  [deck]
  (let [identity (:identity deck)
        cards (:cards deck)
        infhelper (fn [currmap line]
