File tree Expand file tree Collapse file tree 2 files changed +25
-9
lines changed
Expand file tree Collapse file tree 2 files changed +25
-9
lines changed Original file line number Diff line number Diff line change 28582858
28592859(defcard " Read-Write Share"
28602860 (let [ab {:interactive (req true )
2861+ :req (req (< (count (:hosted card)) 4 ))
28612862 :prompt " Host a card from your grip to draw a card?"
28622863 :choices {:req (req (and (runner? target)
28632864 (in-hand? target)))}
28642865 :skippable true
28652866 :msg " host a card facedown from the Grip and draw a card"
28662867 :async true
28672868 :effect (req (host state side (get-card state card) target {:facedown true })
2868- (wait-for (draw state side 1 )
2869- (if (>= (count (:hosted (get-card state card))) 5 )
2870- (continue-ability
2871- state side
2872- {:msg " trash itself"
2873- :async true
2874- :effect (req (trash state side eid card))}
2875- card nil )
2876- (effect-completed state side eid))))}]
2869+ (draw state side eid 1 ))}]
28772870 {:on-install ab
28782871 :events [(assoc ab :event :runner-turn-begins )]
28792872 :abilities [{:fake-cost [(->c :trash-can )]
Original file line number Diff line number Diff line change 74807480 (card-ability state :runner (get-program state 0 ) 0 )
74817481 (is-deck? state :runner [" Corroder" " Rezeki" ])))
74827482
7483+ (deftest read-write-share-limit-4-hosted
7484+ ; ; Should not allow hosting a 5th card (limit 4 hosted cards)
7485+ (do-game
7486+ (new-game {:runner {:hand [" Read-Write Share" " Sure Gamble" " Sure Gamble" " Sure Gamble" " Sure Gamble" ]
7487+ :deck [(qty " Sure Gamble" 10 )]}})
7488+ (take-credits state :corp )
7489+ (play-from-hand state :runner " Read-Write Share" )
7490+ ; ; host 1st card on install
7491+ (click-card state :runner (first (:hand (get-runner ))))
7492+ (is (= 1 (count (:hosted (get-program state 0 )))) " 1 hosted card" )
7493+ ; ; host 2nd-4th cards on turn begins
7494+ (dotimes [i 3 ]
7495+ (take-credits state :runner )
7496+ (take-credits state :corp )
7497+ (start-turn state :runner )
7498+ (click-card state :runner (first (:hand (get-runner ))))
7499+ (is (= (+ 2 i) (count (:hosted (get-program state 0 )))) (str (+ 2 i) " hosted cards" )))
7500+ ; ; should not prompt to host a 5th card
7501+ (take-credits state :runner )
7502+ (take-credits state :corp )
7503+ (start-turn state :runner )
7504+ (is (no-prompt? state :runner ) " No prompt to host a 5th card" )))
7505+
74837506(deftest reaver
74847507 ; ; Reaver - Draw a card the first time you trash an installed card each turn
74857508 (do-game
You can’t perform that action at this time.
0 commit comments