Skip to content

Commit 4964fd9

Browse files
authored
Merge pull request #7034 from francescopellegrini/starlit-knight-test
2 parents 4ccb7cc + 469efbc commit 4964fd9

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

src/clj/game/cards/ice.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3543,8 +3543,8 @@
35433543
sub end-the-run]
35443544
{:on-encounter {:req (req (threat-level 4 state))
35453545
:effect (effect (gain-variable-subs card (sub-count state) sub {:variable true :front false :end true}))}
3546-
:events [{:event :run-ends
3547-
:effect (effect (reset-variable-subs card 0 nil))}]
3546+
:events [{:event :run-ends
3547+
:effect (effect (reset-variable-subs card 0 nil))}]
35483548
:subroutines [(give-tags 1)
35493549
(give-tags 1)]}))
35503550

test/clj/game/cards/ice_test.clj

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6429,6 +6429,38 @@
64296429
(is (= 1 (:position (get-in @state [:run])))
64306430
"Run position updated; now approaching Ice Wall"))))
64316431

6432+
(deftest starlit-knight
6433+
(do-game
6434+
(new-game {:corp {:hand ["Starlit Knight" "Vanity Project"]
6435+
:credits 20}})
6436+
(play-from-hand state :corp "Starlit Knight" "HQ")
6437+
(take-credits state :corp)
6438+
(let [sk (get-ice state :hq 0)]
6439+
(run-on state :hq)
6440+
(rez state :corp sk)
6441+
(run-continue state)
6442+
(changes-val-macro
6443+
2 (count-tags state)
6444+
"Runner got 2 tags"
6445+
(fire-subs state (refresh sk)))
6446+
(run-continue state :movement)
6447+
(run-jack-out state)
6448+
(take-credits state :runner)
6449+
(play-and-score state "Vanity Project")
6450+
(take-credits state :corp)
6451+
(run-on state :hq)
6452+
(run-continue state)
6453+
(is (= ["Give the Runner 1 tag"
6454+
"Give the Runner 1 tag"
6455+
"End the run"
6456+
"End the run"]
6457+
(map :label (:subroutines (refresh sk)))))
6458+
(changes-val-macro
6459+
2 (count-tags state)
6460+
"Runner got 2 more tags"
6461+
(fire-subs state (refresh sk)))
6462+
(is (not (:run @state)) "Run ended"))))
6463+
64326464
(deftest stavka
64336465
(do-game
64346466
(new-game {:corp {:hand ["Stavka" "Prisec"] :credits 10}

0 commit comments

Comments
 (0)