Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/clj/game/core/choose_one.clj
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@
x))
;; cost->str for a choice
costed-str (fn [x]
(if-not (:cost x)
(:option x)
(let [cs (build-cost-string (:cost x))]
(if-not (:option x) cs (str cs ": " (:option x))))))
(let [choice-str (if-not (:cost x)
(:option x)
(let [cs (build-cost-string (:cost x))]
(if-not (:option x) cs (str cs ": " (:option x)))))]
(if (:card x)
(assoc (:card x) :title choice-str)
choice-str)))
;; converts options to choices
choices-fn (fn [x state side eid card targets]
(when (payable? x state side eid card targets)
Expand All @@ -57,7 +60,7 @@
(if-not (seq xs)
(effect-completed state side eid )
(if (= target (costed-str (first xs)))
;; allow for resolving multiple options, like decues wild
;; allow for resolving multiple options, like deuces wild
(wait-for
(resolve-ability
state side (make-eid state eid)
Expand Down
1 change: 1 addition & 0 deletions src/clj/game/core/prevention.clj
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
"Builds a menu item for firing a prevention ability"
[prevention key]
{:option (or (:label prevention) (->> prevention :card :printed-title))
:card (:card prevention)
:ability {:async true
:effect (req (trigger-prevention state side eid key prevention))}})

Expand Down