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

Ghost Runner now trashes when empty #4328

Merged
merged 1 commit into from
Jul 23, 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
1 change: 1 addition & 0 deletions src/clj/game/cards/resources.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,7 @@
(trigger-event state side :spent-stealth-credit card)
(when (zero? (get-counters (get-card state card) :credit))
(trash state :runner card {:unpreventable true})))}]
:events (trash-on-empty :credit)
; See Net Mercur for why this implementation was chosen
:interactions {:pay-credits {:req (req (:run @state))
:type :credit}}}
Expand Down
7 changes: 6 additions & 1 deletion test/clj/game_test/cards/resources.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1473,10 +1473,15 @@
(run-on state :hq)
(let [gr (get-resource state 0)
refr (get-program state 0)]
(changes-val-macro 2 (:credit (get-runner))
"Took 2 credits off of Ghost runner the traditional way."
(dotimes [_ 2]
(card-ability state :runner gr 0)))
(changes-val-macro 0 (:credit (get-runner))
"Used 1 credit from Ghost Runner"
(card-ability state :runner refr 1)
(click-card state :runner gr))))))
(click-card state :runner gr))
(is (not-empty (:discard (get-runner))) "Empty Ghost Runner trashed")))))

(deftest globalsec-security-clearance
;; Globalsec Security Clearance - Ability, click lost on use
Expand Down