gryffon / ringteki

Browser based Legend of the Five Rings LCG
https://jigoku.online
MIT License
86 stars 65 forks source link

Need to re-work setup phase to be more technically correct. #7

Closed gryffon closed 6 years ago

gryffon commented 6 years ago

While we are currently doing all of the actions required of setup, some of them are not happening int he correct order.

Posting "Setup" from the RRG for easy reference:

Setup To set up a game, perform the following steps in order:

  1. Select decks. Each player selects a deck using the deckbuilding rules. See “Deckbuilding” on page 5.
  2. Create token bank and unclaimed ring pool. Place all fate tokens, honor tokens, status tokens, and the Imperial Favor in a pile within reach of each player. This area is known as the token bank. Place the rings near the token bank. This area is known as the unclaimed ring pool.
  3. Determine first player. Randomly select a player. That player will be the first player. Place the first player token in front of this player. The player that is not randomly selected to be the first player gains 1 fate from the general token pool and adds it to their fate pool.
  4. Shuffle dynasty and conflict decks. Each player shuffles both their dynasty and conflict decks separately and presents them to the opponent for additional shuffling and/ or a final cut. Then each player places their dynasty deck to the left of their play area and their conflict deck to the right.
  5. Place provinces and stronghold. In player order, each player secretly selects one of their provinces, places it facedown above their dynasty deck, and places their stronghold card on top of it. If a player is using a role card, it is placed next to his or her stronghold during this step. Each player then places their other four provinces facedown between their dynasty and conflict decks, in any order.
  6. Fill provinces. Each player places a card from the top of their dynasty deck facedown onto each of their empty nonstronghold provinces. In player order, each player has one opportunity to look at each of his or her cards placed in this manner and mulligan any number of them. h Note: After this step, a player may not look at facedown cards in his or her provinces.
  7. Draw starting hand. Each player draws 4 cards from their conflict deck. In player order, each player has one opportunity to mulligan any number of these cards.
  8. Gain starting honor. Each player gains honor tokens equal to the honor value on their stronghold. The game is now ready to begin.

Of note;

dodgepong commented 6 years ago

Worth noting, at the GenCon tournament, they actually had players roll to randomly determine who got to choose who went first. This was important for tiebreakers. This is a departure from the rules as written, and they will need to either release an update to the rules reference, or change the tiebreakers rules.

gryffon commented 6 years ago

That's a good point. Currently, the code is just choosing a random player to go first. I think as long as we support the ability to manually pass first player, that should suffice for the purpose of releasing a beta.

Tie Breakers will be a manual step for a bit, but definitely something we can add in to help out.

JT-Marsh commented 6 years ago

I'd like to add some checks before you continue to subsequent phases. For example you can continue with 0 provinces positioned. Where should these checks be placed?

dodgepong commented 6 years ago

I'm not sure how useful tiebreakers are to implement at all, unless you are adding a timer as well.

gryffon commented 6 years ago

@JT-Marsh setupphase.js would be the most likely place for those checks to happen.

@dodgepong People may be timing themselves. Most likely, it would just be a matter of adding a display that can show the tie-breaker points, rather than enforcing an actual tie-breaker.

SnarkAttack commented 6 years ago

@JT-Marsh For the province check you wanted, there's a prompt specifically for that called setupprovinceprompt.js. In the onMenuCommand function, it just sets a Boolean on button press that is the flag for considering the event done. I think the proper way to fix is make a function in player.js that checks all provinces are there and only sets the flag if true.

SnarkAttack commented 6 years ago

To whoever picks up this issue (I can take it if no one else wants), make sure to move the adding of the stronghold before the adding of provinces, as the placement of provinces might be affected by what clan you're going up against.

jeremylarner commented 6 years ago

I'm not sure it's worth forcing player order onto each step. I would suggest for each of the three decision phases (Provinces, Dynasty, Conflict) the game permits players to make decisions simultaneously, but there is an announcement when each player completes the step. If players wish to follow the rules strictly, the second player simply waits for the first player's announcement before making their decisions. However, most of the time I think players will prefer to save time and not have to wait for their opponents to finish their bit before they can do their provinces/mulligans.

gryffon commented 6 years ago

There's a couple of issues though that make it incorrect. Like seeing the conflict hand before doing the dynasty mulligan. This changes how a person might choose, and we want to avoid that kind of situation, where we don't have correctness because of ease.

We don't have to enforce player 1 taking their mulligan before player 2, but we should endeavor to make sure that the steps are happening in the correct order, because that's not something that a player can arbitrate manually.

gryffon commented 6 years ago

I feel this has been mostly done.