Skip to content

Lampades is not once-per-turn#8592

Open
NBKelly wants to merge 3 commits intomtgred:masterfrom
NBKelly:lampades-not-once
Open

Lampades is not once-per-turn#8592
NBKelly wants to merge 3 commits intomtgred:masterfrom
NBKelly:lampades-not-once

Conversation

@NBKelly
Copy link
Collaborator

@NBKelly NBKelly commented Mar 7, 2026

I also noticed that the can-pay? did not work correctly, so I fixed that up.

Then I thought maybe we've made that mistake before, so I checked every instance in the code base and found three instances where we had, so I fixed those up too.

I also added tests for lampades on the cost and the whenever.

Closes #8588

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)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lampades not triggering twice in same run

2 participants