Skip to content

Commit e4310d7

Browse files
committed
update some cards to use contexts
1 parent c39353e commit e4310d7

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

src/clj/game/cards/assets.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1982,7 +1982,7 @@
19821982
:effect (effect (draw :corp eid 1))}}}]
19831983
{:events [(-> ability
19841984
(assoc :event :runner-lose-tag)
1985-
(assoc-in [:optional :req] (req (= side :runner))))
1985+
(assoc-in [:optional :req] (req (= (:side context) :runner))))
19861986
(-> ability
19871987
(assoc :event :runner-prevent)
19881988
(assoc-in [:optional :req] (req (= :tag (:type context)))))]

src/clj/game/cards/ice.clj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,13 +1608,15 @@
16081608
state side card
16091609
[{:event :corp-reveal
16101610
:duration :end-of-encounter
1611-
:req (req (and
1611+
:req (req
1612+
(and
16121613
; all revealed cards are in grip
1613-
(every? in-hand? targets)
1614+
(every? in-hand? (:cards context))
16141615
; entire grip was revealed
1615-
(= (count targets) (count (:hand runner)))
1616+
(= (count (:cards context))
1617+
(count (:hand runner)))
16161618
; there are cards with the named card type
1617-
(some #(is-type? % cardtype) targets)))
1619+
(some #(is-type? % cardtype) (:cards context))))
16181620
:async true
16191621
:effect (req (continue-ability
16201622
state side

src/clj/game/cards/identities.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -931,9 +931,9 @@
931931

932932
(defcard "Hyoubu Institute: Absolute Clarity"
933933
{:events [{:event :corp-reveal
934-
:req (req (and
935-
(pos? (count targets))
936-
(first-event? state side :corp-reveal #(pos? (count %)))))
934+
:req (req (letfn [(valid-ctx? [[{:keys [cards] :as ctx}]] (pos? (count cards)))]
935+
(and (valid-ctx? [context])
936+
(first-event? state side :corp-reveal valid-ctx?))))
937937
:msg "gain 1 [Credits]"
938938
:async true
939939
:effect (effect (gain-credits eid 1))}]

src/clj/game/cards/resources.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3774,7 +3774,8 @@
37743774
" to " (decapitalize target))))
37753775
:else (effect-completed state side eid)))}
37763776
:events [{:event :runner-lose-tag
3777-
:req (req (= :runner (:side context)))
3777+
:req (req
3778+
(= :runner (:side context)))
37783779
:player :runner
37793780
:msg "gain 1 [Credits]"
37803781
:async true

0 commit comments

Comments
 (0)