mtg

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2020 License: MIT Imports: 11 Imported by: 0

README

mtg

mtg is a library that helps manipulating Magic: The Gathering decks.

Overview

proxy-deck

proxy-deck is a command line tool that can be used to create a proxy deck.

Given a deck.txt in the standard format for MTG decks:

1 Aeromunculus
1 Agony Warp
1 Auger Spree
1 Azorius Guildgate
1 Blightning
1 Bloodfell Caves
1 Blossoming Sands
1 Boros Guildgate

the command

proxy-deck deck.txt

will create a proxy deck.pdf with scryfall images:

deck

With the command

proxy-deck -name "Deck Name" deck.txt

a proxy deck.pdf can be created that will overlay the decks name:

deck-with-name

which may come in handy when using The Staples Binder Method to save some cash.

The Staples Binder Method

The Staples Binder Method can be used to to save some cash while playing multiple decks within a format. With this method you will need at max 4 original copies of any given card in your collection. To reduce the amount of effort this method should only be used for cards that have a value greater than a few dollars.

  • Put all decks in the same sleeves (brand/color).

  • Keep the sleeved staples in a binder.

  • Proxy print the needed number of any given staple with the decks name as an overlay.

  • Cut out the proxy.

  • Sleve up the proxy together with a basic land.

  • Keep the sleeved proxy with the rest of the cards in the deck.

  • Before the game pull out all proxies and replace them with the original printings from the Stapels Binder.

  • After the game replace all of the staples in your deck with the proxies that where pulled out before the game.

  • Tip: The name of the deck is important if you want to always know where the original printing currently is. If you find a proxy within your Staples Binder the name will tell you where your original is located. In case you're trying to replace a proxy from deck A and find a proxy of deck B in your Staples Binder you know that the original is currently located in deck B.

  • Tip: In a casual setting and if your playgroup does not mind, you could skip replacing the proxies to save some time and effort. In case you are double sleeving your cards you will not notice a difference in thickness between (proxy + basic land + outer-sleeve) and (inner-sleeve + staple + outer-sleeve).

Documentation

Index

Constants

View Source
const (
	FrontFaces = "FrontFaces"
	BackFaces  = "BackFaces"
	Tokens     = "Tokens"
)

Variables

This section is empty.

Functions

func CardByName

func CardByName(name string) func(Card) bool

func LayoutDirectory

func LayoutDirectory(deckName string, numberOfCopiesPerCard int, inDir string, outFile string) error

Types

type Card

type Card struct {
	Name       string
	ManaCost   string
	TypeLine   string
	OracleText string
	Power      string
	Toughness  string
	Loyalty    string
	ImageData  []byte
	Version    *Version
}

type Cards

type Cards []Card

func (Cards) Contains

func (cs Cards) Contains(accept func(Card) bool) bool

type Deck

type Deck struct {
	Name     string
	Sections []Section
}

func ParseDeck

func ParseDeck(in io.Reader) (Deck, error)

func (Deck) Cards

func (d Deck) Cards() []Card

type PrinterOption

type PrinterOption func(*ProxyPrinter) error

func NumberOfTokens

func NumberOfTokens(n int) PrinterOption

func PrintOnlyTokens

func PrintOnlyTokens() PrinterOption

func PrintTokens

func PrintTokens() PrinterOption

type ProxyPrinter

type ProxyPrinter struct {
	// contains filtered or unexported fields
}

func NewProxyPrinter

func NewProxyPrinter(client *scryfall.Client, deck Deck, opts ...PrinterOption) *ProxyPrinter

func (*ProxyPrinter) WriteImageProxies

func (p *ProxyPrinter) WriteImageProxies(w io.Writer) error

func (*ProxyPrinter) WriteImageProxiesToFile

func (p *ProxyPrinter) WriteImageProxiesToFile(fileStr string) error

func (*ProxyPrinter) WriteTextProxies

func (p *ProxyPrinter) WriteTextProxies(w io.Writer) error

func (*ProxyPrinter) WriteTextProxiesToFile

func (p *ProxyPrinter) WriteTextProxiesToFile(fileStr string) error

type Section

type Section struct {
	Name  string
	Cards Cards
}

type Version

type Version struct {
	Set             string
	CollectorNumber string
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL