Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major refactor of costs, fix cost strings to only print "Pay" when necessary #4330

Merged
merged 20 commits into from
Jul 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9290731
Fix cost strings to only print "Pay" when necessary
NoahTheDuke Jul 25, 2019
e588372
Move all cost labels into initialization logic
NoahTheDuke Jul 25, 2019
5f2c77c
Rename mill to trash-from-deck, extract title from access ability lab…
NoahTheDuke Jul 26, 2019
2dd0538
Initial [trash] cost implementation
NoahTheDuke Jul 26, 2019
f9f9814
Implement [trash] effect
NoahTheDuke Jul 27, 2019
7355c8f
Rearrange cost handler functions, extract pay-clicks
NoahTheDuke Jul 27, 2019
f642351
Add pay-tags, refactor Keegan Lane
NoahTheDuke Jul 27, 2019
e4b7f18
Add pay-trash-entire-hand, refactor Citadel Sanctuary
NoahTheDuke Jul 27, 2019
a647983
Refactor Whampoa Reclamation to use trash cost
NoahTheDuke Jul 27, 2019
63ccf2b
Implement trash any installed card, refactor Endless Hunger, Heartbeat
NoahTheDuke Jul 27, 2019
bf8b999
Implement forfeit-self, refactor False Lead
NoahTheDuke Jul 27, 2019
8e18319
Implement return-to-hand, refactor Golden, Peregrine, Saker
NoahTheDuke Jul 27, 2019
7b30da4
Clean up Helheim Servers and Genotyping
NoahTheDuke Jul 27, 2019
b96585a
Add pay-remove-from-game, refactor Jackson Howard, Trope, Lucky Charm
NoahTheDuke Jul 27, 2019
5180eb4
Refactor Lily Lockwell
NoahTheDuke Jul 27, 2019
2700227
Implement any-agenda-counter, refactor Mark Yale
NoahTheDuke Jul 27, 2019
174495c
Add trash-program-from-grip, refactor Monolith
NoahTheDuke Jul 27, 2019
63da800
Refactor Reclaim to use :trash-from-hand
NoahTheDuke Jul 27, 2019
e58f86b
Implement rfg-program, refactor Rosetta 2.0
NoahTheDuke Jul 27, 2019
a57e156
Switch from manual counter costs to integrated
NoahTheDuke Jul 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions src/clj/game/cards/agendas.clj
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@
{:implementation "Runner must trash cards manually when required"
:effect (effect (add-counter card :agenda 1))
:silent (req true)
:abilities [{:counter-cost [:agenda 1]
:abilities [{:cost [:agenda 1]
:req (req (:run @state))
:msg "make the Runner trash a card from their grip to jack out or break subroutines for the remainder of the run"}]}

"AstroScript Pilot Program"
{:effect (effect (add-counter card :agenda 1))
:silent (req true)
:abilities [{:counter-cost [:agenda 1]
:abilities [{:cost [:agenda 1]
:msg (msg "place 1 advancement token on " (card-str state target))
:choices {:req can-be-advanced?}
:effect (effect (add-prop target :advance-counter 1 {:placed true}))}]}
Expand Down Expand Up @@ -339,8 +339,7 @@
(add-counters state side card eid)))}
:no-ability {:effect (effect (add-counters card eid))}}}
card nil))
:abilities [{:cost [:click 1]
:counter-cost [:agenda 1]
:abilities [{:cost [:click 1 :agenda 1]
:async true
:label "Do 2 meat damage"
:once :per-turn
Expand Down Expand Up @@ -511,7 +510,7 @@
"Efficiency Committee"
{:silent (req true)
:effect (effect (add-counter card :agenda 3))
:abilities [{:cost [:click 1] :counter-cost [:agenda 1]
:abilities [{:cost [:click 1 :agenda 1]
:effect (effect (gain :click 2)
(register-turn-flag!
card :can-advance
Expand All @@ -523,8 +522,7 @@
"Elective Upgrade"
{:silent (req true)
:effect (effect (add-counter card :agenda 2))
:abilities [{:cost [:click 1]
:counter-cost [:agenda 1]
:abilities [{:cost [:click 1 :agenda 1]
:once :per-turn
:effect (effect (gain :click 2))
:msg "gain [Click][Click]"}]}
Expand All @@ -543,8 +541,7 @@
{:effect (effect (add-counter card :agenda 1)
(shuffle-into-deck :hand))
:interactive (req true)
:abilities [{:cost [:click 1]
:counter-cost [:agenda 1]
:abilities [{:cost [:click 1 :agenda 1]
:msg "draw 5 cards"
:effect (effect (draw 5))}]}

Expand All @@ -561,22 +558,23 @@
card nil))}}

"False Lead"
{:abilities [{:req (req (>= (:click runner) 2))
{:abilities [{:req (req (<= 2 (:click runner)))
:msg "force the Runner to lose [Click][Click]"
:effect (effect (forfeit card)
(lose :runner :click 2))}]}
:cost [:forfeit-self]
:effect (effect (lose :runner :click 2))}]}

"Fetal AI"
{:flags {:rd-reveal (req true)}
:access {:async true
:req (req (not= (first (:zone card)) :discard)) :msg "do 2 net damage"
:req (req (not= (first (:zone card)) :discard))
:msg "do 2 net damage"
:effect (effect (damage eid :net 2 {:card card}))}
:steal-cost-bonus (req [:credit 2])}

"Firmware Updates"
{:silent (req true)
:effect (effect (add-counter card :agenda 3))
:abilities [{:counter-cost [:agenda 1]
:abilities [{:cost [:agenda 1]
:choices {:req #(and (ice? %)
(can-be-advanced? %))}
:req (req (pos? (get-counters card :agenda)))
Expand All @@ -598,8 +596,7 @@
"Geothermal Fracking"
{:effect (effect (add-counter card :agenda 2))
:silent (req true)
:abilities [{:cost [:click 1]
:counter-cost [:agenda 1]
:abilities [{:cost [:click 1 :agenda 1]
:msg "gain 7 [Credits] and take 1 bad publicity"
:effect (effect (gain-credits 7)
(gain-bad-publicity :corp 1))}]}
Expand Down Expand Up @@ -685,8 +682,7 @@
"High-Risk Investment"
{:effect (effect (add-counter card :agenda 1))
:silent (req true)
:abilities [{:cost [:click 1]
:counter-cost [:agenda 1]
:abilities [{:cost [:click 1 :agenda 1]
:msg (msg "gain " (:credit runner) " [Credits]")
:effect (effect (gain-credits (:credit runner)))}]}

Expand Down Expand Up @@ -715,7 +711,7 @@
"House of Knives"
{:effect (effect (add-counter card :agenda 3))
:silent (req true)
:abilities [{:counter-cost [:agenda 1]
:abilities [{:cost [:agenda 1]
:msg "do 1 net damage"
:req (req (:run @state))
:once :per-run
Expand Down Expand Up @@ -780,7 +776,7 @@
:silent (req true)
:effect (effect (add-counter card :power 2))
:abilities [{:req (req (:run @state))
:counter-cost [:power 1]
:cost [:power 1]
:effect (req (let [ls (filter #(= "Labyrinthine Servers" (:title %)) (:scored corp))]
(jack-out-prevent state side)
(when (zero? (reduce + (for [c ls] (get-counters c :power))))
Expand Down Expand Up @@ -915,7 +911,7 @@
{:silent (req true)
:effect (effect (add-counter card :agenda 1))
:abilities [{:req (req (:run @state))
:counter-cost [:agenda 1]
:cost [:agenda 1]
:msg "end the run"
:async true
:effect (effect (end-run eid card))}]}
Expand All @@ -940,8 +936,12 @@

"Personality Profiles"
(let [pp {:req (req (pos? (count (:hand runner))))
:effect (effect (trash (first (shuffle (:hand runner)))))
:msg (msg "force the Runner to trash " (:title (last (:discard runner))) " from their Grip at random")}]
:effect (effect
(continue-ability
(let [c (first (shuffle (:hand runner)))]
{:msg (msg "force the Runner to trash " (:title c) " from their Grip at random")
:effect (effect (trash eid c nil))})
card nil))}]
{:events {:searched-stack pp
:runner-install (assoc pp :req (req (and (some #{:discard} (:previous-zone target))
(pos? (count (:hand runner))))))}})
Expand Down Expand Up @@ -1008,7 +1008,7 @@
"Project Atlas"
{:silent (req true)
:effect (effect (add-counter card :agenda (max 0 (- (get-counters card :advancement) 3))))
:abilities [{:counter-cost [:agenda 1]
:abilities [{:cost [:agenda 1]
:prompt "Choose a card"
:label "Search R&D and add 1 card to HQ"
;; we need the req or the prompt will still show
Expand All @@ -1030,13 +1030,13 @@
"Project Kusanagi"
{:silent (req true)
:effect (effect (add-counter card :agenda (- (get-counters card :advancement) 2)))
:abilities [{:counter-cost [:agenda 1]
:abilities [{:cost [:agenda 1]
:msg "make a piece of ICE gain \"[Subroutine] Do 1 net damage\" after all its other subroutines for the remainder of the run"}]}

"Project Vitruvius"
{:silent (req true)
:effect (effect (add-counter card :agenda (- (get-counters card :advancement) 3)))
:abilities [{:counter-cost [:agenda 1]
:abilities [{:cost [:agenda 1]
:prompt "Choose a card in Archives to add to HQ"
:show-discard true
:choices {:req #(and (in-discard? %)
Expand All @@ -1054,7 +1054,7 @@
:abilities [{:req (req (and (ice? current-ice)
(rezzed? current-ice)
(has-subtype? current-ice "Bioroid")))
:counter-cost [:agenda 1]
:cost [:agenda 1]
:msg (str "make the approached piece of Bioroid ICE gain \"[Subroutine] End the run\""
"after all its other subroutines for the remainder of this run")}]}

Expand Down Expand Up @@ -1088,7 +1088,7 @@
(clear-wait-prompt :runner))})]
{:silent (req true)
:effect (effect (add-counter card :agenda (- (get-counters card :advancement) 3)))
:abilities [{:counter-cost [:agenda 1]
:abilities [{:cost [:agenda 1]
:req (req run)
:effect (effect (show-wait-prompt :runner "Corp to use Project Yagi-Uda")
(continue-ability (choose-card (:server run))
Expand Down Expand Up @@ -1186,7 +1186,7 @@
"Remastered Edition"
{:effect (effect (add-counter card :agenda 1))
:silent (req true)
:abilities [{:counter-cost [:agenda 1]
:abilities [{:cost [:agenda 1]
:msg (msg "place 1 advancement token on " (card-str state target))
:choices {:req installed?}
:effect (effect (add-prop target :advance-counter 1 {:placed true}))}]}
Expand Down Expand Up @@ -1273,7 +1273,7 @@
"Sensor Net Activation"
{:effect (effect (add-counter card :agenda 1))
:silent (req true)
:abilities [{:counter-cost [:agenda 1]
:abilities [{:cost [:agenda 1]
:req (req (some #(and (has-subtype? % "Bioroid") (not (rezzed? %))) (all-installed state :corp)))
:prompt "Choose a bioroid to rez, ignoring all costs"
:choices {:req #(and (has-subtype? % "Bioroid") (not (rezzed? %)))}
Expand Down Expand Up @@ -1409,7 +1409,7 @@
"Timely Public Release"
{:silent (req true)
:effect (effect (add-counter card :agenda 1))
:abilities [{:counter-cost [:agenda 1]
:abilities [{:cost [:agenda 1]
:label "Install a piece of ice in any position, ignoring all costs"
:prompt "Select a piece of ice to install"
:show-discard true
Expand Down
Loading