Skip to content

Commit

Permalink
Merge pull request #7788 from NBKelly/juli-vs-basic-action-card
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahTheDuke authored Oct 4, 2024
2 parents 6fdb923 + 2915f77 commit 8c000dd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/clj/game/cards/resources.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1853,10 +1853,9 @@
{:event :runner-spent-click
:once :per-turn
:req (req (let [all-cards (get-all-cards state)
pred (fn [context]
(and (:is-game-action? context)
(resource? (:stripped-source-card context))))]
(and pred
pred #(and (:is-game-action? %)
(resource? (:stripped-source-card %)))]
(and (pred context)
(first-event? state side :runner-spent-click
#(pred (first %))))))
:cost [(->c :power 1)]
Expand Down
22 changes: 22 additions & 0 deletions test/clj/game/cards/resources_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3516,6 +3516,28 @@
(card-ability state :runner (get-resource state 1) 0))
"Runner did NOT gain 1 click from Juli Moreira Lee")))

(deftest juli-basic-action
(do-game
(new-game {:runner {:hand ["Bahia Bands" "Telework Contract" "Juli Moreira Lee"]
:deck [(qty "Ika" 3)]}})
(take-credits state :corp)
(play-from-hand state :runner "Telework Contract")
(is (changed? [(:credit (get-runner)) 3]
(card-ability state :runner (get-resource state 0) 0))
"Took 3 from telework")
(play-from-hand state :runner "Bahia Bands")
(click-prompt state :runner "Archives")
(run-continue-until state :success)
(click-prompt state :runner "Draw 2 cards")
(click-prompt state :runner "Install a card from the grip, paying 1 [Credits] less")
(click-card state :runner "Juli Moreira Lee")
(is (not (:run @state)) "Run over")
(is (= 1 (:click (get-runner))))
(is (changed? [(get-counters (get-resource state 1) :power) 0]
(click-credit state :runner))
"didn't spend counter")
(is (= 0 (:click (get-runner))) "didn't gain click")))

(deftest kasi-string
;; Kasi String
(do-game
Expand Down

0 comments on commit 8c000dd

Please sign in to comment.