class Squib::Deck
Public Instance Methods
avatar(opts = {})
click to toggle source
# File lib/squib_plus/deck/avatar.rb, line 8 def avatar(opts = {}) DSL::Avatar.new(self, __callee__).run(opts) end
card_num(opts = {})
click to toggle source
Adds a card number to the bottom right of the card by default. Helps with tracking down a specific card in your spreadsheet in games with many unique cards.
# File lib/squib_plus/deck.rb, line 10 def card_num(opts = {}) defaults = { x: width - 100, y: height - 100, width: 50, height: 50, font: 'sans-serif', font_size: 9, color: '#000', align: :center, valign: :middle } range = Args.extract_range opts, self # Index from 1 text(str: range.map { |i| i + 1 }, **(defaults.merge opts)) end
pnp(opts = {})
click to toggle source
Shortcut for creating a Print-n-Play sheet using poker-sized cards
# File lib/squib_plus/deck.rb, line 35 def pnp(opts = {}) cut_zone stroke_color: '#888' defaults = { trim: 37.5, sprue: if opts[:rtl] "#{File.dirname(__FILE__)}/sprues/letter_poker_tight_reverse.yml" else "#{File.dirname(__FILE__)}/sprues/letter_poker_tight.yml" end } save_pdf(defaults.merge(opts)) end
tts(opts = {})
click to toggle source
Shortcut for save_sheet with defaults that make sense for Tabletop Simulator
# File lib/squib_plus/deck.rb, line 29 def tts(opts = {}) defaults = { columns: 10, rows: 7, trim: 37.5 } save_sheet(defaults.merge(opts)) end