Skip to content

bluelovers#54683

My feedback

1 result found

  1. Algorithm Improvement

    942 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    bluelovers#54683 supported this idea  · 
    An error occurred while saving the comment
    bluelovers#54683 commented  · 

    js code
    https://github.com/bluelovers/ws-mtg/blob/9518363fca3c0be1e3e05258919878f6fbf08453/packages/mtg-deck-shuffle/src/library.ts#L27-L43

    idea is

    1. do distribute before shuffle
    - distribute lands
    - distribute cards and insert lands every 4 cards
    https://github.com/bluelovers/ws-mtg/blob/9518363fca3c0be1e3e05258919878f6fbf08453/packages/mtg-deck-shuffle/dist/index.cjs.development.js#L93
    2. split to 12 chunk and random merge it
    https://github.com/bluelovers/ws-mtg/blob/9518363fca3c0be1e3e05258919878f6fbf08453/packages/mtg-deck-shuffle/dist/index.cjs.development.js#L21

    ----

    optional hack

    at begin the match
    ask player choose he want at latest has 2 land or not?

    if all player choose yes
    then will make sure player has 2 land in start
    if not all player allow this then random chose yes or not

    then draw 7 card, if land < 2, random swap a card into library and pick random land out
    if handsize is 6 , then only make sure has 1 land

    https://github.com/bluelovers/ws-mtg/blob/9518363fca3c0be1e3e05258919878f6fbf08453/packages/mtg-deck-shuffle/dist/index.cjs.development.js#L134

Feedback and Knowledge Base