Skip to content

Commit

Permalink
Merge pull request #7093 from francescopellegrini/add-timely-public-r…
Browse files Browse the repository at this point in the history
…elease-new-remote-test
  • Loading branch information
NoahTheDuke authored Aug 18, 2023
2 parents 9a30daf + ffeec1e commit dd47734
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/clj/game/cards/agendas.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
update-all-agenda-points]]
[game.core.bad-publicity :refer [gain-bad-publicity lose-bad-publicity]]
[game.core.board :refer [all-active-installed all-installed all-installed-corp
all-installed-runner-type get-remote-names server->zone]]
all-installed-runner-type get-remote-names installable-servers server->zone]]
[game.core.card :refer [agenda? asset? can-be-advanced?
corp-installable-type? corp? facedown? faceup? get-agenda-points
get-card get-counters get-title get-zone has-subtype? ice? in-discard? in-hand?
Expand Down Expand Up @@ -1962,7 +1962,7 @@
(continue-ability
(let [chosen-ice target]
{:prompt "Choose a server"
:choices (req (conj (vec servers) "New remote"))
:choices (req (installable-servers state chosen-ice))
:async true
:effect (effect
(continue-ability
Expand Down
12 changes: 12 additions & 0 deletions test/clj/game/cards/agendas_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4285,6 +4285,18 @@
(is (empty? (:hand (get-corp))) "Enigma removed from HQ")
(is (zero? (get-counters (refresh tpr) :agenda)) "Agenda counter was spent"))))

(deftest timely-public-release-install-on-new-remote
;; Install on a new remote
(do-game
(new-game {:corp {:hand ["Timely Public Release" "Enigma"]}})
(play-and-score state "Timely Public Release")
(let [tpr (get-scored state :corp 0)]
(card-ability state :corp (refresh tpr) 0)
(click-card state :corp "Enigma")
(click-prompt state :corp "New remote")
(click-prompt state :corp "0")
(is (= "Enigma" (:title (get-ice state :remote2 0))) "Enigma was installed"))))

(deftest timely-public-release-install-on-server-being-run
;; Install on server being run
(testing "when approaching the server"
Expand Down

0 comments on commit dd47734

Please sign in to comment.