netrunner icon indicating copy to clipboard operation
netrunner copied to clipboard

[FEATURE] Include base trace strength in spend to increase trace amount prompt

Open FarCryFromHuman opened this issue 10 years ago • 5 comments

This is an enhancement, not a defect.

Adding the base trace strength to the increase trace strength prompt would vastly increase playability of trace-based cards on smaller displays. Even on large displays the card art can be grainy enough that it is difficult to see the base strength on the card.

I'm sure it's been mentioned before, but I don't see an issue open. If this is a duplicate, feel free to close it.

FarCryFromHuman avatar Jul 15 '16 22:07 FarCryFromHuman

It's a very good idea and one that I've been on the brink of tackling previously, only to get distracted by something else!

JoelCFC25 avatar Jul 15 '16 23:07 JoelCFC25

I'm still nearly illiterate at clojure, but here's the code where I would imagine the answer lies:

From src/clj/game/core-abilities.clj:

(defn corp-trace-prompt "Starts the trace process by showing the boost prompt to the corp." [state card trace] (show-wait-prompt state :runner (str "Corp to initiate a trace from " (:title card)) {:priority 2}) (show-prompt state :corp card "Boost trace strength?" :credit #(init-trace state :corp card trace %) {:priority 2}))

The trace parameter is passed through to init-trace which looks to receive a map with values for :keys and :as. I'm not sure if the trace base strength is included in there anywhere, but if so it's already present in the corp-trace-pompt function and can just be added to the prompt. I'm probably way off base here, or missing some complexity, but this doesn't seem like it would require major refactoring.

If I'm wrong and the trace strength isn't passed along to the corp-trace-pompt function... it might require refactoring every single trace in the game and yuck.

FarCryFromHuman avatar Jul 15 '16 23:07 FarCryFromHuman

You are on the right track, @FarCryFromHuman. The trace parameter will have a :base key that could be added to the prompt. The only trick is that :base could be an integer OR a function (Self-destruct). See how init-trace determines which and uses the result to calculate the trace strength.

nealterrell avatar Jul 16 '16 00:07 nealterrell

Seems like (if (fn? base) (base state side (make-eid state) card nil) base) from init-trace could be extracted into its own function and called by both enclosing functions then. I don't like having to evaluate it twice though (knee-jerk reaction to multiple evaluation -- probably not a real problem).

FarCryFromHuman avatar Jul 16 '16 00:07 FarCryFromHuman

I've briefly looked at this once before but moved to other things. It would also be useful if each trace prompt stated the runner's link explicitly, base trace / boosted strength etc.

Saintis avatar Jul 18 '16 07:07 Saintis