netrunner icon indicating copy to clipboard operation
netrunner copied to clipboard

Hayley turn cutoff time

Open aiannacc opened this issue 11 years ago • 6 comments

Hayley's ID power works once per turn, including the corp's turn. Right now, the cutoff to distinguish when the turn changes is the "End Turn" button. This is problematic.

Hayley players often want to do things at the end of the corp's turn. But they corp can't know that and simply ends their turn immediately after their last click. You end up with the following incorrect behavior:

  1. Corp clicks End
  2. Hayley installs something (using a Clone Chip, say) and gets a bonus install.
  3. Hayley starts her turn.
  4. Hayley installs something but does NOT get a bonus install. The game incorrectly thinks she's already gotten it this turn.

Hayley's cutoff should be changed to when the runner clicks Start Turn, rather than when the corp clicks End Turn.

aiannacc avatar Sep 09 '15 14:09 aiannacc

I don't think that would be enough.

Think of the following:

  • Corp wants to end their turn
  • Haley wants to use Clone Chip a program before the turn ends to get the bonus install
  • Corp turn actually ends
  • Haley's turn begins
  • In Step 1.1, Haley uses another Clone Chip to install a program and gets the bonus install
  • We reach 1.2, and "When your turn begins" conditionals meet their trigger condition

The problem currently is that the time between Corp clicks End Turn and Runner clicks Start turn is some kind of Limbo, and is not correctly represented in the game engine. I don't know currently of a good way to handle such corner cases without making the usual game flow tedious.

Maybe we really need to restructure the turn flow.

Instead of

Corp:

  • "Start turn"
  • Actions
  • "End turn"

Runner:

  • Actions (we're technically on the Runner's turn)
  • "Start turn"
  • Actions
  • "End turn"

something like

Corp:

  • Actions
  • "Start turn"
  • Actions
  • "Trigger 'When your turn begins' abilities" (if any)
  • Actions
  • "End Turn"

Runner

  • Actions (use Haley here, we're technically still on Corp's turn)
  • "Start turn"
  • Actions
  • "Trigger 'When your turn begins' abilities" (if any)
  • Actions
  • "End Turn"

queueseven avatar Sep 10 '15 09:09 queueseven

I think you're right. The unfortunate fact is that the timing structure was designed to be as simple as would accommodate all the cards. Anything short of fully implementing it is going to run into edge cases. I appreciate the concern that this would make the flow tedious.

aiannacc avatar Sep 12 '15 09:09 aiannacc

