Skip to content

Commit

Permalink
Merge pull request #4479 from NoahTheDuke/nb/azmari-facedown-fix
Browse files Browse the repository at this point in the history
Fix Azmari and facedown install interaction
  • Loading branch information
NoahTheDuke authored Sep 4, 2019
2 parents f3d4153 + 2dd2048 commit f4582b0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/clj/game/cards/identities.clj
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@
:once :per-turn
:msg (msg "gain 2 [Credits] from " (:az-target card))}]
{:events {:corp-turn-ends choose-type
:runner-install check-type
:runner-install (assoc check-type
:req (req (and (is-type? target (:az-target card))
(not (facedown? target)))))
:play-event check-type}})

"Az McCaffrey: Mechanical Prodigy"
Expand Down
16 changes: 16 additions & 0 deletions test/clj/game_test/cards/identities.clj
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,22 @@
(click-prompt state :runner (find-card "Bank Job" (:hosted (:identity (get-runner)))))
(is (= 3 (count (get-in @state [:runner :hand]))) "There are 3 cards in the runner's Grip")))

(deftest azmari-edtech-shaping-the-future
;; Azmari EdTech: Shaping the Future
(testing "Don't gain credits when installing facedown #4477"
(do-game
(new-game {:corp {:id "Azmari EdTech: Shaping the Future"
:deck [(qty "Hedge Fund" 5)]
:hand [(qty "Hedge Fund" 5)]}
:runner {:id "Apex: Invasive Predator"
:hand ["Sure Gamble"]}})
(take-credits state :corp)
(click-prompt state :corp "Event")
(core/end-phase-12 state :runner nil)
(let [credits (:credit (get-corp))]
(click-card state :runner "Sure Gamble")
(is (= credits (:credit (get-corp))) "Corp gains no credits from facedown install"))) ))

(deftest az-mccaffrey-mechanical-prodigy
;; Az McCaffrey: Mechanical Prodigy
(do-game
Expand Down

0 comments on commit f4582b0

Please sign in to comment.