       (concat (get-in @state [:bonus :steal-cost]))
       merge-costs flatten vec))
 
-(defn resolve-steal [state side c]
+(defn resolve-steal-events [state side c]
   (let [cdef (card-def c)]
     (when-let [access-effect (:access cdef)]
       (resolve-ability state (to-keyword (:side c)) access-effect c nil))
-    (trigger-event state side :access c)
+    (trigger-event state side :access c)))
+
+(defn resolve-steal [state side c]
+  (let [cdef (card-def c)]
+    (resolve-steal-events state side c)
     (when (or (not (:steal-req cdef)) ((:steal-req cdef) state :runner c nil))
       (steal state :runner c))))
 

    (say state side {:user "__system__" :text (str username " " text ".")})))

(declare prompt! forfeit trigger-event handle-end-run trash update-advancement-cost update-all-advancement-costs
         update-all-ice update-ice-strength update-breaker-strength all-installed)

(defn can-pay? [state side & args]
  (let [costs (merge-costs (remove #(or (nil? %) (= % [:forfeit])) args))

                                      {:cost cost
                                       :effect (effect (system-msg (str "pays " (costs-to-symbol cost)
                                                                        " to steal " (:title c)))
                                                       (resolve-steal c))
                                       :no-effect {:effect (effect (resolve-steal-events c))}} nil)
                    (resolve-ability state :runner
                                     {:prompt (str "You access " (:title c)) :choices ["Steal"]
                                      :effect (req (resolve-steal state :runner c))} c nil)))
                (do (resolve-steal-events state side c)
                    (prompt! state :runner c (str "You accessed but cannot steal " (:title c)) ["OK"] {}))))
        (do (when-let [access-effect (:access cdef)]
              (resolve-ability state (to-keyword (:side c)) access-effect c nil))
