diff --git a/cards/_output/card_31.png b/cards/_output/card_31.png index 81a0b37..af5b921 100644 Binary files a/cards/_output/card_31.png and b/cards/_output/card_31.png differ diff --git a/cards/_output/card_32.png b/cards/_output/card_32.png index 92da909..9c3b0c9 100644 Binary files a/cards/_output/card_32.png and b/cards/_output/card_32.png differ diff --git a/cards/_output/card_33.png b/cards/_output/card_33.png index b5089de..69c10ea 100644 Binary files a/cards/_output/card_33.png and b/cards/_output/card_33.png differ diff --git a/cards/_output/card_34.png b/cards/_output/card_34.png index b0407f3..17ec11f 100644 Binary files a/cards/_output/card_34.png and b/cards/_output/card_34.png differ diff --git a/cards/_output/card_35.png b/cards/_output/card_35.png index da5362e..b66d282 100644 Binary files a/cards/_output/card_35.png and b/cards/_output/card_35.png differ diff --git a/cards/_output/card_36.png b/cards/_output/card_36.png index b2b255a..705b9b4 100644 Binary files a/cards/_output/card_36.png and b/cards/_output/card_36.png differ diff --git a/cards/_output/card_37.png b/cards/_output/card_37.png index 8092c33..d5dbe19 100644 Binary files a/cards/_output/card_37.png and b/cards/_output/card_37.png differ diff --git a/cards/_output/card_38.png b/cards/_output/card_38.png index 45645f1..82cac2b 100644 Binary files a/cards/_output/card_38.png and b/cards/_output/card_38.png differ diff --git a/cards/_output/card_39.png b/cards/_output/card_39.png index f59f002..913e0c1 100644 Binary files a/cards/_output/card_39.png and b/cards/_output/card_39.png differ diff --git a/cards/_output/card_40.png b/cards/_output/card_40.png index be49018..7c5d029 100644 Binary files a/cards/_output/card_40.png and b/cards/_output/card_40.png differ diff --git a/cards/_output/card_41.png b/cards/_output/card_41.png index 7941413..7086d88 100644 Binary files a/cards/_output/card_41.png and b/cards/_output/card_41.png differ diff --git a/cards/_output/card_42.png b/cards/_output/card_42.png index 2087405..e3a8668 100644 Binary files a/cards/_output/card_42.png and b/cards/_output/card_42.png differ diff --git a/cards/_output/card_43.png b/cards/_output/card_43.png index 38cec91..e79e833 100644 Binary files a/cards/_output/card_43.png and b/cards/_output/card_43.png differ diff --git a/cards/_output/card_44.png b/cards/_output/card_44.png index 27a894c..27c7972 100644 Binary files a/cards/_output/card_44.png and b/cards/_output/card_44.png differ diff --git a/cards/_output/card_45.png b/cards/_output/card_45.png index 38f56ee..7b6db01 100644 Binary files a/cards/_output/card_45.png and b/cards/_output/card_45.png differ diff --git a/cards/_output/card_46.png b/cards/_output/card_46.png index 991a22e..91b7556 100644 Binary files a/cards/_output/card_46.png and b/cards/_output/card_46.png differ diff --git a/cards/_output/card_47.png b/cards/_output/card_47.png index 576fed1..1379e5e 100644 Binary files a/cards/_output/card_47.png and b/cards/_output/card_47.png differ diff --git a/cards/_output/card_48.png b/cards/_output/card_48.png index 84d886d..36514f1 100644 Binary files a/cards/_output/card_48.png and b/cards/_output/card_48.png differ diff --git a/cards/_output/card_49.png b/cards/_output/card_49.png index 4f78c01..551f8d2 100644 Binary files a/cards/_output/card_49.png and b/cards/_output/card_49.png differ diff --git a/cards/_output/card_50.png b/cards/_output/card_50.png index aca3b4c..8970d97 100644 Binary files a/cards/_output/card_50.png and b/cards/_output/card_50.png differ diff --git a/cards/_output/card_51.png b/cards/_output/card_51.png index a521dee..dea2792 100644 Binary files a/cards/_output/card_51.png and b/cards/_output/card_51.png differ diff --git a/cards/_output/card_52.png b/cards/_output/card_52.png index cd1c348..7ca88c9 100644 Binary files a/cards/_output/card_52.png and b/cards/_output/card_52.png differ diff --git a/cards/_output/card_53.png b/cards/_output/card_53.png index 6fc0272..3afd2ab 100644 Binary files a/cards/_output/card_53.png and b/cards/_output/card_53.png differ diff --git a/cards/_output/output.pdf b/cards/_output/output.pdf index 8591225..7b95d92 100644 Binary files a/cards/_output/output.pdf and b/cards/_output/output.pdf differ diff --git a/cards/deck.rb b/cards/deck.rb index 79d5b28..99e9bc6 100644 --- a/cards/deck.rb +++ b/cards/deck.rb @@ -17,46 +17,53 @@ layouts = ['economy.yml', 'space-layout-1.yml'] c1 = '#9f68ed' c2 = '#ed9f68' c3 = '#b5ed68' +c4 = '#eeeeee' # conditional coloring # https://squib.readthedocs.io/en/v0.15.0/colors.html?highlight=color#samples -bg = c1 -fg = c2 +color = c1 Squib::Deck.new cards: data['name'].size, layout: layouts do - # background_color = cards['type'].map do |t| - # if color == 'bg' && t == 'O' then - # 'bg' - # else - # 'fg' - # end - # end - #background color: background_color + # set background colour per card type + bg = data['type'].map do |t| + if (t.eql? 'O') + c1 + elsif (t.eql? 'Q') + c2 + elsif (t.eql? 'Q') + c3 + else + c4 + end + end - background color: bg #background color: '#9f68ed' + # set fill colour per card type + fg = data['type'].map do |t| + if (t.eql? 'O') + c2 + elsif (t.eql? 'Q') + c1 + elsif (t.eql? 'Q') + c4 + else + c4 + end + end + + background color: bg rect fill_color: fg , x: 78, y: 78, width: '2.25in', height: '3.25in', radius: 32 - + rect layout: 'cut' # cut line as defined by TheGameCrafter rect layout: 'safe' # safe zone as defined by TheGameCrafter text str: data['name'], layout: 'title' text str: data['type'], layout: 'type' text str: data['text'], layout: 'description' svg file: data['illustration'], layout: 'illustration' + + # output a png of each card and pdf of the deck save_png save_pdf - - # Defaults are pretty sensible. - showcase file: 'showcase.png' - - # Here's a more complete example. - # Tons of ways to tweak it if you like - check the docs. - showcase trim: 32, trim_radius: 32, margin: 100, face: :right, - scale: 0.85, offset: 0.95, fill_color: :black, - reflect_offset: 25, reflect_strength: 0.1, reflect_percent: 0.4, - file: 'showcase2.png' - - save_png prefix: 'showcase_individual_' # to show that they're not trimmed - + end