mse version: 0.3.6
game: D&D
short name: Ander
full name: Ander
icon: card-sample.png
position hint: 001

version: 2008-06-06
depends on: D&D.mse-game                     2008-06-06
depends on: D&D-Ander-symbol.mse-symbol-font 2008-06-04
	
# By Ander, based on work by Randolph

card width: 527
card height: 375
card dpi: 150

############################################################## Extra scripts
init script:
	card_background := {
		colors :=
			if chosen(choice:"Green") then "green"
			else if chosen(choice:"Red") then "red"
			else if chosen(choice:"Black") then "black"
			else if chosen(choice:"Orange") then "orange"
			else if chosen(choice:"Orange2") then "orange_2"
			else if chosen(choice:"Orange3") then "orange_3"
			else if chosen(choice:"Orange4") then "orange_4"
			else if chosen(choice:"Blue") then "blue"
			else if chosen(choice:"Grey") then "grey"
			else if chosen(choice:"Silver") then "silver"
			else if chosen(choice:"Gold") then "gold"
			else if chosen(choice:"Iron") then "iron"
			else "empty"
		card_look := 
			if styling.look == "plain" and colors != "empty" then "2"
			else ""
		"card" + colors + card_look + ".png"
	}
	color_dot_filter :=
		replace_rule(
			match: "\\*",
			replace: { if styling.border_font_color == "Black" then "<sym>$</sym>" else "<sym>@</sym>" } )
############################################################## Extra style options
styling field:
	type: choice
	name: border font color
	initial: White
	choice: Black
	choice: White
styling field:
	type: choice
	name: look
	initial: default
	choice: default
	choice: plain
	description: Set the card style.
styling field:
	type: choice
	name: text size
	initial: normal
	choice: normal
	choice: small
	choice: smaller
	choice: tiny
	choice: diminutive
	description: Set the size of the rules text font.
styling field:
	type: choice
	name: flavor text size
	initial: small
	choice: normal
	choice: small
	choice: smaller
	choice: tiny
	choice: diminutive
	description: Set the size of the flavor text font.
styling field:
	type: choice
	name: name size
	initial: normal
	choice: normal
	choice: small
	choice: smaller
	choice: tiny
	choice: diminutive
	description: Set the size of the name font.
styling field:
	type: choice
	name: descriptors size
	initial: normal
	choice: normal
	choice: small
	choice: smaller
	choice: tiny
	choice: diminutive
	description: Set the size of the descriptor (Daily, Martial, etc.) font.
