From 36a4d184c96e8bc9dbeaefb567fa30bf6eb5168e Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Sun, 8 Mar 2026 08:40:56 +1300 Subject: [PATCH] tucana fires off same server only --- src/clj/game/cards/upgrades.clj | 47 +++++++++++++-------------- test/clj/game/cards/upgrades_test.clj | 10 ++++++ 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/src/clj/game/cards/upgrades.clj b/src/clj/game/cards/upgrades.clj index a839924014..a86314a305 100644 --- a/src/clj/game/cards/upgrades.clj +++ b/src/clj/game/cards/upgrades.clj @@ -1985,36 +1985,33 @@ (draw state side eid 1)))}]}) (defcard "Tucana" - (let [ability {:optional {:prompt "Search R&D for an ice?" - :waiting-prompt true - :yes-ability {:async true - :prompt "Choose a piece of ice to install and rez" - :waiting-prompt true - :interactive (req true) - :choices (req (cancellable (filter ice? (:deck corp)) true)) - :msg (msg "install and rez " (card-str state target) ", paying a total of 3 [Credits] less") - :effect (req (wait-for (corp-install state side (make-eid state eid) target nil {:install-state :rezzed :combined-credit-discount 3 - :msg-keys {:install-source card - :display-origin true}}) - (shuffle! state :corp :deck) - (system-msg state side (str "shuffles R&D")) - (effect-completed state side eid))) - :cancel shuffle-my-deck!}}}] + (let [ability {:optional + {:prompt "Search R&D for an ice?" + :waiting-prompt true + :req (req (= (:previous-zone (:card context)) (get-zone card))) + :yes-ability {:async true + :prompt "Choose a piece of ice to install and rez" + :waiting-prompt true + :interactive (req true) + :choices (req (cancellable (filter ice? (:deck corp)) true)) + :msg (msg "install and rez " (card-str state target) ", paying a total of 3 [Credits] less") + :effect (req (wait-for (corp-install state side (make-eid state eid) target nil {:install-state :rezzed :combined-credit-discount 3 + :msg-keys {:install-source card + :display-origin true}}) + (shuffle! state :corp :deck) + (system-msg state side (str "shuffles R&D")) + (effect-completed state side eid))) + :cancel shuffle-my-deck!}}}] {:legal-zones (req (remove #{"HQ" "R&D" "Archives"} targets)) - :events [(assoc ability - :event :agenda-stolen - :req (req (= (:previous-zone (:card context)) (get-zone card)))) - (assoc ability - :event :agenda-scored - :req (req (= (:previous-zone (:card context)) (get-zone card))))] + :events [(assoc ability :event :agenda-stolen) + (assoc ability :event :agenda-scored)] :on-trash {:req (req (and run (= :runner side))) :effect (effect (register-events card - [(assoc ability - :event :agenda-stolen - :req (req (= (:previous-zone card) (:previous-zone (:card context)))) - :duration :end-of-run)]))}})) + [(assoc-in (assoc ability :event :agenda-stolen :duration :end-of-run) + [:optional :req] + (req (= (:previous-zone card) (:previous-zone (:card context)))))]))}})) (defcard "Tyr's Hand" {:abilities [{:label "Prevent a subroutine on a piece of Bioroid ice from being broken" diff --git a/test/clj/game/cards/upgrades_test.clj b/test/clj/game/cards/upgrades_test.clj index cf4332e502..cc430902bd 100644 --- a/test/clj/game/cards/upgrades_test.clj +++ b/test/clj/game/cards/upgrades_test.clj @@ -4682,6 +4682,16 @@ "Central servers are not listed in the install prompt") (click-prompt state :corp "New remote"))) +(deftest tucana-zone-respected + (do-game + (new-game {:corp {:hand ["Tucana" "Project Atlas"] + :deck ["Afshar"]}}) + (play-cards state :corp ["Tucana" "New remote" :rezzed]) + (take-credits state :corp) + (run-empty-server state :hq) + (click-prompt state :runner "Steal") + (is (no-prompt? state :corp) "Tucana plays nice"))) + (deftest underway-grid ;; Underway Grid - prevent expose of cards in server (do-game