Skip to content

Commit

Permalink
add Timely Public Release test for installing on a new remote
Browse files Browse the repository at this point in the history
  • Loading branch information
francescopellegrini committed Aug 18, 2023
1 parent 9a30daf commit ffeec1e
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 ffeec1e

Please sign in to comment.