############################################################## Card fields
card style:
	background:
		left:	0
		top:	0
		width:	527
		height:	375
		z index: 0
		render style: image
		popup style: in place
		image: { card_background() }
	level:
		z index: 5
	type:
		left: 70
		top : 40
		width: 386
		height: 20
		alignment: top center shrink-overflow
		z index: 1
		font:
			name: Arial
			size: 12
			color:
				script:
					if styling.border_font_color == "Black" then rgb(0,0,0)
					else rgb(255,255,255)
	range icon:
		left: 454
		top: 0
		height: 73
		width: 73
		alignment: middle center
		symbol font:
			name: D&D-Ander-symbol
			size: 73
		always symbol: true
		z index: 2
	action icon:
		left: 0
		top: 0
		height: 73
		width: 73
		alignment: middle center
		symbol font:
			name: D&D-Ander-symbol
			size: 73
		always symbol: true
		z index: 2		
	name:
		left: 70
		top : 12
		width: 386
		height: 26
		alignment: middle center
		padding bottom: 0
		z index: 1
		font:
			name: Arial
			weight: bold
			size:
				script:
					if styling.name_size == "small" then 18
					else if styling.name_size == "smaller" then 16
					else if styling.name_size == "tiny" then 14
					else if styling.name_size == "diminutive" then 12
					else 20
			color:
				script:
					if styling.border_font_color == "Black" then rgb(0,0,0)
					else rgb(255,255,255)
	rule text:
		left: {if card.attack != "" or card.box_label2 != "" or card.box_label5 != "" then "16" else "16"}
		top : 98
		width:{if card.attack != "" or card.box_label2 != "" or card.box_label5 != "" then "350" else "491"}
		height: 240
		font:
			name: Arial
			#size: 12
			size:
				script:
					if styling.text_size == "small" then 11
					else if styling.text_size == "smaller" then 10
					else if styling.text_size == "tiny" then 9
					else if styling.text_size == "diminutive" then 8
					else 12
			color: rgb(0,0,0)
		symbol font:
			name: D&D-Ander-symbol
			size: 12
		alignment: top left
		z index: 2
	flavor text:
		left: {if card.box_label3 != "" or card.box_label4 != "" then "16" else "16"}
		top: 280
		width: {if card.box_label3 != "" or card.box_label4 != "" then "350" else "491"}
		height: 82
		font:
			name: Arial
			#size: 11
			size:
				script:
					if styling.flavor_text_size == "small" then 11
					else if styling.flavor_text_size == "smaller" then 10
					else if styling.flavor_text_size == "tiny" then 9
					else if styling.flavor_text_size == "diminutive" then 8
					else 12
			color: rgb(99,99,99)
		alignment: bottom center
		z index: 3
	descriptors:
		left: 16
		top : 75
		width: 495
		height: 20
		font:
			name: Arial
			weight: bold
			size:
				script:
					if styling.descriptors_size == "small" then 11
					else if styling.descriptors_size == "smaller" then 10
					else if styling.descriptors_size == "tiny" then 9
					else if styling.descriptors_size == "diminutive" then 8
					else 12
			color: rgb(0,0,0)
		symbol font:
			name: D&D-Ander-symbol
			size: 12
		alignment: middle left
		z index: 2
	frequency:
		z index: 2
	flags:
		z index: 2
	attack:
		left: 381
		top : 100
		width: 130
		height: 14
		alignment: middle center
		font:
			name: Arial
			weight: bold
			size: 12
			color: rgb(0,0,0)
		symbol font:
			name: D&D-Ander-symbol
			size: 12
		z index: 3
	box_label2:
		left: 381
		top : 190
		width: 130
		height: 14
		alignment: middle center
		font:
			name: Arial
			weight: bold
			size: 12
			color: rgb(0,0,0)
		symbol font:
			name: D&D-Ander-symbol
			size: 12
		z index: 3	
	box_label5:
		left: 381
		top : 173
		width: 130
		height: 14
		alignment: middle center
		font:
			name: Arial
			weight: bold
			size: 12
			color: rgb(0,0,0)
		symbol font:
			name: D&D-Ander-symbol
			size: 12
		z index: 3
	box_label3:
		left: 381
		top : 280
		width: 130
		height: 14
		alignment: middle center
		font:
			name: Arial
			weight: bold
			size: 12
			color: rgb(0,0,0)
		symbol font:
			name: D&D-Ander-symbol
			size: 12
		z index: 3	
	box_label4:
		left: 381
		top : 263
		width: 130
		height: 14
		alignment: middle center
		font:
			name: Arial
			weight: bold
			size: 12
			color: rgb(0,0,0)
		symbol font:
			name: D&D-Ander-symbol
			size: 12
		z index: 3		
extra card field:
	type: choice
	name: range box
	script: 1
	editable: false
extra card field:
	type: choice
	name: attack box
	script: 1
	editable: false
extra card field:
	type: choice
	name: box1
	script: 1
	editable: false	
extra card field:
	type: choice
	name: box2
	script: 1
	editable: false	
extra card field:
	type: choice
	name: box3
	script: 1
	editable: false
extra card field:
	type: choice
	name: box4
	script: 1
	editable: false
extra card field:
	type: choice
	name: box5
	script: 1
	editable: false	
extra card style:
	box1:
		left: 381
		top : 115
		width: 130
		height: 57
		z index: 3
		visible: { card.attack != "" }
		render style: image
		image: box1.png
	box2:
		left: 381
		top : 205
		width: 130
		height: 57
		z index: 3
		visible: { card.box_label2 != "" }
		render style: image
		image: box1.png
	box5:
		left: 381
		top : 188
		width: 130
		height: 90
		z index: 3
		visible: { card.box_label5 != "" }
		render style: image
		image: box2.png
	box3:
		left: 381
		top : 295
		width: 130
		height: 57
		z index: 3
		visible: { card.box_label3 != "" }
		render style: image
		image: box1.png
	box4:
		left: 381
		top : 278
		width: 130
		height: 90
		z index: 3
		visible: { card.box_label4 != "" }
		render style: image
		image: box3.png