Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Curupira test #7048

Merged
merged 1 commit into from
Aug 12, 2023
Merged
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
4 changes: 2 additions & 2 deletions src/clj/game/cards/programs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1014,12 +1014,12 @@
(strength-pump 1 1)]
:interactive (req true)
:events [{:event :encounter-ice
:optional {:prompt (msg "spend 3 counters to bypass " (:title current-ice))
:optional {:prompt (msg "Spend 3 power counters to bypass " (card-str state current-ice) "?")
:req (req (and
(has-subtype? (:ice context) "Barrier")
(<= 3 (get-counters (get-card state card) :power))))
:yes-ability {:cost [:power 3]
:msg (msg "bypass " (:title current-ice))
:msg (msg "bypass " (card-str state current-ice))
:effect (req (bypass-ice state))}}}

{:event :subroutines-broken
Expand Down
27 changes: 27 additions & 0 deletions test/clj/game/cards/programs_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1950,6 +1950,33 @@
(core/continue state :corp nil)
(is (= 0 (get-counters (refresh crypsis) :virus)) "Used up virus token on Crypsis"))))

(deftest curupira
(do-game
(new-game {:runner {:hand ["Curupira"]
:credits 50}
:corp {:hand ["Battlement"]}})
(play-from-hand state :corp "Battlement" "HQ")
(rez state :corp (get-ice state :hq 0))
(take-credits state :corp)
(core/gain state :runner :click 10)
(play-from-hand state :runner "Curupira")
(let [curu (get-program state 0)]
(dotimes [_ 3]
(run-on state "HQ")
(run-continue state)
(changes-val-macro 1 (get-counters (refresh curu) :power)
"Placed 1 power counter on Curupira"
(core/play-dynamic-ability state :runner {:dynamic "auto-pump-and-break" :card (refresh curu)}))
(core/continue state :corp nil)
(run-jack-out state))
(run-on state "HQ")
(run-continue state)
(changes-val-macro -3 (get-counters (refresh curu) :power)
"Spent 3 hosted power counters"
(click-prompt state :runner "Yes"))
(is (= :movement (:phase (get-run))) "Run has bypassed Battlement")
)))

(deftest customized-secretary
;; Customized Secretary - shuffles the stack even when no program is found
(do-game
Expand Down
Loading