From ffeec1e9a2c39a819cf8e2dde036870c17edd6ad Mon Sep 17 00:00:00 2001 From: Francesco Pellegrini Date: Fri, 18 Aug 2023 09:23:40 +0200 Subject: [PATCH] add Timely Public Release test for installing on a new remote --- src/clj/game/cards/agendas.clj | 4 ++-- test/clj/game/cards/agendas_test.clj | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/clj/game/cards/agendas.clj b/src/clj/game/cards/agendas.clj index ea4f40e14f..7861537db3 100644 --- a/src/clj/game/cards/agendas.clj +++ b/src/clj/game/cards/agendas.clj @@ -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? @@ -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 diff --git a/test/clj/game/cards/agendas_test.clj b/test/clj/game/cards/agendas_test.clj index 72bf77f880..bbb8c27f56 100644 --- a/test/clj/game/cards/agendas_test.clj +++ b/test/clj/game/cards/agendas_test.clj @@ -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"