|
59 | 59 | [game.core.to-string :refer [card-str]]
|
60 | 60 | [game.core.toasts :refer [toast]]
|
61 | 61 | [game.core.update :refer [update!]]
|
62 |
| - [game.core.winning :refer [check-win-by-agenda]] |
| 62 | + [game.core.winning :refer [check-win-by-agenda win]] |
63 | 63 | [game.macros :refer [continue-ability effect msg req wait-for]]
|
64 | 64 | [game.utils :refer :all]
|
65 | 65 | [jinteki.utils :refer :all]))
|
|
700 | 700 | " by " (get-counters card :power) " [Credits]")
|
701 | 701 | :effect (req (swap! state assoc-in [:per-turn (:cid card)] true))}]})
|
702 | 702 |
|
| 703 | +(defcard "Dr. Vientiane Keeling" |
| 704 | + {:constant-effects [(runner-hand-size+ (req (- (get-counters card :power))))] |
| 705 | + :events [{:event :rez |
| 706 | + :msg "add 1 power counter to itself" |
| 707 | + :effect (effect (add-counter card :power 1))} |
| 708 | + {:event :corp-turn-begins |
| 709 | + :msg "add 1 power counter to itself" |
| 710 | + :effect (effect (add-counter card :power 1))}]}) |
| 711 | + |
703 | 712 | (defcard "Drago Ivanov"
|
704 | 713 | {:advanceable :always
|
705 | 714 | :abilities [{:cost [:advancement 2]
|
|
919 | 928 | :msg "do 1 meat damage"
|
920 | 929 | :effect (effect (damage eid :meat 1 {:card card}))}]})
|
921 | 930 |
|
| 931 | +(defcard "Gaslight" |
| 932 | + (let [search-for-operation {:prompt "Choose an operation to add to HQ" |
| 933 | + :msg (msg (if (= target "No action") |
| 934 | + "search R&D, but does not find an operation" |
| 935 | + (str "add " (get-title target) " to HQ"))) |
| 936 | + :choices (req (conj (vec (sort-by :title (filter operation? (:deck corp)))) "No action")) |
| 937 | + :async true |
| 938 | + :effect (req (if (= target "No action") |
| 939 | + (do (shuffle! state :corp :deck) |
| 940 | + (effect-completed state side eid)) |
| 941 | + (wait-for |
| 942 | + (reveal state side target) |
| 943 | + (shuffle! state :corp :deck) |
| 944 | + (move state :corp target :hand) |
| 945 | + (effect-completed state side eid))))} |
| 946 | + ability {:once :per-turn |
| 947 | + :async true |
| 948 | + :label "Trash this asset to search R&D for an operation (start of turn)" |
| 949 | + :req (req (:corp-phase-12 @state)) |
| 950 | + :effect |
| 951 | + (effect |
| 952 | + (continue-ability |
| 953 | + {:optional |
| 954 | + {:prompt "Trash Gaslight to search R&D for an operation?" |
| 955 | + :yes-ability |
| 956 | + {:async true |
| 957 | + :effect (req (wait-for (trash state side card {:cause-card card}) |
| 958 | + (continue-ability state side search-for-operation card nil)))}}} |
| 959 | + card nil))}] |
| 960 | + {:derezzed-events [corp-rez-toast] |
| 961 | + :flags {:corp-phase-12 (req true)} |
| 962 | + :events [(assoc ability :event :corp-turn-begins)] |
| 963 | + :abilities [ability]})) |
| 964 | + |
922 | 965 | (defcard "Gene Splicer"
|
923 | 966 | {:advanceable :always
|
924 | 967 | :access {:req (req (pos? (get-counters (get-card state card) :advancement)))
|
|
969 | 1012 | :async true
|
970 | 1013 | :effect (effect (lose-credits :runner eid 1))}})
|
971 | 1014 |
|
| 1015 | +(defcard "Hostile Architecture" |
| 1016 | + (let [valid-trash (fn [target] (and (corp? (:card target)) (installed? (:card target)))) |
| 1017 | + ability |
| 1018 | + {:event :runner-trash |
| 1019 | + :async true |
| 1020 | + :once-per-instance false |
| 1021 | + :req (req (and (valid-trash target) |
| 1022 | + (first-event? state side :runner-trash #(valid-trash (first %))))) |
| 1023 | + :msg "do 2 meat damage" |
| 1024 | + :effect (effect (damage :corp eid :meat 2 {:card card}))}] |
| 1025 | + {:on-trash ability |
| 1026 | + :events [ability]})) |
| 1027 | + |
| 1028 | + |
972 | 1029 | (defcard "Hostile Infrastructure"
|
973 | 1030 | (let [ability
|
974 | 1031 | {:event :runner-trash
|
|
1611 | 1668 | :abilities [ability]
|
1612 | 1669 | :events [(assoc ability :event :corp-turn-begins)]}))
|
1613 | 1670 |
|
| 1671 | +(defcard "Nightmare Archive" |
| 1672 | + {:flags {:rd-reveal (req true)} |
| 1673 | + :access {:async true |
| 1674 | + :msg (msg "force the Runner to " (decapitalize target)) |
| 1675 | + :player :runner |
| 1676 | + :prompt "Choose one" |
| 1677 | + :choices ["Take 1 Core Damage" "Add Nightmare Archive to score area"] |
| 1678 | + :effect (req (if (= target (str "Add Nightmare Archive to score area")) |
| 1679 | + (do (as-agenda state :runner card -1) |
| 1680 | + (effect-completed state side eid)) |
| 1681 | + (do (wait-for (damage state :corp :brain 1 {:card card}) |
| 1682 | + (move state :corp card :rfg) |
| 1683 | + (effect-completed state side eid)))))}}) |
| 1684 | + |
1614 | 1685 | (defcard "Open Forum"
|
1615 | 1686 | {:events [{:event :corp-mandatory-draw
|
1616 | 1687 | :interactive (req true)
|
|
1901 | 1972 | :events [(assoc ability :event :corp-turn-begins)]
|
1902 | 1973 | :abilities [ability]}))
|
1903 | 1974 |
|
| 1975 | +(defcard "Reaper Function" |
| 1976 | + (let [ability {:async true |
| 1977 | + :once :per-turn |
| 1978 | + :label "Trash this asset to do 2 net damage (start of turn)" |
| 1979 | + :req (req (:corp-phase-12 @state)) |
| 1980 | + :effect |
| 1981 | + (effect |
| 1982 | + (continue-ability |
| 1983 | + {:optional |
| 1984 | + {:prompt "Trash Reaper Function to do 2 net damage?" |
| 1985 | + :yes-ability |
| 1986 | + {:msg "do 2 net damage" |
| 1987 | + :async true |
| 1988 | + :effect (req (wait-for (trash state side card {:cause-card card}) |
| 1989 | + (damage state side eid :net 2 {:card card})))}}} |
| 1990 | + card nil))}] |
| 1991 | + {:derezzed-events [corp-rez-toast] |
| 1992 | + :flags {:corp-phase-12 (req true)} |
| 1993 | + :events [(assoc ability :event :corp-turn-begins)] |
| 1994 | + :abilities [ability]})) |
| 1995 | + |
1904 | 1996 | (defcard "Reconstruction Contract"
|
1905 | 1997 | {:events [{:event :damage
|
1906 | 1998 | :req (req (and (pos? (:amount context))
|
|
2235 | 2327 | (seq (filter #(= (:title %) (:title target)) (:discard runner)))))
|
2236 | 2328 | :value [:credit 2]}]})
|
2237 | 2329 |
|
| 2330 | +(defcard "Superdeep Borehole" |
| 2331 | + ;; the "when it is empty" text is reliant on the card being loaded |
| 2332 | + {:on-rez {:effect (req (update! state side (assoc-in (get-card state card) [:special :borehole-valid] true)) |
| 2333 | + (add-counter state side card :bad-publicity 6))} |
| 2334 | + :events [{:event :corp-turn-begins |
| 2335 | + :msg (msg "take 1 bad publicity from " (:title card)) |
| 2336 | + :async true |
| 2337 | + :effect (req (add-counter state side card :bad-publicity -1 nil) |
| 2338 | + (gain-bad-publicity state :corp eid 1))} |
| 2339 | + {:event :counter-added |
| 2340 | + :req (req (and (same-card? card target) |
| 2341 | + (not (pos? (get-counters card :power))) |
| 2342 | + (:borehole-valid (:special card)))) |
| 2343 | + :msg "win the game" |
| 2344 | + :effect (req (win state :corp "Superdeep Borehole extinction event"))}]}) |
| 2345 | + |
2238 | 2346 | (defcard "Sundew"
|
2239 | 2347 | ; If this a run event then handle in :begin-run as we do not know the server
|
2240 | 2348 | ; being run on in :runner-spent-click.
|
|
2505 | 2613 | :msg (msg (corp-install-msg target))
|
2506 | 2614 | :effect (effect (corp-install eid target nil {:ignore-all-cost true}))}]})
|
2507 | 2615 |
|
| 2616 | +(defcard "Vera Ivanovna Shuyskaya" |
| 2617 | + (let [select-and-trash {:async true |
| 2618 | + :prompt "Choose a card to trash" |
| 2619 | + :choices (req (cancellable (:hand runner) :sorted)) |
| 2620 | + :msg (msg "trash " (:title target) " from the grip") |
| 2621 | + :effect (effect (trash eid target {:cause-card card}))} |
| 2622 | + ability {:interactive (req true) |
| 2623 | + :optional {:prompt "Reveal the grip and trash a card?" |
| 2624 | + :player :corp |
| 2625 | + :autoresolve (get-autoresolve :auto-fire) |
| 2626 | + :yes-ability |
| 2627 | + {:async true |
| 2628 | + :effect (req (wait-for (reveal state side (:hand runner)) |
| 2629 | + (system-msg state :corp (str "reveal " |
| 2630 | + (quantify (count (:hand runner)) "card") |
| 2631 | + " from grip: " |
| 2632 | + (enumerate-str (map :title (:hand runner))))) |
| 2633 | + (continue-ability state side select-and-trash card nil)))} |
| 2634 | + :no-ability {:effect (effect (system-msg "declines to use Vera Ivanovna Shuyskaya"))}}}] |
| 2635 | + {:events [{:event :agenda-scored |
| 2636 | + :interactive (req true) |
| 2637 | + :async true |
| 2638 | + :effect (effect (continue-ability ability card nil))} |
| 2639 | + {:event :agenda-stolen |
| 2640 | + :interactive (req true) |
| 2641 | + :async true |
| 2642 | + :effect (effect (continue-ability ability card nil))}] |
| 2643 | + :abilities [(set-autoresolve :auto-fire "Vera Ivanovna Shuyskaya")]})) |
| 2644 | + |
2508 | 2645 | (defcard "Victoria Jenkins"
|
2509 | 2646 | {:on-rez {:effect (req (lose state :runner :click-per-turn 1))}
|
2510 | 2647 | :leave-play (req (gain state :runner :click-per-turn 1))
|
|
0 commit comments