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

prana once per damage instance! #7536

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NBKelly
Copy link
Collaborator

@NBKelly NBKelly commented Jul 12, 2024

Instead of just swapping the type of damage into the state damage prevent thing, we swap in a map with {:type type :eid eid}.

I updated all checks notes one other things that used this area of the engine to match (we really should enforce this a little more 😂)

Closes #5765

Also made both halves of PE interactive, instead of just the on-score

Closes #5861 (the player wanted pe and sting to interact on steal)

@NoahTheDuke
Copy link
Collaborator

I don't think applying this change to all of the other prevention cards is worthwhile. Better to fix the actual issue, that our "prevention" system is hardcoded. I'd love to set up a checkpoint-like interrupt system, in the damage flow, you could just say (wait-for (check-interrupts ... {:type :net ...}) ...) and it would pull up the relevant abilities. That's a much larger project tho, so best to just fix this case and backburner that for now.

@NBKelly
Copy link
Collaborator Author

NBKelly commented Jul 12, 2024

Fair enough. I think this one is trivial enough that we can keep them consistent (most of them literally aren't being used), and then (sooner or later) I do have plans to actually set up an interface for prevention effects.

@NoahTheDuke
Copy link
Collaborator

i guess for the things that we already have makeshift "prevent" systems, keeping them in sync isn't so bad. but like, netrunner itself allows for arbitrary prevention (Airblade: prevent a "when encountered", alexa belsky: prevent shuffling a card in hq into r&d lol, credit crash: prevent runner trashing a card, dummy box: prevent corp trashing a card, etc etc etc).

we handle almost all of these directly in the cards but they could be done in an automated way if we had the prevention system set up to be modular. just hard to figure out how to design it with what we have.

@NBKelly
Copy link
Collaborator Author

NBKelly commented Jul 15, 2024

Yeah. My idea for prevention is essentially going to mimic how I did traces in ONR:

  • An event fires (let's say, damage)
  • The (let's say, for now) prevention manager picks out all the interrupts which can prevent/interact with that damage on the active side, and lists them as a set of options on a prompt so long as they're payable
  • You can click on whatever interrupts you want and resolve them in any order, or click done when you're done
  • Same thing happens with inactive player
  • Proceed with damage as normal

Which means we can probably actually define the abilities in terms of:

:interrupts [{:type :prevent-meat
              :label "Prevent 3 meat damage"
              :effect ...
              :msg ...
              :req (req whatever)
              :cost [(->c :trash-can 1)]]

which would be distinct from the paid abilities on a card (and would also let us dodge issues like this: #5171, by specifying which ones actually have costs)

@NoahTheDuke
Copy link
Collaborator

NoahTheDuke commented Jul 15, 2024

That's killer. Very similar to how I've envisioned, but mine was not so fleshed out.

@NBKelly
Copy link
Collaborator Author

NBKelly commented Jul 16, 2024

Thinking about this a tiny bit more, I think this is also something I want to wrap through my choose-one helper once that gets fully fleshed out - I think I'll port that piece of the puzzle over in a few months.

@NBKelly NBKelly marked this pull request as draft July 16, 2024 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants