Skip to content

Commit

Permalink
Makler
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahTheDuke committed Dec 8, 2019
1 parent 5038af2 commit cc2865a
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/clj/game/cards/ice.clj
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,8 @@
(or (in-hand? %)
(in-discard? %)))}
:async true
:effect (effect (corp-install eid target nil nil))
:msg (msg (corp-install-msg target))}]}
:msg (msg (corp-install-msg target))
:effect (effect (corp-install eid target nil nil))}]}

"Ashigaru"
{:events [{:event :card-moved
Expand Down
11 changes: 11 additions & 0 deletions src/clj/game/cards/programs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,17 @@
:effect (effect (gain-credits 2))
:msg "gain 2 [Credits]"}]}

"Makler"
(auto-icebreaker {:abilities [(break-sub 2 2 "Barrier")
(strength-pump 2 2)]
:events [{:event :pass-ice
:once :per-turn
:req (req (and (rezzed? target)
(every? #(= (:cid card) %) (map :breaker (filter :broken (:subroutines target))))
(empty? (remove :broken (:subroutines target)))))
:msg (msg "gain 1 [Credits]")
:effect (effect (gain-credits :runner 1))}]})

"Mammon"
(auto-icebreaker {:flags {:runner-phase-12 (req (pos? (:credit runner)))}
:abilities [{:label "X [Credits]: Place X power counters"
Expand Down
58 changes: 58 additions & 0 deletions test/clj/game_test/cards/programs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,64 @@
(card-ability state :runner mopus 0)
(is (= 2 (:credit (get-runner))) "Gain 2cr"))))

(deftest makler
;; Makler
(testing "Break ability costs 2 for 2 subroutines"
(do-game
(new-game {:corp {:deck [(qty "Hedge Fund" 5)]
:hand ["Battlement"]}
:runner {:hand ["Makler"]
:credits 20}})
(play-from-hand state :corp "Battlement" "HQ")
(take-credits state :corp)
(play-from-hand state :runner "Makler")
(run-on state "HQ")
(core/rez state :corp (get-ice state :hq 0))
(changes-val-macro
-2 (:credit (get-runner))
"Break ability costs 2 credits"
(card-ability state :runner (get-program state 0) 0)
(click-prompt state :runner "End the run")
(click-prompt state :runner "End the run"))))
(testing "Boost ability costs 2 credits, increases strength by 2"
(do-game
(new-game {:corp {:deck [(qty "Hedge Fund" 5)]
:hand ["Bastion"]}
:runner {:hand ["Makler"]
:credits 20}})
(play-from-hand state :corp "Bastion" "HQ")
(take-credits state :corp)
(play-from-hand state :runner "Makler")
(run-on state "HQ")
(core/rez state :corp (get-ice state :hq 0))
(changes-val-macro
-2 (:credit (get-runner))
"Boost ability costs 2 credits"
(card-ability state :runner (get-program state 0) 1))
(changes-val-macro
2 (core/get-strength (get-program state 0))
"Boost ability increases strength by 2"
(card-ability state :runner (get-program state 0) 1))))
(testing "Break all subs ability gives 1 credit"
(do-game
(new-game {:corp {:deck [(qty "Hedge Fund" 5)]
:hand [(qty "Battlement" 2)]}
:runner {:hand ["Makler"]
:credits 20}})
(play-from-hand state :corp "Battlement" "HQ")
(play-from-hand state :corp "Battlement" "Archives")
(take-credits state :corp)
(play-from-hand state :runner "Makler")
(run-on state "HQ")
(core/rez state :corp (get-ice state :hq 0))
(card-ability state :runner (get-program state 0) 0)
(click-prompt state :runner "End the run")
(click-prompt state :runner "End the run")
(changes-val-macro
1 (:credit (get-runner))
"Break all subs ability gives 1 credit"
(run-continue state)))))

(deftest mammon
;; Mammon - Pay to add X power counters at start of turn, all removed at end of turn
(do-game
Expand Down

0 comments on commit cc2865a

Please sign in to comment.