Skip to content

Commit 1dd7327

Browse files
committed
indent changes
1 parent 9908406 commit 1dd7327

File tree

2 files changed

+61
-60
lines changed

2 files changed

+61
-60
lines changed

src/clj/game/core/pick_counters.clj

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -141,59 +141,59 @@
141141
pay-rest (req
142142
(if (and (<= (- target-count counter-count) (get-in @state [side :credit]))
143143
(<= stealth-target stealth-count))
144-
(let [remainder (max 0 (- target-count counter-count))
145-
remainder-str (when (pos? remainder)
146-
(str remainder " [Credits]"))
147-
card-strs (when (pos? (count selected-cards))
148-
(str (enumerate-str (map #(let [{:keys [card number]} %
149-
title (:title card)]
150-
(str number " [Credits] from " title))
151-
(vals selected-cards)))))
152-
message (str card-strs
153-
(when (and card-strs remainder-str)
154-
" and ")
155-
remainder-str
156-
(when (and card-strs remainder-str)
157-
" from [their] credit pool"))]
158-
(lose state side :credit remainder)
159-
(let [cards (->> (vals selected-cards)
160-
(map :card)
161-
(remove #(-> (card-def %) :interactions :pay-credits :cost-reduction)))]
162-
(wait-for (trigger-spend-credits-from-cards state side cards)
163-
; Now we trigger all of the :counter-added events we'd neglected previously
164-
(pick-counter-triggers state side eid selected-cards selected-cards target-count message))))
165-
(continue-ability
166-
state side
167-
(pick-credit-providing-cards provider-func eid target-count stealth-target selected-cards)
168-
card nil)))]
144+
(let [remainder (max 0 (- target-count counter-count))
145+
remainder-str (when (pos? remainder)
146+
(str remainder " [Credits]"))
147+
card-strs (when (pos? (count selected-cards))
148+
(str (enumerate-str (map #(let [{:keys [card number]} %
149+
title (:title card)]
150+
(str number " [Credits] from " title))
151+
(vals selected-cards)))))
152+
message (str card-strs
153+
(when (and card-strs remainder-str)
154+
" and ")
155+
remainder-str
156+
(when (and card-strs remainder-str)
157+
" from [their] credit pool"))]
158+
(lose state side :credit remainder)
159+
(let [cards (->> (vals selected-cards)
160+
(map :card)
161+
(remove #(-> (card-def %) :interactions :pay-credits :cost-reduction)))]
162+
(wait-for (trigger-spend-credits-from-cards state side cards)
163+
; Now we trigger all of the :counter-added events we'd neglected previously
164+
(pick-counter-triggers state side eid selected-cards selected-cards target-count message))))
165+
(continue-ability
166+
state side
167+
(pick-credit-providing-cards provider-func eid target-count stealth-target selected-cards)
168+
card nil)))]
169169
(if (or (not (pos? target-count)) ; there is a limit
170170
(<= target-count counter-count) ; paid everything
171171
(zero? (count provider-cards))) ; no more additional credit sources found
172172
{:async true
173173
:effect pay-rest}
174-
{:async true
175-
:prompt (str "Choose a credit providing card ("
176-
counter-count (when (and target-count (pos? target-count))
177-
(str " of " target-count))
178-
" [Credits]"
179-
(if (pos? stealth-target)
180-
(str ", " (min stealth-count stealth-target) " of " stealth-target " stealth")
181-
"")
182-
")")
183-
:choices {:card #(in-coll? (map :cid provider-cards) (:cid %))}
184-
:effect (req (let [pay-credits-type (-> target card-def :interactions :pay-credits :type)
185-
pay-function (if (= :custom pay-credits-type)
186-
(-> target card-def :interactions :pay-credits :custom)
187-
(take-counters-of-type pay-credits-type))
188-
custom-ability ^:ignore-async-check {:async true
189-
:effect pay-function}
190-
neweid (make-eid state outereid)
191-
providing-card target]
192-
(wait-for (resolve-ability state side neweid custom-ability providing-card [card])
193-
(continue-ability state side
194-
(pick-credit-providing-cards
195-
provider-func eid target-count stealth-target
196-
(update selected-cards (:cid providing-card)
197-
#(assoc % :card providing-card :number (+ (:number % 0) async-result))))
198-
card targets))))
199-
:cancel-effect pay-rest}))))
174+
{:async true
175+
:prompt (str "Choose a credit providing card ("
176+
counter-count (when (and target-count (pos? target-count))
177+
(str " of " target-count))
178+
" [Credits]"
179+
(if (pos? stealth-target)
180+
(str ", " (min stealth-count stealth-target) " of " stealth-target " stealth")
181+
"")
182+
")")
183+
:choices {:card #(in-coll? (map :cid provider-cards) (:cid %))}
184+
:effect (req (let [pay-credits-type (-> target card-def :interactions :pay-credits :type)
185+
pay-function (if (= :custom pay-credits-type)
186+
(-> target card-def :interactions :pay-credits :custom)
187+
(take-counters-of-type pay-credits-type))
188+
custom-ability ^:ignore-async-check {:async true
189+
:effect pay-function}
190+
neweid (make-eid state outereid)
191+
providing-card target]
192+
(wait-for (resolve-ability state side neweid custom-ability providing-card [card])
193+
(continue-ability state side
194+
(pick-credit-providing-cards
195+
provider-func eid target-count stealth-target
196+
(update selected-cards (:cid providing-card)
197+
#(assoc % :card providing-card :number (+ (:number % 0) async-result))))
198+
card targets))))
199+
:cancel-effect pay-rest}))))

src/clj/game/core/prompts.clj

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@
2828
{:keys [waiting-prompt prompt-type show-discard cancel-effect end-effect targets]}]
2929
(let [prompt (if (string? message) message (message state side eid card targets))
3030
choices (choice-parser choices)
31-
newitem ^:ignore-async-check {:eid eid
32-
:msg prompt
33-
:choices choices
34-
:effect f
35-
:card card
36-
:prompt-type (or prompt-type :other)
37-
:show-discard show-discard
38-
:cancel-effect cancel-effect
39-
:end-effect end-effect}]
31+
newitem ^:ignore-async-check
32+
{:eid eid
33+
:msg prompt
34+
:choices choices
35+
:effect f
36+
:card card
37+
:prompt-type (or prompt-type :other)
38+
:show-discard show-discard
39+
:cancel-effect cancel-effect
40+
:end-effect end-effect}]
4041
(when (or (#{:waiting :run} prompt-type)
4142
(:number choices)
4243
(:card-title choices)

0 commit comments

Comments
 (0)