{"action":"created","issue":{"url":"https://api.github.com/repos/mtgred/netrunner/issues/1218","repository_url":"https://api.github.com/repos/mtgred/netrunner","labels_url":"https://api.github.com/repos/mtgred/netrunner/issues/1218/labels{/name}","comments_url":"https://api.github.com/repos/mtgred/netrunner/issues/1218/comments","events_url":"https://api.github.com/repos/mtgred/netrunner/issues/1218/events","html_url":"https://github.com/mtgred/netrunner/pull/1218","id":133336117,"number":1218,"title":"Rework of start-of-turn effects; implementation of Step 4.3 during runs (rez before access)","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":1,"created_at":"2016-02-12T20:28:48Z","updated_at":"2016-02-14T12:59:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mtgred/netrunner/pulls/1218","html_url":"https://github.com/mtgred/netrunner/pull/1218","diff_url":"https://github.com/mtgred/netrunner/pull/1218.diff","patch_url":"https://github.com/mtgred/netrunner/pull/1218.patch"},"body":"This is a pretty big rework of start-of-turn effects for both players, plus an implementation of Step 4.3 for runs (corp rez/actions before run is declared successful and access happens). In both implementations I have tried to balance accuracy of game rules, correct behavior for card interactions, and ease of use. I believe I've done a good job thanks to input from the community in #282 and #334.\r\n\r\nI also implemented Museum of History, which uses a single prompt to shuffle up to N cards from Archives into R&D, where N is the number of rezzed Museums. (I preferred this to having a separate prompt for each Museum.)\r\n\r\nBefore I get to the massive wall of text, I will begin with the \"tl;dr\":\r\n\r\n## TL;DR\r\n\r\n### Corp start of turn\r\n\r\nIf a corp card triggers on start of turn, it is supposed to happen before the mandatory draw. For the few cards where this matters, we separate \"Start Turn\" from \"Mandatory Draw\" UI buttons. If there are no cards rezzed where this matters, we don't show this separate step, so Start Turn flows into the mandatory draw.\r\n\r\n### Runner start of turn\r\n\r\nRunner has a similar window between starting their turn and being able to take their first click, so separate \"Start Turn\" and \"Take Clicks\" buttons. We have slightly different behaviors for \"at the start of your turn\" cards depending on if they are __optional__ or __mandatory__, on their interactions with other cards, and if we think the user wants to be forcefully reminded of the card every turn.\r\n\r\n### Run Step 4.3 (act before access)\r\n\r\nWhen runner passes the last piece of ice, corp sees \"No Action\" and \"Act before access\" buttons. If the latter is selected, then the runner will wait after clicking \"Successful Run\". Once the corp acts, Runner has a window to use paid abilities, after which they continue to accessing with no chance to jack out. \r\n\r\n## Details\r\n\r\n### Start of Turn Effects\r\n\r\nThis is my current list of cards that I have implemented the new start-of-turn phase for. We refer to this as \"Step 1.2\", as that is the FFG term for the window in which \"when your turn begins\" triggers. \r\n\r\nCards generally fall into these categories:\r\n\r\n1. A mandatory action at 1.2, whose effect can influence other 1.2 abilities (Adonis Campaign: take credits to pay for an Executive Bootcamp ice rez; MaxX: use Wyldside before MaxX). \r\n\r\n    For these cards, we give the ability to click the card to invoke its start of turn effect during 1.2. If at the end of 1.2 the card has not been used, we use it automatically. (So if you don't care about the order in which your Campaigns pay out, you can ignore the manual trigger opportunity.) These cards will often not cause Step 1.2 to happen automatically, but instead may be used by other cards as a reason to cause 1.2. (See Drug Dealer, below.)\r\n\r\n2. A mandatory action at 1.2, whose effect generally does not influence other 1.2 abilities (Beach Party, Security Testing). \r\n\r\n   The effect will trigger automatically at the end of 1.2. There is no reason (yet?) for the user to have to trigger these cards manually.\r\n\r\n3. An optional action at 1.2, whose effect is situational or requires fine-tuned control (Aesop's Pawnshop, Chop Bot 3000, The Supplier, Blue Sun). \r\n\r\n    These cards will force Step 1.2 as long as an appropriate condition is met (Aesops: another card is installed; Supplier: a card is hosted; etc.). In that window, clicking the card will use its ability. If the ability is not used, then nothing happens when 1.2 ends, the implication being that the player did not want to use the effect.\r\n\r\n4. An optional action at 1.2, whose effect is something that the user likely wants to be asked about every turn (Apex, Joshua B.). This is a judgment call, where I ask myself \"If the player has chosen to play this card, is it likely they want to be reminded of it every turn?\"\r\n\r\n    These cards will not force Step 1.2 unless there is some interesting interaction. Their ability can be used through a card click during 1.2. If the ability has not been manually triggered by the end of 1.2, then an optional/cancellable prompt is shown.\r\n\r\n    The distinction between cards in Category 3 and Category 4 is subjective and open to change. (For example, one could argue that The Supplier belongs in Category 4: if there's something hosted on it, you probably want to be forced to interact with it each turn.)\r\n\r\nI have implemented these ideas for these cards:\r\n\r\n#### Corp\r\n\r\n1. __Drip economy__ (Adonis, Eve, Launch Campaigns; Expo Grid; PAD Campaign, Mental Health Clinic, Server Diagnostics; Marked Accounts; Reality Threedee): Category 1. \r\n\r\n    These cards will not cause Step 1.2 themselves, but during that Step can be clicked to take their credits for the turn. If they are not clicked, or Step 1.2 is not used, then they grant their credits before mandatory draw. This allows their credits to be used for an Executive Bootcamp rez, for example.\r\n\r\n2. Blue Sun: Category 3. Causes Step 1.2 if there are rezzed corp cards.\r\n3. Constellation Protocol: Category 3. Causes Step 1.2 if there is an ice with advancement tokens, and another ice that is advanceable.\r\n4. Corporate Town: Category 3. Causes Step 1.2 if there are installed resources, and if Corp Town is rezzed or there is a forfeitable agenda.\r\n5. Early Premiere: Category 3. Causes Step 1.2 if there are installed corp cards in servers that can be advanced.\r\n6. Executive Bootcamp: Category 3. Causes Step 1.2 if there are unrezzed corp cards.\r\n7. Hades Fragment, Museum of History: Category 3. Causes Step 1.2 if there are cards in Archives.\r\n8. Kala Ghoda Real TV: Category 3. Causes Step 1.2 if there are cards in the runner's Stack.\r\n9. Public Support: Category 2. No known interactions.\r\n10. Rex Campaign: Category 1. See Drip Economy.\r\n11. Tech Startup: Category 3. Always causes Step 1.2. \r\n12. Tennin Institute: Category 3. Causes Step 1.2 if the runner did not make a successful run.\r\n\r\n#### Runner\r\n\r\n1. __Drip economy__ (Daily Casts, Data Folding, Hard at Work, Iain Stirling, Underworld Contact): Category 1. \r\n\r\n    Same behavior as corp drip economy cards. Will be flagged as `:drip-economy` for interactions with Drug Dealer.\r\n2. Activist Support: Category 2.\r\n3. Aesop's Pawnshop and Chop Bot 3000: Category 1. Causes Step 1.2 if there are installed runner cards. Flagged as `:drip-economy` for Drug Dealer interaction.\r\n4. Apex: Category 4. Does not cause Step 1.2, but can be clicked in that window to do the install. If not clicked, or there is no Step 1.2, will show an optional prompt to do his install.\r\n5. Beach Party: Category 2.\r\n6. Darwin: Category 3. Always causes Step 1.2\r\n7. Deep Thought: Category 4. \r\n8. Dr. Lovegood: Category 1. Causes Step 1.2 if other runner cards are installed.\r\n9. Drug Dealer: Category 1. Causes Step 1.2 if `:drip-economy` runner cards are installed. \r\n\r\n    One of the major motivations for doing this on the runner's side, this will allow a runner with 0 credits to click Drug Dealer to lose 1 credit, then proceed to their turn and automatically take credits from their drip economy. Likewise, spend your last credit on Personal Workshop before Drug Dealer takes it.\r\n10. Earthrise Hotel, Wyldside: Category 1. These have an interaction with MaxX, below.\r\n11. Globalsec Security Clearance: Category 3. Always causes Step 1.2. has interactions with Aesop's Pawnshop, Jak Sinclair.\r\n12. Hyperdriver: Category 3. Always causes Step 1.2. \r\n13. Incubator: Category 2.\r\n14. Jak Sinclair: Category 4.  Always causes Step 1.2.\r\n15. Joshua B.: Category 4. Always causes Step 1.2.\r\n16. MaxX: Category 1. Causes Step 1.2 if there are other mandatory draw cards installed (Wyldside, Earthrise). Lets you decide to trash from MaxX or draw first.\r\n17. Motivation: Category 4.\r\n18. Parasite: Category 2.\r\n19. Personal Workshop: Category 1. The \"remove 1 counter\" acts like Drip Economy cards.\r\n20. Qianju PT: Category 3. Always causes Step 1.2.\r\n21. Security Testing: Category 1. Does not cause Step 1.2.\r\n22. Starlight Crusade Funding: Category 2.\r\n23. Stim Dealer: Category 2.\r\n24. The Supplier: Category 4. Does not cause Step 1.2; always prompts to install if something is installed and affordable.\r\n25. Trope: Category 2.\r\n26. Vigil: Category 1. Does not cause Step 1.2.\r\n27. Virus Breeding Ground: Category 2.\r\n28. Woman in the Red Dress: Category 1. Does not cause Step 1.2.\r\n29. Zona Sul Shipping: Category 2.\r\n\r\n\r\n\r\n### Run Step 4.3\r\n\r\nI believe I have addressed @mtgred's concerns in implementing this step of the run timing. Nothing changes during the run until the runner presses Continue to go past the last piece of ice. At that point:\r\n\r\n1. Corp gets the usual \"No action\" button, but also a \"Action before access\" button. Either button allows runner to select Continue or Jack Out in run step 4.1. \r\n2. If corp selected \"No action\", then \"successful run\" triggers and access begins. +0 clicks compared to live for either side in this case.\r\n3. If corp selected \"Action before access\", then runner now sees \"Waiting for Corp actions\" with no buttons of their own. Corp may rez/use abilities at this time, understanding that runner has committed to Successful Run  and accessing.\r\n4. When corp is done, runner sees \"Continue to access\" button with __no__ Jack Out option. They may use paid abilities before clicking that button, which _now_ triggers \"successful run\" and begins the access step.\r\n5. If the corp requested this Step 4.3 window, then we have +1 click for each player overall, __only__ for runs where corp needed the window to rez/act. That probably happens 1-2 times a game on average."},"comment":{"url":"https://api.github.com/repos/mtgred/netrunner/issues/comments/183884193","html_url":"https://github.com/mtgred/netrunner/pull/1218#issuecomment-183884193","issue_url":"https://api.github.com/repos/mtgred/netrunner/issues/1218","id":183884193,"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":"2016-02-14T12:59:02Z","updated_at":"2016-02-14T12:59:02Z","body":"Nice :+1: "}}