     (when (or (has? card :subtype "Virus") (= (:counter-type card) "Virus"))
       (set-prop state :runner card :counter 0)))
   (trigger-event state side :purge))
+
+(defn get-virus-counters [state side card]
+   (let [hiveminds (filter #(= (:title %) "Hivemind") (get-in @state [:runner :rig :program]))]
+        (reduce + (map :counter (cons card hiveminds)))))
 
 (defn play-instant
   ([state side card] (play-instant state side card nil))

  (swap! state assoc-in [side :selected] nil)
  (swap! state update-in [side :prompt] rest))

(defn show-select [state side card ability]
  (swap! state assoc-in [side :selected]
         {:ability (dissoc ability :choices) :req (get-in ability [:choices :req])
          :max (get-in ability [:choices :max])})
  (show-prompt state side card
               (if-let [m (get-in ability [:choices :max])]
                 (str "Select up to " m " targets for " (:title card))
                 (str "Select a target for " (:title card)))
               ["Done"] (fn [choice] (resolve-select state side))))

(defn resolve-ability [state side {:keys [counter-cost advance-counter-cost cost effect msg req once
                                          once-key optional prompt choices end-turn player psi trace
                                          not-distinct] :as ability}
                       {:keys [title cid counter advance-counter] :as card} targets]
  (when ability
    (when (and optional

               p (assoc p :current-strength nil))))
    (system-msg state side "continues the run")))


(defn play-ability [state side {:keys [card ability targets] :as args}]
      (system-msg state side (str "play ability"))
  (let [cdef (card-def card)
        abilities (:abilities cdef)
        ab (if (= ability (count abilities))
