mse version: 0.3.4
game: magic
short name: Future Textless
full name: Futureshift Textless
icon: card-sample.png
position hint: 051

card width: 375
card height: 523
card dpi: 150

#By: Pichoro
#
#Todo:
#Make different colored colorless mana symbols work
#Casting cost mask
#Frames can be changed to jpegs
#make colored artifacts look right
############################################################## Extra scripts

init script:
	# Should hybrids have a grey name?
	mask_hybrid_with_land := { styling.grey_hybrid_name }
	
	suffix := [card: "card.png", pt: "pt.png"]
	template := { input + suffix[type] }
	land_template := { (if input == "a" then "c" else input) + "l" + suffix[type] }
	color_combination := {
		# The base hybrid, without the outer frame blended over it
		base := base_hybrid[shape][color_count]()
		
		# Put a frame around it?
		if land and not colored_lands then
			masked_blend(
				mask:  "multicolor_blend_{type}.png",
				dark:  land_template("c"),
				light: base,
			)
		else if multi then 
			masked_blend(
				mask:  "multicolor_blend_{type}.png",
				dark:  template("m"),
				light: base,
			)
		else if artifact then 
			masked_blend(
				mask:  "artifact_blend_{type}.png",
				dark:  template("a"),
				light: base,
			)
		else if color_count > 1 and mask_hybrid_with_land() then
			masked_blend(
				mask:  "hybrid_blend_{type}.png",
				dark:  land_template("c"),
				light: base,
			)
		else base
	}
	
	# Use the normal tap symbol
	mana_t := {
		if      styling.tap_symbol == "old"        then "old"
		else if styling.tap_symbol == "diagonal T" then "older"
		else                                            "new"
	}
	
	# Use guild mana symbols?
	guild_mana := { styling.use_guild_mana_symbols }
	
	colorless_color := {
		if contains(card.card_color, match: "white")
		   and not contains(card.card_color, match: "hybrid")
		   and not contains(card.card_color, match: "multicolor")
		   and not contains(card.card_color, match: "artifact")
		   and not contains(card.card_color, match: "land") then "w"
		else if contains(card.card_color, match: "blue")
		   and not contains(card.card_color, match: "hybrid")
		   and not contains(card.card_color, match: "multicolor")
		   and not contains(card.card_color, match: "artifact")
		   and not contains(card.card_color, match: "land") then "u"
		else if contains(card.card_color, match: "black")
		   and not contains(card.card_color, match: "hybrid")
		   and not contains(card.card_color, match: "multicolor")
		   and not contains(card.card_color, match: "artifact")
		   and not contains(card.card_color, match: "land") then "b"
		else if contains(card.card_color, match: "red")
		   and not contains(card.card_color, match: "hybrid")
		   and not contains(card.card_color, match: "multicolor")
		   and not contains(card.card_color, match: "artifact")
		   and not contains(card.card_color, match: "land") then "r"
		else if contains(card.card_color, match: "green")
		   and not contains(card.card_color, match: "hybrid")
		   and not contains(card.card_color, match: "multicolor")
		   and not contains(card.card_color, match: "artifact")
		   and not contains(card.card_color, match: "land") then "g"
		else "c"
	}
	
	font_colors_white := { input != "w" and input != "c" and input != "a" and input != "l" and input != "m" }
	
	paintbrush_font:= { if contains(card.card_color, match:"land") then "white"
		else if contains(card.card_color, match:"artifact") or contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"white") then "black"
		else "white"
	}

############################################################## Extra style options

styling field:
	type: boolean
	name: grey hybrid name
	description: Use a grey background for the name and type line on hybrid cards. This is done on real cards.
styling field:
	type: boolean
	name: use guild mana symbols
	description: Use the Ravnica guild symbols instead of the official half/half circles for hybrid mana.
	initial: no
styling field:
	type: choice
	name: tap symbol
	description: What tap symbol should be used on cards?
	initial: modern
	choice: modern
	choice: old
	choice: diagonal T
styling field:
	type: choice
	name: font color
	description: What color should the font on cards be?
	initial: automatic
	choice: automatic
	choice: black
	choice: white

styling style:
	use guild mana symbols:
		choice images:
			yes: /magic-mana-small.mse-symbol-font/mana_guild_rg.png
			no:  /magic-mana-small.mse-symbol-font/mana_rg.png
	tap symbol:
		render style: both
		choice images:
			modern:     /magic-mana-large.mse-symbol-font/mana_t.png
			old:        /magic-mana-large.mse-symbol-font/mana_t_old.png
			diagonal T: /magic-mana-large.mse-symbol-font/mana_t_older.png

