-
Notifications
You must be signed in to change notification settings - Fork 397
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
Implement Recurring and Placed Credits #4262
Conversation
Cards that benefit from this implementation
|
I think Net Mercur needs a better |
ToDo List
|
With removing tags, make sure you effect-complete payment and non-payment. |
(lose-tags state :runner 1) | ||
(system-msg state side (build-spend-msg cost-str "remove 1 tag" "removes 1 tag")) | ||
(play-sfx state side "click-remove-tag")))) | ||
(wait-for (pay-sync state side (make-eid state {:source :action :source-type :remove-tag}) nil :click 1 :credit remove-cost) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since removing tags is now awaitable, I should test a case of Sahasrara + Thunder Art Gallery to check if all the prompts are handled correctly.
Implement pay-credits prompts for trashing accessed cards and traces
…edits during runs
I think we're done here! 🎊 |
Thinking about Net Mercur more, I think we could get 80% by requiring What do you think? |
Clean up custom pay-credit effects, cold read
Closes #362 |
Overview
Currently, paying costs is awaitable through
pay-sync
, but we delegate individual cost types to their own functions which may or may not individually be awaited, and right now paying credits is not. This PR introduces a new function that will check for any installed and active cards that have usable credits, and if so, will open a select prompt that's based on thepick-virus-counters-to-spend
function (used for Khumalo and the Khumalo breakers) to pay or partially pay the appropriate cost.Changelog
Costs
pay-credits
can-pay?
to accept aneid
to check installed cards for the appropriate credits:pay-credits
to:interactions
map, which connects the credits on the card (or a custom function) with thepay-credits
function. It currently has 3 usable fields::req
: Works as other reqs, checking to see whether the current action is the right kind to use this card's credits/ability:type
: Only 3 allowed values::credit
,:recurring
, and:custom
.:credit
is for credits that are placed on the card (eg Miss Bones or Cold Read).:recurring
is for recurring credits (eg Smoke or Dedicated Server).:custom
is for cards that have payment-related abilities but aren't placed/recurring credits (eg Flame-out or Patchwork):custom
: Only used when:type
is:custom
. Effectively an:effect
map, it's an async 5-fn that should usemake-result
to return the amount of credits that will be applied to the effect.Engine
make-eid
calls to use existingeid
for passing along:source
and:source-type
where appropriatemake-eid
calls at base levels (actions) to provide the necessary:source-type
:play-area
toall-active
for each sideRuns
can-pay
logic so we know definitively if the runner can pay to trash a given card or nothandle-run-end
would dissoc:access
even tho it was still happeningTraces
pay-sync
within trace prompts where appropriateCards
See below for full list of implemented cards
Tests
See below for full list of implemented cards. Every single one got a small test for this functionality