GithubHelp home page GithubHelp logo

iniquit / dr4ft Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dr4fters/dr4ft

0.0 0.0 0.0 8.39 MB

Multiplayer Online MTG Draft and Sealed Simulator

Home Page: https://dr4ft.info/

License: MIT License

JavaScript 88.03% CSS 2.71% Dockerfile 0.14% Smarty 0.68% SCSS 8.44% Shell 0.01%

dr4ft's Introduction

dr4ft


CI

dr4ft Discord

dr4ft is a NodeJS based web-application that simulates draft and sealed format between players and/or bots. Most of MTG sets are playable thanks to MTGJson support. We follow as much as possible the rules that determine how a real booster is created.

The application provides the following features:

  • Draft and Sealed format
  • Regular, Cube and Chaos game types
  • Special game modes like "Glimpse Draft" or "Decadent"
  • 1 to 100 players
  • 1 to 12 packs per player
  • All playable sets ever printed
  • Import your custom set and play it
  • In-game chat
  • Pick Timer
  • Autopick
  • Suggest lands
  • Kick players
  • Connection indicators
  • Pick confirmation
  • Grid and column view
  • Card sorting by rarity, type, color or mana cost
  • Bots
  • Notifications when a pack is available
  • API to create and manage a game remotely. More docs here
  • Accurate Booster generation rules from @taw's magic-sealed-data
  • Allow several picks per pack
  • Download draft logs for analysis
  • Export your deck to various other apps
  • Generate deck hashes for competitive play

Technologies

dr4ft is written in ES6 and transpiled with Webpack and Babel, and uses React on the client-side. The application uses SocketIO and the Websocket technology between client and server.


Project History

dr4ft is a fork of arxanas' drafts.ninja fork of aeosynth's draft project:

draft (initial project, discontinued)
    ↳ drafts.ninja (fork, discontinued)
            ↳ dr4ft (fork, current main project)

It supports all their features, and many more.

Known pages running this code:


Installation

Native

  1. Install Node.js >= 16.0.0. Alternatively, install nvm and then run nvm use in this repo, which will install the correct Node version for this repo as defined in the .nvmrc file.
  2. Run
    $ npm ci
    $ npm run build
    $ npm start
  3. Visit http://localhost:1337

Docker

You can also create a Docker image and run the app in a container:

  1. Install Docker
  2. Build the image:
    docker build -t dr4ft-app .
  3. Run it in a container:
    docker run -dp 1337:1337 dr4ft-app
  4. Visit http://localhost:1337

Usage

Start Server

npm start This command start the server

npm run download_allsets This command downloads all sets from MTGJson and integrates them.

npm run update_database This command downloads integrates all files previously downloaded from MTGJson.

npm run download_booster_rules download and parse booster generation rules from magic-sealed-data

Development Notes

VSCode

You can debug this application by adding the following configuration to your launch.json:

{
  "name": "Launch via NPM",
  "type": "node",
  "request": "launch",
  "cwd": "${workspaceFolder}",
  "runtimeExecutable": "npm",
  "runtimeArgs": [
      "run", "start-debug"
  ],
  "port": 1338
}

You should now be able to set breakpoints in backend/ and hit them when you start the debugger. This relies on the --inspect-brk=1338 flag to open port 1338 for the debugger to attach to.

Breakpoints for the frontend should be set in your browser console.

Contributors

❤️ Thank you!

Contribute!

Be a part of this project! You can run the test using the following.

  1. Install dependencies from package.json by running npm ci
  2. Run the test via npm test
  3. Make some fun new modules!

Found bugs or have feature requests? Feel free to open an issue! Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

The project is unaffiliated with Wizards of the Coast, and is licensed under the MIT license.

dr4ft's People

Contributors

benjaminpwagner avatar caelen-feller avatar charliepugh92 avatar crookedneighbor avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dev-id avatar ebbit1q avatar gitter-badger avatar haganbmj avatar herveh44 avatar keeler avatar kyonlee avatar lrawicz avatar mildmongrel avatar mixmix avatar nex3 avatar noojuno avatar oelarnes avatar pgtest2 avatar psettle avatar skwerlman avatar t-moennich avatar thinkingofmaud avatar tooomm avatar zeldazach avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.