<commit_before>(in-ns 'game.core)

(def cards-agendas

  {"15 Minutes"
     {:abilities [{:cost [:click 1] :msg "shuffle 15 Minutes into R&D"
                   :effect (req (let [corp-agendas (get-in corp [:scored])
                                      agenda-owner (if (some #(= (:cid %) (:cid card)) corp-agendas) :corp :runner)]
                                  (gain-agenda-point state agenda-owner (- (:agendapoints card))))
                                ; refresh agendapoints to 1 before shuffle in case it was modified by e.g. The Board
                                (move state :corp (dissoc (assoc card :agendapoints 1) :seen :rezzed) :deck {:front true})
                                (shuffle! state :corp :deck)
                                )
                   }]
      :flags {:has-abilities-when-stolen true}}

   "Accelerated Beta Test"
   (letfn [(abt [n i]
             {:req (req (> i 0))
              :prompt "Select a piece of ICE from the Temporary Zone to install"
              :choices {:req #(and (:side % "Corp")
                                   (= (:type %) "ICE")
                                   (= (:zone %) [:play-area]))}
              :effect (req (corp-install state side target nil
                                         {:no-install-cost true :install-state :rezzed-no-cost})
                           (trigger-event state side :rez target)
                           (when (< n i)
                             (resolve-ability state side (abt (inc n) i) card nil)))})]
     {:optional {:prompt "Look at the top 3 cards of R&D?"
                 :yes-ability {:effect (req (let [n (count (filter #(= (:type %) "ICE")
                                                                   (take 3 (:deck corp))))]
                                              (resolve-ability
                                               state side
                                               {:msg "look at the top 3 cards of R&D"
                                                :effect (req (doseq [c (take 3 (:deck corp))]
                                                               (move state side c :play-area))
                                                             (resolve-ability state side (abt 1 n) card nil))}
                                               card nil)))}}})

   "Ancestral Imager"
   {:events {:jack-out {:msg "do 1 net damage" :effect (effect (damage :net 1))}}}

   "AstroScript Pilot Program"
   {:data {:counter 1}
    :abilities [{:counter-cost 1 :msg (msg "place 1 advancement token on "
                                           (if (:rezzed target) (:title target) "a card"))
                 :choices {:req can-be-advanced?}
                 :effect (effect (add-prop target :advance-counter 1 {:placed true}))}]}

   "Award Bait"
   {:access {:choices ["0", "1", "2"] :prompt "How many advancement tokens?"
             :effect (req (let [c (Integer/parseInt target)]
                            (resolve-ability
                             state side
                             {:choices {:req can-be-advanced?}
                              :msg (msg "place " c " advancement tokens on " (if (:rezzed target) (:title target) "a card"))<commit_msg>Cleans up ABT code.<commit_after>(in-ns 'game.core)

(def cards-agendas

  {"15 Minutes"
     {:abilities [{:cost [:click 1] :msg "shuffle 15 Minutes into R&D"
                   :effect (req (let [corp-agendas (get-in corp [:scored])
                                      agenda-owner (if (some #(= (:cid %) (:cid card)) corp-agendas) :corp :runner)]
                                  (gain-agenda-point state agenda-owner (- (:agendapoints card))))
                                ; refresh agendapoints to 1 before shuffle in case it was modified by e.g. The Board
                                (move state :corp (dissoc (assoc card :agendapoints 1) :seen :rezzed) :deck {:front true})
                                (shuffle! state :corp :deck)
                                )
                   }]
      :flags {:has-abilities-when-stolen true}}

   "Accelerated Beta Test"
   (letfn [(abt [n i]
             {:req (req (> i 0))
              :prompt "Select a piece of ICE from the Temporary Zone to install"
              :choices {:req #(and (:side % "Corp")
                                   (= (:type %) "ICE")
                                   (= (:zone %) [:play-area]))}
              :effect (req (corp-install state side target nil
                                         {:no-install-cost true :install-state :rezzed-no-cost})
                           (trigger-event state side :rez target)
                           (when (< n i)
                             (resolve-ability state side (abt (inc n) i) card nil)))})]
     {:optional {:prompt "Look at the top 3 cards of R&D?"
                 :yes-ability {:effect (req (let [n (count (filter #(= (:type %) "ICE") (take 3 (:deck corp))))]
                                              (resolve-ability state side
                                                               {:msg "look at the top 3 cards of R&D"
                                                                :effect (req (doseq [c (take 3 (:deck corp))]
                                                                               (move state side c :play-area))
                                                                             (resolve-ability state side (abt 1 n) card nil))}
                                                               card nil)))}}})

   "Ancestral Imager"
   {:events {:jack-out {:msg "do 1 net damage" :effect (effect (damage :net 1))}}}

   "AstroScript Pilot Program"
   {:data {:counter 1}
    :abilities [{:counter-cost 1 :msg (msg "place 1 advancement token on "
                                           (if (:rezzed target) (:title target) "a card"))
                 :choices {:req can-be-advanced?}
                 :effect (effect (add-prop target :advance-counter 1 {:placed true}))}]}

   "Award Bait"
   {:access {:choices ["0", "1", "2"] :prompt "How many advancement tokens?"
             :effect (req (let [c (Integer/parseInt target)]
                            (resolve-ability
                             state side
                             {:choices {:req can-be-advanced?}
                              :msg (msg "place " c " advancement tokens on " (if (:rezzed target) (:title target) "a card"))
{'fraction_non_alphanumeric': 0.11787484510532838, 'fraction_numerical': 0.006815365551425031, 'mean_word_length': 1.143046797212081, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 48, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '100631', 'n_tokens_mistral': 1744, 'n_tokens_neox': 1543, 'n_words': 554}