Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a475d98
switch to triple logs (no visible change)
NBKelly Mar 19, 2026
3ac7251
add support for side specific logging
NBKelly Mar 21, 2026
c14fb18
add support for side specific logging
NBKelly Mar 21, 2026
1f0e60d
runner side logging for the card accessed
NBKelly Mar 21, 2026
4aca7b2
update unit tests for side specific logging
NBKelly Mar 21, 2026
80d0f0f
don't need all three keys - public + side works
NBKelly Mar 21, 2026
b485443
side specific logging for chain reaction
NBKelly Mar 21, 2026
78d830e
side specific logging for read-write share
NBKelly Mar 21, 2026
fcae90b
side specific logging for cultivate, flood the market
NBKelly Mar 21, 2026
5afa032
CBI raid tells corp the top
NBKelly Mar 21, 2026
17076ca
lethe, sleipnir and knowledge seeker privately log
NBKelly Mar 21, 2026
2b121b1
melies and hiram log privately now
NBKelly Mar 21, 2026
4b1a688
some util functions privately log
NBKelly Mar 21, 2026
45693b1
corp installs privately log
NBKelly Mar 21, 2026
fec7374
hiram updated unit tests
NBKelly Mar 21, 2026
24a2e38
multi-say takes in a map to say to multiple
NBKelly Mar 21, 2026
b008944
sabotage privately logs
NBKelly Mar 21, 2026
d6b6aa2
elevation logs privately
NBKelly Mar 21, 2026
d3a1217
place-advancements helper, private info logging from TAI
NBKelly Mar 28, 2026
933578e
hidden info for borealis
NBKelly Mar 28, 2026
1432b32
private logging for gateway
NBKelly Mar 28, 2026
d668e1e
ashes cards log private info
NBKelly Mar 29, 2026
e3b20ef
Merge branch 'master' into side-specific-logs
NBKelly Mar 29, 2026
f1ab6e4
Update identities.clj
NBKelly Mar 29, 2026
98b8975
reworked say to combine message maps into one linear sequence
NBKelly Apr 2, 2026
303398b
condense ability messages into multi-msg
NBKelly Apr 2, 2026
a44dbff
update for new log structure
NBKelly Apr 2, 2026
2201d33
update diffs for new log structure
NBKelly Apr 2, 2026
ff2da64
update tests for new log structure
NBKelly Apr 2, 2026
e5ebb26
Merge branch 'side-specific-logs' of github.com:NBKelly/netrunner int…
NBKelly Apr 2, 2026
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
112 changes: 38 additions & 74 deletions src/clj/game/cards/agendas.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
[game.core.cost-fns :refer [rez-cost install-cost]]
[game.core.choose-one :refer [choose-one-helper]]
[game.core.damage :refer [damage]]
[game.core.def-helpers :refer [corp-recur defcard do-net-damage draw-abi gain-credits-ability give-tags
offer-jack-out reorder-choice take-credits get-x-fn]]
[game.core.def-helpers :refer [combine-abilities corp-recur defcard do-net-damage draw-abi gain-credits-ability give-tags
look-at-the-top offer-jack-out place-advancement-counter reorder-choice take-credits get-x-fn]]
[game.core.drawing :refer [draw draw-up-to]]
[game.core.effects :refer [register-lingering-effect]]
[game.core.eid :refer [effect-completed make-eid]]
Expand Down Expand Up @@ -251,34 +251,21 @@
:effect (effect (gain-tags eid 1))}]})

