Skip to content

add Laser Pointer test #7047

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
Aug 12, 2023
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
6 changes: 4 additions & 2 deletions src/clj/game/cards/programs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1829,9 +1829,11 @@
:async true
:effect (effect (continue-ability
{:optional
{:prompt "Trash Laser Pointer to bypass?"
{:prompt (msg "Trash Laser Pointer to bypass "
(card-str state current-ice)
"?")
:yes-ability
{:msg (msg "trash itself to bypass the current ice")
{:msg (msg "bypass" (card-str state current-ice))
:effect (req
(wait-for (trash state :runner (make-eid state eid) card
{:unpreventable :true
Expand Down
38 changes: 38 additions & 0 deletions test/clj/game/cards/programs_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3984,6 +3984,44 @@
(core/purge state :corp)
(is (empty? (get-program state)) "Lamprey trashed by purge")))

(deftest laser-pointer
(do-game
(new-game {:runner {:hand [(qty "Laser Pointer" 3)]
:credits 10}
:corp {:hand ["Envelope" "Starlit Knight" "Rototurret"]
:credits 50}})
(play-from-hand state :corp "Envelope" "HQ")
(play-from-hand state :corp "Starlit Knight" "HQ")
(play-from-hand state :corp "Rototurret" "HQ")
(rez state :corp (get-ice state :hq 0))
(rez state :corp (get-ice state :hq 1))
(rez state :corp (get-ice state :hq 2))
(take-credits state :corp)
(play-from-hand state :runner "Laser Pointer")
(play-from-hand state :runner "Laser Pointer")
(play-from-hand state :runner "Laser Pointer")
(run-on state :hq)
(run-continue state)
(changes-val-macro
1 (count (:discard (get-runner)))
"Laser Pointer trashed"
(click-prompt state :runner "Yes"))
(is (= :movement (:phase (get-run))) "Runner bypassed Rototurret")
(run-continue state)
(run-continue state)
(changes-val-macro
1 (count (:discard (get-runner)))
"Laser Pointer trashed"
(click-prompt state :runner "Yes"))
(is (= :movement (:phase (get-run))) "Runner bypassed Starlit Knight")
(run-continue state)
(run-continue state)
(changes-val-macro
1 (count (:discard (get-runner)))
"Laser Pointer trashed"
(click-prompt state :runner "Yes"))
(is (= :movement (:phase (get-run))) "Runner bypassed Envelope")))

(deftest leech
;; Leech - Reduce strength of encountered piece of ice
(do-game
Expand Down