       (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))))
 

(defn optional-ability [state side card msg ability targets]
  (show-prompt state side card msg ["Yes" "No"] #(if (= % "Yes")
                                                   (resolve-ability state side ability card targets)
                                                   (when-let [no-msg (:no-msg ability)]
                                                     (system-msg state side (:no-msg ability))))))

(defn resolve-trace [state side boost]
  (let [runner (:runner @state)

    (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 resolve-steal-events)

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