Skip to content

Commit

Permalink
Merge pull request #6578 from NoahTheDuke/nb/fix-publics
Browse files Browse the repository at this point in the history
Fix public agendas being facedown
  • Loading branch information
NoahTheDuke authored Aug 31, 2022
2 parents c27fe04 + 2d0053b commit 4c5a321
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
10 changes: 5 additions & 5 deletions src/clj/game/core/diffs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -159,19 +159,19 @@
(declare cards-summary)

(defn card-summary [card state side]
(if (not (is-public? card side))
(if (is-public? card side)
(-> (cond-> card
(:host card) (-> (dissoc-in [:host :hosted])
(update :host card-summary state side))
(:hosted card) (update :hosted cards-summary state side))
(private-card))
(playable? state side)
(card-abilities-summary state side)
(select-non-nil-keys card-keys))
(-> (cond-> card
(:host card) (-> (dissoc-in [:host :hosted])
(update :host card-summary state side))
(:hosted card) (update :hosted cards-summary state side))
(playable? state side)
(card-abilities-summary state side)
(select-non-nil-keys card-keys))))
(private-card))))

(defn cards-summary [cards state side]
(when (seq cards)
Expand Down
2 changes: 1 addition & 1 deletion src/clj/web/lobby.clj
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
players-blocked-user?
(-> (mapcat get-blocked-list (map :user (:players lobby)))
(set)
(contains? (str/lower-case (:username user))))]
(contains? (str/lower-case (:username user ""))))]
(not (or user-blocked-players? players-blocked-user?))))
lobbies)))

Expand Down
7 changes: 4 additions & 3 deletions src/cljc/game/core/card.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
(defn facedown?
"Checks if the specified card is facedown."
[card]
(or (when (not (condition-counter? card))
(or (when-not (condition-counter? card)
(= (get-zone card) #?(:clj [:rig :facedown]
:cljs ["rig" "facedown"])))
(:facedown card)))
Expand Down Expand Up @@ -456,7 +456,8 @@
(not (in-set-aside? card)))
(and (or (installed? card)
(:host card))
(not (facedown? card)))
(or (faceup? card)
(not (facedown? card))))
(in-discard? card))
;; public corp cards:
;; * installed and rezzed
Expand All @@ -467,7 +468,7 @@
(:host card))
(or (operation? card)
(condition-counter? card)
(rezzed? card)))
(faceup? card)))
(and (in-discard? card)
(faceup? card)))))))

Expand Down
14 changes: 7 additions & 7 deletions src/cljs/nr/gameboard/board.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -609,13 +609,13 @@

(defn draw-facedown?
"Returns true if the installed card should be drawn face down."
[{:keys [facedown host] :as card}]
(if (corp? card)
(and (not (operation? card))
(not (condition-counter? card))
(not (faceup? card))
(not= (:side host) "Runner"))
facedown))
[{:keys [host] :as card}]
(or (facedown? card)
(and (corp? card)
(not (or (operation? card)
(condition-counter? card)
(faceup? card)
(= (:side host) "Runner"))))))

(defn card-view
[{:keys [zone code type abilities counter
Expand Down

0 comments on commit 4c5a321

Please sign in to comment.