Skip to content

Commit e376881

Browse files
committed
flagship works for rnd
1 parent 7e1d3d9 commit e376881

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

src/clj/game/core/access.clj

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -627,15 +627,14 @@
627627

628628
(defn access-helper-rd
629629
[state {:keys [chosen random-access-limit] :as access-amount} already-accessed {:keys [no-root] :as args}]
630-
(let [current-available (set (concat (if-not (any-effects state :runner :disable-random-accesses true? {:server :rd}) (map :cid (get-in @state [:corp :deck])) [])
631-
(map :cid (root-content state :rd))))
632-
already-accessed-fn (fn [card] (contains? already-accessed (:cid card)))
630+
(let [already-accessed-fn (fn [card] (contains? already-accessed (:cid card)))
633631

634632
deck (access-cards-from-rd state)
635633
card-to-access (first (drop-while already-accessed-fn deck))
636634

637635
card-from "Card from deck"
638636
card-from-button (when (and (pos? random-access-limit)
637+
(not (any-effects state :runner :disable-random-accesses true?))
639638
card-to-access)
640639
[card-from])
641640
root (root-content state :rd already-accessed-fn)
@@ -815,10 +814,8 @@
815814
[state {:keys [chosen random-access-limit] :as access-amount}
816815
already-accessed {:keys [no-root access-first] :as args}]
817816
(let [hand (when (not (or (:prevent-hand-access (:run @state))
818-
(any-effects state :runner :disable-random-accesses true? {:server :hq})))
817+
(any-effects state :runner :disable-random-accesses true?)))
819818
(get-in @state [:corp :hand]))
820-
current-available (set (concat (map :cid hand)
821-
(map :cid (root-content state :hq))))
822819

823820
already-accessed-fn (fn [card] (contains? already-accessed (:cid card)))
824821

test/clj/game/cards/upgrades_test.clj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,6 +1640,26 @@
16401640
(do-trash-prompt state 4)
16411641
(is (no-prompt? state :runner)))))
16421642

1643+
(deftest flagship-vs-twinning
1644+
(doseq [act [:trash :no-action]]
1645+
(do-game
1646+
(new-game {:corp {:hand ["Flagship"]
1647+
:deck ["Beanstalk Royalties" "Project Atlas"]
1648+
:stack-deck true}
1649+
:runner {:hand ["The Twinning" "Overclock" "Prepaid VoicePAD"]}})
1650+
(play-cards state :corp ["Flagship" "R&D" :rezzed])
1651+
(stack-deck state :corp ["Beanstalk Royalties" "Project Atlas"])
1652+
(take-credits state :corp)
1653+
(play-cards state :runner
1654+
"The Twinning"
1655+
"Prepaid VoicePAD"
1656+
["Overclock" "Prepaid VoicePAD" "R&D"])
1657+
(run-continue-until state :success)
1658+
(click-prompt state :runner "1")
1659+
(click-prompts state :runner "Card from deck" "No action")
1660+
(click-prompt state :runner "No action")
1661+
(is (no-prompt? state :runner) "Denied extra access"))))
1662+
16431663
(deftest forced-connection
16441664
;; Forced Connection - ambush, trace(3) give the runner 2 tags
16451665
(do-game

0 commit comments

Comments
 (0)