Skip to content

Commit a2b1802

Browse files
authored
Merge pull request #7994 from NBKelly/defer-install-trash-triggers-to-cost-paid-checkpoint
defer events from trashing cards during install until the next checkpoint
2 parents a162058 + ff43d12 commit a2b1802

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/clj/game/core/installing.clj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
:async true
104104
:effect (req (system-msg state :corp (str "trashes " (card-str state prev-card)))
105105
(if (get-card state prev-card) ; make sure they didn't trash the card themselves
106-
(trash state :corp eid prev-card {:keep-server-alive true})
106+
(trash state :corp eid prev-card {:keep-server-alive true :suppress-checkpoint true})
107107
(effect-completed state :corp eid)))}
108108
nil nil))
109109

@@ -356,7 +356,7 @@
356356
:effect (req (if (>= (count targets) need-to-trash)
357357
(do (system-msg state side (str "trashes " (enumerate-str (map #(card-str state %) targets))))
358358
(wait-for
359-
(trash-cards state side targets {:keep-server-alive true})
359+
(trash-cards state side targets {:keep-server-alive true :suppress-checkpoint true})
360360
(corp-install-pay state side eid card server (assoc args :resolved-optional-trash true))))
361361
(do (toast state :corp (str "You must either trash at least " need-to-trash " ice, or trash none of them"))
362362
(continue-ability state side (trash-all-or-none) card targets))))
@@ -372,7 +372,7 @@
372372
:waiting-prompt true
373373
:effect (req (do (system-msg state side (str "trashes " (enumerate-str (map #(card-str state %) targets))))
374374
(wait-for
375-
(trash-cards state side targets {:keep-server-alive true})
375+
(trash-cards state side targets {:keep-server-alive true :suppress-checkpoint true})
376376
(corp-install-pay state side eid card server (assoc args :resolved-optional-trash true)))))
377377
:cancel-effect (req (corp-install-pay state side eid card server (assoc args :resolved-optional-trash true)))}
378378
card nil)
@@ -584,7 +584,7 @@
584584
(not (has-ancestor? % host-card))
585585
(program? %))}
586586
:async true
587-
:effect (req (wait-for (trash-cards state side (make-eid state eid) targets {:unpreventable true})
587+
:effect (req (wait-for (trash-cards state side (make-eid state eid) targets {:unpreventable true :suppress-checkpoint true})
588588
(update-mu state)
589589
(runner-install-pay state side eid card (assoc args :resolved-optional-trash true))))
590590
:cancel-effect (req (update-mu state)
@@ -651,7 +651,7 @@
651651
;; the total selection is worth X memory, since the req function must be satisfied at
652652
;; every point of the selection --nbkelly, jun 2024
653653
:effect (req (wait-for
654-
(trash-cards state side (make-eid state eid) targets {:unpreventable true})
654+
(trash-cards state side (make-eid state eid) targets {:unpreventable true :suppress-checkpoint true})
655655
(update-mu state)
656656
(runner-host-enforce-specific-memory state side eid card
657657
(get-card state potential-host)
@@ -678,7 +678,7 @@
678678
:min to-destroy
679679
:max (count relevant-cards)}
680680
:async true
681-
:effect (req (wait-for (trash-cards state side (make-eid state eid) targets {:unpreventable true})
681+
:effect (req (wait-for (trash-cards state side (make-eid state eid) targets {:unpreventable true :suppress-checkpoint true})
682682
(update-mu state)
683683
(runner-host-enforce-specific-memory state side eid card
684684
(get-card state potential-host) args)))}

0 commit comments

Comments
 (0)