Skip to content

Commit

Permalink
Merge pull request mtgred#7392 from francescopellegrini/fix/msg-and-p…
Browse files Browse the repository at this point in the history
…rompts
  • Loading branch information
NoahTheDuke authored Apr 15, 2024
2 parents 360e169 + 78ec879 commit 9efa5ee
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 49 deletions.
14 changes: 7 additions & 7 deletions src/clj/game/cards/agendas.clj
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
:stolen {:async true
:effect (effect (continue-ability (corp-recur) card nil))}
:flags {:has-abilities-when-stolen true}
:abilities [{:label "Add 1 card from Archives to HQ"
:abilities [{:label "Choose a card to add to HQ"
:cost [(->c :trash-from-deck 1) (->c :agenda 1)]
:once :per-turn
:msg "add 1 card from Archives to HQ"
Expand Down Expand Up @@ -738,7 +738,7 @@
(defcard "Eminent Domain"
(let [expend-abi {:req (req (some corp-installable-type? (:hand corp)))
:cost [(->c :credit 1)]
:prompt "Choose 1 card to install and rez"
:prompt "Choose 1 card to install and rez, paying 5 [Credits] less"
:choices {:card #(and (in-hand? %)
(corp-installable-type? %))}
:msg "install and rez 1 card from HQ, paying 5 [Credits] less"
Expand Down Expand Up @@ -1181,7 +1181,7 @@
(all-active-installed state :corp))))]
(continue-ability
state side
{:prompt (msg "Choose " derez-count " pieces of ice protecting " (zone->name [zone]) " to derez")
{:prompt (msg "Choose " (quantify derez-count "piece") " of ice protecting " (zone->name [zone]) " to derez")
:choices {:card #(and (ice? %)
(rezzed? %)
(= (second (get-zone %)) zone))
Expand All @@ -1204,14 +1204,14 @@
:events [{:event :run
:async true
:optional
{:prompt (msg "Remove 1 hosted agenda counter to rez up to 2 ice protecting " (zone->name (:server context)) ", ignoring all costs?")
{:prompt (msg "Remove 1 hosted agenda counter to rez up to 2 pieces of ice protecting " (zone->name (:server context)) ", ignoring all costs?")
:req (req (pos? (get-counters card :agenda)))
:yes-ability
{:cost [(->c :agenda 1)]
:effect (req (let [current-server (first (:server (:run @state)))]
(continue-ability
state side
{:prompt (msg "Choose up to 2 ice protecting " (zone->name current-server))
{:prompt (msg "Choose up to 2 pieces of ice protecting " (zone->name current-server))
:choices {:card #(and (ice? %)
(not (rezzed? %))
(= (second (get-zone %)) current-server))
Expand Down Expand Up @@ -1321,7 +1321,7 @@

(defcard "Midnight-3 Arcology"
{:on-score {:async true
:msg "Draw 3 cards and skip their discard step this turn"
:msg "draw 3 cards and skip their discard step this turn"
:effect (effect
(register-lingering-effect
card
Expand Down Expand Up @@ -2073,7 +2073,7 @@
(defcard "Stoke the Embers"
(letfn [(score-abi
[cred-gain]
{:msg (msg "gain " cred-gain" [Credits]")
{:msg (msg "gain " cred-gain " [Credits]")
:interactive (req true)
:async true
:effect (req (wait-for
Expand Down
2 changes: 1 addition & 1 deletion src/clj/game/cards/assets.clj
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@
:interactive (req true)
:choices (req [(when (seq (:hand corp)) "Trash 1 card from HQ to gain 2 [Credits] and draw 1 card")
(when (some #(not (:seen %)) (:discard corp))
"Turn 1 facedown card in Archives faceup to place 1 advancement counter")
"Turn 1 facedown card in Archives faceup to place 1 advancement counter on an installed card")
"Done"])
:async true
:effect (req (if (= target "Done")
Expand Down
4 changes: 2 additions & 2 deletions src/clj/game/cards/events.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4148,9 +4148,9 @@
:choices (req (cancellable targets-in-the-grip))
:async true
:effect (effect (runner-install (assoc eid :source card :source-type :runner-install) target))
:msg (msg "install " (:title target) " from the grip")}
:msg (msg "install " (:title target))}
;; else show a fake prompt so the corp can't infer that no legal targets exist
{:prompt "You have no programs or pieces of hardware in the grip"
{:prompt "You have no programs or pieces of hardware to install"
:choices ["OK"]
:prompt-type :bogus})
card nil)))}]
Expand Down
4 changes: 2 additions & 2 deletions src/clj/game/cards/hardware.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@
:effect (req (continue-ability
state side
{:optional
{:prompt "Install this card from the heap?"
{:prompt "Install this hardware from the heap?"
:yes-ability {:cost [(->c :lose-click 1)]
:msg (msg "install " (get-title card) " from the heap")
:async true
Expand All @@ -1255,7 +1255,7 @@
(if (= 3 (count (filter #(= (:printed-title %) (:printed-title card))
(get-in @state [:runner :scored]))))
(do (system-msg state side "wins the game")
(win state :runner "assassination plot (Jeihtinho)")
(win state :runner "assassination plot (Jeitinho)")
(effect-completed state side eid))
(effect-completed state side eid)))}]})

Expand Down
17 changes: 6 additions & 11 deletions src/clj/game/cards/ice.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,6 @@
:events [{:event :end-of-encounter
:req (req (and (= :this-turn (:rezzed card))
(same-card? (:ice context) card)))
:msg "force the Runner to choose an effect"
:effect (effect (continue-ability
{:prompt "Choose one"
:player :runner
Expand All @@ -1215,12 +1214,11 @@
(= target "Corp trashes 1 Runner card")
trash-installed-sub
(= target "Take 2 tags")
{:effect (effect (gain-tags :runner eid 2 {:unpreventable true}))
:msg "give the Runner 2 tags"}
{:msg (msg "force the Runner to " (decapitalize target))
:effect (effect (gain-tags :runner eid 2 {:unpreventable true}))}
(= target "Suffer 3 net damage")
{:effect (req (wait-for (pay state :runner (make-eid state eid) card [(->c :net 3)])
(system-msg state :runner (:msg async-result))
(effect-completed state side eid)))})
{:msg (msg "force the Runner to " (decapitalize target))
:effect (req (pay state :runner eid card [(->c :net 3)]))})
card nil))}
card nil))}]})

Expand Down Expand Up @@ -2002,7 +2000,7 @@

(defcard "Descent"
(let [shuffle-ab
{:label "Draw 1 card and shuffle 2 agendas in HQ and/or Archives into R&D"
{:label "Draw 1 card and shuffle up to 2 agendas in HQ and/or Archives into R&D"
:msg "draw 1 card"
:async true
:cost [:credit 1]
Expand Down Expand Up @@ -2579,10 +2577,7 @@
:advance-counter
(inc (faceup-archives-types corp))
{:placed true}))}
:subroutines [{:msg "gain 2 [Credits] and end the run"
:async true
:effect (req (wait-for (gain-credits state :corp 2)
(end-run state side eid card)))}
:subroutines [(combine-abilities (gain-credits-sub 2) end-the-run)
end-the-run
end-the-run]})

Expand Down
6 changes: 3 additions & 3 deletions src/clj/game/cards/identities.clj
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@
:msg (msg "install " (:title target))
:async true
:effect (effect (runner-install (assoc eid :source card :source-type :runner-install) target nil))}}}
{:prompt (str "You have no " card-type " in hand")
{:prompt (str "You have no " card-type " to install")
:choices ["Carry on!"]
:prompt-type :bogus}))
card nil))}]})
Expand Down Expand Up @@ -1368,7 +1368,7 @@
(continue-ability
state :corp
{:async true
:prompt "No ice to install"
:prompt "You have no piece of ice to install"
:choices ["Carry on!"]
:prompt-type :bogus
:effect (effect (effect-completed eid))}
Expand Down Expand Up @@ -2151,7 +2151,7 @@
(let [thunderbolt-sub
{:player :runner
:async true
:label (str "End the run unless the Runner pays " (build-cost-label [(->c :trash-installed 1)]))
:label "End the run unless the Runner trashes 1 of their installed cards"
:prompt "Choose one"
:waiting-prompt true
:choices (req ["End the run"
Expand Down
16 changes: 8 additions & 8 deletions src/clj/game/cards/operations.clj
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@
:yes-ability
{:cost [(->c :credit 2)]
:req (req (seq (:hand runner)))
:effect(req (let [target-card (first (shuffle (:hand runner)))]
:effect (req (let [target-card (first (shuffle (:hand runner)))]
(wait-for
(reveal state side target-card)
(system-msg state side (str "shuffles " (:title target-card) " into the stack"))
Expand Down Expand Up @@ -511,9 +511,9 @@
:card #(and (corp? %)
(installed? %)
(can-be-advanced? %))}
:msg (msg "place 1 advancement counter on " (quantify (count targets) "card"))
:effect (req (doseq [t targets]
(add-prop state :corp t :advance-counter 1 {:placed true})))}]
:msg (msg "place 1 advancement counter on " (quantify (count targets) "card"))
:effect (req (doseq [t targets]
(add-prop state :corp t :advance-counter 1 {:placed true})))}]
{:on-play
{:prompt "Choose one"
:choices (req ["Place 1 advancement counter on each of up to 2 cards you can advance"
Expand Down Expand Up @@ -2766,13 +2766,13 @@

(defcard "Sudden Commandment"
(let [play-instant-second {:optional
{:prompt (msg "Pay 3 [Credits] to gain [Click]?")
{:prompt "Pay 3 [Credits] to gain [Click]?"
:waiting-prompt true
:req (req (threat-level 3 state))
:yes-ability {:cost [(->c :credit 3)]
:msg (msg "gain [Click]")
:msg "gain [Click]"
:effect (effect (gain-clicks 1))}}}
play-instant-first {:prompt (msg "Choose a non-terminal operation")
play-instant-first {:prompt "Choose a non-terminal operation"
:choices (req (conj (filter #(and (operation? %)
(not (has-subtype? % "Terminal"))
(should-trigger? state :corp (assoc eid :source % :source-type :play) % nil (or (:on-play (card-def %)) {}))
Expand All @@ -2786,7 +2786,7 @@
(continue-ability state side (when is-first-mandate? play-instant-second) card nil)
(wait-for (play-instant state side (assoc (make-eid state eid) :source target :source-type :play) target nil)
(continue-ability state side (when is-first-mandate? play-instant-second) card nil)))))}]
{:on-play {:msg "Draw 2 cards"
{:on-play {:msg "draw 2 cards"
:async true
:effect (req (wait-for (draw state side (make-eid state eid) 2)
(continue-ability
Expand Down
12 changes: 6 additions & 6 deletions src/clj/game/cards/programs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1708,14 +1708,14 @@
(cond
is-facedown?
{:optional
{:prompt (msg "Host face-down card on this program instead of accessing it?")
:yes-ability {:msg (msg "host a facedown card on itself instead of accessing it")
{:prompt "Host face-down card on this program instead of accessing it?"
:yes-ability {:msg "host a facedown card on itself instead of accessing it"
:effect (effect (update! (assoc-in card [:special :host-available] false))
(host card target-card))}}}
(or is-agenda? is-trap?)
{:optional
{:prompt (msg "Host " (:title target-card) " on this program instead of accessing it?")
:yes-ability {:msg (msg "host a " (:title target-card) " on itself instead of accessing it")
:yes-ability {:msg (msg "host " (:title target-card) " on itself instead of accessing it")
:effect (effect (update! (assoc-in card [:special :host-available] false))
(host card target-card))}}})
card nil)))}
Expand Down Expand Up @@ -2097,7 +2097,7 @@
{:event :encounter-ice
:interactive (req true)
:ability-name "Malandragem (Power counter)"
:optional {:prompt "Spend 1 power counter to bypass encountered ice?"
:optional {:prompt "Remove 1 power counter to bypass encountered ice?"
:once :per-turn
:req (req (and (>= 3 (ice-strength state side current-ice))
(<= 1 (get-counters (get-card state card) :power))))
Expand Down Expand Up @@ -2301,7 +2301,7 @@
(muse-abi [where]
{:prompt "Choose a non-daemon program"
:msg (msg (if (= target "Done")
(str "shuffle the stack")
"shuffle the stack"
(str "install " (:title target))))
:choices (req (concat
(->> (where runner)
Expand Down Expand Up @@ -2330,7 +2330,7 @@
(let [target-card target]
(continue-ability
state side
{:prompt (msg "Choose an ice to host " (:title target-card))
{:prompt (msg "Choose a piece of ice to host " (:title target-card))
:choices {:card #(and (installed? %)
(ice? %))}
:async true
Expand Down
10 changes: 5 additions & 5 deletions src/clj/game/cards/resources.clj
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
:effect (effect (add-counter (get-card state card) :power 1))}
{:event :runner-turn-begins
:optional
{:prompt (str "Trash this resource to force the Corp to lose 10 [Credits]?")
{:prompt "Trash this resource to force the Corp to lose 10 [Credits]?"
:req (req (>= (get-counters (get-card state card) :power) 3))
:yes-ability
{:msg "trash itself and force the Corp to lose 10 [Credits]"
Expand Down Expand Up @@ -1313,7 +1313,7 @@
:req (req (and (threat-level 3 state)
(= :rd target)
(= :archives (first (:server run)))))
:msg (msg "access 1 additional card")
:msg "access 1 additional card"
:effect (effect (access-bonus :rd 1))}
ability
(successful-run-replace-breach
Expand Down Expand Up @@ -2113,7 +2113,7 @@
:events [{:event :breach-server
:req (req (and tagged run
(or (= target :rd) (= target :hq))))
:msg "access 1 additional card"
:msg (msg "access 1 additional card from " (zone->name target))
:effect (effect (access-bonus target 1))}]})

(defcard "\"Pretty\" Mary da Silva"
Expand Down Expand Up @@ -3517,11 +3517,11 @@
(continue-ability
state side
{:req (req (< 0 (get-counters card :power)))
:prompt (msg (format "How many additional %s accesses do you want to make?" (if (= :rd target-server) "R&D" "HQ")))
:prompt (msg "How many additional " (zone->name target-server) " accesses do you want to make?")
:choices {:number (req (min 2 (get-counters card :power)))
:default (req (min 2 (get-counters card :power)))}
:msg (msg "access " (quantify target "additional card") " from "
(if (= :rd target-server) "R&D" "HQ"))
(zone->name target-server))
:async true
:effect (effect (access-bonus target-server (max 0 target))
(add-counter :runner card :power (- target) {:placed true})
Expand Down
4 changes: 2 additions & 2 deletions src/clj/game/cards/upgrades.clj
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
(continue-ability
state side
{:optional
{:prompt (str "Derez another ice to give "
{:prompt (str "Derez another piece of ice to give "
(:title rezzed-card)
" +3 strength for the remainder of the run?")
:waiting-prompt true
Expand Down Expand Up @@ -898,7 +898,7 @@
(zero? (get-counters % :advancement))
(same-server? card %))
(all-installed-corp state)))
:prompt "Choose a piece of ice protecting this server to place 1 advancement counter on"
:prompt "Choose a piece of ice protecting this server"
:waiting-prompt true
:choices {:req (req (and (ice? target)
(zero? (get-counters target :advancement))
Expand Down
Loading

0 comments on commit 9efa5ee

Please sign in to comment.