############################################################## Card fields
card style:
	############################# Background stuff
	border color:
		left: 0
		top : 0
		width:	375
		height:	523
		radius: 18
		left width:   17
		right width:  17
		top width:    17
		bottom width: 18
		mask: bordermask.png
		z index: 2
	card color:
		left:	0
		top:	0
		width:	375
		height:	523
		z index: -2
		render style: image
		popup style: in place
		image: { card_background() }

	############################# Name line
	name:
		left: { if card.card_symbol=="none" then 73 else 88 }
		top : 30
		width: { if card.card_symbol=="none" then 269 else 254 }
		height: 30
		alignment: middle shrink-overflow
		padding bottom: 0
		z index: 2
		font:
			name: Matrix
			size: 18
			color: { font_color(card.card_color) }
	casting cost:
		left: 18
		top: 57
		height: 422
		width: 75
		alignment: top left
		direction: vertical
		symbol font:
			name: magic-mana-future
			size: 22
			scale down to: 22
			alignment: bottom right
		always symbol: true
		mask: costmask.png
		z index: 2
		padding top: 0
	card symbol:
		left: {if card.card_symbol=="none" then 50 else 67}
		top : 35
		height: 20
		width: 14
		z index: 2
		render style: image
		choice images:
			tombstone: tombstone.png

	############################# Image
	image:
		left: 37
		top: 46
		width: 322
		height: 418
		z index: 0
		mask: mask_image.png

	############################# Card type
	type:
		left: 49
		top : 434
		width: { 288 - max(18,card_style.rarity.content_width) }
		height: 28
		alignment: top shrink-overflow
		z index: 1
		padding top: 2
		font:
			name: Matrix
			size: 16
			color: { font_color(card.card_color) }
			separator color: rgb(128,128,128)
	rarity:
		right: 352
		top : 439
		width: 36
		height: 19
		z index: 2
		alignment: middle right
		render style: image
		choice images:
			# Images based on the set symbol
			basic land: script: symbol_variation(symbol: set.symbol, variation: "common")
			common:     script: symbol_variation(symbol: set.symbol, variation: "common")
			uncommon:   script: symbol_variation(symbol: set.symbol, variation: "uncommon")
			rare:       script: symbol_variation(symbol: set.symbol, variation: "rare")
			special:    script: symbol_variation(symbol: set.symbol, variation: "special")

	############################# PT
	pt:
		z index: 4
		left:	287
		top:	468
		width:	60
		height:	28
		alignment: center middle
		font:
			name: Mplantin
			size: 16
			weight: bold
			color: { font_color(card.card_color) }
			separator color: rgb(200,0,0)
	############################# Card sorting / numbering
	############################# Copyright stuff

	illustrator:
		right: { if card.pt != "" then 281 else 341 }
		top : 478
		width: { max(150, card_style.illustrator.content_width) + 5 }
		height: 16
		z index: 2
		alignment: middle right
		font:
			name: MPlantin
			size: 8
			color:
				script:
					if contains(card.card_color, match:"land") then rgb(255,255,255)
					else if contains(card.card_color, match:"artifact") or
					contains(card.card_color, match:"multicolor") or
					contains(card.card_color, match:"white") then rgb(0,0,0)
					else rgb(255,255,255)

	copyright line:
		left: 22
		top : 491
		width: { if card.pt != "" then 260 else 320 }
		height: 12
		z index: 2
		alignment: bottom right
		font:
			name: MPlantin
			size: 7
			color:
				script:
					if contains(card.card_color, match:"land") then rgb(255,255,255)
					else if contains(card.card_color, match:"artifact") or
					contains(card.card_color, match:"multicolor") or
					contains(card.card_color, match:"white") then rgb(0,0,0)
					else rgb(255,255,255)

############################################################## Extra card fields
extra card field:
	type: choice
	name: pt box
	script: card.card_color
	editable: false
extra card field:
	type: choice
	name: type symbol
	choice:
		name: white
		choice: artifact
		choice: creature
		choice: enchantment
		choice: instant
		choice: land
		choice: multitype
		choice: sorcery
	choice:
		name: black
		choice: artifact
		choice: creature
		choice: enchantment
		choice: instant
		choice: land
		choice: multitype
		choice: sorcery
extra card field:
	type: choice
	name: paintbrush
	script: paintbrush_font(value)
	editable: false
	choice: black
	choice: white

extra card style:
	pt box:
		right: 357
		bottom: 505
		width: 78
		height: 51
		z index: 1
		visible: { card.pt != "" }
		render style: image
		image: { card_ptbox() }
		mask: mask_pt.png
	type symbol:
		left: 23
		top: 25
		width: 21
		height: 20
		z index: 2
		render style: image
		choice images:
			white artifact: artifact_white.png
			black artifact: artifact_black.png
			white creature: creature_white.png
			black creature: creature_black.png
			white enchantment: enchantment_white.png
			black enchantment: enchantment_black.png
			white instant: instant_white.png
			black instant: instant_black.png
			white land: land_white.png
			black land: land_black.png
			white multitype: multitype_white.png
			black multitype: multitype_black.png
			white sorcery: sorcery_white.png
			black sorcery: sorcery_black.png
	paintbrush:
		right: { ( if card.pt != "" then 281 else 341 ) - card_style.illustrator.content_width }
		top : 479
		width: 40
		height: 15
		z index: 2
		render style: image
		choice images:
			black: paintbrush.png
			white: paintbrush_w.png
