Skip to content

More binary prompts #6603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from 10 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
3 changes: 1 addition & 2 deletions src/clj/game/cards/assets.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1951,8 +1951,7 @@
(defcard "Rex Campaign"
(let [payout-ab {:prompt "Choose one"
:choices ["Remove 1 bad publicity" "Gain 5 [Credits]"]
:msg (msg (if (= target "Remove 1 bad publicity")
"remove 1 bad publicity" "gain 5 [Credits]"))
:msg (msg "to " (decapitalize target))
:async true
:effect (req (if (= target "Remove 1 bad publicity")
(lose-bad-publicity state side eid 1)
Expand Down
4 changes: 1 addition & 3 deletions src/clj/game/cards/events.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2316,9 +2316,7 @@
{:play-cost-bonus (req (- (get-link state)))
:prompt "Choose one"
:choices ["Gain 4 [Credits]" "Draw 4 cards"]
:msg (msg (if (= target "Gain 4 [Credits]")
"gain 4 [Credits]"
"draw 4 cards"))
:msg (msg "to " (decapitalize target))
:async true
:effect (req (if (= target "Gain 4 [Credits]")
(gain-credits state :runner eid 4)
Expand Down
39 changes: 17 additions & 22 deletions src/clj/game/cards/ice.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2222,7 +2222,7 @@
:duration :end-of-run
:req (req (same-card? card target))
:value (:subtypes target)})
(system-msg state :corp (str "chooses " (card-str state target) " for Loki's ability"))
(system-msg state :corp (str "uses Loki to choose " (card-str state target)))
(doseq [sub (:subroutines target)]
(add-sub! state side (get-card state card) sub (:cid target) {:front true}))
(register-events
Expand All @@ -2232,28 +2232,23 @@
:unregister-once-resolved true
:req (req (get-card state card))
:effect (effect (remove-subs! (get-card state card) #(= cid (:from-cid %))))}]))))}
:subroutines [{:label "End the run unless the Runner shuffles their Grip into the Stack"
:subroutines [{:label "End the run unless the Runner shuffles the grip into the stack"
:player :runner
:async true
:effect (req (if (and (zero? (count (:hand runner)))
(< (count (:deck runner)) 2)) ; UFAQ 24
(do (system-msg state :corp (str "uses Loki to end the run"))
(end-run state side eid card))
(continue-ability
state :runner
{:optional
{:waiting-prompt "Runner to choose an option"
:prompt "Shuffle your Grip into the Stack?"
:player :runner
:yes-ability
{:effect (req (doseq [c (:hand runner)]
(move state :runner c :deck))
(shuffle! state :runner :deck)
(system-msg state :runner "shuffles their Grip into their Stack"))}
:no-ability
{:async true
:effect (effect (system-msg :runner "declines to shuffle their Grip into their Stack")
(end-run eid card))}}}
card nil)))}]})
:prompt "Choose one"
:choices (req [(when-not (and (zero? (count (:hand runner)))
(< (count (:deck runner)) 2)) ; UFAQ 24
"Shuffle the grip into the stack")
"End the run"])
:msg (req (msg (if (= target "End the run")
"to "
"to force the Runner to ")
(decapitalize target)))
:effect (req (if (= target "End the run")
(end-run state :corp eid card)
(do (doseq [c (:hand runner)]
(move state :runner c :deck))
(shuffle! state :runner :deck))))}]})

(defcard "Loot Box"
(letfn [(top-3 [state] (take 3 (get-in @state [:runner :deck])))
Expand Down
4 changes: 1 addition & 3 deletions src/clj/game/cards/identities.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1662,9 +1662,7 @@
(let [ab {:prompt "Choose one"
:player :corp
:choices ["Gain 2 [Credits]" "Draw 2 cards"]
:msg (msg (if (= target "Gain 2 [Credits]")
"gain 2 [Credits]"
"draw 2 cards"))
:msg (msg "to " (decapitalize target))
:async true
:interactive (req true)
:effect (req (if (= target "Gain 2 [Credits]")
Expand Down
56 changes: 26 additions & 30 deletions src/clj/game/cards/operations.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1607,25 +1607,20 @@
(defcard "O₂ Shortage"
{:on-play
{:async true
:effect (req (if (empty? (:hand runner))
(do (gain-clicks state :corp 2)
(system-msg state side "uses O₂ Shortage to gain [Click][Click]")
(effect-completed state side eid))
(continue-ability
state side
{:optional
{:waiting-prompt "Runner to make a decision"
:prompt "Trash 1 random card from your Grip?"
:player :runner
:yes-ability {:async true
:effect (req (let [c (take 1 (shuffle (:hand runner)))]
(system-msg state :corp
(str "uses O₂ Shortage to trash "
(:title (first c)) " from the Runner's Grip"))
(trash-cards state :runner eid c {:cause-card card :cause :forced-to-trash})))}
:no-ability {:msg "gain [Click][Click]"
:effect (effect (gain-clicks :corp 2))}}}
card nil)))}})
:player :runner
:waiting-prompt "Runner to make a decision"
:prompt "Choose one"
:choices (req [(when-not (empty? (:hand runner))
"Trash 1 random card from the grip")
"The Corp gains [Click][Click]"])
:msg (req (if (= target "The Corp gains [Click][Click]")
"gain [Click][Click]"
(msg "to force the Runner to " (decapitalize target))))
:effect (req (if (= target "The Corp gains [Click][Click]")
(gain-clicks state :corp 2)
(do (let [c (take 1 (shuffle (:hand runner)))]
(trash-cards state :runner eid c {:cause-card card :cause :forced-to-trash})
(effect-completed state side eid)))))}})

(defcard "Observe and Destroy"
{:on-play
Expand Down Expand Up @@ -2112,17 +2107,18 @@
(defcard "Riot Suppression"
{:on-play
{:rfg-instead-of-trashing true
:optional
{:req (req (last-turn? state :runner :trashed-card))
:waiting-prompt "Runner to choose an option"
:prompt "Take 1 brain damage to prevent having 3 fewer clicks next turn?"
:player :runner
:yes-ability
{:async true
:effect (effect (system-msg "suffers 1 brain damage to prevent losing 3[Click] to Riot Suppression")
(damage eid :brain 1 {:card card}))}
:no-ability {:msg "give the Runner 3 fewer [Click] next turn"
:effect (req (swap! state update-in [:runner :extra-click-temp] (fnil #(- % 3) 0)))}}}})
:req (req (last-turn? state :runner :trashed-card))
:player :runner
:async true
:waiting-prompt "Runner to choose an option"
:prompt "Choose one"
:msg (msg "force the Runner to " (decapitalize target))
:choices ["Suffer 1 brain damage" "Get 3 fewer [Click] on the next turn"]
:effect (req (if (= target "Suffer 1 brain damage")
(do (damage state :runner eid :brain 1 {:card card})
(effect-completed state side eid))
(do (swap! state update-in [:runner :extra-click-temp] (fnil #(- % 3) 0))
(effect-completed state side eid))))}})

(defcard "Rolling Brownout"
{:on-play {:msg "increase the play cost of operations and events by 1 [Credits]"}
Expand Down
4 changes: 1 addition & 3 deletions src/clj/game/cards/programs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2270,9 +2270,7 @@
{:prompt "Choose one"
:choices ["Gain 3 [Credits]" "Draw 2 cards"]
:async true
:msg (msg (if (= target "Draw 2 cards")
"draw 2 cards"
"gain 3 [Credits]"))
:msg (msg "to " (decapitalize target))
:effect (req (if (= target "Draw 2 cards")
(draw state :runner eid 2)
(gain-credits state :runner eid 3)))}))
Expand Down
Loading