From c2092114dacdfed68726371d915c6a87a4d26ccd Mon Sep 17 00:00:00 2001 From: Francesco Pellegrini Date: Sun, 18 Dec 2022 11:19:28 +0100 Subject: [PATCH 1/2] fix Meridian infinite approach when added to score area --- src/clj/game/cards/ice.clj | 7 +++---- test/clj/game/cards/ice_test.clj | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/clj/game/cards/ice.clj b/src/clj/game/cards/ice.clj index eea5fc9655..19e2e8c3c2 100644 --- a/src/clj/game/cards/ice.clj +++ b/src/clj/game/cards/ice.clj @@ -2555,10 +2555,9 @@ :effect (req (if (str/starts-with? target "Corp") (wait-for (gain-credits state :corp 4) (end-run state :runner eid card)) - (do (as-agenda state :runner card -1) - (if current-ice - (encounter-ends state side eid) - (effect-completed state side eid)))))}]}) + (do (encounter-ends state side (make-eid state eid)) + (as-agenda state :runner card -1) + (effect-completed state side eid))))}]}) (defcard "Merlin" (grail-ice (do-net-damage 2))) diff --git a/test/clj/game/cards/ice_test.clj b/test/clj/game/cards/ice_test.clj index e791387d26..d371214f96 100644 --- a/test/clj/game/cards/ice_test.clj +++ b/test/clj/game/cards/ice_test.clj @@ -4312,17 +4312,17 @@ (new-game {:corp {:deck ["Meridian"]}}) (play-from-hand state :corp "Meridian" "HQ") (take-credits state :corp) + (run-on state "HQ") (let [mer (get-ice state :hq 0)] (rez state :corp (refresh mer)) - (run-on state "HQ") (run-continue state) (card-subroutine state :corp (refresh mer) 0) (click-prompt state :runner "Add Meridian to score area") - (is (:run @state) "Run is still live") - (run-continue state) (is (= 1 (count (:scored (get-runner)))) "In runner score area") (is (= -1 (:agenda-point (get-runner))) "Worth -1 agenda points") - (is (empty? (get-ice state :hq)) "ice uninstalled")))) + (is (empty? (get-ice state :hq)) "ice uninstalled") + (run-continue state) + (is (not (:run @state)) "Run has ended")))) (deftest meru-mati (do-game From 75edef4ccedd455bbdd3871424f11f2fe919e211 Mon Sep 17 00:00:00 2001 From: Francesco Pellegrini Date: Sun, 18 Dec 2022 16:50:13 +0100 Subject: [PATCH 2/2] add missing wait-for --- src/clj/game/cards/ice.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/clj/game/cards/ice.clj b/src/clj/game/cards/ice.clj index 19e2e8c3c2..7b9c7f9021 100644 --- a/src/clj/game/cards/ice.clj +++ b/src/clj/game/cards/ice.clj @@ -2555,9 +2555,9 @@ :effect (req (if (str/starts-with? target "Corp") (wait-for (gain-credits state :corp 4) (end-run state :runner eid card)) - (do (encounter-ends state side (make-eid state eid)) - (as-agenda state :runner card -1) - (effect-completed state side eid))))}]}) + (wait-for (encounter-ends state side (make-eid state eid)) + (as-agenda state :runner card -1) + (effect-completed state side eid))))}]}) (defcard "Merlin" (grail-ice (do-net-damage 2)))