2022-11-18 23:08:08 -05:00
|
|
|
require 'squib'
|
2023-01-01 20:54:41 -05:00
|
|
|
require 'game_icons'
|
|
|
|
|
|
|
|
AUDIENCE = GameIcons.get('delapouite/person').
|
|
|
|
recolor(fg: 'black', bg: 'white', fg_opacity: 1.0, bg_opacity: 0.0).
|
|
|
|
string
|
|
|
|
MUSIC = GameIcons.get('delapouite/musical-score').
|
|
|
|
recolor(fg: 'black', bg: 'white', fg_opacity: 1.0, bg_opacity: 0.0).
|
|
|
|
string
|
|
|
|
|
2023-01-02 22:27:14 -05:00
|
|
|
VOLUMES = {
|
|
|
|
"ppp" => 1,
|
|
|
|
"pp" => 2,
|
|
|
|
"p" => 3,
|
|
|
|
"mp" => 4,
|
|
|
|
"mf" => 5,
|
|
|
|
"f" => 6,
|
|
|
|
"ff" => 7,
|
|
|
|
"fff" => 8,
|
|
|
|
}
|
|
|
|
|
2023-01-01 20:54:41 -05:00
|
|
|
data = Squib.yaml file: 'data.yml'
|
|
|
|
|
|
|
|
Squib::Deck.new(cards: 18) do
|
|
|
|
use_layout file: 'economy.yml'
|
|
|
|
use_layout file: 'layout.yml'
|
|
|
|
background color: 'white'
|
|
|
|
cut_zone
|
|
|
|
safe_zone
|
|
|
|
|
|
|
|
text layout: :title, str: data.name
|
|
|
|
|
|
|
|
svg layout: :art, data: MUSIC
|
|
|
|
|
|
|
|
rect layout: :description
|
|
|
|
text layout: :description, str: data.effect.zip(data.blurb).map { |e, b|
|
|
|
|
"#{e}#{b ? "\n<i>#{b}</i>" : nil}"
|
|
|
|
} do |embed|
|
|
|
|
embed.svg key: '{a}', width: 32, height: 32, data: AUDIENCE
|
|
|
|
end
|
2023-01-02 22:27:14 -05:00
|
|
|
text layout: :type, markup: true, str: data.volume.map { |v| "<b><i>#{v} (#{VOLUMES[v]})</i></b>" }
|
2022-11-18 23:08:08 -05:00
|
|
|
|
|
|
|
save format: :png
|
2023-01-01 21:28:20 -05:00
|
|
|
save_sheet prefix: "sheet",
|
|
|
|
columns: 5, rows: 4, trim: '0.125in', count_format: ''
|
|
|
|
|
2022-11-18 23:08:08 -05:00
|
|
|
end
|