Commit 141ee2e0 authored by twanvl's avatar twanvl

Updated FPM token templates to new color system

parent 5b6b3ecb
...@@ -12,23 +12,15 @@ card dpi: 300 ...@@ -12,23 +12,15 @@ card dpi: 300
############################################################## Extra scripts ############################################################## Extra scripts
init script: init script:
# Load blend scripts for hybrids/multicolors
include file: magic-blends.mse-include/blend-scripts
# Which green template should be used?
green_template := { green_template := {
if input == "g" then ( if input == "g" then (
if styling.green_style == "light" then "lg" if styling.green_style == "light" then "lg"
else "g" else "g"
) else input ) else input
} }
suffix := [card: "card.jpg", textbox: "textbox.png", typeline: "typeline.png"]
card_template := { green_template() + "card.jpg" } template := { green_template() + suffix[type] }
land_template := { green_template() + "lcard.jpg" } land_template := { (if input == "a" then "c" else green_template()) + "l" + suffix[type] }
typeline_template := { green_template() + "typeline.png" }
typelineland_template := { green_template() + "ltypeline.png" }
textbox_template := { green_template() + "textbox.png" }
textboxland_template := { green_template() + "ltextbox.png" }
# Use the normal tap symbol # Use the normal tap symbol
mana_t := { mana_t := {
...@@ -40,14 +32,9 @@ init script: ...@@ -40,14 +32,9 @@ init script:
# Use guild mana symbols? # Use guild mana symbols?
guild_mana := { styling.use_guild_mana_symbols } guild_mana := { styling.use_guild_mana_symbols }
# Does the card have a color that requires a white font for copyright/artist? # Only white cards use a black font
black_font_colors := filter_rule(match:"^(hybrid 2 color [^/]*/ )?(hybrid 3 color [^/]*/[^/]*/ )?(hybrid 4 color [^/]*/[^/]*/[^/]*/ )?(hybrid vertical [^/]*/ )?(hybrid 5 color horizontal [^/]*/[^/]*/[^/]*/[^/]*/ )?(white)") # TODO: also for some overlays involving white
white_font_colors := filter_rule(match:"^(hybrid 2 color overlay green / white|hybrid 2 color overlay red / white)") font_colors_white := { input != "w" }
font_color := {
if white_font_colors(input: card.card_color) != "" then rgb(255,255,255)
else if black_font_colors(input: card.card_color) != "" then rgb(0,0,0)
else rgb(255,255,255)
}
############################################################## Extra style ############################################################## Extra style
styling field: styling field:
...@@ -125,7 +112,7 @@ card style: ...@@ -125,7 +112,7 @@ card style:
z index: -2 z index: -2
render style: image render style: image
popup style: in place popup style: in place
include file: magic-blends.mse-include/card-backgrounds image: { card_background() }
############################# Name line ############################# Name line
name: name:
...@@ -291,7 +278,7 @@ card style: ...@@ -291,7 +278,7 @@ card style:
font: font:
name: MPlantin-Italic name: MPlantin-Italic
size: 8 size: 8
color: { font_color() } color: { font_color(card.card_color) }
symbol font: symbol font:
name: magic-paintbrush name: magic-paintbrush
size: 14 size: 14
...@@ -306,7 +293,7 @@ card style: ...@@ -306,7 +293,7 @@ card style:
font: font:
name: MPlantin name: MPlantin
size: 7 size: 7
color: { font_color() } color: { font_color(card.card_color) }
############################################################## Extra card fields ############################################################## Extra card fields
...@@ -319,15 +306,17 @@ extra card field: ...@@ -319,15 +306,17 @@ extra card field:
extra card field: extra card field:
type: choice type: choice
name: textbox name: textbox
include file: magic-blends.mse-include/card-colors script: card.card_color
default: card.card_color
show statistics: false show statistics: false
editable: false
save value: false
extra card field: extra card field:
type: choice type: choice
name: type image name: typeline
include file: magic-blends.mse-include/card-colors script: card.card_color
default: card.card_color
show statistics: false show statistics: false
editable: false
save value: false
extra card style: extra card style:
pt symbols: pt symbols:
...@@ -348,12 +337,11 @@ extra card style: ...@@ -348,12 +337,11 @@ extra card style:
render style: image render style: image
popup style: in place popup style: in place
visible: visible:
{ if card.rule_text != "" then 1 { card.rule_text != "" or
else if number_of_items(in:"" + card.flavor_text) > 21 then 1 (number_of_items(in:"" + card.flavor_text) > 21) }
else 0 } image: { card_textbox() }
include file: magic-blends.mse-include/card-textboxes
z index: 2 z index: 2
type image: typeline:
left: 53 left: 53
top: 463 top: 463
width: 304 width: 304
...@@ -361,5 +349,5 @@ extra card style: ...@@ -361,5 +349,5 @@ extra card style:
render style: image render style: image
popup style: in place popup style: in place
visible: { card.type != "" or card.illustrator != "" or card.copyright != "" } visible: { card.type != "" or card.illustrator != "" or card.copyright != "" }
include file: magic-blends.mse-include/card-typelines image: { card_typeline() }
z index: 2 z index: 2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment