Skip to content

Commit

Permalink
Merge pull request #7770 from NBKelly/security-leak
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahTheDuke authored Sep 24, 2024
2 parents 4f1de1b + ec19352 commit 7ae415b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/clj/game/cards/events.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3558,6 +3558,13 @@
:value -2}))
(update-all-ice))}]})

(defcard "Security Leak"
{:static-abilities [{:type :card-ability-additional-cost
:req (req (and (same-card? (:card context) (:basic-action-card corp))
(= "Advance 1 installed card"
(:label (:ability context)))))
:value (->c :credit 1)}]})

(defcard "Showing Off"
{:makes-run true
:on-play {:async true
Expand Down
15 changes: 15 additions & 0 deletions test/clj/game/cards/events_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6459,6 +6459,21 @@
(run-continue state :movement)
(run-jack-out state))))

(deftest security-leak
(do-game
(new-game {:corp {:hand ["Hostile Takeover"]}
:runner {:hand ["Security Leak"]}})
(take-credits state :corp)
(play-from-hand state :runner "Security Leak")
(take-credits state :runner)
(play-from-hand state :corp "Hostile Takeover" "New remote")
(dotimes [_ 2]
(is (changed? [(:credit (get-corp)) -2]
(click-advance state :corp (get-content state :remote1 0)))
"Spent 2c to advance hostile takeover"))
(score state :corp (get-content state :remote1 0))
(is (is-discard? state :runner ["Security Leak"]) "Security leak works like other currents")))

(deftest showing-off
;; Showing Off
(do-game
Expand Down

0 comments on commit 7ae415b

Please sign in to comment.