Skip to content

fix Info Bounty :once limitation #6810

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
Dec 11, 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
4 changes: 2 additions & 2 deletions src/clj/game/cards/resources.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1538,10 +1538,10 @@
{:event :end-breach-server
:async true
:interactive (req true)
:once :per-run
:once :per-turn
:req (req (first-event? state side :end-breach-server #(is-mark? state (:from-server (first %)))))
:msg "gain 2 [Credits]"
:effect (effect (gain-credits :runner eid 2))}]})
:effect (effect (gain-credits eid 2))}]})

(defcard "Inside Man"
{:recurring 2
Expand Down
23 changes: 23 additions & 0 deletions test/clj/game/cards/resources_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3038,9 +3038,14 @@
(new-game {:corp {:hand ["Hedge Fund"]}
:runner {:deck ["Info Bounty" "Patron"]}})
(take-credits state :corp)
(core/gain state :runner :click 1)
(play-from-hand state :runner "Info Bounty")
(play-from-hand state :runner "Patron")
(core/set-mark state :hq)
(changes-val-macro
0 (:credit (get-runner))
"Gained no credits when running not on mark"
(run-empty-server state :archives))
(changes-val-macro
2 (:credit (get-runner))
"Gained 2 credits"
Expand All @@ -3060,6 +3065,24 @@
"Gained no credits on run on mark when breach is replaced"
(run-empty-server state :hq))))

(deftest info-bounty-with-virtuoso
;; Info Bounty - interaction with Virtuoso
(do-game
(new-game {:corp {:hand ["Hedge Fund"]
:deck [(qty "Hedge Fund" 10)]}
:runner {:deck ["Info Bounty" "Virtuoso"]
:credits 10}})
(take-credits state :corp)
(play-from-hand state :runner "Info Bounty")
(play-from-hand state :runner "Virtuoso")
(core/set-mark state :rd)
(changes-val-macro
2 (:credit (get-runner))
"Gained 2 credits when finished breaching mark"
(run-empty-server state :rd)
(click-prompt state :runner "No action"))
(click-prompt state :runner "No action")))

(deftest inside-man-pay-credits-prompt
;; Pay-credits prompt
(do-game
Expand Down