netrunner icon indicating copy to clipboard operation
netrunner copied to clipboard

Double Hosted Icebreakers do not reset strength after encounter

Open Taneru opened this issue 10 years ago • 5 comments

This was the situation: I had a Corroder and Multithreader hosted on a Leprechaun, which was itself hosted on an Omni-Drive. I boosted the strength up to 4 during a run to break through a Meru-Mati, and after passing that ice, the strength stayed at 4, rather than dropping back down to 2. I later boosted the strength a single time again in order to see if it was just a display error, and the strength further increased from 4 to 5.

Below is the /card-info details of the icebreaker itself, then the Leprechaun, and finally the Omni-Drive.

Corroder

Taneru shows card-info of Corroder hosted on Leprechaun hosted on Omni-Drive: {:faction "Anarch", :limited 3, :pump {:encounter 3}, :breaks ["Barrier"], :zone (:onhost), :cid 2723052, :type "Program", :abilities [{:label "Break 1 barrier subroutine", :cost ["credit" 1]} {:label "Add 1 strength", :cost ["credit" 1], :pump 1}], :title "Corroder", :counter 0, :uniqueness false, :host {:faction "Shaper", :limited 3, :hosted-programs [2723060], :zone ["onhost"], :cid 2723047, :type "Program", :abilities {:label "Install a program on [Leprechaun", :cost ["click" 1]} {:label "Host an installed program on Leprechaun"}], :title "Leprechaun", :counter 0, :uniqueness false, :host {:faction "Shaper", :limited 3, :zone ["rig" "hardware"], :cid 2723079, :type "Hardware", :rec-counter 1, :abilities [{:label "Install and host a program of 1[Memory Unit] or less on Omni-Drive", :cost ["click" 1]} {:label "Host an installed program of 1 or less on Omni-Drive"} {:label "Take 1 "}], :title "Omni-Drive", :counter 0, :uniqueness false, :host nil, :code "03039", :side "Runner", :cost 3, :installed true, :advance-counter 0, :subtype "Gear", :previous-zone ["hand"]}, :code "06019", :side "Runner", :facedown nil, :cost 2, :installed true, :advance-counter 0, :memoryunits 1, :subtype "Daemon", :previous-zone ["hand"]}, :strength 2, :code "01007", :side "Runner", :current-strength 5, :facedown nil, :cost 2, :installed true, :advance-counter 0, :memoryunits 1, :subtype "Icebreaker - Fracter", :previous-zone ["hand"]}.

Leprechaun

