Skip to content

Commit 4c5a321

Browse files
authored
Merge pull request #6578 from NoahTheDuke/nb/fix-publics
Fix public agendas being facedown
2 parents c27fe04 + 2d0053b commit 4c5a321

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

src/clj/game/core/diffs.clj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,19 +159,19 @@
159159
(declare cards-summary)
160160

161161
(defn card-summary [card state side]
162-
(if (not (is-public? card side))
162+
(if (is-public? card side)
163163
(-> (cond-> card
164164
(:host card) (-> (dissoc-in [:host :hosted])
165165
(update :host card-summary state side))
166166
(:hosted card) (update :hosted cards-summary state side))
167-
(private-card))
167+
(playable? state side)
168+
(card-abilities-summary state side)
169+
(select-non-nil-keys card-keys))
168170
(-> (cond-> card
169171
(:host card) (-> (dissoc-in [:host :hosted])
170172
(update :host card-summary state side))
171173
(:hosted card) (update :hosted cards-summary state side))
172-
(playable? state side)
173-
(card-abilities-summary state side)
174-
(select-non-nil-keys card-keys))))
174+
(private-card))))
175175

176176
(defn cards-summary [cards state side]
177177
(when (seq cards)

src/clj/web/lobby.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
players-blocked-user?
155155
(-> (mapcat get-blocked-list (map :user (:players lobby)))
156156
(set)
157-
(contains? (str/lower-case (:username user))))]
157+
(contains? (str/lower-case (:username user ""))))]
158158
(not (or user-blocked-players? players-blocked-user?))))
159159
lobbies)))
160160

src/cljc/game/core/card.cljc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
(defn facedown?
317317
"Checks if the specified card is facedown."
318318
[card]
319-
(or (when (not (condition-counter? card))
319+
(or (when-not (condition-counter? card)
320320
(= (get-zone card) #?(:clj [:rig :facedown]
321321
:cljs ["rig" "facedown"])))
322322
(:facedown card)))
@@ -456,7 +456,8 @@
456456
(not (in-set-aside? card)))
457457
(and (or (installed? card)
458458
(:host card))
459-
(not (facedown? card)))
459+
(or (faceup? card)
460+
(not (facedown? card))))
460461
(in-discard? card))
461462
;; public corp cards:
462463
;; * installed and rezzed
@@ -467,7 +468,7 @@
467468
(:host card))
468469
(or (operation? card)
469470
(condition-counter? card)
470-
(rezzed? card)))
471+
(faceup? card)))
471472
(and (in-discard? card)
472473
(faceup? card)))))))
473474

src/cljs/nr/gameboard/board.cljs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -609,13 +609,13 @@
609609

610610
(defn draw-facedown?
611611
"Returns true if the installed card should be drawn face down."
612-
[{:keys [facedown host] :as card}]
613-
(if (corp? card)
614-
(and (not (operation? card))
615-
(not (condition-counter? card))
616-
(not (faceup? card))
617-
(not= (:side host) "Runner"))
618-
facedown))
612+
[{:keys [host] :as card}]
613+
(or (facedown? card)
614+
(and (corp? card)
615+
(not (or (operation? card)
616+
(condition-counter? card)
617+
(faceup? card)
618+
(= (:side host) "Runner"))))))
619619

620620
(defn card-view
621621
[{:keys [zone code type abilities counter

0 commit comments

Comments
 (0)