{"action":"created","issue":{"url":"https://api.github.com/repos/mtgred/netrunner/issues/194","labels_url":"https://api.github.com/repos/mtgred/netrunner/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/mtgred/netrunner/issues/194/comments","events_url":"https://api.github.com/repos/mtgred/netrunner/issues/194/events","html_url":"https://github.com/mtgred/netrunner/issues/194","id":75682601,"number":194,"title":"Question: implementing Hivemind","user":{"login":"nealterrell","id":10083341,"avatar_url":"https://avatars.githubusercontent.com/u/10083341?v=3","gravatar_id":"","url":"https://api.github.com/users/nealterrell","html_url":"https://github.com/nealterrell","followers_url":"https://api.github.com/users/nealterrell/followers","following_url":"https://api.github.com/users/nealterrell/following{/other_user}","gists_url":"https://api.github.com/users/nealterrell/gists{/gist_id}","starred_url":"https://api.github.com/users/nealterrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nealterrell/subscriptions","organizations_url":"https://api.github.com/users/nealterrell/orgs","repos_url":"https://api.github.com/users/nealterrell/repos","events_url":"https://api.github.com/users/nealterrell/events{/privacy}","received_events_url":"https://api.github.com/users/nealterrell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-12T17:49:22Z","updated_at":"2015-05-16T10:52:52Z","closed_at":null,"body":"I am working on implementing Hivemind. It is tricky, needless to say.\r\n\r\nCurrently I have a new function in Core called get-virus-counters. It returns the sum of a card's virus counters with the number of counters on an installed Hivemind. Cards that use counters passively --Gorman Drip, Medium, Nerve Agent, and Deep Thought -- simply need to call get-virus-counters in their ability triggers instead of just using their own `:counters` value. These cards work fine.\r\n\r\nThe harder use case is for abilities that consume counters: Cache, Imp, Datasucker, Gravedigger, Hemorrhage, Crypsis. These cards should be able to trigger their abilities if (card's counters + Hivemind's counters) >= ability cost, and should be able to spend a Hivemind counter for the ability if necessary.\r\n\r\nI have four thoughts on how to approach this:\r\n\r\n0. Give Hivemind a single ability to transfer a counter to another virus. Then the user can activate that virus to spend the counter.\r\n\r\n    Example: click Hivemind; select Cache to move 1 counter. Click Cache to consume the counter and gain 1 credit.\r\n\r\n    PROS: simplest to implement (I have it done already). \r\n    CONS: does not automate using the target virus, so the user could skip that step (cheating). Probably un-intuitive at first, as you would otherwise start by clicking the card you want to activate (Cache/Imp). \r\n\r\n1. Give Hivemind an ability to trigger another virus card's active ability. On clicking Hivemind, prompt to select an installed `:subtype \"Virus\"` that has an ability with a `:counter-cost` that is less than the sum of Hivemind's counters and the target's counters. Add the requisite counters to the target, remove counters from Hivemind, and resolve the ability's `:effect`.\r\n\r\n    Example: click Hivemind; select Cache to lose 1 counter from Hivemind, gain 1 credit.\r\nExample: during a run when accessing, click Hivemind; select Imp to lose 1 counter from Hivemind, trash accessed card.\r\n\r\n    PROS: Makes it clear that the Hivemind token is being spent. Doesn't require changing any existing cards.\r\nCONS: Probably the most complicated to implement.\r\n\r\n2. Give every virus with an ability a second ability to spend a Hivemind counter to trigger the card's effect. \r\n\r\n    Example: click Cache; two abilities show, one to gain 1 credit, another to spend a Hivemind counter to gain 1 credit.\r\n\r\n    PROS: makes it clear what is happening. Consistent starting point (always with the card that is acting).\r\n    CONS: doubles the # of clicks for activating the base ability of these cards, as now the game will show a menu that requires a second click.\r\n\r\n3. Rework all virus ability triggers to consume a counter from Hivemind if there are insufficient counters on the card.\r\n\r\n    Example: click Cache; if no counters are on Cache, consume a counter from Hivemind, then trigger the ability as normal.\r\n\r\n    PROS: fewest changes to user interface. Single click to trigger actions, as currently.\r\n    CONS: no warning, so prone to accidents. If the user clicks Cache one too many times (server lag, click-happy, etc.), Cache will automatically consume a very valuable Hivemind token with no way of recovering it. Requires changing code for all the existing virus abilities.\r\n\r\nI suppose a final option would be to take option 4 and add a confirmation prompt if the card wants to use a Hivemind token.\r\n\r\nAny thoughts from users or developers? What is going to give the best user experience?"},"comment":{"url":"https://api.github.com/repos/mtgred/netrunner/issues/comments/102607758","html_url":"https://github.com/mtgred/netrunner/issues/194#issuecomment-102607758","issue_url":"https://api.github.com/repos/mtgred/netrunner/issues/194","id":102607758,"user":{"login":"mtgred","id":284114,"avatar_url":"https://avatars.githubusercontent.com/u/284114?v=3","gravatar_id":"","url":"https://api.github.com/users/mtgred","html_url":"https://github.com/mtgred","followers_url":"https://api.github.com/users/mtgred/followers","following_url":"https://api.github.com/users/mtgred/following{/other_user}","gists_url":"https://api.github.com/users/mtgred/gists{/gist_id}","starred_url":"https://api.github.com/users/mtgred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtgred/subscriptions","organizations_url":"https://api.github.com/users/mtgred/orgs","repos_url":"https://api.github.com/users/mtgred/repos","events_url":"https://api.github.com/users/mtgred/events{/privacy}","received_events_url":"https://api.github.com/users/mtgred/received_events","type":"User","site_admin":false},"created_at":"2015-05-16T10:52:52Z","updated_at":"2015-05-16T10:52:52Z","body":"New prompts are added at the end of a prompt queue. Adding the new prompt at the beginning of the queue would make it work for Imp. You can maybe add a parameter to the prompt function to add it at the front instead of the end.\r\n\r\nI like the option 2 better as it is explicit. But option 4 is fine too."}}