Skip to content

Commit ffb7ee4

Browse files
authored
Merge pull request #6486 from artemmikhalitsin/fix/moon-pool-not-rfg-when-not-discarding-from-hq
Fix: Pay moon pool RFG cost even if no cards are discarded
2 parents 11f8314 + 51063ae commit ffb7ee4

File tree

2 files changed

+39
-16
lines changed

2 files changed

+39
-16
lines changed

src/clj/game/cards/assets.clj

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@
13711371
(in-discard? %)
13721372
(not (faceup? %)))
13731373
:max 2}
1374-
:msg (msg "to reveal " (str/join " and " (map :title targets)) " from Archives and shuffle them into R&D")
1374+
:msg (msg "reveal " (str/join " and " (map :title targets)) " from Archives and shuffle them into R&D")
13751375
:effect (req (wait-for (reveal state side targets)
13761376
(doseq [c targets]
13771377
(move state side c :deck))
@@ -1384,22 +1384,27 @@
13841384
card nil)
13851385
(effect-completed state side eid)))))
13861386
:cancel-effect (effect (system-msg "declines to use Moon Pool to reveal any cards in Archives")
1387-
(effect-completed eid))}]
1388-
{:abilities [{:prompt "Trash up to 2 cards from HQ"
1389-
:label "Trash up to 2 cards from HQ"
1387+
(effect-completed eid))}
1388+
moon-pool-discard-ability
1389+
{:prompt "Trash up to 2 cards from HQ"
1390+
:choices {:card #(and (corp? %)
1391+
(in-hand? %))
1392+
:max 2}
1393+
:async true
1394+
:msg (msg "trash " (count targets) " cards from HQ ")
1395+
:effect (req (wait-for (trash-cards state :corp targets {:cause-card card})
1396+
(continue-ability
1397+
state side
1398+
moon-pool-reveal-ability
1399+
card nil)))
1400+
:cancel-effect (effect (system-msg "declines to use Moon Pool to trash any cards from HQ")
1401+
(continue-ability moon-pool-reveal-ability card nil))}]
1402+
{:abilities [{:label "Trash up to 2 cards from HQ. Shuffle up to 2 cards from Archives into R&D"
13901403
:cost [:remove-from-game]
13911404
:async true
1392-
:choices {:card #(and (corp? %)
1393-
(in-hand? %))
1394-
:max 2}
1395-
:msg (msg "trash " (count targets) " cards from HQ ")
1396-
:effect (req (wait-for (trash-cards state :corp targets {:cause-card card})
1397-
(continue-ability
1398-
state side
1399-
moon-pool-reveal-ability
1400-
card nil)))
1401-
:cancel-effect (effect (system-msg "declines to use Moon Pool to trash any cards from HQ")
1402-
(continue-ability moon-pool-reveal-ability card nil))}]})))
1405+
:effect (effect (continue-ability
1406+
moon-pool-discard-ability
1407+
card nil))}]})))
14031408

14041409
(defcard "Mr. Stone"
14051410
{:events [{:event :runner-gain-tag

test/clj/game/cards/assets_test.clj

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3133,7 +3133,25 @@
31333133
(click-card state :corp "Hostile Takeover")
31343134
(click-card state :corp "Hostile Takeover")
31353135
(score state :corp (get-content state :remote3 0))
3136-
(is (= 1 (count (:scored (get-corp)))) "Hostile was scored")))
3136+
(is (= 1 (count (:scored (get-corp)))) "Hostile was scored")
3137+
(is (find-card "Moon Pool" (:rfg (get-corp))) "Moon Pool is rfg'd")
3138+
(is (nil? (get-content state :remote1 0)))))
3139+
3140+
(deftest moon-pool-rfg-when-no-cards-trashed-from-hq
3141+
(do-game
3142+
(new-game {:corp {:hand ["Moon Pool", (qty "Hedge Fund" 3)]
3143+
:discard ["Longevity Serum"]}})
3144+
(play-from-hand state :corp "Moon Pool" "New remote")
3145+
(let [moon-pool (get-content state :remote1 0)]
3146+
(rez state :corp moon-pool)
3147+
(card-ability state :corp moon-pool 0)
3148+
(prompt-is-card? state :corp :moon-pool)
3149+
(click-prompt state :corp "Done")
3150+
(click-card state :corp "Longevity Serum")
3151+
(click-prompt state :corp "Done")
3152+
(no-prompt? state :corp)
3153+
(is (find-card "Moon Pool" (:rfg (get-corp))) "Moon Pool is rfg'd")
3154+
(is (nil? (get-content state :remote1 0))))))
31373155

31383156
(deftest mr-stone
31393157
;; Mr Stone

0 commit comments

Comments
 (0)