    "Refractor"
    {:abilities [{:cost [:credit 1] :msg "break 1 code gate subroutine"}
                 {:cost [:credit 1] :msg "add 3 strength" :effect (effect (pump card 3))}]}
+
+   "Sage"
+   {:abilities [{:cost [:credit 2] :msg "break 1 code gate or barrier subroutine"}]
+    :effect #(add-watch % (keyword (str "sage" (:cid %3)))
+                        (fn [k ref old new]
+                          (when (not= (get-in old [:runner :memory]) (get-in new [:runner :memory]))
+                            (set-prop ref %2 %3 :counter 0))))
+    :leave-play #(remove-watch % (keyword (str "sage" (:cid %3))))}
 
    "Snowball"
    {:abilities [{:cost [:credit 1] :msg "break 1 barrier subroutine"}

   {:abilities [{:msg "break any number of AP subroutine" :effect (effect (trash card))}
                {:msg "Prevent any number of net damage" :effect (effect (trash card))}]}

   "Faerie"
   {:abilities [{:msg "break any number of sentry subroutine" :effect (effect (trash card))}
                {:cost [:credit 1] :msg "add 1 strength" :effect (effect (pump card 1))}]}

   {:abilities [{:req (req tagged) :cost [:click 1] :effect (effect (damage :meat 1))
                 :msg "do 1 meat damage"}]}

   "Project Atlas"
   {:effect (effect (set-prop card :counter (- (:advance-counter card) 3)))
    :abilities [{:counter-cost 1 :prompt "Choose a card" :msg (msg "add " (:title target) " to HQ from R&D")
                 :choices (req (:deck corp)) :effect (effect (move target :hand) (shuffle! :deck))}]}

   "Project Vitruvius"
   {:effect (effect (set-prop card :counter (- (:advance-counter card) 3)))
    :abilities [{:counter-cost 1 :prompt "Choose a card"
                 :msg (msg "add " (if (:seen target)
                                    (:title target) "an unseen card ") " to HQ from Archives")
                 :choices (req (:discard corp)) :effect (effect (move target :hand))}]}

   "Public Sympathy"
   {:effect (effect (gain :max-hand-size 2)) :leave-play (effect (lose :max-hand-size 2))}

