Skip to content

Commit 7e8636c

Browse files
authored
Merge pull request #6613 from francescopellegrini/fix/globalsec-security-clearance-click-cost
fix Globalsec Security Clearance ability click cost
2 parents 9532e58 + 4ee9e05 commit 7e8636c

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

src/clj/game/cards/resources.clj

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,17 +1320,24 @@
13201320
:type :credit}}})
13211321

13221322
(defcard "Globalsec Security Clearance"
1323+
(let [ability {:once :per-turn
1324+
:label "Lose [Click] and look at the top card of R&D (start of turn)"
1325+
:req (req (:runner-phase-12 @state))
1326+
:optional
1327+
{:prompt "Lose [Click] to look at the top card of R&D?"
1328+
:waiting-prompt "Runner to choose an option"
1329+
:autoresolve (get-autoresolve :auto-fire)
1330+
:yes-ability
1331+
{:msg "lose [Click] and look at the top card of R&D"
1332+
:prompt (req (->> corp :deck first :title (str "The top card of R&D is ")))
1333+
:choices ["OK"]
1334+
:effect (effect (lose-clicks 1))}}}]
13231335
{:req (req (< 1 (get-link state)))
13241336
:flags {:runner-phase-12 (req true)}
1325-
:abilities [{:msg "lose [Click] and look at the top card of R&D"
1326-
:once :per-turn
1327-
:effect (effect (continue-ability
1328-
{:prompt (req (->> corp :deck first :title (str "The top card of R&D is ")))
1329-
:choices ["OK"]}
1330-
card nil))}]
1331-
:events [{:event :runner-turn-begins
1332-
:req (req (get-in @state [:per-turn (:cid card)]))
1333-
:effect (effect (lose-clicks 1))}]})
1337+
:abilities [ability (set-autoresolve :auto-fire "Globalsec Security Clearance")]
1338+
:events [(assoc ability
1339+
:event :runner-turn-begins
1340+
:interactive (req true))]}))
13341341

13351342
(defcard "Grifter"
13361343
{:events [{:event :runner-turn-ends

test/clj/game/cards/resources_test.clj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2545,7 +2545,9 @@
25452545
(is (:runner-phase-12 @state) "Runner in Step 1.2")
25462546
(let [gsec (get-resource state 0)]
25472547
(card-ability state :runner gsec 0)
2548+
(click-prompt state :runner "Yes")
25482549
(is (= "The top card of R&D is Hedge Fund" (:msg (prompt-map :runner))) "GSec revealed Hedge Fund")
2550+
(click-prompt state :runner "OK")
25492551
(end-phase-12 state :runner)
25502552
(is (= 3 (:click (get-runner))) "Runner lost 1 click from Globalsec Security Clearance"))))
25512553

0 commit comments

Comments
 (0)