Skip to content

rework Jaguarundi #7037

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
35 changes: 16 additions & 19 deletions src/clj/game/cards/ice.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2231,29 +2231,26 @@
:effect (req
(continue-ability
state side
(if (zero? (:click runner))
{:msg "give the runner 1 tag"
:async true
:effect (req (gain-tags state :runner eid 1))}
{;:msg "give the runner 1 tag unless they spend [click]"
:player :runner
:prompt "Choose one"
:choices (req ["Take 1 tag"
(when (can-pay? state :runner nil card nil [:click 1])
"Spend [click]")])
:waiting-prompt "Runner to make a choice"
:async true
:effect (req (if (= target "Take 1 tag")
(do (system-msg state :runner "takes 1 tag on encountering Jaguarundi")
(gain-tags state :runner eid 1))
(wait-for (pay state :runner (make-eid state eid) card :lose-click 1)
(system-msg state side (:msg async-result))
(effect-completed state :runner eid))))})
{:player :runner
:prompt "Choose one"
:choices (req ["Take 1 tag"
(when (can-pay? state :runner nil card nil [:click 1])
"Spend [Click]")])
:waiting-prompt true
:async true
:msg (msg (if (= target "Take 1 tag")
"give the Runner 1 tag"
(str "force the runner to " (decapitalize target) " on encountering it")))
:effect (req (if (= target "Take 1 tag")
(gain-tags state :runner eid 1)
(wait-for (pay state :runner (make-eid state eid) card :click 1)
(system-msg state side (:msg async-result))
(effect-completed state :runner eid))))}
card nil))}
:subroutines [(give-tags 1)
{:label "Do 1 core damage if the Runner is tagged"
:req (req tagged)
:msg "Do 1 core damage"
:msg "do 1 core damage"
:async true
:effect (req (damage state side eid :brain 1 {:card card}))}]})

Expand Down
25 changes: 21 additions & 4 deletions test/clj/game/cards/ice_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3469,16 +3469,33 @@

(deftest jaguarundi-no-threat
(do-game
(new-game {:corp {:hand ["City Works Project" "Hostile Takeover" "Jaguarundi"]}})
(new-game {:corp {:hand ["City Works Project" "Jaguarundi"]}})
(play-and-score state "City Works Project")
(play-from-hand state :corp "Jaguarundi" "HQ")
(take-credits state :corp)
(run-on state :hq)
(rez state :corp (get-ice state :hq 0))
(run-continue state :encounter-ice)
(is (no-prompt? state :runner) "no jaguarundi prompt")))
(is (no-prompt? state :runner) "no jaguarundi prompt")
(fire-subs state (get-ice state :hq 0))
(is (= 1 (count-tags state)))
(is (= 1 (:brain-damage (get-runner))))))

(deftest jaguarundi-jesminder-interaction
(do-game
(new-game {:corp {:hand ["Jaguarundi"]}
:runner {:id "Jesminder Sareen: Girl Behind the Curtain"}})
(play-from-hand state :corp "Jaguarundi" "HQ")
(take-credits state :corp)
(run-on state :hq)
(rez state :corp (get-ice state :hq 0))
(run-continue state :encounter-ice)
(changes-val-macro
0 (:brain-damage (get-runner))
"Got no core damage"
(fire-subs state (get-ice state :hq 0)))))

(deftest jaguarundi-no-threat-spend-click
(deftest jaguarundi-threat-ability
(do-game
(new-game {:corp {:hand ["City Works Project" "Hostile Takeover" "Jaguarundi"]}})
(core/gain state :corp :click 10)
Expand All @@ -3494,7 +3511,7 @@
(changes-val-macro
-1 (:click (get-runner))
"spent a click on jag"
(click-prompt state :runner "Spend [click]"))
(click-prompt state :runner "Spend [Click]"))
(is (no-prompt? state :runner) "no jaguarundi prompt")))

(deftest jua-encounter-effect-prevent-runner-from-installing-cards-for-the-rest-of-the-turn
Expand Down