From 46335984fe3db6696f412a42bb0ee1bd1fa08e57 Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Wed, 9 Oct 2024 10:16:50 +1300 Subject: [PATCH] simplification --- src/clj/game/cards/resources.clj | 8 +++----- src/clj/game/core/drawing.clj | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/clj/game/cards/resources.clj b/src/clj/game/cards/resources.clj index 27bc4ff472..562ee06f49 100644 --- a/src/clj/game/cards/resources.clj +++ b/src/clj/game/cards/resources.clj @@ -71,7 +71,7 @@ [game.core.servers :refer [central->name is-central? is-remote? protecting-same-server? remote->name target-server unknown->kw zone->name zones->sorted-names]] - [game.core.set-aside :refer [set-aside get-set-aside set-aside-for-me]] + [game.core.set-aside :refer [set-aside set-aside-for-me]] [game.core.shuffling :refer [shuffle!]] [game.core.tags :refer [gain-tags lose-tags tag-prevent]] [game.core.to-string :refer [card-str]] @@ -3084,8 +3084,7 @@ {:cost-bonus -1 :no-toast true})) (seq (:hosted card)))) - :effect (req (set-aside state side eid (:hosted card)) - (let [set-aside-cards (get-set-aside state side eid)] + :effect (req (let [set-aside-cards (set-aside state side eid (:hosted card))] (wait-for (trash state side card {:cause :ability-cost :cause-card card}) (system-msg state side "trashed") (continue-ability @@ -3303,8 +3302,7 @@ :once-key :the-class-act-put-bottom :async true :effect - (req (set-aside-for-me state :runner eid (take (inc target) (:deck runner))) - (let [cards (get-set-aside state :runner eid)] + (req (let [cards (set-aside-for-me state :runner eid (take (inc target) (:deck runner)))] (continue-ability state side {:waiting-prompt true diff --git a/src/clj/game/core/drawing.clj b/src/clj/game/core/drawing.clj index 5283d32ab0..1325c6fc64 100644 --- a/src/clj/game/core/drawing.clj +++ b/src/clj/game/core/drawing.clj @@ -80,8 +80,7 @@ (effect-completed state side eid) (let [to-draw (take draws-after-prevent (get-in @state [side :deck])) set-aside-eid eid] - (set-aside-for-me state side set-aside-eid to-draw) - (let [drawn (get-set-aside state side set-aside-eid) + (let [drawn (set-aside-for-me state side set-aside-eid to-draw) drawn-count (count drawn)] (swap! state update-in [side :register :drawn-this-turn] (fnil #(+ % drawn-count) 0)) (if (not no-update-draw-stats)