I think this can be made better with our Step 1.2 code, but not perfect: without more UI tedium, we don't have a way of differentiating between Step 3.2 (paid abilities before Corp turn ends) and Step 1.1 (paid abilities before Runner turn begins). I think that if we treated all actions that occur after Corp hits End Turn as actually happening during 3.2, then a lot of use cases will be fixed. Haley could Clone Chip after Corp ends turn to effectively have it happen on Corp's turn, then after hitting Start Turn use Haley again during their turn. (This is a change from current, where Corp End Turn effectively sets "current turn" to Runner; with the change, "current turn" wouldn't switch until Start Turn is pressed.)

The one category of use case that this still fails would be if Haley wanted to use a paid ability like Street Peddler to install a card on her turn at Step 1.1 which had a start-of-turn trigger she wanted to activate at 1.2, like Daily Casts. The simple proposal above wouldn't be able to handle that.

@JoelCFC25 suggested adding an "Action before end of turn" button to the opponent's UI during your turn, giving them a window to act once you click End Turn, but before that event triggers (thus the turn is still yours). I may be able to work that.

nealterrell avatar Mar 09 '16 06:03 nealterrell

OK, I have a solution ready. It's a combination of the "Action before access" run UI and the notes in here.

At any point during the opponent's turn, you can click a button "Action Before Turn Ends". If you click this, then when the opponent goes to End Turn, they get a wait-prompt to wait for your actions, and you get a prompt to take action. Those actions are during Step 3.2/2.2 (window before Corp/Runner end of turn) of your opponent's turn, so any "once per turn" counts as on the opponent's turn. When you are done, the opponent's turn ends and you are technically in your turn, Step 1.1 (window before Start Turn). If you act here, then "once per turn" counts as your turn. When you click Start Turn, you will move into Step 1.2 ("start of turn" triggers) if applicable, or go strait into your first click actions.

This allows the most difficult interaction for Hayley: using a paid ability at the opponent's end of turn to install a card that triggers on "start of turn", and then doing so again at Step 1.1 of runner's turn. Example: at end of corp's turn, use Clone Chip to install Multithreader from heap, and Hayley install another Multithreader from hand. Use the recurring credits during opponent's turn to pump Study Guide. After corp turn ends, pop Street Peddler to install a resource, and Haley install Daily Casts from hand. Hit Start Turn: Multithreaders refresh their credits, Daily Casts ticks down.

nealterrell avatar Mar 11 '16 16:03 nealterrell

@JoelCFC25 I think this issue should be reopened :thought_balloon:

queueseven avatar May 13 '16 13:05 queueseven

If I understand correctly, the thorniest interaction is when a player wants to do actions both in 3.2/2.2 and 1.1. Ideally we would want to manage this interaction without at all affecting the opponent of the player who wants to do Funky Stuff.

So in a paper game, what happens is that your opponent says, "end my turn", and then you say, "wait, in your end of turn, I do a thing, then my turn begins, I do these things." This implicitly changes the meaning of the previous declaration of "end my turn" to "pass priority", and then the onus is on the player doing Funky Stuff to properly step through their phases.

My suggestion is that the same thing is true in jnet. In cases where it might matter (as determined by analysing cards in the deck, by a global user preference, by a deck-level preference, or by a game-level preference), show both an "End Previous Turn" button to progress to 1.1, and a "Start Turn" button to progress to the action phase. (Or you could name them "Start Turn" and "Action Phase" to match what they're actually doing; but that means the wording "Start Turn" on jnet means something different to what it used to. I'll use EPT and ST in the following description.)

When you press an End Turn button, you're just passing priority. Then, your opponent gets to trigger their abilities. If they trigger any "when your turn begins" abilities (Adonis/Blue Sun) they're implicitly also requesting to be moved forward to that phase; the EPT button disappears. But until they do or until they click End Previous Turn or Start Turn, it's still counted as the previous turn.

Cases:

  1. Nothing more exciting than start of turn triggers need to happen: these work exactly as before. Without even displaying the additional button overhead in many cases, depending on how clever/user-configurable the setting is.
  2. You want to do stuff at the end of their turn, but don't care about once-per-turn triggers: Opponent presses End Turn, you do your thing, then press Start Turn. No overhead in clicks, and, again, the additional button may not even be displayed. Your stuff is counted as happening in your opponent's turn, which is generally better for you if it does matter and is how people assume it happens in paper.
  3. You want to do stuff at the end of their turn, but you do care about once per turn triggers. (Say, Kate installing a program at the end of the corp's turn, or prerezzing something vs Councilman.) Same as (2). Since the limbo is by default counted as in the previous player's turn, this is probably exactly what you want.
  4. You want to do stuff in the limbo period, and you care about it being in your turn. (Say, Kate, having already used up her discount during the corp turn, and has exactly 1 credit, and wants to clone chip Parasite in 1.1.) Opponent presses End of Turn, you press End Previous Turn, then do your thing, then press Start Turn. Overhead relative to now: 1 mouseclick. I think that's acceptable to put that burden on the player doing the Funky Stuff.
  5. You want to do stuff in the limbo period, and you care about the distinction between the previous player's turn, your turn pre-start of turn triggers, and your turn post-start of turn triggers. (Say, the Hayley/Multithreader/Peddler case above.) Same as (4). Opponent presses End of Turn, you do things in 3.2, press End Previous Turn, do more things in 1.1, press Start Turn, do more things in 1.3. The same overhead of 1 mouseclick, with the same reason for being acceptable.

The things I like about this UX:

  • It never affects your opponent at all.
  • It puts the burden on you to properly progress through your phases.
  • You can "skip ahead" if you don't need to care about certain distinctions.
  • The implementation is conservative if not told otherwise, to provide the assumed best results for players.
  • It pretty much builds in the same assumptions that would be assumed in paper.

What we lose is the ability for your opponent to specifically react to something you did in 2.2/3.2 in that phase, without spamming chat or something. But I can't think of a case where that matters, so that feels like an acceptable price to pay at the moment.

SohumB avatar May 13 '16 14:05 SohumB