Added a bunch of defaults

master
silverwizard 5 years ago
parent 113c4198ca
commit 198ae5c782
  1. 19
      CardGen.pl
  2. 7
      shopping.yml

@ -5,14 +5,31 @@ use Text::Wrap;
$Text::Wrap::columns = 30;
my $cards = LoadFile('shopping.yml');
if($cards->{Deck}->{Background}){
$bgcolour = $cards->{Deck}->{Background};
}else{
$bgcolour='white';
}
if($cards->{Deck}->{Font}){
$mainfont = $cards->{Deck}->{Font};
}else{
$mainfont = 'Courier';
}
if($cards->{Deck}->{TextColour}){
$txtcolour = $cards->{Deck}->{TextColour};
}else{
$txtcolour = 'black';
}
if($cards->{Deck}->{BorderColour}){
$bordercolour = $cards->{Deck}->{BorderColour};
}else{
$bordercolour = 'red';
}
foreach my $card (keys %{$cards->{Deck}->{Cards}}){
my $image = Image::Magick->new(size=>'600x825');
$image->ReadImage('canvas:' . $bgcolour);
$image->Draw(stroke=>'red', fill => 'none', strokewidth=>1, primitive=>'rectangle', points=>'38,38 562,787');
$image->Draw(stroke=>$bordercolour, fill => 'none', strokewidth=>1, primitive=>'rectangle', points=>'38,38 562,787');
my $surface = Image::Magick->new;
$surface->Rotate(90);
$surface->Resize('600x825!');

@ -1,7 +1,8 @@
Deck:
Background: black
Font: Courier
TextColour: white
#Background: black
#Font: Courier
#TextColour: DarkGoldenRod3
#BorderColour: green
Cards:
Leg Boost:
- Grants +1d6 when jumping

Loading…
Cancel
Save