Skip to content
Open
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
22 changes: 11 additions & 11 deletions src/clj/game/cards/programs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@
:interactive (effect true)
:optional
{:req (req (has-subtype? (:ice context) "Sentry")
(can-pay? state side (assoc eid :source-type :ability) card nil [(->c :credit 2 {:stealth :all-stealth})]))
(can-pay? state side (assoc eid :source-type :ability) card nil [(->c :credit 2 {:stealth :all-stealth})]))
:once :per-turn
:prompt (msg "Pay 2 [Credits] to bypass " (:title (:ice context)) "?")
:yes-ability {:cost [(->c :credit 2 {:stealth :all-stealth})]
Expand Down Expand Up @@ -2136,8 +2136,8 @@
(defcard "Mantle"
{:recurring 1
:interactions {:pay-credits {:req (req (= :ability (:source-type eid))
(or (hardware? target)
(program? target)))
(or (hardware? target)
(program? target)))
:type :recurring}}})

(defcard "Marjanah"
Expand Down Expand Up @@ -2742,16 +2742,16 @@
:optional {:prompt (msg "Pay " (count (:subroutines (get-card state current-ice)))
" [Credits] to bypass encountered ice?")
:req (req (not (has-subtype? current-ice "Barrier"))
(same-card? current-ice (:host card))
(can-pay? state :runner eid (:ice context) nil [(->c :credit (count (:subroutines (get-card state current-ice))))]))
(same-card? current-ice (:host card))
(can-pay? state :runner (assoc eid :source-type :ability) card nil [(->c :credit (count (:subroutines (get-card state current-ice))))]))
:yes-ability {:async true
:effect (effect (wait-for
(pay state side (make-eid state eid) card [(->c :credit (count (:subroutines (get-card state current-ice))))])
(let [payment-str (:msg async-result)
msg-ab {:msg (str "bypass " (card-str state (:ice context)))}]
(print-msg state side msg-ab card nil payment-str))
(bypass-ice state)
(effect-completed state side eid)))}}}]})
(pay state side (make-eid state eid) card [(->c :credit (count (:subroutines (get-card state current-ice))))])
(let [payment-str (:msg async-result)
msg-ab {:msg (str "bypass " (card-str state (:ice context)))}]
(print-msg state side msg-ab card nil payment-str))
(bypass-ice state)
(effect-completed state side eid)))}}}]})

(defcard "Pichação"
;; TODO - there's not really a way to tell if an event happened during a run?
Expand Down
13 changes: 13 additions & 0 deletions test/clj/game/cards/programs_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7318,6 +7318,19 @@
"Physarum Entangler cost was paid")
(is (= :movement (:phase (get-run))) "Runner has bypassed Ravana")))

(deftest physarum-entangler-vs-mantle
(do-game
(new-game {:runner {:hand ["Physarum Entangler" "Mantle"] :credits 2}
:corp {:hand ["Vanilla" "Whitespace"]}})
(play-from-hand state :corp "Whitespace" "Archives")
(take-credits state :corp)
(play-cards state :runner "Mantle" ["Physarum Entangler" "Whitespace"])
(run-on state :archives)
(rez state :corp "Whitespace")
(run-continue-until state :encounter-ice)
(click-prompts state :runner "Yes" "Mantle")
(is (= :movement (:phase (get-run))) "Runner has bypassed Whitespace")))

(deftest pichacao
;; Pichação
(do-game
Expand Down
Loading