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
5 changes: 2 additions & 3 deletions src/clj/game/cards/programs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
break-ability
no-unbreakable-subs
(pos? unbroken-subs)
(can-pay? state side eid card total-cost))
(can-pay? state side eid card nil total-cost))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oof, what an annoying footgun. i wonder if we can fix this so it's not possible?

Copy link
Collaborator

@NoahTheDuke NoahTheDuke Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this can be fixed, somewhat easily i hope:

([state side eid card title & args]
(let [remove-zero-credit-cost (and (= (:source-type eid) :corp-install)
(not (ice? card)))

should become:

  ([state side eid card arg & args]
   (let [[title args] (if (string? arg) [arg args] [nil (cons arg args)])         
         remove-zero-credit-cost (and (= (:source-type eid) :corp-install)
                                      (not (ice? card)))

[{:dynamic :auto-pump-and-break
:cost total-cost
:cost-label (build-cost-label total-cost)
Expand Down Expand Up @@ -1951,12 +1951,11 @@
{:access-ability
{:async true
:trash? true
:once :per-turn
:label "Trash card"
:req (req (and (not (:disabled card))
(not (agenda? target))
(not (in-discard? target))
(can-pay? state side eid card [(->c :power 1) (->c :credit (:cost target 0) {:stealth :all-stealth})])))
(can-pay? state side eid card nil [(->c :power 1) (->c :credit (:cost target 0) {:stealth :all-stealth})])))
:waiting-prompt true
:effect (req (let [accessed-card target
play-or-rez (:cost target)]
Expand Down
4 changes: 2 additions & 2 deletions src/clj/game/core/ice.clj
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@
no-unbreakable-subs
can-auto-break
(pos? unbroken-subs)
(can-pay? state side eid card total-cost))
(can-pay? state side eid card nil total-cost))
[{:dynamic :auto-pump-and-break
:cost total-cost
:cost-label (build-cost-label total-cost)
Expand All @@ -826,7 +826,7 @@
(:title current-ice))}])
(when (and pump-ability
(pos? times-pump)
(can-pay? state side eid card total-pump-cost))
(can-pay? state side eid card nil total-pump-cost))
[{:dynamic :auto-pump
:cost total-pump-cost
:cost-label (build-cost-label total-pump-cost)
Expand Down
20 changes: 20 additions & 0 deletions test/clj/game/cards/programs_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5257,6 +5257,26 @@
(is (= 1 (count (:discard (get-corp)))))
(is (= 0 (count (:discard (get-runner)))) "0 in discard"))))

(deftest lampades-not-once-per-turn
(do-game
(new-game {:corp {:hand ["Tiered Subscription" "Tiered Subscription"]}
:runner {:hand ["Lampades" "Jailbreak"]}})
(take-credits state :corp)
(play-cards state :runner "Lampades" ["Jailbreak" "HQ"])
(run-continue-until state :success)
(click-prompts state :runner "[Lampades] Trash card" "[Lampades] Trash card")
(is (= 2 (count (:discard (get-corp)))) "Trashed both")))

(deftest lampades-cost-actually-checks
(do-game
(new-game {:corp {:hand ["PAD Campaign" "PAD Campaign"]}
:runner {:hand ["Lampades" "Jailbreak"]}})
(take-credits state :corp)
(play-cards state :runner "Lampades" ["Jailbreak" "HQ"])
(run-continue-until state :success)
(is (= ["Pay 4 [Credits] to trash" "No action"] (prompt-titles :runner))
"Can't pay without sufficient stealth credits")))

(deftest lamprey
;; Lamprey - Corp loses 1 credit for each successful HQ run; trashed on purge
(do-game
Expand Down
Loading