Skip to content

Commit

Permalink
Merge pull request #7272 from francescopellegrini/fix/masterwork-not-…
Browse files Browse the repository at this point in the history
…working-with-paladin-poemu

fix Masterwork not working with Paladin Poemu
  • Loading branch information
NoahTheDuke authored Feb 2, 2024
2 parents c80d846 + e042d54 commit 36d3af2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/clj/game/cards/hardware.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@
(can-pay? state side (assoc eid :source card :source-type :runner-install) target nil
[:credit (install-cost state side target {:cost-bonus 1})])))}
:msg (msg "install " (:title target) " from the grip, paying 1 [Credit] more")
:effect (effect (runner-install eid target {:cost-bonus 1}))}}}
:effect (effect (runner-install (assoc eid :source card :source-type :runner-install) target {:cost-bonus 1}))}}}
{:event :runner-install
:async true
:interactive (req true)
Expand Down
16 changes: 16 additions & 0 deletions test/clj/game/cards/hardware_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2920,6 +2920,22 @@
(is (= 6 (count (:hand (get-runner)))) "Hayley install")
(is (no-prompt? state :runner))))

(deftest masterwork-v37-interaction-with-paladin-poemu
;; Masterwork (v37) should be able to spend credits hosted on Paladin Poemu
(do-game
(new-game {:runner {:hand ["Masterwork (v37)" "Acacia" "Paladin Poemu"]}})
(take-credits state :corp)
(play-from-hand state :runner "Masterwork (v37)")
(play-from-hand state :runner "Paladin Poemu")
(let [pp (get-resource state 0)]
(core/add-counter state :runner (refresh pp) :credit 2)
(run-on state "HQ")
(click-prompt state :runner "Yes")
(click-card state :runner "Acacia")
(is (changed? [(get-counters (refresh pp) :credit) -1]
(click-card state :runner pp))
"Spent 1 credit from Paladin Poemu"))))

(deftest maui-pay-credits-prompt
;; Pay-credits prompt
(do-game
Expand Down

0 comments on commit 36d3af2

Please sign in to comment.