Skip to content

Commit d2f70e9

Browse files
fix Economic Warfare credits check
1 parent 42e25bb commit d2f70e9

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/clj/game/cards/operations.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@
708708
(defcard "Economic Warfare"
709709
{:on-play
710710
{:req (req (and (last-turn? state :runner :successful-run)
711-
(can-pay? state :runner (assoc eid :source card :source-type :ability) card nil :credit 4)))
711+
(>= (:credit runner) 4)))
712712
:msg "make the runner lose 4 [Credits]"
713713
:async true
714714
:effect (effect (lose-credits :runner eid 4))}})

test/clj/game/cards/operations_test.clj

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,25 @@
11671167
(play-from-hand state :corp "Economic Warfare")
11681168
(is (= 3 (:credit (get-runner))) "Runner has 3 credits")))
11691169

1170+
(deftest economic-warfare-ignoring-net-mercur-credits
1171+
;; Economic Warfare should ignore Net Mercur credits
1172+
(do-game
1173+
(new-game {:corp {:hand ["Economic Warfare"]}
1174+
:runner {:hand ["Net Mercur" "Mantle" "Marjanah"]}})
1175+
(take-credits state :corp)
1176+
(core/gain state :runner :credit 2)
1177+
(play-from-hand state :runner "Marjanah")
1178+
(play-from-hand state :runner "Mantle")
1179+
(play-from-hand state :runner "Net Mercur")
1180+
(run-on state :archives)
1181+
(card-ability state :runner (get-program state 0) 1)
1182+
(click-card state :runner (get-program state 1))
1183+
(click-prompt state :runner "Place 1 [Credits]")
1184+
(run-continue state)
1185+
(take-credits state :runner)
1186+
(play-from-hand state :corp "Economic Warfare")
1187+
(is (= 3 (:credit (get-runner))) "Runner has still 3 credits")))
1188+
11701189
(deftest election-day
11711190
(do-game
11721191
(new-game {:corp {:deck [(qty "Election Day" 7)]}})

0 commit comments

Comments
 (0)