File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 179
179
(when-let [click-state (:click-state @state)]
180
180
(when (= (:active-player @state) side)
181
181
(reset! state (assoc click-state :log (:log @state) :click-state click-state :run nil :history (:history @state)))
182
+ (doseq [c (filter #(not (has-subtype? % " Lockdown" )) (:play-area (side @state)))]
183
+ (move state side c (:previous-zone c) {:suppress-event true }))
182
184
(system-say state side (str " [!] " (if (= side :corp ) " Corp" " Runner" ) " uses the undo-click command" ))
183
185
(doseq [s [:runner :corp ]]
184
186
(toast state s " Game reset to start of click" )))))
Original file line number Diff line number Diff line change 46
46
(is (= 4 (:click (get-runner ))) " Runner back to 4 clicks" )
47
47
(is (= 5 (:credit (get-runner ))) " Runner back to 5 credits" )))
48
48
49
+ (deftest undo-click-return-card-from-play-area
50
+ (do-game
51
+ (new-game {:corp {:deck [" Predictive Planogram" ]}
52
+ :runner {:deck [" Dirty Laundry" ]}})
53
+ (play-from-hand state :corp " Predictive Planogram" )
54
+ (core/command-undo-click state :corp )
55
+ (is (= 0 (count (:play-area (get-corp )))) " Corp play area is empty" )
56
+ (is (= 1 (count (:hand (get-corp )))) " Corp has 1 card in HQ" )
57
+ (take-credits state :corp )
58
+ (play-from-hand state :runner " Dirty Laundry" )
59
+ (core/command-undo-click state :runner )
60
+ (is (= 0 (count (:play-area (get-runner )))) " Runner play area is empty" )
61
+ (is (= 1 (count (:hand (get-runner )))) " Player has 1 card in grip" )))
62
+
63
+ (deftest undo-click-does-not-return-lockdown-from-play-area
64
+ (do-game
65
+ (new-game {:corp {:deck [" NAPD Cordon" " Predictive Planogram" ]}
66
+ :runner {:deck [" Dirty Laundry" ]}})
67
+ (play-from-hand state :corp " NAPD Cordon" )
68
+ (play-from-hand state :corp " Predictive Planogram" )
69
+ (core/command-undo-click state :corp )
70
+ (is (= 1 (count (:play-area (get-corp )))) " Corp play area still has NAPD Cordon" )
71
+ (is (= 1 (count (:hand (get-corp )))) " Corp has 1 card in HQ" )))
72
+
49
73
(deftest undo-click-with-bioroid-cost
50
74
(do-game
51
75
(new-game {:corp {:deck [(qty " Hedge Fund" 5 )]
You can’t perform that action at this time.
0 commit comments