(defcard "Architect Deployment Test"
{:on-score
{:interactive (req true)
:async true
:msg "look at the top 5 cards of R&D"
:waiting-prompt true
;; this is explicitly so the prompt shows up before we look at the menu
:effect (req (continue-ability
state side
{:prompt (msg "The top cards of R&D are (top->bottom): "
(enumerate-cards (take 5 (:deck corp))))
:choices ["OK"]
:async true
:req (req (not-empty (:deck corp)))
:effect (effect (continue-ability
{:prompt "Choose a card to install"
:choices (cancellable (filter corp-installable-type?
(take 5 (:deck corp))))
:async true
:effect (req (let [target-position (first (positions #{target} (take 5 (:deck corp))))]
(corp-install state side
eid target nil
{:ignore-all-cost true
:msg-keys {:install-source card
:origin-index target-position
:display-origin true}
:install-state :rezzed-no-cost})))}
card nil))}
card nil))}})
{:on-score (combine-abilities
(look-at-the-top :corp :corp 5)
{:prompt "Choose a card to install"
:choices (req (cancellable (filter corp-installable-type? (take 5 (:deck corp)))))
:async true
:change-in-game-state {:silent true
:req (req (seq (:deck corp)))}
:effect (req (let [target-position (first (positions #{target} (take 5 (:deck corp))))]
(corp-install state side
eid target nil
{:ignore-all-cost true
:msg-keys {:install-source card
:origin-index target-position
:display-origin true}
:install-state :rezzed-no-cost})))})})

(defcard "Armed Intimidation"
{:on-score
Expand Down Expand Up @@ -318,13 +305,8 @@
:effect (effect (lose-credits :runner eid 7))}})

(defcard "AstroScript Pilot Program"
{:on-score (agenda-counters 1)
:abilities [{:cost [(->c :agenda 1)]
:label "place 1 advancement counter"
:msg (msg "place 1 advancement counter on " (card-str state target))
:choices {:req (req (can-be-advanced? state target))}
:async true
:effect (effect (add-prop eid target :advance-counter 1 {:placed true}))}]})
{:on-score (agenda-counters 1)
:abilities [(assoc (place-advancement-counter true 1) :cost [(->c :agenda 1)])]})

(defcard "Award Bait"
{:flags {:rd-reveal (req true)}
Expand Down Expand Up @@ -1000,7 +982,8 @@
state side
{:req (req (pos? (count (:hand corp))))
:prompt "Choose a card in HQ to move to the top of R&D"
:msg "add 1 card in HQ to the top of R&D"
:msg {:public "add 1 card in HQ to the top of R&D"
:corp (msg "add facedown " (:title target) " to the top of R&D")}
:choices {:card #(and (in-hand? %)
(corp? %))}
:effect (effect (move target :deck {:front true}))}
Expand Down Expand Up @@ -1422,7 +1405,8 @@
:choices {:max (req (count (:hand corp)))
:card #(and (corp? %)
(in-hand? %))}
:msg (msg "trash " (quantify (count targets) "card") " from HQ")
:msg {:public (msg "trash " (quantify (count targets) "card") " from HQ")
:corp (msg "trash " (quantify (count targets) "card") " from HQ (" (enumerate-cards targets :sorted) ")")}
:async true
:cancel {:msg "decline trashing any cards from HQ"
:async true
Expand Down Expand Up @@ -1635,8 +1619,9 @@
:waiting-prompt true
:choices {:max (req (count (:hand corp)))
:card (every-pred corp? in-hand?)}
:msg (msg "shuffle " (quantify (count targets) "card")
" from HQ into R&D")
:msg {:public (msg "shuffle " (quantify (count targets) "card")
" from HQ into R&D")
:corp (msg "shuffle " (enumerate-cards targets :sorted) " from HQ into R&D")}
:cancel shuffle-my-deck!
:effect (req (doseq [t targets]
(move state side t :deck))
Expand Down Expand Up @@ -1964,7 +1949,8 @@
(or (agenda? %)
(asset? %)
(upgrade? %))))}
:msg (msg "swap " (card-str state to-swap) " with a card from HQ")
:msg {:public (msg "swap " (card-str state to-swap) " with a card from HQ")
:corp (msg "swap " (card-str state to-swap {:maybe-visible true}) " with a card from HQ (" (:title target) ")")}
:effect (req (wait-for (swap-cards-async state side to-swap target)
(continue-ability state :runner (offer-jack-out) card nil)))})
(choose-card [run-server]
Expand Down Expand Up @@ -2118,13 +2104,7 @@

(defcard "Remastered Edition"
{:on-score (agenda-counters 1)
:abilities [{:cost [(->c :agenda 1)]
:msg (msg "place 1 advancement counter on " (card-str state target))
:label "place 1 advancement counter"
:keep-menu-open :while-agenda-tokens-left
:choices {:card installed?}
:async true
:effect (effect (add-prop eid target :advance-counter 1 {:placed true}))}]})
:abilities [(assoc (place-advancement-counter nil 1) :cost [(->c :agenda 1)])]})

