Skip to content

Commit 6612b52

Browse files
committed
cleanup/comments
1 parent d223014 commit 6612b52

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/clj/game/core/runs.clj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,10 @@
337337
;; note: as far as I can tell, this deliberately leaves on open eid (the run eid).
338338
;; Attempting to change that breaks a very large number of tests, so I'm leaving this
339339
;; note here to remind me when I look at this later. -nbk, 2025
340+
;;
341+
;; TODO: rewrite forced encounter to use it's own version of encounter-ice,
342+
;; then we can close the eids on this. Right now, closing the eids breaks
343+
;; forced encounters and nothing else.
340344
[state side eid ice]
341345
(swap! state update :encounters conj {:eid eid
342346
:ice ice})
@@ -362,8 +366,10 @@
362366
;; or knifed.
363367
(when-let [c-ice (get-current-ice state)]
364368
(when (and (same-card? c-ice ice) (zero? (count (:subroutines c-ice))))
365-
(wait-for (trigger-event-simult state side :subroutines-broken nil (break-subs-event-context state c-ice [] (get-in @state [:runner :basic-action-card]))))))))))
366-
369+
(wait-for
370+
(trigger-event-simult state side :subroutines-broken nil (break-subs-event-context state c-ice [] (get-in @state [:runner :basic-action-card])))
371+
(when (should-end-encounter? state side ice)
372+
(encounter-ends state side eid)))))))))
367373

368374
(defmethod start-next-phase :encounter-ice
369375
[state side _]

0 commit comments

Comments
 (0)