Taneru shows card-info of Leprechaun hosted on Omni-Drive: {:faction "Shaper", :limited 3, :hosted-programs [2723052 2723060], :zone (:onhost), :cid 2723047, :type "Program", :abilities {:label "Install a program on [Leprechaun", :cost ["click" 1]} {:label "Host an installed program on Leprechaun"}], :title "Leprechaun", :counter 0, :uniqueness false, :host {:faction "Shaper", :limited 3, :zone ["rig" "hardware"], :cid 2723079, :type "Hardware", :rec-counter 1, :abilities [{:label "Install and host a program of 1[Memory Unit] or less on Omni-Drive", :cost ["click" 1]} {:label "Host an installed program of 1 or less on Omni-Drive"} {:label "Take 1 "}], :title "Omni-Drive", :counter 0, :uniqueness false, :host nil, :code "03039", :side "Runner", :cost 3, :installed true, :advance-counter 0, :subtype "Gear", :previous-zone ["hand"]}, :code "06019", :side "Runner", :facedown nil, :cost 2, :hosted [{:faction "Adam", :limited 3, :zone ["onhost"], :cid 2723060, :type "Program", :rec-counter 0, :abilities [{:label "Take 1 [Recurring Credits]"}], :title "Multithreader", :counter 0, :uniqueness false, :host {:faction "Shaper", :limited 3, :zone ["onhost"], :cid 2723047, :type "Program", :abilities {:label "Install a program on [Leprechaun", :cost ["click" 1]} {:label "Host an installed program on Leprechaun"}], :title "Leprechaun", :counter 0, :uniqueness false, :host {:faction "Shaper", :limited 3, :zone ["rig" "hardware"], :cid 2723079, :type "Hardware", :rec-counter 1, :abilities [{:label "Install and host a program of 1[Memory Unit] or less on Omni-Drive", :cost ["click" 1]} {:label "Host an installed program of 1 or less on Omni-Drive"} {:label "Take 1 "}], :title "Omni-Drive", :counter 0, :uniqueness false, :host nil, :code "03039", :side "Runner", :cost 3, :installed true, :advance-counter 0, :subtype "Gear", :previous-zone ["hand"]}, :code "06019", :side "Runner", :facedown nil, :cost 2, :installed true, :advance-counter 0, :memoryunits 1, :subtype "Daemon", :previous-zone ["hand"]}, :code "09040", :side "Runner", :facedown nil, :cost 3, :installed true, :advance-counter 0, :memoryunits 1, :previous-zone ["hand"]} {:faction "Anarch", :limited 3, :pump {:encounter 3}, :breaks ["Barrier"], :zone ["onhost"], :cid 2723052, :type "Program", :abilities [{:label "Break 1 barrier subroutine", :cost ["credit" 1]} {:label "Add 1 strength", :cost ["credit" 1], :pump 1}], :title "Corroder", :counter 0, :uniqueness false, :host {:faction "Shaper", :limited 3, :hosted-programs [2723060], :zone ["onhost"], :cid 2723047, :type "Program", :abilities {:label "Install a program on [Leprechaun", :cost ["click" 1]} {:label "Host an installed program on Leprechaun"}], :title "Leprechaun", :counter 0, :uniqueness false, :host {:faction "Shaper", :limited 3, :zone ["rig" "hardware"], :cid 2723079, :type "Hardware", :rec-counter 1, :abilities [{:label "Install and host a program of 1[Memory Unit] or less on Omni-Drive", :cost ["click" 1]} {:label "Host an installed program of 1 or less on Omni-Drive"} {:label "Take 1 "}], :title "Omni-Drive", :counter 0, :uniqueness false, :host nil, :code "03039", :side "Runner", :cost 3, :installed true, :advance-counter 0, :subtype "Gear", :previous-zone ["hand"]}, :code "06019", :side "Runner", :facedown nil, :cost 2, :installed true, :advance-counter 0, :memoryunits 1, :subtype "Daemon", :previous-zone ["hand"]}, :strength 2, :code "01007", :side "Runner", :current-strength 5, :facedown nil, :cost 2, :installed true, :advance-counter 0, :memoryunits 1, :subtype "Icebreaker - Fracter", :previous-zone ["hand"]}], :installed true, :advance-counter 0, :memoryunits 1, :subtype "Daemon", :previous-zone ["hand"]}.

Omni-Drive

