netrunner icon indicating copy to clipboard operation
netrunner copied to clipboard

Rosetta 2.0, Cache -> Au Revoir, Au Revoir, Snitch = -1 MU

Open vkl125 opened this issue 9 years ago • 10 comments

To reproduce, I use Andromeda, then I install Au Revoir, Au Revoir, and Snitch which resulted in -1 MU

vkl125 avatar Jul 31 '17 02:07 vkl125

Could not reproduce this at all. Wrote an automated test case and it works every time. Was anything else in play? Otherwise some random latency gremlin

(deftest au-revoir-snitch
  ;; Check for #2678
  (do-game
    (new-game (default-corp)
              (make-deck "Andromeda: Dispossessed Ristie" [(qty "Au Revoir" 5) (qty "Snitch" 5)]))
    (take-credits state :corp)
    (play-from-hand state :runner "Au Revoir")
    (play-from-hand state :runner "Au Revoir")
    (play-from-hand state :runner "Snitch")
    (is (= 1 (:memory (get-runner))) "Runner has one memory")))

danhut avatar Jul 31 '17 06:07 danhut

Try using Bloo moose to install the au revoir from cache.

vkl125 avatar Jul 31 '17 12:07 vkl125

Bloo Moose doesn't install cards, it removes a card in the Heap from the game. There should never be any MU impacts.

JoelCFC25 avatar Jul 31 '17 13:07 JoelCFC25

Sorry, i meant Rosetta 3.0

vkl125 avatar Jul 31 '17 13:07 vkl125

Actual steps to reproduce, as the problem has nothing to do with what programs you use.

  1. Install Rosetta 2.0.
  2. Install a program from hand (e.g. Cache). Now at 3 MU.
  3. Use Rosetta 2.0 to remove the Cache from the game and install another program (e.g. Au Revoir). Now at 2 MU.

What's happening is that when you remove a program from the game with Rosetta 2.0, you are not being properly given back the memory that it took up.

BONUS weirdness: If you drag the RFG'd program back to your hand, you will regain the memory it was taking up.

stoppableforce avatar Jul 31 '17 18:07 stoppableforce

Here's the problem: https://github.com/mtgred/netrunner/blob/master/src/clj/game/cards/resources.clj#L1211

Needs to be (gain state side :memory (:memoryunits target))

JoelCFC25 avatar Jul 31 '17 19:07 JoelCFC25

@JoelCFC25 I had kind of fumbled into that same solution, but it doesn't seem to actually be fixing the problem.

nevermind, I had, uh, sort of forgotten to reload the cards in my REPL.

stoppableforce avatar Jul 31 '17 19:07 stoppableforce

Re:Bonus Weirdness

The same thing happens if you drag any other self-exiling program (like trope) from RFG to somewhere else, but only if it exiled itself. It's like it's still installed.

PesiTheWizard avatar Aug 01 '17 00:08 PesiTheWizard

Can't we just focus on situations that actually matter? We have only a small number of people working on this in their spare time.

danhut avatar Aug 01 '17 00:08 danhut

I brought this up because I would have thought that a better way would be to make it so that RFGing programs automatically uninstalled them, keeping similar things from happening in the future and simplifying card-code.

PesiTheWizard avatar Aug 01 '17 00:08 PesiTheWizard