From b36b30c7bf205f2dfcb0db86317de7987ece46cc Mon Sep 17 00:00:00 2001 From: kjchiu Date: Sun, 5 Sep 2021 21:59:11 -0400 Subject: [PATCH 1/2] subliminal recur should reveal fixes #5744 added hyoubu reveal to base subliminal test --- src/clj/game/cards/operations.clj | 4 +++- test/clj/game/cards/operations_test.clj | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/clj/game/cards/operations.clj b/src/clj/game/cards/operations.clj index 2e89e647c3..7593a73b27 100644 --- a/src/clj/game/cards/operations.clj +++ b/src/clj/game/cards/operations.clj @@ -2306,7 +2306,9 @@ :prompt "Add Subliminal Messaging to HQ?" :yes-ability {:msg "add Subliminal Messaging to HQ" - :effect (effect (move card :hand))}}}]}) + :effect (effect (reveal eid card) + (move card :hand))}}}]}) + (defcard "Success" (letfn [(advance-n-times [state side eid card target n] diff --git a/test/clj/game/cards/operations_test.clj b/test/clj/game/cards/operations_test.clj index 8718cfa634..63a40987db 100644 --- a/test/clj/game/cards/operations_test.clj +++ b/test/clj/game/cards/operations_test.clj @@ -3738,7 +3738,8 @@ ;; Subliminal Messaging - Playing/trashing/milling will all prompt returning to hand (testing "Basic test" (do-game - (new-game {:corp {:deck [(qty "Subliminal Messaging" 3)]} + (new-game {:corp {:id "Hyoubu Institute: Absolute Clarity" + :deck [(qty "Subliminal Messaging" 3)]} :runner {:id "Noise: Hacker Extraordinaire" :deck [(qty "Cache" 3) "Utopia Shard"]}}) (play-from-hand state :corp "Subliminal Messaging") @@ -3756,6 +3757,7 @@ (click-prompt state :corp "Yes") (is (= 3 (count (:hand (get-corp)))) "All 3 Subliminals returned to HQ") (core/move state :corp (find-card "Subliminal Messaging" (:hand (get-corp))) :deck) + (is (= 10 (:credit (get-corp))) "Only first subliminal should give Hyoubu reveal credit") (take-credits state :corp) (play-from-hand state :runner "Cache") (play-from-hand state :runner "Utopia Shard") From ea6a8e1d206a7485f3d2cb319b3812f9d52669ca Mon Sep 17 00:00:00 2001 From: kjchiu Date: Tue, 28 Sep 2021 18:10:15 -0400 Subject: [PATCH 2/2] account for async effects --- src/clj/game/cards/operations.clj | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/clj/game/cards/operations.clj b/src/clj/game/cards/operations.clj index 7593a73b27..0c5064cd68 100644 --- a/src/clj/game/cards/operations.clj +++ b/src/clj/game/cards/operations.clj @@ -2306,8 +2306,11 @@ :prompt "Add Subliminal Messaging to HQ?" :yes-ability {:msg "add Subliminal Messaging to HQ" - :effect (effect (reveal eid card) - (move card :hand))}}}]}) + :async true + :effect (req (wait-for (reveal state side (make-eid state eid) card)) + (move state side card :hand) + (effect-completed state side eid))}}}]}) + (defcard "Success"