Taneru shows card-info of Omni-Drive: {:faction "Shaper", :limited 3, :zone (:rig :hardware), :cid 2723079, :type "Hardware", :rec-counter 1, :abilities [{:label "Install and host a program of 1[Memory Unit] or less on Omni-Drive", :cost ["click" 1]} {:label "Host an installed program of 1 or less on Omni-Drive"} {:label "Take 1 "}], :title "Omni-Drive", :counter 0, :uniqueness false, :host nil, :code "03039", :side "Runner", :cost 3, :hosted [{:faction "Shaper", :limited 3, :hosted-programs [2723052 2723060], :zone ["onhost"], :cid 2723047, :type "Program", :abilities {:label "Install a program on [Leprechaun", :cost ["click" 1]} {:label "Host an installed program on Leprechaun"}], :title "Leprechaun", :counter 0, :uniqueness false, :host {:faction "Shaper", :limited 3, :zone ["rig" "hardware"], :cid 2723079, :type "Hardware", :rec-counter 1, :abilities [{:label "Install and host a program of 1[Memory Unit] or less on Omni-Drive", :cost ["click" 1]} {:label "Host an installed program of 1 or less on Omni-Drive"} {:label "Take 1 "}], :title "Omni-Drive", :counter 0, :uniqueness false, :host nil, :code "03039", :side "Runner", :cost 3, :installed true, :advance-counter 0, :subtype "Gear", :previous-zone ["hand"]}, :code "06019", :side "Runner", :facedown nil, :cost 2, :hosted [{:faction "Adam", :limited 3, :zone ["onhost"], :cid 2723060, :type "Program", :rec-counter 0, :abilities [{:label "Take 1 [Recurring Credits]"}], :title "Multithreader", :counter 0, :uniqueness false, :host {:faction "Shaper", :limited 3, :zone ["onhost"], :cid 2723047, :type "Program", :abilities {:label "Install a program on [Leprechaun", :cost ["click" 1]} {:label "Host an installed program on Leprechaun"}], :title "Leprechaun", :counter 0, :uniqueness false, :host {:faction "Shaper", :limited 3, :zone ["rig" "hardware"], :cid 2723079, :type "Hardware", :rec-counter 1, :abilities [{:label "Install and host a program of 1[Memory Unit] or less on Omni-Drive", :cost ["click" 1]} {:label "Host an installed program of 1 or less on Omni-Drive"} {:label "Take 1 "}], :title "Omni-Drive", :counter 0, :uniqueness false, :host nil, :code "03039", :side "Runner", :cost 3, :installed true, :advance-counter 0, :subtype "Gear", :previous-zone ["hand"]}, :code "06019", :side "Runner", :facedown nil, :cost 2, :installed true, :advance-counter 0, :memoryunits 1, :subtype "Daemon", :previous-zone ["hand"]}, :code "09040", :side "Runner", :facedown nil, :cost 3, :installed true, :advance-counter 0, :memoryunits 1, :previous-zone ["hand"]} {:faction "Anarch", :limited 3, :pump {:encounter 3}, :breaks ["Barrier"], :zone ["onhost"], :cid 2723052, :type "Program", :abilities [{:label "Break 1 barrier subroutine", :cost ["credit" 1]} {:label "Add 1 strength", :cost ["credit" 1], :pump 1}], :title "Corroder", :counter 0, :uniqueness false, :host {:faction "Shaper", :limited 3, :hosted-programs [2723060], :zone ["onhost"], :cid 2723047, :type "Program", :abilities {:label "Install a program on [Leprechaun", :cost ["click" 1]} {:label "Host an installed program on Leprechaun"}], :title "Leprechaun", :counter 0, :uniqueness false, :host {:faction "Shaper", :limited 3, :zone ["rig" "hardware"], :cid 2723079, :type "Hardware", :rec-counter 1, :abilities [{:label "Install and host a program of 1[Memory Unit] or less on Omni-Drive", :cost ["click" 1]} {:label "Host an installed program of 1 or less on Omni-Drive"} {:label "Take 1 "}], :title "Omni-Drive", :counter 0, :uniqueness false, :host nil, :code "03039", :side "Runner", :cost 3, :installed true, :advance-counter 0, :subtype "Gear", :previous-zone ["hand"]}, :code "06019", :side "Runner", :facedown nil, :cost 2, :installed true, :advance-counter 0, :memoryunits 1, :subtype "Daemon", :previous-zone ["hand"]}, :strength 2, :code "01007", :side "Runner", :current-strength 5, :facedown nil, :cost 2, :installed true, :advance-counter 0, :memoryunits 1, :subtype "Icebreaker - Fracter", :previous-zone ["hand"]}], :installed true, :advance-counter 0, :memoryunits 1, :subtype "Daemon", :previous-zone ["hand"]}], :installed true, :advance-counter 0, :subtype "Gear", :previous-zone ["hand"]}.

Taneru avatar Jan 27 '16 23:01 Taneru

Thanks for the thoroughness of the report. You are correct, the code that resets icebreakers uses a function all-installed, which only looks one level of hosting deep for installed programs. Someone will need to improve the function to recursively explore all levels of hosting.

nealterrell avatar Jan 28 '16 06:01 nealterrell

If no one's working on this yet, does anybody mind if I take a crack at this? Looks like a nice issue for a first pull request.

tmoritaa avatar Mar 10 '16 22:03 tmoritaa

Go for it! I hope you like recursion :).

nealterrell avatar Mar 10 '16 22:03 nealterrell

@Tondo: note that I have changes pending to all-installed in #1331. What I did was specific to the Corp side and the (for now) small number of assets/upgrades capable of hosting installed cards, so it probably won't impact what you'll be trying to fix here.

JoelCFC25 avatar Mar 11 '16 00:03 JoelCFC25

@JoelCFC25 Duly noted. How long do pull requests normally take to get merged into master? Cause if you're worried about merging issues I could make my pull request after your's is merged.

tmoritaa avatar Mar 11 '16 16:03 tmoritaa