From be536f93d1709f050e1ac5cac3d2c5eb55a92333 Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 09:36:13 +1300 Subject: [PATCH 01/15] fixed 2012, added 2024 --- src/cljc/jinteki/preconstructed.cljc | 202 +++++++++++++++++++++------ 1 file changed, 163 insertions(+), 39 deletions(-) diff --git a/src/cljc/jinteki/preconstructed.cljc b/src/cljc/jinteki/preconstructed.cljc index ab0a2dcbc6..c03f5d5a60 100644 --- a/src/cljc/jinteki/preconstructed.cljc +++ b/src/cljc/jinteki/preconstructed.cljc @@ -141,26 +141,28 @@ [:preconstructed.worlds-2012-a-tag "Ben Marsh (C) vs. Jeremy Zwirn (R)"] [:preconstructed.worlds-2012-info "Worlds 2012 was played with (up to 3 copies of) the Core Set as the only legal product. Jeremy Zwirn (Building a Better World, Gabriel Santiago) took first place against Ben Marsh (Engineering the Future, Gabriel Santiago) in the first ever Netrunner World Championship."] [:preconstructed.worlds-2012-a-ul "Worlds 2012: Weyland vs. Criminal"] - (precon "Ben Marsh - 2012: Weyland" - {:title "Weyland Consortium: Building a Better World" :side "Corp" :code 1093} - [{:qty 3 :card "Priority Requisition"} - {:qty 3 :card "Private Security Force"} - {:qty 3 :card "Hostile Takeover"} - {:qty 2 :card "Posted Bounty"} - {:qty 3 :card "Ice Wall"} + (precon "Ben Marsh - 2012: ETF" + {:title "Haas-Bioroid: Engineering the Future" :side "Corp" :code 1054} + [{:qty 3 :card "Enigma"} + {:qty 2 :card "Heimdall 1.0"} + {:qty 2 :card "Tollbooth"} + {:qty 3 :card "Viktor 1.0"} + {:qty 2 :card "Ichi 1.0"} + {:qty 3 :card "Rototurret"} + {:qty 2 :card "Archer"} + {:qty 1 :card "Ice Wall"} {:qty 3 :card "Wall of Static"} - {:qty 3 :card "Enigma"} - {:qty 3 :card "Shadow"} - {:qty 3 :card "Archer"} - {:qty 3 :card "Data Raven"} - {:qty 3 :card "Hadrian's Wall"} - {:qty 3 :card "Melange Mining Corp."} - {:qty 1 :card "Corporate Troubleshooter"} + {:qty 3 :card "Adonis Campaign"} + {:qty 3 :card "PAD Campaign"} + {:qty 2 :card "Project Junebug"} + {:qty 2 :card "Aggressive Secretary"} {:qty 2 :card "Snare!"} - {:qty 2 :card "Archived Memories"} - {:qty 3 :card "Beanstalk Royalties"} + {:qty 1 :card "Experiential Data"} {:qty 3 :card "Hedge Fund"} - {:qty 3 :card "Scorched Earth"}]) + {:qty 3 :card "Biotic Labor"} + {:qty 3 :card "Private Security Force"} + {:qty 3 :card "Accelerated Beta Test"} + {:qty 3 :card "Priority Requisition"}]) (precon "Jeremy Z - 2012: Criminal" {:title "Gabriel Santiago: Consummate Professional" :side "Runner" :code 1017} [{:qty 2 :card "Corroder"} @@ -189,28 +191,26 @@ [:preconstructed.worlds-2012-b-tag "Jeremy Z (C) vs. Ben Marsh (R)"] [:preconstructed.worlds-2012-info "Worlds 2012 was played with (up to 3 copies of) the Core Set as the only legal product. Jeremy Zwirn (Building a Better World, Gabriel Santiago) took first place against Ben Marsh (Engineering the Future, Gabriel Santiago) in the first ever Netrunner World Championship."] [:preconstructed.worlds-2012-b-ul "Worlds 2012: Haas-Bioroid vs. Criminal"] - (precon "Jeremy Z - 2012: ETF" - {:title "Haas-Bioroid: Engineering the Future" :side "Corp" :code 1054} - [{:qty 3 :card "Enigma"} - {:qty 2 :card "Heimdall 1.0"} - {:qty 2 :card "Tollbooth"} - {:qty 3 :card "Viktor 1.0"} - {:qty 2 :card "Ichi 1.0"} - {:qty 3 :card "Rototurret"} - {:qty 2 :card "Archer"} - {:qty 1 :card "Ice Wall"} + (precon "Jeremy Z - 2012: Weyland" + {:title "Weyland Consortium: Building a Better World" :side "Corp" :code 1093} + [{:qty 3 :card "Priority Requisition"} + {:qty 3 :card "Private Security Force"} + {:qty 3 :card "Hostile Takeover"} + {:qty 2 :card "Posted Bounty"} + {:qty 3 :card "Ice Wall"} {:qty 3 :card "Wall of Static"} - {:qty 3 :card "Adonis Campaign"} - {:qty 3 :card "PAD Campaign"} - {:qty 2 :card "Project Junebug"} - {:qty 2 :card "Aggressive Secretary"} + {:qty 3 :card "Enigma"} + {:qty 3 :card "Shadow"} + {:qty 3 :card "Archer"} + {:qty 3 :card "Data Raven"} + {:qty 3 :card "Hadrian's Wall"} + {:qty 3 :card "Melange Mining Corp."} + {:qty 1 :card "Corporate Troubleshooter"} {:qty 2 :card "Snare!"} - {:qty 1 :card "Experiential Data"} + {:qty 2 :card "Archived Memories"} + {:qty 3 :card "Beanstalk Royalties"} {:qty 3 :card "Hedge Fund"} - {:qty 3 :card "Biotic Labor"} - {:qty 3 :card "Private Security Force"} - {:qty 3 :card "Accelerated Beta Test"} - {:qty 3 :card "Priority Requisition"}]) + {:qty 3 :card "Scorched Earth"}]) (precon "Ben Marsh - 2012: Gabe" {:title "Gabriel Santiago: Consummate Professional" :side "Runner" :code 1017} [{:qty 3 :card "Sneakdoor Beta"} @@ -240,7 +240,7 @@ (matchup [:preconstructed.worlds-2013-a "Worlds 2013: Jens Erickson (C) vs. Andrew Veen (R)"] [:preconstructed.worlds-2013-a-tag "Jens Erickson (C) vs. Andrew Veen (R)"] - [:preconstructed.worlds-2013-info "166 players attended worlds in 2013. The tournament was held in Minneapolis, MN, USA, and consisted of 6 swiss rounds into a top 32 cut. The legal cardpool consisted of cards up to Opening Moves."] + [:preconstructed.worlds-2013-info "166 players attended worlds in 2013. The tournament was held in Minneapolis, MN, USA, and consisted of 6 swiss rounds into a top 32 cut. The legal cardpool consisted of cards up to Opening Moves. Jens Erickson (Andromeda, ETR) took first place against Andrew Veen (Kate, NBN: Making News)"] [:preconstructed.worlds-2013-a-ul "Worlds 2013: HB FastAdv vs. Shaper Katman"] (precon "Jens Erickson - 2013: Engineering the Future" {:title "Haas-Bioroid: Engineering the Future" :side "Corp" :code 1054} @@ -292,7 +292,7 @@ (matchup [:preconstructed.worlds-2013-b "Worlds 2013: Andrew Veen (C) vs. Jens Erickson (R)"] [:preconstructed.worlds-2013-b-tag "Andrew Veen (C) vs. Jens Erickson (R)"] - [:preconstructed.worlds-2013-info "166 players attended worlds in 2013. The tournament was held in Minneapolis, MN, USA, and consisted of 6 swiss rounds into a top 32 cut. The legal cardpool consisted of cards up to Opening Moves."] + [:preconstructed.worlds-2013-info "166 players attended worlds in 2013. The tournament was held in Minneapolis, MN, USA, and consisted of 6 swiss rounds into a top 32 cut. The legal cardpool consisted of cards up to Opening Moves. Jens Erickson (Andromeda, ETR) took first place against Andrew Veen (Kate, NBN: Making News)"] [:preconstructed.worlds-2013-b-ul "Worlds 2013: NBN Fast Adv vs. Andy Sucker"] (precon "Andrew Veen - 2013: Making News" {:title "NBN: Making News" :side "Corp" :code 25104} @@ -1466,6 +1466,128 @@ {:qty 2 :card "Fermenter"} {:qty 1 :card "Leech"}]))) +(def worlds-2024-deer-runs + (matchup + [:preconstructed.worlds-2024-a "Worlds 2023: Aruzan (C) vs. DeeR (R)"] + [:preconstructed.worlds-2024-a-tag "Aruzan (C) vs. DeeR (R)"] + [:preconstructed.worlds-2024-info "204 players played in the third Netrunner world championship run by Null Signal Games. In this tournament, Aruzan (Arissana, Reality Plus) won the title of Netrunner World Champion in a final game Against DeeR (Lat, PE), with Aruzan going entirely undefeated in the top cut. The tournament was held at the San Francisco Embarcadero Waterfront Hotel on 19th and 20th of October, and consisted of 14 rounds of Single-Sided Swiss into a top 16 cut. The legal cardpool consisted of cards up to Rebellion Without Rehearsal."] + [:preconstructed.worlds-2024-a-ul "Worlds 2024: ??? vs. ???"] + (precon "Aruzan - 2024: Kill R+" + {:title "NBN: Reality Plus" :side "Corp" :code 30051} + [{:qty 2 :card "Degree Mill"} + {:qty 1 :card "Oracle Thinktank"} + {:qty 3 :card "Project Beale"} + {:qty 1 :card "Tomorrowʼs Headline"} + {:qty 3 :card "False Lead"} + {:qty 1 :card "Orbital Superiority"} + {:qty 3 :card "Behold!"} + {:qty 1 :card "Gaslight"} + {:qty 3 :card "Spin Doctor"} + {:qty 1 :card "Lady Liberty"} + {:qty 3 :card "Rashida Jaheem"} + {:qty 3 :card "Regolith Mining License"} + {:qty 3 :card "Ping"} + {:qty 3 :card "Unsmiling Tsarevna"} + {:qty 2 :card "Virtual Service Agent"} + {:qty 3 :card "Oppo Research"} + {:qty 1 :card "Predictive Planogram"} + {:qty 2 :card "Your Digital Life"} + {:qty 1 :card "Sprint"} + {:qty 2 :card "Mindscaping"} + {:qty 2 :card "End of the Line"} + {:qty 1 :card "Pivot"} + {:qty 2 :card "AMAZE Amusements"} + {:qty 2 :card "The Holo Man"}]) + (precon "DeeR - 2024: Deep Dive Lat" + {:title "Lat: Ethical Freelancer" :side "Runner" :code 26019} + [{:qty 3 :card "Creative Commission"} + {:qty 2 :card "Deep Dive"} + {:qty 2 :card "Diesel"} + {:qty 3 :card "Trick Shot"} + {:qty 1 :card "Bahia Bands"} + {:qty 3 :card "Dirty Laundry"} + {:qty 3 :card "Overclock"} + {:qty 2 :card "Sure Gamble"} + {:qty 2 :card "Pinhole Threading"} + {:qty 3 :card "Simulchip"} + {:qty 2 :card "Swift"} + {:qty 1 :card "Echelon"} + {:qty 1 :card "Euler"} + {:qty 1 :card "Gauss"} + {:qty 1 :card "K2CP Turbine"} + {:qty 1 :card "Paricia"} + {:qty 1 :card "Propeller"} + {:qty 3 :card "Self-modifying Code"} + {:qty 1 :card "Fermenter"} + {:qty 1 :card "Cupellation"} + {:qty 1 :card "Revolver"} + {:qty 1 :card "Dr. Nuka Vrolyck"} + {:qty 3 :card "Stoneship Chart Room"} + {:qty 2 :card "Telework Contract"} + {:qty 1 :card "DJ Fenris"}]))) + +(def worlds-2024-deer-corps + (matchup + [:preconstructed.worlds-2024-b "Worlds 2023: cableCarnage (C) vs. William Huang (R)"] + [:preconstructed.worlds-2024-b-tag "cableCarnage (C) vs. William Huang (R)"] + [:preconstructed.worlds-2024-info "204 players played in the third Netrunner world championship run by Null Signal Games. In this tournament, Aruzan (Arissana, Reality Plus) won the title of Netrunner World Champion in a final game Against DeeR (Lat, PE), with Aruzan going entirely undefeated in the top cut. The tournament was held at the San Francisco Embarcadero Waterfront Hotel on 19th and 20th of October, and consisted of 14 rounds of Single-Sided Swiss into a top 16 cut. The legal cardpool consisted of cards up to Rebellion Without Rehearsal."] + [:preconstructed.worlds-2024-b-ul "Worlds 2024: ??? vs. ???"] + (precon "DeeR - 2024: Loud PE" + {:title "Jinteki: Personal Evolution" :side "Corp" :code 1067} + [{:qty 1 :card "Blood in the Water"} + {:qty 3 :card "Fujii Asset Retrieval"} + {:qty 2 :card "House of Knives"} + {:qty 2 :card "Hybrid Release"} + {:qty 2 :card "Regenesis"} + {:qty 3 :card "Sting!"} + {:qty 3 :card "Cohort Guidance Program"} + {:qty 2 :card "Moon Pool"} + {:qty 3 :card "Prāna Condenser"} + {:qty 1 :card "Snare!"} + {:qty 3 :card "Rashida Jaheem"} + {:qty 1 :card "Wage Workers"} + {:qty 3 :card "Spin Doctor"} + {:qty 2 :card "Anansi"} + {:qty 2 :card "Anemone"} + {:qty 3 :card "Tatu-Bola"} + {:qty 3 :card "Vampyronassa"} + {:qty 2 :card "Data Loop"} + {:qty 3 :card "Mindscaping"} + {:qty 1 :card "Hedge Fund"} + {:qty 1 :card "Mavirus"} + {:qty 1 :card "Tranquility Home Grid"} + {:qty 1 :card "The Holo Man"} + {:qty 1 :card "Crisium Grid"}]) + (precon "Aruzan - 2024: Spree Arissana" + {:title "Arissana Rocha Nahu: Street Artist" :side "Runner" :code 34020} + [{:qty 2 :card "Burner"} + {:qty 3 :card "Creative Commission"} + {:qty 3 :card "Deep Dive"} + {:qty 3 :card "Diesel"} + {:qty 3 :card "Spec Work"} + {:qty 2 :card "Spree"} + {:qty 3 :card "Trick Shot"} + {:qty 3 :card "Sure Gamble"} + {:qty 2 :card "Pinhole Threading"} + {:qty 2 :card "Aniccam"} + {:qty 3 :card "Simulchip"} + {:qty 1 :card "Coalescence"} + {:qty 1 :card "Euler"} + {:qty 1 :card "Gauss"} + {:qty 1 :card "Ika"} + {:qty 3 :card "Muse"} + {:qty 1 :card "Paricia"} + {:qty 1 :card "Pichação"} + {:qty 1 :card "Propeller"} + {:qty 1 :card "Self-modifying Code"} + {:qty 1 :card "Botulus"} + {:qty 2 :card "Fermenter"} + {:qty 1 :card "Physarum Entangler"} + {:qty 2 :card "Environmental Testing"} + {:qty 2 :card "Daily Casts"} + {:qty 1 :card "DJ Fenris"} + {:qty 1 :card "Hannah \"Wheels\" Pilintra"}]))) + ;; Utility (defn matchup-by-key @@ -1498,7 +1620,9 @@ :worlds-2022-a worlds-2022-sokka-corps :worlds-2022-b worlds-2022-sokka-runs :worlds-2023-a worlds-2023-sokka-corps - :worlds-2023-b worlds-2023-sokka-runs)) + :worlds-2023-b worlds-2023-sokka-runs + :worlds-2024-a worlds-2024-deer-runs + :worlds-2024-b worlds-2024-deer-corps)) (def all-matchups "A set of all preconstructed matchups (by key). From 8f02430efacc8103d38ffc5b60f9ef93d65c6811 Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 09:37:19 +1300 Subject: [PATCH 02/15] Added keys (still waiting on decklist names and player names) --- src/cljc/jinteki/preconstructed.cljc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cljc/jinteki/preconstructed.cljc b/src/cljc/jinteki/preconstructed.cljc index c03f5d5a60..f6c462e4d3 100644 --- a/src/cljc/jinteki/preconstructed.cljc +++ b/src/cljc/jinteki/preconstructed.cljc @@ -1638,4 +1638,5 @@ :worlds-2020-a :worlds-2020-b :worlds-2021-a :worlds-2021-b :worlds-2022-a :worlds-2022-b - :worlds-2023-a :worlds-2023-b}) + :worlds-2023-a :worlds-2023-b + :worlds-2024-a :worlds-2024-b}) From 46066b32b9eed8ca48aa09e49d351591067f3ddb Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 10:22:20 +1300 Subject: [PATCH 03/15] headline quote fixed --- src/cljc/jinteki/preconstructed.cljc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cljc/jinteki/preconstructed.cljc b/src/cljc/jinteki/preconstructed.cljc index f6c462e4d3..30d78f12d1 100644 --- a/src/cljc/jinteki/preconstructed.cljc +++ b/src/cljc/jinteki/preconstructed.cljc @@ -1468,7 +1468,7 @@ (def worlds-2024-deer-runs (matchup - [:preconstructed.worlds-2024-a "Worlds 2023: Aruzan (C) vs. DeeR (R)"] + [:preconstructed.worlds-2024-a "Worlds 2024: Aruzan (C) vs. DeeR (R)"] [:preconstructed.worlds-2024-a-tag "Aruzan (C) vs. DeeR (R)"] [:preconstructed.worlds-2024-info "204 players played in the third Netrunner world championship run by Null Signal Games. In this tournament, Aruzan (Arissana, Reality Plus) won the title of Netrunner World Champion in a final game Against DeeR (Lat, PE), with Aruzan going entirely undefeated in the top cut. The tournament was held at the San Francisco Embarcadero Waterfront Hotel on 19th and 20th of October, and consisted of 14 rounds of Single-Sided Swiss into a top 16 cut. The legal cardpool consisted of cards up to Rebellion Without Rehearsal."] [:preconstructed.worlds-2024-a-ul "Worlds 2024: ??? vs. ???"] @@ -1477,7 +1477,7 @@ [{:qty 2 :card "Degree Mill"} {:qty 1 :card "Oracle Thinktank"} {:qty 3 :card "Project Beale"} - {:qty 1 :card "Tomorrowʼs Headline"} + {:qty 1 :card "Tomorrow's Headline"} {:qty 3 :card "False Lead"} {:qty 1 :card "Orbital Superiority"} {:qty 3 :card "Behold!"} @@ -1528,7 +1528,7 @@ (def worlds-2024-deer-corps (matchup - [:preconstructed.worlds-2024-b "Worlds 2023: cableCarnage (C) vs. William Huang (R)"] + [:preconstructed.worlds-2024-b "Worlds 2024: DeeR (C) vs Aruzan (R)"] [:preconstructed.worlds-2024-b-tag "cableCarnage (C) vs. William Huang (R)"] [:preconstructed.worlds-2024-info "204 players played in the third Netrunner world championship run by Null Signal Games. In this tournament, Aruzan (Arissana, Reality Plus) won the title of Netrunner World Champion in a final game Against DeeR (Lat, PE), with Aruzan going entirely undefeated in the top cut. The tournament was held at the San Francisco Embarcadero Waterfront Hotel on 19th and 20th of October, and consisted of 14 rounds of Single-Sided Swiss into a top 16 cut. The legal cardpool consisted of cards up to Rebellion Without Rehearsal."] [:preconstructed.worlds-2024-b-ul "Worlds 2024: ??? vs. ???"] From 87510fc0f765965b5aafebeecca476861f712b3b Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 11:30:31 +1300 Subject: [PATCH 04/15] checkbox for open decklists --- src/cljs/nr/new_game.cljs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cljs/nr/new_game.cljs b/src/cljs/nr/new_game.cljs index f099f13860..dfc1a3f9d7 100644 --- a/src/cljs/nr/new_game.cljs +++ b/src/cljs/nr/new_game.cljs @@ -21,6 +21,7 @@ :spectatorhands :precon :gateway-type + :open-decklists :timer :title]) @@ -78,6 +79,12 @@ :on-change #(swap! options assoc :singleton (.. % -target -checked))}] (tr [:lobby.singleton "Singleton"])]) +(defn open-decklists [options] + [:label + [:input {:type "checkbox" :checked (:open-decklists @options) + :on-change #(swap! options assoc :open-decklists (.. % -target -checked))}] + (tr [:lobby.open-decklists "Open Decklists"])]) + (defn gateway-constructed-choice [fmt-state gateway-type] [:div {:style {:display (if (= @fmt-state "system-gateway") "block" "none")}} @@ -219,6 +226,7 @@ [:h3 (tr [:lobby.options "Options"])] [allow-spectators options] [toggle-hidden-info options] + [open-decklists options] [password-input options] [add-timer options] [save-replay options] @@ -239,6 +247,7 @@ :save-replay (not= "casual" (:room @lobby-state)) :singleton false :spectatorhands false + :open-decklists false :timed false :timer nil}) title (r/cursor state [:title]) From 4ad4054ecdd0390ecd2eac7f384ba08669ebe71c Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 11:38:50 +1300 Subject: [PATCH 05/15] lobby takes open-decklist arg --- src/clj/web/lobby.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/clj/web/lobby.clj b/src/clj/web/lobby.clj index 9702420d2e..40c46b38c2 100644 --- a/src/clj/web/lobby.clj +++ b/src/clj/web/lobby.clj @@ -85,7 +85,7 @@ user :user {:keys [gameid now allow-spectator api-access format mute-spectators password room save-replay - precon gateway-type side singleton spectatorhands timer title] + precon gateway-type side singleton spectatorhands timer title open-decklists] :or {gameid (random-uuid) now (inst/now)}} :options}] (let [player {:user user @@ -102,6 +102,7 @@ :pool (join-pool!) ;; options :precon (validate-precon format precon gateway-type) + :open-decklists (or open-decklists (when (validate-precon format precon gateway-type) true)) :allow-spectator allow-spectator :api-access api-access :format format @@ -181,6 +182,7 @@ :messages :mute-spectators :original-players + :open-decklists :password :players :room From 2f31cbf936b6e3df94846af04cd39d34c3b8f26b Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 11:49:50 +1300 Subject: [PATCH 06/15] show open decklists in lobby --- src/cljs/nr/game_row.cljs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cljs/nr/game_row.cljs b/src/cljs/nr/game_row.cljs index d64c83cb77..9a69c323e8 100644 --- a/src/cljs/nr/game_row.cljs +++ b/src/cljs/nr/game_row.cljs @@ -185,12 +185,18 @@ (when precon [:span.format-precon-deck-names (tr (:tr-underline (matchup-by-key precon)))])) -(defn game-format [{fmt :format singleton? :singleton precon :precon}] +(defn- open-decklists-span [open-decklists] + (js/console.log (str "open: " open-decklists)) + (when open-decklists + [:span.open-decklists (str " " (tr [:lobby.open-decklists-b] "(open decklists)"))])) + +(defn game-format [{fmt :format singleton? :singleton precon :precon open-decklists :open-decklists}] [:div {:class "game-format"} [:span.format-label (tr [:lobby.format "Format"]) ": "] [:span.format-type (tr-format (slug->format fmt "Unknown"))] [precon-span precon] [:span.format-singleton (str (when singleton? (str " " (tr [:lobby.singleton-b "(singleton)"]))))] + [open-decklists-span open-decklists] [precon-under-span precon]]) (defn- time-since From 9191464ebb6d821289febbb9c2a032d2186102a8 Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 11:50:31 +1300 Subject: [PATCH 07/15] send open decklists as part of game state (so we dont bloat lobby state) --- src/clj/game/core/diffs.clj | 1 + src/clj/game/core/set_up.clj | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/clj/game/core/diffs.clj b/src/clj/game/core/diffs.clj index 4cd7977ad3..760b6c0abb 100644 --- a/src/clj/game/core/diffs.clj +++ b/src/clj/game/core/diffs.clj @@ -425,6 +425,7 @@ ;; :angel-arena-info :corp :corp-phase-12 + :decklists :encounters :end-turn :gameid diff --git a/src/clj/game/core/set_up.clj b/src/clj/game/core/set_up.clj index f6febbcf55..8f82069634 100644 --- a/src/clj/game/core/set_up.clj +++ b/src/clj/game/core/set_up.clj @@ -124,6 +124,12 @@ :type "Basic Action" :title "Runner Basic Action Card"}))) +(defn- set-deck-lists + [state] + (let [runner-cards (into (sorted-map) (frequencies (map :title (get-in @state [:runner :deck])))) + corp-cards (into (sorted-map) (frequencies (map :title (get-in @state [:corp :deck]))))] + (swap! state assoc :decklists {:corp corp-cards :runner runner-cards}))) + (defn init-game "Initializes a new game with the given players vector." [game] @@ -133,6 +139,8 @@ (when-let [messages (seq (:messages game))] (swap! state assoc :log (into [] messages)) (system-say state nil "[hr]")) + (when (:open-decklists game) + (set-deck-lists state)) (card-init state :corp corp-identity) (implementation-msg state corp-identity) (card-init state :runner runner-identity) From 7f5b030e2859aba7dee742d0d8149c1c28b30a0b Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 11:50:51 +1300 Subject: [PATCH 08/15] tr strings for everything except the decks --- src/cljc/i18n/en.cljc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cljc/i18n/en.cljc b/src/cljc/i18n/en.cljc index bb1e84e05f..980786b582 100644 --- a/src/cljc/i18n/en.cljc +++ b/src/cljc/i18n/en.cljc @@ -397,6 +397,8 @@ :intermediate-info "This lobby is using the System Gateway intermediate decks for the Corporation and Runner. These decks have slightly more range than the beginner decks. Games are played to 7 agenda points." :intermediate-ul "System Gateway - Intermediate Teaching Decks" :constructed "Constructed"} + :open-decklists "Open Decklists" + :open-decklists-b "(open decklists)" :singleton "Singleton" :singleton-b "(singleton)" :singleton-details "This will restrict decklists to only those which do not contain any duplicate cards. It is recommended you use the listed singleton-based identities." @@ -747,6 +749,7 @@ :mu-count (fn [[unused available]] (str unused " of " available " MU unused")) :special-mu-count (fn [[unused available mu-type]] (str unused " of " available " " mu-type " MU unused")) :indicate-action "Indicate action" + :show-decklists "Show/Hide decklists" :spec-count (fn [[c]] (str c " Spectator" (when (> c 1) "s"))) :spec-view "Spectator View" :runner-view "Runner View" From 943bb5d971cea90679a6b9ab643dc391d46998a0 Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 11:51:50 +1300 Subject: [PATCH 09/15] show/hide decklists in-game --- src/cljs/nr/gameboard/board.cljs | 39 +++++++++++++++++++++++++++++++- src/cljs/nr/gameboard/log.cljs | 8 +++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/cljs/nr/gameboard/board.cljs b/src/cljs/nr/gameboard/board.cljs index d7e5f5e4e3..219efe6e3f 100644 --- a/src/cljs/nr/gameboard/board.cljs +++ b/src/cljs/nr/gameboard/board.cljs @@ -27,7 +27,7 @@ [nr.sounds :refer [update-audio]] [nr.translations :refer [tr tr-side tr-game-prompt]] [nr.utils :refer [banned-span checkbox-button cond-button get-image-path - image-or-face render-icons render-message]] + image-or-face map-longest render-icons render-message]] [reagent.core :as r])) (declare stacked-card-view show-distinct-cards) @@ -1293,6 +1293,42 @@ [build-game-stats (get-in @game-state [:stats :corp]) (get-in @game-state [:stats :runner])] [:button.win-right {:on-click #(reset! win-shown true) :type "button"} "✘"]]))))) +(defn- build-in-game-decklists + "Builds the in-game decklist display" + [corp-list runner-list] + (let [lists (map-longest list nil corp-list runner-list) + card-qty (fn [c] (second c)) + card-name (fn [c] [:div {:text-align "left" + :on-mouse-over #(card-preview-mouse-over % zoom-channel) + :on-mouse-out #(card-preview-mouse-out % zoom-channel)} + (render-message (subs (str (first c) " ") 1))])] + [:div + [:table.decklists.table + [:tbody + [:tr.win.th + [:td.win.th (tr [:side.corp "Corp"])] [:td.win.th] + [:td.win.th (tr [:side.runner "Runner"])] [:td.win.th]] + (doall (map-indexed + (fn [i [corp runner]] + [:tr {:key i} + [:td (card-qty corp)] [:td (card-name corp)] + [:td (card-qty runner)] [:td (card-name runner)]]) + lists))]]])) + +(defn build-decks-box + "Builds the decklist display box for open decklists" + [game-state] + (let [show-decklists (r/cursor app-state [:display-decklists])] + (fn [game-state] + (when (and @show-decklists + (get-in @game-state [:decklists])) + (let [corp-list (or (get-in @game-state [:decklists :corp]) {:- 1}) + runner-list (or (get-in @game-state [:decklists :runner]) {:- 1})] + [:div.decklists.blue-shade + [:div "some text to block out some space"] + [:br] + [build-in-game-decklists corp-list runner-list]]))))) + (defn build-start-box "Builds the start-of-game pop up box" [my-ident my-user my-hand prompt-state my-keep op-ident op-user op-keep me-quote op-quote my-side] @@ -2142,6 +2178,7 @@ op-quote (r/cursor game-state [op-side :quote])] [build-start-box me-ident me-user me-hand prompt-state me-keep op-ident op-user op-keep me-quote op-quote side]) + [build-decks-box game-state] [build-win-box game-state] [:div {:class (if (:replay @game-state) diff --git a/src/cljs/nr/gameboard/log.cljs b/src/cljs/nr/gameboard/log.cljs index 068c3085d7..1927d902a6 100644 --- a/src/cljs/nr/gameboard/log.cljs +++ b/src/cljs/nr/gameboard/log.cljs @@ -63,6 +63,13 @@ :key "Indicate action"} (tr [:game.indicate-action "Indicate action"])])) +(defn show-decklists [] + (when (get-in @app-state [:current-game :open-decklists]) + [:button.show-decklists {:on-click #(do (.preventDefault %) + (swap! app-state update-in [:display-decklists] not)) + :key "Show Decklists"} + (tr [:game.show-decklists "Show/Hide decklists"])])) + (defn fuzzy-match-score "Matches if all characters in input appear in target in order. Score is sum of matched indices, lower is a better match" @@ -176,6 +183,7 @@ :on-key-down #(command-menu-key-down-handler state %) :on-change #(log-input-change-handler state %)}]]] [indicate-action] + [show-decklists] [command-menu !input-ref state]])))) (defn log-messages [] From 14f02f65df10e6b48346bb37429709fde669dab6 Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 11:52:06 +1300 Subject: [PATCH 10/15] nice css --- src/css/gameboard.styl | 2 +- src/css/lobby.styl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/css/gameboard.styl b/src/css/gameboard.styl index 28795c4ad5..b563fcf23c 100644 --- a/src/css/gameboard.styl +++ b/src/css/gameboard.styl @@ -1091,7 +1091,7 @@ div animation: fadein 0.5s - .log-input form input, .indicate-action + .log-input form input, .indicate-action, .show-decklists width: 100% .command-matches-container diff --git a/src/css/lobby.styl b/src/css/lobby.styl index 0f7073857f..98da2de269 100644 --- a/src/css/lobby.styl +++ b/src/css/lobby.styl @@ -141,6 +141,10 @@ color: #ff571a; font-style: bold; + .open-decklists + color: #ffE31A; + font-style: bold; + .format-label font-weight: bold From 42c18e15bcc0534b831a303e7132006b7676aabe Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 13:03:59 +1300 Subject: [PATCH 11/15] only show open decklist span when not using precons --- src/cljs/nr/game_row.cljs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/cljs/nr/game_row.cljs b/src/cljs/nr/game_row.cljs index 9a69c323e8..d1587ee918 100644 --- a/src/cljs/nr/game_row.cljs +++ b/src/cljs/nr/game_row.cljs @@ -185,9 +185,8 @@ (when precon [:span.format-precon-deck-names (tr (:tr-underline (matchup-by-key precon)))])) -(defn- open-decklists-span [open-decklists] - (js/console.log (str "open: " open-decklists)) - (when open-decklists +(defn- open-decklists-span [precon open-decklists] + (when (and open-decklists (not precon)) [:span.open-decklists (str " " (tr [:lobby.open-decklists-b] "(open decklists)"))])) (defn game-format [{fmt :format singleton? :singleton precon :precon open-decklists :open-decklists}] @@ -196,7 +195,7 @@ [:span.format-type (tr-format (slug->format fmt "Unknown"))] [precon-span precon] [:span.format-singleton (str (when singleton? (str " " (tr [:lobby.singleton-b "(singleton)"]))))] - [open-decklists-span open-decklists] + [open-decklists-span precon open-decklists] [precon-under-span precon]]) (defn- time-since From 3d60760e8b490787971f2616d9ff25a1e17fe569 Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 20:31:03 +1300 Subject: [PATCH 12/15] actually sorted --- src/clj/game/core/set_up.clj | 4 ++-- src/cljs/nr/gameboard/board.cljs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/clj/game/core/set_up.clj b/src/clj/game/core/set_up.clj index 8f82069634..8731bc18ea 100644 --- a/src/clj/game/core/set_up.clj +++ b/src/clj/game/core/set_up.clj @@ -126,8 +126,8 @@ (defn- set-deck-lists [state] - (let [runner-cards (into (sorted-map) (frequencies (map :title (get-in @state [:runner :deck])))) - corp-cards (into (sorted-map) (frequencies (map :title (get-in @state [:corp :deck]))))] + (let [runner-cards (sort-by key (frequencies (map :title (get-in @state [:runner :deck])))) + corp-cards (sort-by key (frequencies (map :title (get-in @state [:corp :deck]))))] (swap! state assoc :decklists {:corp corp-cards :runner runner-cards}))) (defn init-game diff --git a/src/cljs/nr/gameboard/board.cljs b/src/cljs/nr/gameboard/board.cljs index 219efe6e3f..637a4c38ad 100644 --- a/src/cljs/nr/gameboard/board.cljs +++ b/src/cljs/nr/gameboard/board.cljs @@ -1301,7 +1301,7 @@ card-name (fn [c] [:div {:text-align "left" :on-mouse-over #(card-preview-mouse-over % zoom-channel) :on-mouse-out #(card-preview-mouse-out % zoom-channel)} - (render-message (subs (str (first c) " ") 1))])] + (render-message (first c))])] [:div [:table.decklists.table [:tbody From 5168cb07e4b64de09e9759106f6200a8c6743b67 Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 20:37:03 +1300 Subject: [PATCH 13/15] player names --- src/cljc/jinteki/preconstructed.cljc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cljc/jinteki/preconstructed.cljc b/src/cljc/jinteki/preconstructed.cljc index 30d78f12d1..ba64015820 100644 --- a/src/cljc/jinteki/preconstructed.cljc +++ b/src/cljc/jinteki/preconstructed.cljc @@ -1468,9 +1468,9 @@ (def worlds-2024-deer-runs (matchup - [:preconstructed.worlds-2024-a "Worlds 2024: Aruzan (C) vs. DeeR (R)"] - [:preconstructed.worlds-2024-a-tag "Aruzan (C) vs. DeeR (R)"] - [:preconstructed.worlds-2024-info "204 players played in the third Netrunner world championship run by Null Signal Games. In this tournament, Aruzan (Arissana, Reality Plus) won the title of Netrunner World Champion in a final game Against DeeR (Lat, PE), with Aruzan going entirely undefeated in the top cut. The tournament was held at the San Francisco Embarcadero Waterfront Hotel on 19th and 20th of October, and consisted of 14 rounds of Single-Sided Swiss into a top 16 cut. The legal cardpool consisted of cards up to Rebellion Without Rehearsal."] + [:preconstructed.worlds-2024-a "Worlds 2024: Alex Boyd (C) vs. Dee Ruttenberg (R)"] + [:preconstructed.worlds-2024-a-tag "Alex Boyd (C) vs. Dee Ruttenberg (R)"] + [:preconstructed.worlds-2024-info "204 players played in the third Netrunner world championship run by Null Signal Games. In this tournament, Alex Boyd AKA Aruzan (Arissana, Reality Plus) won the title of Netrunner World Champion in a final game Against Dee Ruttenberg AKA DeeR (Lat, PE), with Aruzan going entirely undefeated in the top cut. The tournament was held at the San Francisco Embarcadero Waterfront Hotel on 19th and 20th of October, and consisted of 14 rounds of Single-Sided Swiss into a top 16 cut. The legal cardpool consisted of cards up to Rebellion Without Rehearsal."] [:preconstructed.worlds-2024-a-ul "Worlds 2024: ??? vs. ???"] (precon "Aruzan - 2024: Kill R+" {:title "NBN: Reality Plus" :side "Corp" :code 30051} @@ -1528,9 +1528,9 @@ (def worlds-2024-deer-corps (matchup - [:preconstructed.worlds-2024-b "Worlds 2024: DeeR (C) vs Aruzan (R)"] - [:preconstructed.worlds-2024-b-tag "cableCarnage (C) vs. William Huang (R)"] - [:preconstructed.worlds-2024-info "204 players played in the third Netrunner world championship run by Null Signal Games. In this tournament, Aruzan (Arissana, Reality Plus) won the title of Netrunner World Champion in a final game Against DeeR (Lat, PE), with Aruzan going entirely undefeated in the top cut. The tournament was held at the San Francisco Embarcadero Waterfront Hotel on 19th and 20th of October, and consisted of 14 rounds of Single-Sided Swiss into a top 16 cut. The legal cardpool consisted of cards up to Rebellion Without Rehearsal."] + [:preconstructed.worlds-2024-b "Worlds 2024: Dee Ruttenberg (C) vs Alex Boyd (R)"] + [:preconstructed.worlds-2024-b-tag "Dee Ruttenberg (C) vs. Alex Boyd (R)"] + [:preconstructed.worlds-2024-info "204 players played in the third Netrunner world championship run by Null Signal Games. In this tournament, Alex Boyd AKA Aruzan (Arissana, Reality Plus) won the title of Netrunner World Champion in a final game Against Dee Ruttenberg AKA DeeR (Lat, PE), with Aruzan going entirely undefeated in the top cut. The tournament was held at the San Francisco Embarcadero Waterfront Hotel on 19th and 20th of October, and consisted of 14 rounds of Single-Sided Swiss into a top 16 cut. The legal cardpool consisted of cards up to Rebellion Without Rehearsal."] [:preconstructed.worlds-2024-b-ul "Worlds 2024: ??? vs. ???"] (precon "DeeR - 2024: Loud PE" {:title "Jinteki: Personal Evolution" :side "Corp" :code 1067} From 4618db7227cc44df85e63495443aab1ac9dab0dd Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 20:40:55 +1300 Subject: [PATCH 14/15] placeholder deck names --- src/cljc/jinteki/preconstructed.cljc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cljc/jinteki/preconstructed.cljc b/src/cljc/jinteki/preconstructed.cljc index ba64015820..374fc03716 100644 --- a/src/cljc/jinteki/preconstructed.cljc +++ b/src/cljc/jinteki/preconstructed.cljc @@ -1471,7 +1471,7 @@ [:preconstructed.worlds-2024-a "Worlds 2024: Alex Boyd (C) vs. Dee Ruttenberg (R)"] [:preconstructed.worlds-2024-a-tag "Alex Boyd (C) vs. Dee Ruttenberg (R)"] [:preconstructed.worlds-2024-info "204 players played in the third Netrunner world championship run by Null Signal Games. In this tournament, Alex Boyd AKA Aruzan (Arissana, Reality Plus) won the title of Netrunner World Champion in a final game Against Dee Ruttenberg AKA DeeR (Lat, PE), with Aruzan going entirely undefeated in the top cut. The tournament was held at the San Francisco Embarcadero Waterfront Hotel on 19th and 20th of October, and consisted of 14 rounds of Single-Sided Swiss into a top 16 cut. The legal cardpool consisted of cards up to Rebellion Without Rehearsal."] - [:preconstructed.worlds-2024-a-ul "Worlds 2024: ??? vs. ???"] + [:preconstructed.worlds-2024-a-ul "Worlds 2024: Kill R+ vs. Good Stuff Lat"] (precon "Aruzan - 2024: Kill R+" {:title "NBN: Reality Plus" :side "Corp" :code 30051} [{:qty 2 :card "Degree Mill"} @@ -1531,7 +1531,7 @@ [:preconstructed.worlds-2024-b "Worlds 2024: Dee Ruttenberg (C) vs Alex Boyd (R)"] [:preconstructed.worlds-2024-b-tag "Dee Ruttenberg (C) vs. Alex Boyd (R)"] [:preconstructed.worlds-2024-info "204 players played in the third Netrunner world championship run by Null Signal Games. In this tournament, Alex Boyd AKA Aruzan (Arissana, Reality Plus) won the title of Netrunner World Champion in a final game Against Dee Ruttenberg AKA DeeR (Lat, PE), with Aruzan going entirely undefeated in the top cut. The tournament was held at the San Francisco Embarcadero Waterfront Hotel on 19th and 20th of October, and consisted of 14 rounds of Single-Sided Swiss into a top 16 cut. The legal cardpool consisted of cards up to Rebellion Without Rehearsal."] - [:preconstructed.worlds-2024-b-ul "Worlds 2024: ??? vs. ???"] + [:preconstructed.worlds-2024-b-ul "Worlds 2024: Loud PE vs. Deep Dive Arissana"] (precon "DeeR - 2024: Loud PE" {:title "Jinteki: Personal Evolution" :side "Corp" :code 1067} [{:qty 1 :card "Blood in the Water"} From 43e08867240a42d6d06b6898c9c33e62ca457f8d Mon Sep 17 00:00:00 2001 From: NB Kelly Date: Tue, 22 Oct 2024 20:48:18 +1300 Subject: [PATCH 15/15] meaningless text --- src/cljs/nr/gameboard/board.cljs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cljs/nr/gameboard/board.cljs b/src/cljs/nr/gameboard/board.cljs index 637a4c38ad..293c05bc5f 100644 --- a/src/cljs/nr/gameboard/board.cljs +++ b/src/cljs/nr/gameboard/board.cljs @@ -1325,7 +1325,6 @@ (let [corp-list (or (get-in @game-state [:decklists :corp]) {:- 1}) runner-list (or (get-in @game-state [:decklists :runner]) {:- 1})] [:div.decklists.blue-shade - [:div "some text to block out some space"] [:br] [build-in-game-decklists corp-list runner-list]])))))