Skip to content

Commit

Permalink
Merge pull request #7048 from francescopellegrini/curupira-test
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahTheDuke authored Aug 12, 2023
2 parents 25fac6b + d7cf2fa commit e142d7d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
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 @@ -1955,6 +1955,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

0 comments on commit e142d7d

Please sign in to comment.