Skip to content

fix Globalsec Security Clearance ability click cost #6613

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

Merged
merged 1 commit into from
Sep 27, 2022
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
25 changes: 16 additions & 9 deletions src/clj/game/cards/resources.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1320,17 +1320,24 @@
:type :credit}}})

(defcard "Globalsec Security Clearance"
(let [ability {:once :per-turn
:label "Lose [Click] and look at the top card of R&D (start of turn)"
:req (req (:runner-phase-12 @state))
:optional
{:prompt "Lose [Click] to look at the top card of R&D?"
:waiting-prompt "Runner to choose an option"
:autoresolve (get-autoresolve :auto-fire)
:yes-ability
{:msg "lose [Click] and look at the top card of R&D"
:prompt (req (->> corp :deck first :title (str "The top card of R&D is ")))
:choices ["OK"]
:effect (effect (lose-clicks 1))}}}]
{:req (req (< 1 (get-link state)))
:flags {:runner-phase-12 (req true)}
:abilities [{:msg "lose [Click] and look at the top card of R&D"
:once :per-turn
:effect (effect (continue-ability
{:prompt (req (->> corp :deck first :title (str "The top card of R&D is ")))
:choices ["OK"]}
card nil))}]
:events [{:event :runner-turn-begins
:req (req (get-in @state [:per-turn (:cid card)]))
:effect (effect (lose-clicks 1))}]})
:abilities [ability (set-autoresolve :auto-fire "Globalsec Security Clearance")]
:events [(assoc ability
:event :runner-turn-begins
:interactive (req true))]}))

(defcard "Grifter"
{:events [{:event :runner-turn-ends
Expand Down
2 changes: 2 additions & 0 deletions test/clj/game/cards/resources_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2546,7 +2546,9 @@
(is (:runner-phase-12 @state) "Runner in Step 1.2")
(let [gsec (get-resource state 0)]
(card-ability state :runner gsec 0)
(click-prompt state :runner "Yes")
(is (= "The top card of R&D is Hedge Fund" (:msg (prompt-map :runner))) "GSec revealed Hedge Fund")
(click-prompt state :runner "OK")
(end-phase-12 state :runner)
(is (= 3 (:click (get-runner))) "Runner lost 1 click from Globalsec Security Clearance"))))

Expand Down