diff --git a/src/clj/game/cards/assets.clj b/src/clj/game/cards/assets.clj index daba41aadd..9ac8c508dd 100644 --- a/src/clj/game/cards/assets.clj +++ b/src/clj/game/cards/assets.clj @@ -991,15 +991,18 @@ "Malia Z0L0K4" (let [re-enable-target (req (when-let [malia-target (:malia-target card)] - (system-msg state side (str "uses " (:title card) " to unblank " - (card-str state malia-target))) - (enable-card state :runner (get-card state malia-target)) - (when-let [reactivate-effect (:reactivate (card-def malia-target))] - (resolve-ability state :runner reactivate-effect (get-card state malia-target) nil))))] + (when (:disabled (get-card state malia-target)) + (system-msg state side (str "uses " (:title card) " to unblank " + (card-str state malia-target))) + (enable-card state :runner (get-card state malia-target)) + (when-let [reactivate-effect (:reactivate (card-def malia-target))] + (resolve-ability state :runner reactivate-effect (get-card state malia-target) nil)))))] {:effect (effect (update! (assoc card :malia-target target)) (disable-card :runner target)) :msg (msg (str "blank the text box of " (card-str state target))) - :choices {:req #(and (= (:side %) "Runner") (installed? %) (resource? %) + :choices {:req #(and (= "Runner" (:side %)) + (installed? %) + (resource? %) (not (has-subtype? % "Virtual")))} :leave-play re-enable-target :move-zone re-enable-target}) diff --git a/src/clj/game/cards/events.clj b/src/clj/game/cards/events.clj index 813bb0435a..e083f95181 100644 --- a/src/clj/game/cards/events.clj +++ b/src/clj/game/cards/events.clj @@ -250,7 +250,7 @@ {:msg (msg "place 3 virus tokens on " (:title target)) :choices {:req #(and (installed? %) (= (:side %) "Runner") - (zero? (get-virus-counters state side %)))} + (zero? (get-virus-counters state %)))} :effect (req (add-counter state :runner target :virus 3))} card nil))} diff --git a/src/clj/game/cards/icebreakers.clj b/src/clj/game/cards/icebreakers.clj index 8152174e0d..c1e3e9b30d 100644 --- a/src/clj/game/cards/icebreakers.clj +++ b/src/clj/game/cards/icebreakers.clj @@ -357,7 +357,7 @@ {:label "Add a virus counter" :effect (effect (system-msg "manually adds a virus counter to Aumakua") (add-counter card :virus 1))}] - :strength-bonus (req (get-virus-counters state side card)) + :strength-bonus (req (get-virus-counters state card)) :events {:run-ends {:req (req (and (not (or (get-in @state [:run :did-trash]) (get-in @state [:run :did-steal]))) (get-in @state [:run :did-access]))) @@ -546,7 +546,7 @@ :req (req (:runner-phase-12 @state)) :effect (effect (add-counter card :virus 1) (update-breaker-strength card))}] - :strength-bonus (req (or (get-virus-counters state side card) 0))} + :strength-bonus (req (or (get-virus-counters state card) 0))} "Demara" (auto-icebreaker ["Barrier"] diff --git a/src/clj/game/cards/programs.clj b/src/clj/game/cards/programs.clj index 7249037e28..a2c5120e4a 100644 --- a/src/clj/game/cards/programs.clj +++ b/src/clj/game/cards/programs.clj @@ -60,6 +60,8 @@ (system-msg "places 1 [Credit] on Bankroll"))}} :abilities [{:label "[Trash]: Take all credits from Bankroll" :async true + ;; Cannot trash unless there are counters (so game state changes) + :req (req (pos? (get-counters card :credit))) :effect (req (let [credits-on-bankroll (get-counters card :credit)] (wait-for (trash state :runner card {:cause :ability-cost}) (take-credits state :runner credits-on-bankroll) @@ -114,7 +116,7 @@ :events {:successful-run {:silent (req true) :req (req (= target :rd)) :effect (effect (add-counter card :virus 1))} - :pre-advancement-cost {:req (req (>= (get-virus-counters state side card) 3)) + :pre-advancement-cost {:req (req (>= (get-virus-counters state card) 3)) :effect (effect (advancement-cost-bonus 1))} :counter-added {:req (req (or (= (:title target) "Hivemind") (= (:cid target) (:cid card)))) @@ -207,16 +209,16 @@ ab (if (get-in card [:special :auto-accept]) auto-ab ab)] (continue-ability state side ab card targets)))}} :effect (effect (toast "Tip: You can toggle automatically adding virus counters by clicking Consume.")) - :abilities [{:req (req (pos? (get-virus-counters state side card))) + :abilities [{:req (req (pos? (get-virus-counters state card))) :cost [:click 1] :label "Gain 2 [Credits] for each hosted virus counter, then remove all virus counters." - :effect (req (gain-credits state side (* 2 (get-virus-counters state side card))) + :effect (req (gain-credits state side (* 2 (get-virus-counters state card))) (update! state side (assoc-in card [:counter :virus] 0)) (when-let [hiveminds (filter #(= "Hivemind" (:title %)) (all-active-installed state :runner))] (doseq [h hiveminds] (update! state side (assoc-in h [:counter :virus] 0))))) :msg (msg (let [local-virus (get-counters card :virus) - global-virus (get-virus-counters state side card) + global-virus (get-virus-counters state card) hivemind-virus (- global-virus local-virus)] (str "gain " (* 2 global-virus) " [Credits], removing " (quantify local-virus "virus counter") " from Consume" (when (pos? hivemind-virus) @@ -270,7 +272,7 @@ :effect (effect (add-counter card :virus 1)) :req (req (= target :rd))} :runner-turn-begins - {:req (req (>= (get-virus-counters state side card) 3)) :msg "look at the top card of R&D" + {:req (req (>= (get-virus-counters state card) 3)) :msg "look at the top card of R&D" :effect (effect (prompt! card (str "The top card of R&D is " (:title (first (:deck corp)))) ["OK"] {}))}}} @@ -454,9 +456,9 @@ card nil)))}]} "Gorman Drip v1" - {:abilities [{:cost [:click 1] :effect (effect (gain-credits (get-virus-counters state side card)) + {:abilities [{:cost [:click 1] :effect (effect (gain-credits (get-virus-counters state card)) (trash card {:cause :ability-cost})) - :msg (msg "gain " (get-virus-counters state side card) " [Credits]")}] + :msg (msg "gain " (get-virus-counters state card) " [Credits]")}] :events {:corp-click-credit {:effect (effect (add-counter :runner card :virus 1))} :corp-click-draw {:effect (effect (add-counter :runner card :virus 1))}}} @@ -651,10 +653,10 @@ :pre-access {:async true :req (req (= target :rd)) :effect (effect (continue-ability - {:req (req (< 1 (get-virus-counters state side card))) + {:req (req (< 1 (get-virus-counters state card))) :prompt "Choose how many additional R&D accesses to make with Medium" - :choices {:number (req (dec (get-virus-counters state side card))) - :default (req (dec (get-virus-counters state side card)))} + :choices {:number (req (dec (get-virus-counters state card))) + :default (req (dec (get-virus-counters state card)))} :msg (msg "access " target " additional cards from R&D") :effect (effect (access-bonus (max 0 target)))} card nil))}}} @@ -676,10 +678,10 @@ :pre-access {:async true :req (req (= target :hq)) :effect (effect (continue-ability - {:req (req (< 1 (get-virus-counters state side card))) + {:req (req (< 1 (get-virus-counters state card))) :prompt "Choose how many additional HQ accesses to make with Nerve Agent" - :choices {:number (req (dec (get-virus-counters state side card))) - :default (req (dec (get-virus-counters state side card)))} + :choices {:number (req (dec (get-virus-counters state card))) + :default (req (dec (get-virus-counters state card)))} :msg (msg "access " target " additional cards from HQ") :effect (effect (access-bonus (max 0 target)))} card nil))}}} @@ -752,7 +754,7 @@ :effect (effect (update-ice-strength (:host card)))} :pre-ice-strength {:req (req (= (:cid target) (:cid (:host card)))) - :effect (effect (ice-strength-bonus (- (get-virus-counters state side card)) target))} + :effect (effect (ice-strength-bonus (- (get-virus-counters state card)) target))} :ice-strength-changed {:req (req (and (= (:cid target) (:cid (:host card))) (not (card-flag? (:host card) :untrashable-while-rezzed true)) @@ -1080,7 +1082,7 @@ "Trypano" (let [trash-if-5 (req (when-let [h (get-card state (:host card))] - (if (and (>= (get-virus-counters state side card) 5) + (if (and (>= (get-virus-counters state card) 5) (not (and (card-flag? h :untrashable-while-rezzed true) (rezzed? h)))) (do (system-msg state :runner (str "uses Trypano to trash " (card-str state h))) diff --git a/src/clj/game/cards/resources.clj b/src/clj/game/cards/resources.clj index 1216153296..37d55a7ed1 100644 --- a/src/clj/game/cards/resources.clj +++ b/src/clj/game/cards/resources.clj @@ -577,24 +577,30 @@ :abilities [{:msg "avoid 1 tag" :effect (effect (tag-prevent :runner 1) (trash card {:cause :ability-cost}))}]} "District 99" - {:implementation "Adding power counters must be done manually for programs/hardware trashed manually (e.g. by being over MU)" - :abilities [{:label "Add a card from your heap to your grip" - :req (req (seq (filter #(= (:faction (:identity runner)) (:faction %)) (:discard runner)))) - :counter-cost [:power 3] :cost [:click 1] - :prompt (msg "Which card to add to grip?") - :choices (req (filter #(= (:faction (:identity runner)) (:faction %)) (:discard runner))) - :effect (effect (move target :hand)) - :msg (msg "Add " (:title target) " to grip")} - {:label "Add a power counter manually" - :once :per-turn - :effect (effect (add-counter card :power 1)) - :msg (msg "manually add a power counter.")}] - :events (let [prog-or-hw (fn [t] (or (program? (first t)) (hardware? (first t)))) - trash-event (fn [side-trash] {:once :per-turn - :req (req (first-event? state side side-trash prog-or-hw)) - :effect (effect (add-counter card :power 1))})] - {:corp-trash (trash-event :corp-trash) - :runner-trash (trash-event :runner-trash)})} + (letfn [(eligible-cards [runner] (filter #(same-card? :faction (:identity runner) %) + (:discard runner)))] + {:implementation "Adding power counters must be done manually for programs/hardware trashed manually (e.g. by being over MU)" + :abilities [{:label "Add a card from your heap to your grip" + :req (req (seq (eligible-cards runner))) + :counter-cost [:power 3] + :cost [:click 1] + :prompt "Select a card to add to grip?" + :choices (req (eligible-cards runner)) + :effect (effect (move target :hand)) + :msg (msg "add " (:title target) " to grip")} + {:label "Add a power counter manually" + :once :per-turn + :effect (effect (add-counter card :power 1)) + :msg "manually add a power counter"}] + :events (let [prog-or-hw #(or (program? (first %)) + (hardware? (first %))) + trash-event (fn [side-trash] {:once :per-turn + :req (req (first-event? state side side-trash prog-or-hw)) + :effect (effect (system-msg :runner "adds 1 power counter on District 99") + (add-counter card :power 1))})] + {:corp-trash (trash-event :corp-trash) + :runner-trash (trash-event :runner-trash)})}) + "DJ Fenris" (let [is-draft-id? #(.startsWith (:code %) "00") @@ -622,8 +628,20 @@ (clear-wait-prompt state :corp) (effect-completed state side eid)))}] {:async true - :effect (effect (show-wait-prompt :corp "Runner to pick identity to host on DJ Fenris") - (continue-ability fenris-effect card nil))}) + :effect (req (show-wait-prompt state :corp "Runner to pick identity to host on DJ Fenris") + (continue-ability state side fenris-effect card nil)) + ;; Handle Dr. Lovegood / Malia + :disable {:effect (req (doseq [hosted (:hosted card)] + (disable-card state side hosted)))} + :reactivate {:effect (req (doseq [hosted (:hosted card) + :let [c (dissoc hosted :disabled) + {:keys [effect events]} (card-def c)]] + ;; Manually enable card to trigger `:effect`, similar to `enable-identity` + (update! state side c) + (when effect + (effect state side (make-eid state) c nil)) + (when events + (register-events state side events c))))}}) "Donut Taganes" {:msg "increase the play cost of operations and events by 1 [Credits]" @@ -2072,7 +2090,7 @@ :effect (req (resolve-ability state side {:msg (msg "move 1 virus counter to " (:title target)) - :choices {:req #(pos? (get-virus-counters state side %))} + :choices {:req #(pos? (get-virus-counters state %))} :effect (req (add-counter state side card :virus -1) (add-counter state side target :virus 1))} card nil))}]} diff --git a/src/clj/game/core/actions.clj b/src/clj/game/core/actions.clj index 73b9b9ca04..2637b03ae8 100644 --- a/src/clj/game/core/actions.clj +++ b/src/clj/game/core/actions.clj @@ -119,22 +119,32 @@ (same-side? s (:side card)) (or (= last-zone :play-area) (same-side? side (:side card)))) - (case server - ("Heap" "Archives") - (let [action-str (if (= (first (:zone c)) :hand) "discards " "trashes ")] - (trash state s c {:unpreventable true}) - (system-msg state side (str action-str label from-str))) - ("Grip" "HQ") - (do (move state s (dissoc c :seen :rezzed) :hand {:force true}) - (system-msg state side (str "moves " label from-str " to " server))) - ("Stack" "R&D") - (do (move state s (dissoc c :seen :rezzed) :deck {:front true :force true}) - (system-msg state side (str "moves " label from-str " to the top of " server))) - nil)))) - -(defn concede [state side args] - (system-msg state side "concedes") - (win state (if (= side :corp) :runner :corp) "Concede")) + (let [move-card-to (partial move state s (dissoc c :seen :rezzed)) + log-move (fn [verb & text] (system-msg state side (str verb " " label from-str + (when (seq text) (apply str " " text)))))] + (case server + ("Heap" "Archives") + (if (= :hand (first (:zone c))) + ;; Discard from hand, do not trigger trash + (do (move-card-to :discard {:force true}) + (log-move "discards")) + (do (trash state s c {:unpreventable true}) + (log-move "trashes"))) + ("Grip" "HQ") + (do (move-card-to :hand {:force true}) + (log-move "moves" "to " server)) + ("Stack" "R&D") + (do (move-card-to :deck {:front true :force true}) + (log-move "moves" "to the top of " server)) + ;; default + nil))))) + +(defn concede + "Trigger game concede by specified side. Takes a third argument for use with user commands." + ([state side _] (concede state side)) + ([state side] + (system-msg state side "concedes") + (win state (if (= side :corp) :runner :corp) "Concede"))) (defn- finish-prompt [state side prompt card] (when-let [end-effect (:end-effect prompt)] diff --git a/src/clj/game/core/cards.clj b/src/clj/game/core/cards.clj index 7d568ec5b6..71229cdbe2 100644 --- a/src/clj/game/core/cards.clj +++ b/src/clj/game/core/cards.clj @@ -54,15 +54,19 @@ (defn update! "Updates the state so that its copy of the given card matches the argument given." [state side {:keys [type zone cid host] :as card}] - (if (= type "Identity") + (cond + (= type "Identity") (when (= side (to-keyword (:side card))) (swap! state assoc-in [side :identity] card)) - (if host - (update-hosted! state side card) - (let [z (cons (to-keyword (or (get-scoring-owner state card) (:side card))) zone) - [head tail] (split-with #(not= (:cid %) cid) (get-in @state z))] - (when (not-empty tail) - (swap! state assoc-in z (vec (concat head [card] (rest tail))))))))) + + host + (update-hosted! state side card) + + :else + (let [z (cons (to-keyword (or (get-scoring-owner state card) (:side card))) zone) + [head tail] (split-with #(not= (:cid %) cid) (get-in @state z))] + (when (not-empty tail) + (swap! state assoc-in z (vec (concat head [card] (rest tail)))))))) ;; Helpers for move (defn- remove-old-card @@ -255,7 +259,7 @@ (defn get-virus-counters "Calculate the number of virus counters on the given card, taking Hivemind into account." - [state side card] + [state card] (let [hiveminds (when (is-virus-program? card) (filter #(= (:title %) "Hivemind") (all-active-installed state :runner)))] (reduce + (map #(get-counters % :virus) (cons card hiveminds))))) @@ -274,7 +278,7 @@ (defn disable-identity "Disables the side's identity" [state side] - (let [id (assoc (:identity (side @state)) :disabled true)] + (let [id (assoc (get-in @state [side :identity]) :disabled true)] (update! state side id) (unregister-events state side id) (when-let [leave-play (:leave-play (card-def id))] @@ -283,19 +287,20 @@ (defn disable-card "Disables a card" [state side card] + (deactivate state side card) (let [c (assoc card :disabled true)] - (deactivate state side card) - (update! state side c))) + (update! state side c)) + (when-let [disable-effect (:disable (card-def card))] + (resolve-ability state side disable-effect (get-card state card) nil))) (defn enable-identity "Enables the side's identity" [state side] - (let [id (assoc (:identity (side @state)) :disabled false) - cdef (card-def id) - events (:events cdef)] + (let [id (assoc (get-in @state [side :identity]) :disabled false) + {:keys [events effect]} (card-def id)] (update! state side id) - (when-let [eff (:effect cdef)] - (eff state side (make-eid state) id nil)) + (when effect + (effect state side (make-eid state) id nil)) (when events (register-events state side events id)))) diff --git a/src/clj/game/main.clj b/src/clj/game/main.clj index 5dff026eda..a2284332e3 100644 --- a/src/clj/game/main.clj +++ b/src/clj/game/main.clj @@ -153,7 +153,7 @@ "Concedes victory from the given player." [state side] (when (and state side) - (core/concede state side nil))) + (core/concede state side))) (defn handle-say "Adds a message from a user to the chat log." diff --git a/test/clj/game_test/cards/ice.clj b/test/clj/game_test/cards/ice.clj index 846499ee72..4aa2140737 100644 --- a/test/clj/game_test/cards/ice.clj +++ b/test/clj/game_test/cards/ice.clj @@ -851,7 +851,7 @@ (is (= 1 (count (:hosted (refresh lotus)))) "Parasite hosted on Lotus Field") (take-credits state :runner 1) (take-credits state :corp) - (is (= 1 (core/get-virus-counters state :runner (first (:hosted (refresh lotus))))) + (is (= 1 (core/get-virus-counters state (first (:hosted (refresh lotus))))) "Parasite has 1 virus counter") (is (= 4 (:current-strength (refresh lotus))) "Lotus Field strength unchanged") (take-credits state :runner) @@ -883,7 +883,7 @@ (run-jack-out state) (take-credits state :runner) (take-credits state :corp) - (is (zero? (core/get-virus-counters state :runner (first (:hosted (refresh m))))) + (is (zero? (core/get-virus-counters state (first (:hosted (refresh m))))) "Parasite does not gain a virus counter")))) (testing "Facedown ice" (do-game @@ -906,7 +906,7 @@ (take-credits state :runner) (take-credits state :corp) (is (empty? (:prompt (get-runner))) "No Trypano prompt") - (is (zero? (core/get-virus-counters state :runner (first (:hosted (refresh m))))) + (is (zero? (core/get-virus-counters state (first (:hosted (refresh m))))) "Trypano does not gain a virus counter")))) (testing "Derezzed ice" (do-game @@ -929,12 +929,12 @@ (run-jack-out state) (take-credits state :runner) (take-credits state :corp) - (is (zero? (core/get-virus-counters state :runner (first (:hosted (refresh m))))) + (is (zero? (core/get-virus-counters state (first (:hosted (refresh m))))) "Parasite does not gain a virus counter") (take-credits state :runner) (core/derez state :corp (refresh m)) (take-credits state :corp) - (is (= 1 (core/get-virus-counters state :runner (first (:hosted (refresh m))))) + (is (= 1 (core/get-virus-counters state (first (:hosted (refresh m))))) "Parasite gains a virus counter on derezzed Magnet") (play-from-hand state :runner "Parasite") (click-card state :runner (refresh e)) @@ -947,16 +947,16 @@ (run-jack-out state) (take-credits state :runner) (take-credits state :corp) - (is (= 1 (core/get-virus-counters state :runner (first (:hosted (refresh m))))) + (is (= 1 (core/get-virus-counters state (first (:hosted (refresh m))))) "First parasite stays at 1 virus counter on rezzed Magnet") - (is (zero? (core/get-virus-counters state :runner (second (:hosted (refresh m))))) + (is (zero? (core/get-virus-counters state (second (:hosted (refresh m))))) "Second parasite does not gain a virus counter on derezzed Magnet") (take-credits state :runner) (core/derez state :corp (refresh m)) (take-credits state :corp) - (is (= 2 (core/get-virus-counters state :runner (first (:hosted (refresh m))))) + (is (= 2 (core/get-virus-counters state (first (:hosted (refresh m))))) "First parasite gains a virus counter on derezzed Magnet") - (is (= 1 (core/get-virus-counters state :runner (second (:hosted (refresh m))))) + (is (= 1 (core/get-virus-counters state (second (:hosted (refresh m))))) "Second parasite gains a virus counter on rezzed Magnet"))))) (deftest mausolus @@ -1498,7 +1498,7 @@ (is (= 1 (count (:hosted (refresh sacw)))) "Parasite hosted on Self-Adapting Code Wall") (take-credits state :runner 1) (take-credits state :corp) - (is (= 1 (core/get-virus-counters state :runner (first (:hosted (refresh sacw))))) + (is (= 1 (core/get-virus-counters state (first (:hosted (refresh sacw))))) "Parasite has 1 virus counter") (is (= 1 (:current-strength (refresh sacw))) "Self-Adapting Code Wall strength unchanged") (take-credits state :runner) diff --git a/test/clj/game_test/cards/resources.clj b/test/clj/game_test/cards/resources.clj index 6775042bdd..eca7ee6010 100644 --- a/test/clj/game_test/cards/resources.clj +++ b/test/clj/game_test/cards/resources.clj @@ -488,7 +488,7 @@ (testing "Trashes by both sides and manual triggers" (do-game (new-game (default-corp ["Bio-Ethics Association"]) - (default-runner ["District 99" (qty "Spy Camera" 2) "Faerie"])) + (default-runner ["District 99" (qty "Spy Camera" 3) "Faerie"])) (play-from-hand state :corp "Bio-Ethics Association" "New remote") (take-credits state :corp) (play-from-hand state :runner "District 99") @@ -503,6 +503,11 @@ (click-prompt state :runner "OK") (is (= 1 (get-counters (refresh d99) :power)) "Manual power counter addition suppressed later trigger") (play-from-hand state :runner "Spy Camera") + (take-credits state :runner) + (take-credits state :corp) + (core/move-card state :runner {:card (find-card "Spy Camera" (:hand (get-runner))) + :server "Heap"}) + (is (= 1 (get-counters (refresh d99) :power)) "Discarding from hand does not trigger D99") (is (= 1 (count (:hand (get-runner)))) "Faerie in hand") (is (= "Faerie" (:title (first (:hand (get-runner)))))) (core/rez state :corp bea) @@ -676,7 +681,29 @@ ;; Use All-nighter to trigger Geist (card-ability state :runner (get-resource state 0) 0) (is (= (+ 1 hand-count) (count (:hand (get-runner)))) - "Drew one card with Geist when using All-nighter trash ability, not two (from Laguna Velasco District)")))))) + "Drew one card with Geist when using All-nighter trash ability, not two (from Laguna Velasco District)")))) + (testing "Disable with Malia" + (do-game + (new-game (default-corp ["Malia Z0L0K4"]) + (make-deck geist ["DJ Fenris"])) + (play-from-hand state :corp "Malia Z0L0K4" "New remote") + (take-credits state :corp) + (play-from-hand state :runner "DJ Fenris") + (click-prompt state :runner chaos) + (is (= 5 (core/available-mu state)) "Gained 1 MU from CT") + (let [malia (get-content state :remote1 0) + dj-fenris (get-resource state 0) + hosted-ct #(first (:hosted (refresh dj-fenris)))] + (core/rez state :corp malia) + (click-card state :corp dj-fenris) + (is (:disabled (refresh dj-fenris)) "DJ Fenris is disabled") + (is (:disabled (hosted-ct)) "CT is disabled") + (is (= 4 (core/available-mu state)) "Disabling DJ Fenris also disabled CT, reducing MU back to 4") + ;; Trash Malia to stop disable + (core/trash state :corp (refresh malia)) + (is (not (:disabled (refresh dj-fenris))) "DJ Fenris is enabled") + (is (not (:disabled (hosted-ct))) "CT is enabled") + (is (= 5 (core/available-mu state)) "Enabling DJ Fenris also enabled CT, bringing MU back up to 5")))))) (deftest donut-taganes ;; Donut Taganes - add 1 to play cost of Operations & Events when this is in play diff --git a/test/clj/game_test/cards/upgrades.clj b/test/clj/game_test/cards/upgrades.clj index 9f547f7cb7..a8a870f098 100644 --- a/test/clj/game_test/cards/upgrades.clj +++ b/test/clj/game_test/cards/upgrades.clj @@ -534,7 +534,7 @@ ;; runner's turn ;; install cache and medium (play-from-hand state :runner "Cache") - (let [virus-counters (fn [card] (core/get-virus-counters state :runner (refresh card))) + (let [virus-counters (fn [card] (core/get-virus-counters state (refresh card))) cache (find-card "Cache" (get-program state)) cvs (get-content state :hq 0)] (is (= 3 (virus-counters cache))) @@ -558,7 +558,7 @@ ;; runner's turn ;; install cache and medium (play-from-hand state :runner "Cache") - (let [virus-counters (fn [card] (core/get-virus-counters state :runner (refresh card))) + (let [virus-counters (fn [card] (core/get-virus-counters state (refresh card))) cache (find-card "Cache" (get-program state)) cvs (get-content state :remote1 0)] (is (= 3 (virus-counters cache)))