                    (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]}]

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

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


(defn score [state side args]
  (let [card (or (:card args) args)]
    (when (>= (:advance-counter card) (or (:current-cost card) (:advancementcost card)))
      (let [moved-card (move state :corp card :scored)
            c (card-init state :corp moved-card)]
        (system-msg state :corp (str "scores " (:title c) " and gains " (:agendapoints c)
