From 10995f3dc8c6ce48528be6e36f0268bc05ba0c8e Mon Sep 17 00:00:00 2001 From: Ninjananas Date: Sun, 15 Jun 2025 18:33:04 +0200 Subject: [PATCH] Plein de modifs --- data/cards.csv | 106 ++-- graphics/bundled/icones_bannieres.svg | 843 +++++++++++++++++++++++--- scripts/generate_layouts.py | 5 +- src/deck.rb | 31 +- 4 files changed, 836 insertions(+), 149 deletions(-) diff --git a/data/cards.csv b/data/cards.csv index f17644a..706a15c 100644 --- a/data/cards.csv +++ b/data/cards.csv @@ -1,53 +1,53 @@ -"quantite","type","nom","rang","icone","rang_alt","icone_alt","type_effet_1","effet_1","type_effet_2","effet_2","type_effet_3","effet_3","art","citation" -"0","dummy","dummy","dummy","dummy","dummy","dummy","dummy","dummy",,,,,, -"1","candidat","Industrion","10","ind",,,,,,,,,, -"1","candidat","Usinax","9","ind",,,,,,,,,, -"1","candidat","Ouvriex","8","ind","1","gau",,,,,,,, -"1","candidat","Patronex","7","ind","2","dro",,,,,,,, -"1","candidat","Alpha-Kappa-Beta","6","ind","3","roy",,,,,,,, -"1","candidat","Libertarix","5","ind","4","ana",,,,,,,, -"1","candidat","Gauchoïde","10","gau",,,,,,,,,, -"1","candidat","Répartitron","9","gau",,,,,,,,,, -"1","candidat","Oligarchix","8","gau","1","roy",,,,,,,, -"1","candidat","Pink Alu","7","gau","2","ind",,,,,,,, -"1","candidat","Révolutron XV","6","gau","3","ana",,,,,,,, -"1","candidat","Lokaloïd","5","gau","4","eco",,,,,,,, -"1","candidat","Royalix","10","roy",,,,,,,,,, -"1","candidat","Monark Mk IV","9","roy",,,,,,,,,, -"1","candidat","Louis-Louis","8","roy","1","dro",,,,,,,, -"1","candidat","BDFL 2.0","7","roy","2","gau",,,,,,,, -"1","candidat","Éco-Duc 3.1","6","roy","3","eco",,,,,,,, -"1","candidat","Lys-Import","5","roy","4","ind",,,,,,,, -"1","candidat","Anarchix 2000","10","ana",,,,,,,,,, -"1","candidat","Son of Robotry","9","ana",,,,,,,,,, -"1","candidat","Phoc-U","8","ana","1","ind",,,,,,,, -"1","candidat","Robow Warrior","7","ana","2","eco",,,,,,,, -"1","candidat","Skizzo 2","6","ana","3","dro",,,,,,,, -"1","candidat","London Call","5","ana","4","gau",,,,,,,, -"1","candidat","Conservator","10","dro",,,,,,,,,, -"1","candidat","Traditron","9","dro",,,,,,,,,, -"1","candidat","Greenwasher","8","dro","1","eco",,,,,,,, -"1","candidat","Crazy Gun","7","dro","2","ana",,,,,,,, -"1","candidat","Profitron","6","dro","3","ind",,,,,,,, -"1","candidat","MDP 123456","5","dro","4","roy",,,,,,,, -"1","candidat","Écolotron","10","eco",,,,,,,,,, -"1","candidat","Pichonio","9","eco",,,,,,,,,, -"1","candidat","Hermitron","8","eco","1","ana",,,,,,,, -"1","candidat","Gaiax","7","eco","2","roy",,,,,,,, -"1","candidat","Vegauchix","6","eco","3","gau",,,,,,,, -"1","candidat","Chassa-Cor III","5","eco","4","dro",,,,,,,, -"1","candidat","Adaptatron","0","jok",,,,,,,,,, -"1","candidat","Compatiblix","0","jok",,,,,,,,,, -"3","action","Robocaïne",,"robocaine",,,"effet","Jouez 2 actions","effet","Piochez 2 cartes",,,, -"3","action","Corruption","-2","corruption",,,"magouille","Volez un candidat adverse. Ajoutez-lui cette carte comme mod. Son parti perd un :pv:.",,,,,, -"3","action","Retournement de veste",,"veste",,,"effet","Retournez un de vos candidats sur son autre parti. Un :pv: de son ancien parti est transféré à son nouveau parti",,,,,, -"2","action","Assassinat",,"assassinat",,,"magouille","Défaussez un candidat (le vôtre ou celui d’un adversaire)",,,,,, -"5","action","Casserole","-3","casserole",,,"effet","Mettez le mod de cette carte à un candidat. Retirez deux :pv: à son parti.",,,,,, -"2","action","Spin Doctor",,"spindoctor",,,"effet","Défaussez un mod négatif d'un de vos candidats",,,,,, -"3","action","Propagande","++2","propagande","-1",,"magouille","Mettez le mod de cette carte à un candidat. Si échec, mettez le mod négatif ",,,,,, -"1","action","Campagne de Com'","++2","campagne",,,"effet","Ajoutez comme mod à un candidat :symbole_ind: et un :pv: à son parti.",,,,,, -"1","action","Campagne de Com'","++2","campagne",,,"effet","Ajoutez comme mod à un candidat :symbole_gau: et un :pv: à son parti.",,,,,, -"1","action","Campagne de Com'","++2","campagne",,,"effet","Ajoutez comme mod à un candidat :symbole_roy: et un :pv: à son parti.",,,,,, -"1","action","Campagne de Com'","++2","campagne",,,"effet","Ajoutez comme mod à un candidat :symbole_ana: et un :pv: à son parti.",,,,,, -"1","action","Campagne de Com'","++2","campagne",,,"effet","Ajoutez comme mod à un candidat :symbole_dro: et un :pv: à son parti.",,,,,, -"1","action","Campagne de Com'","++2","campagne",,,"effet","Ajoutez comme mod à un candidat :symbole_eco: et un :pv: à son parti.",,,,,, +quantite,type,nom,rang,icone,rang_alt,icone_alt,type_effet_1,effet_1,type_effet_2,effet_2,type_effet_3,effet_3,art,citation +0,dummy,dummy,dummy,dummy,dummy,dummy,dummy,dummy,,,,,, +1,candidat,Industrion,10,ind,,,,,,,,,, +1,candidat,Usinax,9,ind,,,,,,,,,, +1,candidat,Ouvriex,8,ind,1,gau,,,,,,,, +1,candidat,Patronex,7,ind,2,dro,,,,,,,, +1,candidat,Alpha-Kappa-Beta,6,ind,3,roy,,,,,,,, +1,candidat,Libertarix,5,ind,4,ana,,,,,,,, +1,candidat,Gauchoïde,10,gau,,,,,,,,,, +1,candidat,Répartitron,9,gau,,,,,,,,,, +1,candidat,Oligarchix,8,gau,1,roy,,,,,,,, +1,candidat,Pink Alu,7,gau,2,ind,,,,,,,, +1,candidat,Révolutron XV,6,gau,3,ana,,,,,,,, +1,candidat,Lokaloïd,5,gau,4,eco,,,,,,,, +1,candidat,Royalix,10,roy,,,,,,,,,, +1,candidat,Monark Mk IV,9,roy,,,,,,,,,, +1,candidat,Louis-Louis,8,roy,1,dro,,,,,,,, +1,candidat,BDFL 2.0,7,roy,2,gau,,,,,,,, +1,candidat,Éco-Duc 3.1,6,roy,3,eco,,,,,,,, +1,candidat,Lys-Import,5,roy,4,ind,,,,,,,, +1,candidat,Anarchix 2000,10,ana,,,,,,,,,, +1,candidat,Son of Robotry,9,ana,,,,,,,,,, +1,candidat,Phoc-U,8,ana,1,ind,,,,,,,, +1,candidat,Robow Warrior,7,ana,2,eco,,,,,,,, +1,candidat,Skizzo 2,6,ana,3,dro,,,,,,,, +1,candidat,London Call,5,ana,4,gau,,,,,,,, +1,candidat,Conservator,10,dro,,,,,,,,,, +1,candidat,Traditron,9,dro,,,,,,,,,, +1,candidat,Greenwasher,8,dro,1,eco,,,,,,,, +1,candidat,Crazy Gun,7,dro,2,ana,,,,,,,, +1,candidat,Profitron,6,dro,3,ind,,,,,,,, +1,candidat,MDP 123456,5,dro,4,roy,,,,,,,, +1,candidat,Écolotron,10,eco,,,,,,,,,, +1,candidat,Pichonio,9,eco,,,,,,,,,, +1,candidat,Hermitron,8,eco,1,ana,,,,,,,, +1,candidat,Gaiax,7,eco,2,roy,,,,,,,, +1,candidat,Vegauchix,6,eco,3,gau,,,,,,,, +1,candidat,Chassa-Cor III,5,eco,4,dro,,,,,,,, +1,candidat,Adaptatron,0,jok,,,,,,,,,, +1,candidat,Compatiblix,0,jok,,,,,,,,,, +3,action,Robocaïne,,robocaine,,,effet,Jouez 2 actions,effet,Piochez 2 cartes,,,, +3,action,Corruption,-2,corruption,,,magouille,•Volez un candidat adverse.\n•Il obtient :m2:.\n•Son parti : -2 :pv:.,,,,,, +3,action,Retournement de veste,,veste,,,effet,Retournez un de vos candidats sur son autre parti.\nUn :pv: de son ancien parti est transféré à son nouveau parti,,,,,, +2,action,Assassinat,,assassinat,,,magouille,Défaussez un candidat (le vôtre ou celui d’un adversaire),,,,,, +5,action,Casserole,-3,casserole,,,effet,Ciblez un candidat\n•Il obtient :m3:.\n•Retirez 2 :pv: à son parti.,,,,,, +2,action,Spin Doctor,,spindoctor,,,effet,Défaussez un mod négatif d'un de vos candidats,,,,,, +3,action,Propagande,++2,propagande,-1,,magouille,Ciblez un candidat\nRéussite : Il obtient :p2:\nÉchec : Il obtient :m1:,,,,,, +1,action,Campagne de Com',++2,campagne,,,effet,Ciblez un candidat :symbole_ind:\n•Il obtient :p2:.\n•Son parti : +1:pv:.,,,,,, +1,action,Campagne de Com',++2,campagne,,,effet,Ciblez un candidat :symbole_gau:\n•Il obtient :p2:.\n•Son parti : +1:pv:.,,,,,, +1,action,Campagne de Com',++2,campagne,,,effet,Ciblez un candidat :symbole_dro:\n•Il obtient :p2:.\n•Son parti : +1:pv:.,,,,,, +1,action,Campagne de Com',++2,campagne,,,effet,Ciblez un candidat :symbole_roy:\n•Il obtient :p2:.\n•Son parti : +1:pv:.,,,,,, +1,action,Campagne de Com',++2,campagne,,,effet,Ciblez un candidat :symbole_eco:\n•Il obtient :p2:.\n•Son parti : +1:pv:.,,,,,, +1,action,Campagne de Com',++2,campagne,,,effet,Ciblez un candidat :symbole_ana:\n•Il obtient :p2:.\n•Son parti : +1:pv:.,,,,,, diff --git a/graphics/bundled/icones_bannieres.svg b/graphics/bundled/icones_bannieres.svg index 182395c..4364632 100644 --- a/graphics/bundled/icones_bannieres.svg +++ b/graphics/bundled/icones_bannieres.svg @@ -7,7 +7,7 @@ viewBox="0 0 297 210" version="1.1" id="svg8" - inkscape:version="1.4 (e7c3feb100, 2024-10-09)" + inkscape:version="1.4.1 (93de688d07, 2025-03-30)" sodipodi:docname="icones_bannieres.svg" xml:space="preserve" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" @@ -18,7 +18,22 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">-2+2-1+1-3+3PV + +OU + +OUPV + y="-227.27954" />+2-2 diff --git a/scripts/generate_layouts.py b/scripts/generate_layouts.py index a5d90ed..8e21e0c 100644 --- a/scripts/generate_layouts.py +++ b/scripts/generate_layouts.py @@ -75,8 +75,8 @@ EFFECT_ICON_X = EFFECT_FRAME_X + EFFECT_ICON_MARGIN + (EFFECT_ICON_SIZE / 2.) EFFECT_TEXT_MARGIN = .2 -EFFECT_SEPARATOR_HEIGHT = 1. -EFFECT_SEPARATOR_MARGIN = .05 +EFFECT_SEPARATOR_HEIGHT = 2. +EFFECT_SEPARATOR_MARGIN = -.05 TOTAL_SEPARATOR_HEIGHT = EFFECT_SEPARATOR_HEIGHT + (2 * EFFECT_SEPARATOR_MARGIN) EFFECT_SEPARATOR_X = EFFECT_FRAME_X + (EFFECT_FRAME_WIDTH / 2.) @@ -252,6 +252,7 @@ effect_text: align: center valign: middle markup: true + font: exo-2-0 9 effect_text_1_0: extends: effect_text diff --git a/src/deck.rb b/src/deck.rb index ec43964..2b56fb2 100644 --- a/src/deck.rb +++ b/src/deck.rb @@ -8,7 +8,7 @@ WIDTH = (2.5 + 2*BLEED) * DPI HEIGHT = (3.5 + 2*BLEED) * DPI EFFECT_FONT_SIZE = 8 EFFECT_FONT_SPACING = 5 -EMBED_SIZE = EFFECT_FONT_SIZE / 9.0 # In cells +EMBED_SIZE = EFFECT_FONT_SIZE / 8.0 # In cells EMBED_DY = - (0.7 * EMBED_SIZE + 0.2) * DPI / 300 # In cells @@ -16,6 +16,7 @@ EMBED_DY = - (0.7 * EMBED_SIZE + 0.2) * DPI / 300 # In cells data = Squib.csv file: 'data/cards.csv', explode: 'quantite' data['rang'].map! { it.nil? ? nil : it.to_s.sub(/\A\++/, "+") } data['rang_alt'].map! { it.nil? ? nil : it.to_s.sub(/\A\++/, "+") } +['effet_1', 'effet_2', 'effet_3'].each { data[it].each { it&.gsub! '\n', "\n" } } def icon_to_svg(icon) icon.nil? ? nil : "icone_#{icon}.svg" @@ -141,7 +142,7 @@ Squib::Deck.new( text str: data['rang_alt'], layout: 'alt_banner_text' fill_color = data['effet_1'].map { |effet| effet.nil? ? '#0000': '#f7f7f7ff' } - stroke_color = data['effet_1'].map { |effet| effet.nil? ? '#0000': '#cca9' } + stroke_color = data['effet_1'].map { |effet| effet.nil? ? '#0000': '#e3ca0eff' } rect layout: 'effect_frame', fill_color: fill_color, stroke_color: stroke_color n_effects = (0..data['icone'].length).map { |idx| get_n_effects(data, idx) } @@ -149,15 +150,23 @@ Squib::Deck.new( n.times do |i| # Effect texts text(str: (0..data['icone'].length).map { |idx| (n == n_effects[idx]) ? data["effet_#{i+1}"][idx] : nil}, layout: "effect_text_#{n}_#{i}", font_size: EFFECT_FONT_SIZE, spacing: EFFECT_FONT_SPACING) do |embed| - embed_custom(embed, 'effet') - embed_custom(embed, 'magouille') - embed_custom(embed, 'pv') - embed_custom(embed, 'symbole_ind') - embed_custom(embed, 'symbole_gau') - embed_custom(embed, 'symbole_roy') - embed_custom(embed, 'symbole_ana') - embed_custom(embed, 'symbole_dro') - embed_custom(embed, 'symbole_eco') + [ + 'effet', + 'magouille', + 'pv', + 'symbole_ind', + 'symbole_gau', + 'symbole_roy', + 'symbole_ana', + 'symbole_dro', + 'symbole_eco', + 'm1', + 'm2', + 'm3', + 'p1', + 'p2', + 'p3', + ].each { embed_custom(embed, it) } end # Effect icons