Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Harishchandra reveal on manual changing #4342

Merged
merged 1 commit into from
Aug 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
32 changes: 16 additions & 16 deletions src/clj/game/cards/identities.clj
Original file line number Diff line number Diff line change
Expand Up @@ -523,22 +523,22 @@
:effect (effect (update-all-ice))}

"Harishchandra Ent.: Where You're the Star"
{:events {:runner-gain-tag {:effect (req (when (is-tagged? state)
(reveal-hand state :runner)))}
:runner-lose-tag {:effect (req (when-not (is-tagged? state)
(conceal-hand state :runner)))}
;; Triggered when Paparazzi enters / leaves
:runner-is-tagged {:effect (req (if (is-tagged? state)
(reveal-hand state :runner)
(conceal-hand state :runner)))}
;; Triggered when gaining or losing additional tag
:runner-additional-tag-change {:effect (req (if (is-tagged? state)
(reveal-hand state :runner)
(conceal-hand state :runner)))}}
:effect (req (when (is-tagged? state)
(reveal-hand state :runner)))
:leave-play (req (when (is-tagged? state)
(conceal-hand state :runner)))}
(let [ab {:effect (req (if (is-tagged? state)
(reveal-hand state :runner)
(conceal-hand state :runner)))}]
{:events {:runner-gain-tag ab
:runner-lose-tag ab
;; Triggered when the runner clicks the '+' and '-' buttons
:manual-gain-tag ab
:manual-lose-tag ab
;; Triggered when Paparazzi enters / leaves
:runner-is-tagged ab
;; Triggered when gaining or losing additional tag
:runner-additional-tag-change ab}
:effect (req (when (is-tagged? state)
(reveal-hand state :runner)))
:leave-play (req (when (is-tagged? state)
(conceal-hand state :runner)))})

"Harmony Medtech: Biomedical Pioneer"
{:effect (effect (lose :agenda-point-req 1) (lose :runner :agenda-point-req 1))
Expand Down
8 changes: 5 additions & 3 deletions src/clj/game/core/actions.clj
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@
(defn- change-tags
"Change a player's base tag count"
[state delta]
(if (neg? delta)
(deduct state :runner [:tag (Math/abs delta)])
(gain state :runner :tag delta))
(if (pos? delta)
(do (gain state :runner :tag delta)
(trigger-event state :runner :manual-gain-tag delta))
(do (deduct state :runner [:tag (Math/abs delta)])
(trigger-event state :runner :manual-lose-tag delta)))
(system-msg state :runner
(str "sets Tags to " (get-in @state [:runner :tag :base])
" (" (if (pos? delta) (str "+" delta) delta) ")")))
Expand Down