   (let [username (get-in @state [side :user :username])]
     (say state side {:user "__system__" :text (str username " " text ".")})))
 
-(declare prompt! forfeit trigger-event handle-end-run trash)
+(declare prompt! forfeit trigger-event handle-end-run trash update-advancement-cost)
 
 (defn pay [state side card & args]
   (let [costs (merge-costs (remove #(or (nil? %) (= % [:forfeit])) args))

  (swap! state assoc-in [side :register] nil)
  (swap! state assoc-in [side :click] (get-in @state [side :click-per-turn]))
  (trigger-event state side (if (= side :corp) :corp-turn-begins :runner-turn-begins))
  (when (= side :corp) (draw state :corp)))

(defn end-turn [state side args]
  (let [max-hand-size (get-in @state [side :max-hand-size])]

                   (system-msg state side (str "installs " card-name " in " server))))
               (let [moved-card (move state side c slot)]
                 (trigger-event state side :corp-install moved-card)
                 (when (= (:type c) "Agenda")
                   (update-advancement-cost state side moved-card))
                 (when rezzed (rez state side moved-card {:no-cost true})))))))))

(defn play [state side {:keys [card server]}]
