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

Make Khusyuk mandatory #4372

Merged
merged 2 commits into from
Aug 12, 2019
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
3 changes: 2 additions & 1 deletion src/clj/game/cards/events.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1295,8 +1295,8 @@
"Khusyuk"
(let [access-revealed (fn [revealed]
{:async true
:mandatory true
:prompt "Which of the revealed cards would you like to access (first card is on top)?"
:not-distinct true
:choices revealed
:req (req (not= (:max-access run) 0))
:effect (effect (access-card eid target))})
Expand Down Expand Up @@ -1328,6 +1328,7 @@
:async true
:replace-access
{:async true
:mandatory true
:effect (req
(wait-for
(resolve-ability state side (select-install-cost state) card nil)
Expand Down
10 changes: 2 additions & 8 deletions test/clj/game_test/cards/events.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,6 @@
(dotimes [_ 3] (play-from-hand state :runner "Akamatsu Mem Chip"))
(play-from-hand state :runner "Gordian Blade")
(play-run-event state (find-card "Khusyuk" (:hand (get-runner))) :rd)
(click-prompt state :runner "Replacement effect")
(click-prompt state :runner "1 [Credit]: 6 cards")
(is (last-log-contains? state "Accelerated Beta Test, Brainstorm, Chiyashi, DNA Tracker, Excalibur, Fire Wall") "Revealed correct 6 cards from R&D")
(click-prompt state :runner "Brainstorm")
Expand All @@ -2050,7 +2049,6 @@
(dotimes [_ 3] (play-from-hand state :runner "Cache"))
(dotimes [_ 3] (play-from-hand state :runner "Akamatsu Mem Chip"))
(play-run-event state (find-card "Khusyuk" (:hand (get-runner))) :rd)
(click-prompt state :runner "Replacement effect")
(click-prompt state :runner "1 [Credit]: 6 cards")
(is (last-log-contains? state "Accelerated Beta Test, Brainstorm, Chiyashi") "Revealed correct 3 cards from R&D")
(click-prompt state :runner "Brainstorm")
Expand All @@ -2075,7 +2073,6 @@
(dotimes [_ 3] (play-from-hand state :runner "Cache"))
(play-from-hand state :runner "R&D Interface")
(play-run-event state (find-card "Khusyuk" (:hand (get-runner))) :rd)
(click-prompt state :runner "Replacement effect")
(click-prompt state :runner "1 [Credit]: 3 cards")
(is (last-log-contains? state "Accelerated Beta Test, Brainstorm, Chiyashi") "Revealed correct 3 cards from R&D")
(click-prompt state :runner "Brainstorm")
Expand All @@ -2092,7 +2089,6 @@
(core/move state :corp (find-card "Chiyashi" (:hand (get-corp))) :deck)
(take-credits state :corp)
(play-run-event state (find-card "Khusyuk" (:hand (get-runner))) :rd)
(click-prompt state :runner "Replacement effect")
(click-prompt state :runner "1 [Credit]: 0 cards")
(is (empty? (:prompt (get-runner))) "Runner shouldn't get any access prompt when nothing is installed")))
(testing "Interaction with The Turning Wheel"
Expand All @@ -2106,7 +2102,6 @@
(play-from-hand state :runner "The Turning Wheel")
(let [tww (get-resource state 0)]
(play-run-event state (find-card "Khusyuk" (:hand (get-runner))) :rd)
(click-prompt state :runner "Replacement effect")
(is (zero? (get-counters (refresh tww) :power)) "The Turning Wheel shouldn't gain counters yet"))))
(testing "Ash interaction"
(do-game
Expand All @@ -2130,7 +2125,6 @@
(play-run-event state (find-card "Khusyuk" (:hand (get-runner))) :rd)
(click-prompt state :corp "0")
(click-prompt state :runner "0") ;lose Ash trace
(click-prompt state :runner "Replacement effect")
(click-prompt state :runner "1 [Credit]: 3 cards")
(is (second-last-log-contains? state "Accelerated Beta Test, Brainstorm, Chiyashi") "Revealed correct 3 cards from R&D")
(is (empty? (:prompt (get-runner))) "No prompt to access cards."))))
Expand All @@ -2153,11 +2147,11 @@
(core/gain state :runner :credit 100)
(play-from-hand state :runner "Eater")
(dotimes [_ 3] (play-from-hand state :runner "Cache"))
(play-run-event state (find-card "Khusyuk" (:hand (get-runner))) :rd)
(core/rez state :corp (get-ice state :rd 0))
(play-from-hand state :runner "Khusyuk")
(card-ability state :runner (get-program state 0) 0) ; use Eater
(click-prompt state :runner "Replacement effect")
(click-prompt state :runner "End the run")
(run-successful state)
(click-prompt state :runner "1 [Credit]: 3 cards")
(is (second-last-log-contains? state "Accelerated Beta Test, Brainstorm, Chiyashi") "Revealed correct 3 cards from R&D")
(is (empty? (:prompt (get-runner))) "No prompt to access cards."))))
Expand Down
1 change: 0 additions & 1 deletion test/clj/game_test/cards/operations.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2863,7 +2863,6 @@
(play-from-hand state :runner "Film Critic")
(play-from-hand state :runner "Khusyuk")
(run-successful state)
(click-prompt state :runner "Replacement effect")
(click-prompt state :runner "1 [Credit]: 1 card")
(click-prompt state :runner "Ice Wall")
(click-prompt state :runner "No action")
Expand Down