netrunner
netrunner copied to clipboard
Card disable system experimental overhaul
Basically an overhaul of how we enable/disable cards. I've applied it in most cases.
It still doesn't correctly axe static-abilities of cards.
I'm currently trying to think of a way to correctly apply this without having any-effects?
recursively call itself with every call.
I believe it may require updating checkpoint to cache a list of disabled cards in state, and the effect's functions to check
- if a an effect belongs to a static ability
- if the owner of that effect is in the disabled cards list and then you see if the list of disabled cards has changed, and if you do, you resolve another checkpoint (yuck, I know, but that resolves chains with malia/light the fire)
A consequence of this should be that when the above is resolved, hush should be at least 99% correct.
Closes #6872 Closes #7301 ~~(I'll write a test for this case)~~ Closes #6916 ~~(I'll write a test for this case)~~ Closes #6909 ~~(I'll write a test for this case)~~
I'm going to tackle this too: Closes #7247 (I'll be writing tests for this)
Some older issues this will close: Closes #6627 Closes #6728
Ice that I'm adding tests for right now. This seems like a large list, but I added a few helpers to make it not as horrible to do:
- [x] Afshar
- [x] Akhet
- [x] Anansi
- [x] Attini
- [x] Blockchain
- [x] Echo
- [x] Envelopment
- [x] Funhouse
- [x] Hive
- [x] Hortum
- [x] Information Overload
- [x] Masvingo
- [x] Mausolus
- [x] Cloud Eater
- [x] NEXT Bronze
- [x] NEXT Gold
- [x] NEXT Sapphire
- [x] NEXT Silver
- [x] Nebula
- [x] Orion
- [x] Wormhole
- [x] Asteroid Belt
- [x] Saisentan
- [x] Salvage
- [x] Seraph
- [x] Searchlight
- [x] Stavka
- [x] Surveyor
- [x] Swarm
- [x] Thoth
- [x] Tithonium
- [x] Tollbooth
- [x] Tour Guide
- [x] Turing
- [x] Tyr
- [x] Tyrant
- [x] Woodcutter
- [x] Wraparound
ok more updates on this:
- Employee strike works perfectly (I think)
- Same for Direct Access (I think)
- Static abilities are correctly disabled
- Paid abilities are disabled at the diffs level, but still show up on cards
- Hushed ice cannot gain subroutines
- We cache disabled cards at each fake and real checkpoint
- If you're PE and you score an agenda while employee striked, you do no damage (I added a test for this)
- If you're PU and you score a String! while striked, you still trash the top card (the current test passes)
Still todo: All the errors Make recurring credits and credit sources work properly At least one test has to be rewritten for magnet Tests for hush
Now we can't spend from disabled cards, and we can't activate menu-less abilities (like taking credits from miss bones) when the ability isn't playable (which has somehow never been an issue before?)
Zona Sul and Beckman have been slightly reworked with a :trash-on-tagged keyword. It only kind of works, because we don't actually call checkpoint that often. I could put it in fake checkpoint? I'm not sure if that's smart, but it's an option I guess.
I added an :enforce-condition
key and engine trigger for making sure earth station and a teia work right with the new disable system.
It appears to work for me, and it passes the old tests.
soon as the tests are green, i'm good to merge this. this is a phenomenal effort, i'm quite grateful that you've put in the work to figure it out.
I managed to get saci working correctly, which currently is correct until there are other corp effects that can disable programs in the game (and as long as the runner does not use dr. lovegood to disable their own saci). All tests pass now.
ok, I think this is good to go again