(defcard "Remote Data Farm"
{:move-zone (req (when (and (in-scored? card)
Expand Down Expand Up @@ -2303,16 +2283,11 @@

(defcard "Sericulture Expansion"
(project-agenda {:mode :computed})
{:events [{:event :corp-turn-ends
:req (req (and (seq (all-installed state :corp))
(can-pay? state side eid card nil [(->c :agenda 1)])))
:prompt "Choose a card to place 2 advancement counters on"
:player :corp
:cost [(->c :agenda 1)]
:choices {:card (every-pred corp? installed?)}
:msg (msg "place 2 advancement counters on " (card-str state target))
:async true
:effect (req (add-prop state :corp eid target :advance-counter 2 {:placed true}))}]})
{:events [(assoc (place-advancement-counter nil 2)
:event :corp-turn-ends
:req (req (and (seq (all-installed state :corp))
(can-pay? state side eid card nil [(->c :agenda 1)])))
:cost [(->c :agenda 1)])]})

(defcard "Show of Force"
{:on-score {:async true
Expand Down Expand Up @@ -2354,13 +2329,8 @@
card targets)))}]}))

(defcard "Slash and Burn Agriculture"
{:expend {:req (req (some #(can-be-advanced? state %) (all-installed state :corp)))
:cost [(->c :credit 1)]
:choices {:req (req (can-be-advanced? state target))}
:msg (msg "place 2 advancement counters on " (card-str state target))
:async true
:effect (req
(add-prop state :corp eid target :advance-counter 2 {:placed true}))}})
{:expend (assoc (place-advancement-counter true 2)
:cost [(->c :credit 1)])})

(defcard "SSL Endorsement"
{:flags {:has-events-when-stolen true}
Expand Down Expand Up @@ -2467,14 +2437,8 @@
(gain-credits state side (make-eid state eid) cred-gain)
(continue-ability
state side
{:req (req (seq (all-installed-corp state)))
:choices {:card #(installed? %)}
:waiting-prompt true
:msg (msg "place 1 advancement counter on "
(card-str state target))
:async true
:effect (effect (add-prop :corp eid target :advance-counter 1
{:placed true}))}
(assoc (place-advancement-counter nil 1)
:req (req (seq (all-installed-corp state))))
card nil)))})]
{:on-score (score-abi 3)
:derezzed-events [{:event :corp-install
Expand Down
36 changes: 19 additions & 17 deletions src/clj/game/cards/assets.clj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
[game.core.cost-fns :refer [play-cost]]
[game.core.damage :refer [damage]]
[game.core.def-helpers :refer [corp-install-up-to-n-cards corp-recur corp-rez-toast defcard do-meat-damage do-net-damage draw-abi gain-credits-ability give-tags
make-icon reorder-choice spend-credits take-credits take-n-credits-ability trash-on-empty get-x-fn with-revealed-hand]]
make-icon place-advancement-counter reorder-choice spend-credits take-credits take-n-credits-ability trash-on-empty get-x-fn with-revealed-hand]]
[game.core.drawing :refer [draw first-time-draw-bonus max-draw
remaining-draws]]
[game.core.effects :refer [is-disabled-reg? register-lingering-effect update-disabled-cards]]
Expand Down Expand Up @@ -1351,13 +1351,8 @@
:effect (effect (gain-clicks 2))}]})

