Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 22 additions & 25 deletions src/clj/game/cards/upgrades.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe thread this? (-> ability (assoc :event ...) (assoc-in [:optional :req] ...))

[: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"
Expand Down
10 changes: 10 additions & 0 deletions test/clj/game/cards/upgrades_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading