               :effect (effect (add-prop card :rec-counter -1) (gain :credit 1))}
              (get-in cdef [:abilities ability]))
         cost (:cost ab)]
-    (prn "play-ability" cost)
     (when (or (nil? cost)
               (apply can-pay? state side cost))
         (when-let [activatemsg (:activatemsg ab)] (system-msg state side activatemsg))

        (if (not (nil? source-effect)) (source-effect state side source nil))
        (update! state side dest-card))
      )))

     ; (when-let [leave-effect (:leave-play (card-def card))]
     ;   (when (or (and (= (:side card) "Runner") (:installed card))
     ;             (:rezzed card)
     ;             (= (first (:zone card)) :current)
     ;             (not (empty? (filter #(= (:cid card) (:cid %)) (get-in @state [:corp :scored])))))
     ;     (leave-effect state side card nil)))


(defn fire-leave-play-effects [state side card]
  (if-let [source-leave-play (:source-leave-play card)]

  (let [source-def (card-def source)
        source-events (if (:events source-def) (:events source-def) {})
        dest-card (merge dest {:events source-events})]
          (update! state side dest-card)
          (register-events state side (:events dest-card) dest-card)
        ))
