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

Fixed Acme run-ends event. Fixed Acme triggering on non-ice rez. #3849

Merged
merged 3 commits into from
Aug 24, 2018
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
9 changes: 5 additions & 4 deletions src/clj/game/cards/identities.clj
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,16 @@
:events {:run {:effect (req (when (and (outermost? run-position run-ices)
(rezzed? current-ice))
(activate state card true)))}
:rez {:effect (req (when (outermost? run-position run-ices)
(activate state card true)))}
:rez {:effect (req (when (and (outermost? run-position run-ices)
(= (:cid current-ice) (:cid target)))
(activate state card true)))}
:derez {:effect (req (when (outermost? run-position run-ices)
(activate state card false)))}
:pass-ice {:effect (req (when (and (outermost? run-position run-ices)
(get-in card [:special :acme-active]))
(activate state card false)))}
:end-run {:effect (req (when (get-in card [:special :acme-active])
(activate state card false)))}}})
:run-ends {:effect (req (when (get-in card [:special :acme-active])
(activate state card false)))}}})

"Adam: Compulsive Hacker"
{:events {:pre-start-game
Expand Down
29 changes: 29 additions & 0 deletions test/clj/game_test/cards/identities.clj
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,35 @@
(run-on state :archives)
(is (is-tagged? state) "Runner is tagged when encountering outermost ice")
(run-continue state)
(is (not (is-tagged? state)) "Runner is not tagged when encountering second ice")))
(testing "Tag loss when runner jacks out"
(do-game
(new-game
(make-deck "Acme Consulting: The Truth You Need" ["Vanilla" (qty "Hedge Fund" 5)])
(default-runner))
(play-from-hand state :corp "Vanilla" "Archives")
(core/rez state :corp (get-ice state :archives 0))
(take-credits state :corp)
(run-on state :archives)
(is (is-tagged? state) "Runner is tagged when encountering outermost ice")
(run-jack-out state)
(is (not (is-tagged? state)) "Runner no longer tagged after jacking out")))
(testing "No tag gained when rezzing something other than ice"
(do-game
(new-game
(make-deck "Acme Consulting: The Truth You Need" ["Vanilla" "NGO Front"])
(default-runner))
(play-from-hand state :corp "Vanilla" "Archives")
(play-from-hand state :corp "NGO Front" "New remote")
(take-credits state :corp)
(run-on state :archives)
(is (not (is-tagged? state)) "Runner is not yet tagged when encountering outermost ice")
(core/rez state :corp (get-ice state :archives 0))
(is (= 1 (get-in @state [:runner :tag :additional])) "Runner gains 1 additional tag when ice rezzed")
(core/rez state :corp (get-content state :remote1 0))
(is (:rezzed (get-content state :remote1 0)) "NGO Front now rezzed")
(is (= 1 (get-in @state [:runner :tag :additional])) "Runner does not gain a tag when asset rezzed")
(run-continue state)
(is (not (is-tagged? state)) "Runner is not tagged when encountering second ice"))))

(deftest adam:-compulsive-hacker
Expand Down