(defcard "Hearts and Minds"
(let [political {:req (req unprotected)
:prompt "Choose a card you can advance to place 1 advancement counter on"
:choices {:req (req (and (can-be-advanced? state target)
(installed? target)))}
:msg (msg "place 1 advancement counter on " (card-str state target))
:async true
:effect (effect (add-prop eid target :advance-counter 1 {:placed true}))}
(let [political (assoc (place-advancement-counter true 1)
:req (req unprotected))
ability {:req (req (:corp-phase-12 @state))
:label "Move 1 hosted advancement counter to another card you can advance (start of turn)"
:skippable true
Expand All @@ -1374,10 +1369,11 @@
:choices {:req (req (and (installed? target)
(can-be-advanced? state target)
(not (same-card? from-ice target))))}
:msg (msg "move 1 hosted advancement counter from "
(card-str state from-ice)
" to "
(card-str state target))

:msg {:public (msg "move 1 hosted advancement counter from " (card-str state from-ice)
" to " (card-str state target))
:corp (msg "move 1 hosted advancement counter from " (card-str state from-ice {:maybe-visible true})
" to " (card-str state target {:maybe-visible true}))}
:async true
:effect (req (wait-for
(add-prop state :corp target :advance-counter 1 {:placed true})
Expand Down Expand Up @@ -2007,7 +2003,8 @@
{:async true
:prompt (msg "Choose an installed card to place advancement counters on (" x " remaining)")
:choices {:card #(installed? %)}
:msg (msg "place 1 advancement counter on " (card-str state target))
:msg {:public (msg "place 1 advancement counter on " (card-str state target))
:corp (msg "place 1 advancement counter on " (card-str state target {:maybe-visible true}))}
:effect (req (wait-for (add-prop state side target :advance-counter 1 {:placed true})
(if (> x 1)
(continue-ability
Expand All @@ -2024,7 +2021,9 @@
(in-discard? %)
(not (faceup? %)))
:max 2}
:msg (msg "reveal " (enumerate-cards targets :sorted) " from Archives and shuffle them into R&D")
:msg (msg "reveal " (enumerate-cards targets :sorted) " from Archives and shuffle "
(if (= 1 (count targets)) "it" "them")
" into R&D")
:effect (req (wait-for (reveal state side targets)
(doseq [c targets]
(move state side c :deck))
Expand All @@ -2043,7 +2042,8 @@
(in-hand? %))
:max 2}
:async true
:msg (msg "trash " (quantify (count targets) "card") " from HQ")
:msg {:public (msg "trash " (quantify (count targets) "card") " from HQ")
:corp (msg "trash facedown " (enumerate-cards targets) " from HQ")}
:effect (req (wait-for (trash-cards state :corp targets {:cause-card card})
(continue-ability
state side
Expand Down Expand Up @@ -3127,7 +3127,8 @@
:choices {:not-self true
:req (req (and (corp? target)
(installed? target)))}
:msg (msg "trash " (card-str state target) " and gain 3 [Credits]")
:msg {:public (msg "trash " (card-str state target) " and gain 3 [Credits]")
:corp (msg "trash " (card-str state target {:maybe-visible true}) " and gain 3 [Credits]")}
:effect (req (wait-for (trash state side target {:unpreventable true
:cause-card card})
(gain-credits state side eid 3)))}]
Expand Down Expand Up @@ -3459,7 +3460,8 @@
:async true
:effect (effect (draw eid 1))}
{:label "place 1 advancement counter on a piece of ice"
:msg (msg "place 1 advancement counter on " (card-str state target))
:msg {:public (msg "place 1 advancement counter on " (card-str state target))
:corp (msg "place 1 advancement counter on " (card-str state target {:maybe-visible true}))}
:prompt "Choose a piece of ice to place 1 advancement counter on"
:async true
:choices {:card #(and (ice? %)
Expand Down
8 changes: 5 additions & 3 deletions src/clj/game/cards/events.clj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
[game.core.def-helpers :refer [all-cards-in-hand* in-hand*?
breach-access-bonus defcard draw-abi drain-credits gain-credits-ability offer-jack-out
reorder-choice run-any-server-ability run-central-server-ability run-remote-server-ability run-server-ability run-server-from-choices-ability scry tutor-abi with-revealed-hand
make-icon
reorder-choice run-any-server-ability run-central-server-ability run-remote-server-ability run-server-ability run-server-from-choices-ability scry tutor-abi with-revealed-hand]]
make-icon]]
[game.core.drawing :refer [draw]]
[game.core.effects :refer [register-lingering-effect]]
[game.core.eid :refer [complete-with-result effect-completed make-eid
Expand Down Expand Up @@ -585,6 +584,8 @@
:effect (req (if (= target "Done")
(do (doseq [c (reverse chosen)]
(move state :corp c :deck {:front true}))
(system-msg state side (str "The top cards of R&D are "
" are " (enumerate-cards chosen)) {:log-side :corp})
(effect-completed state side eid))
(continue-ability state side (cbi-choice original '() (count original) original)
card nil)))})
Expand Down Expand Up @@ -635,7 +636,8 @@
:max (req (cards-to-trash state))
:all true}
:waiting-prompt true
:msg (msg "trash " (enumerate-str (map #(card-str state %) targets)))
:msg {:public (msg "trash " (enumerate-str (map #(card-str state %) targets)))
:corp (msg "trash " (enumerate-str (map #(card-str state % {:maybe-visible true}) targets)))}
:effect (req (wait-for (trash-cards state side targets)
(continue-ability
state :corp
Expand Down
Loading
Loading