Skip to content

Commit

Permalink
Clean up Wotan, Kusanagi, add Sage and Savant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahTheDuke committed Aug 1, 2019
1 parent 85a0449 commit 72b0bea
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 5 deletions.
15 changes: 10 additions & 5 deletions test/clj/game_test/cards/agendas.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2002,6 +2002,7 @@
(card-ability state :corp pk-scored 0)
(click-card state :corp (get-ice state :hq 0))
(is (last-log-contains? state "Do 1 net damage"))
(is (= 2 (count (:subroutines (get-ice state :hq 0)))) "Ice Wall gains 1 subroutine")
(is (zero? (get-counters (refresh pk-scored) :agenda)) "Kusanagi should have 0 agenda counters"))))

(deftest project-vitruvius
Expand All @@ -2028,22 +2029,26 @@
(is (= 1 (count (:hand (get-corp)))) "Corp should have 1 cards in hand"))))

(deftest project-wotan
;; Project Wotan - Only checks if agenda counter is spent
;; Project Wotan
(do-game
(new-game {:corp {:deck ["Project Wotan"
"Eli 1.0"
(qty "Hedge Fund" 3)]}})
(starting-hand state :corp ["Project Wotan" "Eli 1.0"])
(play-from-hand state :corp "Eli 1.0" "HQ")
(let [eli (get-ice state :hq 0)]
(core/rez state :corp eli))
(play-and-score state "Project Wotan")
(take-credits state :corp)
(let [wot-scored (get-scored state :corp 0)]
(let [wot-scored (get-scored state :corp 0)
eli (get-ice state :hq 0)]
(core/rez state :corp eli)
(is (= 3 (get-counters (refresh wot-scored) :agenda)) "Wotan should start with 3 agenda counters")
(run-on state "HQ")
(card-ability state :corp wot-scored 0)
(is (= 2 (get-counters (refresh wot-scored) :agenda))) "Wotan should only have 2 agenda counters")))
(is (last-log-contains? state "End the run"))
(is (= 2 (get-counters (refresh wot-scored) :agenda)) "Wotan should only have 2 agenda counters")
(is (= 3 (count (:subroutines (refresh eli)))) "Eli gains a sub from Project Wotan")
(core/end-run state :corp)
(is (= 2 (count (:subroutines (refresh eli)))) "Eli resets to normal number of subs"))))

(deftest project-yagi-uda
(testing "Swap ICE from HQ"
Expand Down
28 changes: 28 additions & 0 deletions test/clj/game_test/cards/programs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2205,6 +2205,20 @@
"No RNG Key prompt, straight to access prompt")
(is (= 5 (:credit (get-runner))) "Gained no credits")))))

(deftest sage
;; Sage - +1 str for each unused MU
(do-game
(new-game {:runner {:deck ["Sage" "Box-E"]}})
(take-credits state :corp)
(core/gain state :runner :credit 10)
(play-from-hand state :runner "Sage")
(let [sage (get-program state 0)]
(is (= 2 (core/available-mu state)))
(is (= 2 (:current-strength (refresh sage))) "+2 strength for 2 unused MU")
(play-from-hand state :runner "Box-E")
(is (= 4 (core/available-mu state)))
(is (= 4 (:current-strength (refresh sage))) "+4 strength for 4 unused MU"))))

(deftest sahasrara
;; Sahasrara
(testing "Pay-credits prompt"
Expand All @@ -2219,6 +2233,20 @@
(click-card state :runner rara)
(click-card state :runner rara))))))

(deftest savant
;; Savant - +1 str for each unused MU
(do-game
(new-game {:runner {:deck ["Savant" "Box-E"]}})
(take-credits state :corp)
(core/gain state :runner :credit 10)
(play-from-hand state :runner "Savant")
(let [savant (get-program state 0)]
(is (= 2 (core/available-mu state)))
(is (= 3 (:current-strength (refresh savant))) "+2 strength for 2 unused MU")
(play-from-hand state :runner "Box-E")
(is (= 4 (core/available-mu state)))
(is (= 5 (:current-strength (refresh savant))) "+4 strength for 4 unused MU"))))

(deftest scheherazade
;; Scheherazade - Gain 1 credit when it hosts a program
(do-game
Expand Down

0 comments on commit 72b0bea

Please sign in to comment.