diff --git a/src/clj/game/cards/ice.clj b/src/clj/game/cards/ice.clj index ea8cb04f51..9d247107b3 100644 --- a/src/clj/game/cards/ice.clj +++ b/src/clj/game/cards/ice.clj @@ -4265,6 +4265,12 @@ :duration :end-of-run :req (req (same-card? card (:ice context))) :value (req (any-subs-broken? (:ice context)))}) + (register-lingering-effect + state side card + {:type :cannot-auto-break-subs-on-ice + :duration :end-of-run + :req (req (same-card? card (:ice context))) + :value true}) (effect-completed state side eid)))}] {:subroutines [(give-tags 1) (do-net-damage 2) diff --git a/src/clj/game/core/ice.clj b/src/clj/game/core/ice.clj index e3620f83d9..6782a9c3db 100644 --- a/src/clj/game/core/ice.clj +++ b/src/clj/game/core/ice.clj @@ -765,6 +765,7 @@ (not= :unrestricted ((:breakable %) state side eid current-ice [card])) (not (:breakable % true))) ; breakable is a bool (:subroutines current-ice))) + can-auto-break (not (any-effects state side :cannot-auto-break-subs-on-ice true? {:ice current-ice})) times-break (when (and (pos? unbroken-subs) subs-broken-at-once) (if (pos? subs-broken-at-once) @@ -786,6 +787,7 @@ (when (and break-ability (or (not (get-strength card)) pump-ability (zero? strength-diff)) no-unbreakable-subs + can-auto-break (pos? unbroken-subs) (can-pay? state side eid card total-cost)) [{:dynamic :auto-pump-and-break diff --git a/test/clj/game/cards/ice_test.clj b/test/clj/game/cards/ice_test.clj index d5ffab66ac..964702ac2c 100644 --- a/test/clj/game/cards/ice_test.clj +++ b/test/clj/game/cards/ice_test.clj @@ -8128,6 +8128,25 @@ (click-prompt state :runner "Do 2 net damage") (is (no-prompt? state :runner) "Cannot break more than 1 sub")))) +(deftest unsmiling-tsarevna-auto-break + ;; Unsmiling Tsarevna - limit auto break when rez ability fired + (do-game + (new-game {:corp {:hand [(qty "Unsmiling Tsarevna" 1)] + :deck [(qty "Hedge Fund" 5)] + :credits 20} + :runner {:hand ["Carmen"] + :credits 20}}) + (play-from-hand state :corp "Unsmiling Tsarevna" "HQ") + (take-credits state :corp) + (play-from-hand state :runner "Carmen") + (let [ut-hq (get-ice state :hq 0) + carm (get-program state 0)] + (run-on state :hq) + (rez state :corp ut-hq) + (click-prompt state :corp "Yes") + (run-continue state) + (is (empty? (filter #(:dynamic %) (:abilities (refresh carm)))) "No auto break dynamic ability")))) + (deftest valentao-no-choice-without-tags (do-game (new-game {:corp {:hand ["Valentão"]}})