﻿mse version: 0.3.6
short name: DC
full name: DC
installer group: DC/Game Files
icon: icon.png
position hint: 13

version: 2008-5-19

#By: Zaratustra
#Updated by: Zuty
############################################################## Functions & filters
## Copied and Pasted from vs.mse-game, with a few modifications
# General functions
init script:
	text_filter := 
		# step 1 : remove all automatic tags
		tag_remove_rule(tag: "<sym-auto>") +
		tag_remove_rule(tag: "<i-auto>")   +
		replace_rule(
			match: "~|~THIS~|CARDNAME",
			in_context: "(^|[[:space:]]|\\()<match>",
			replace: "<atom-cardname></atom-cardname>"
			) +
		replace_rule(
			match:"Action:",
			replace: "<atom><b-auto>&</b-auto></atom>"
			)+
		# step 2 : fill in atom fields
		tag_contents_rule(
			tag: "<atom-cardname>",
			contents: { if card.name=="" then "CARDNAME" else card.name }
			)
	
	# Determine type of card
	card_type := {
		if      card.super_type == "superhero"   then "superhero"
		else if card.super_type == "Superhero"   then "superhero"
		else if card.super_type == "hero"    then "hero"
		else if card.super_type == "Hero"    then "hero"
		else if card.super_type == "superpower"	then "superpower"
		else if card.super_type == "Superpower"	then "superpower"
		else if card.super_type == "villain"	then "villain"
		else if card.super_type == "Villain"	then "villain"
		else if card.super_type == "supervillain"	then "supervillain"
		else if card.super_type == "Supervillain"	then "supervillain"
		else if card.super_type == "equipment"	then "equipment"
		else if card.super_type == "Equipment"	then "equipment"
		else if card.super_type == "location"	then "location"
		else if card.super_type == "Location"	then "location"
		else if card.super_type == "Starter"	then "starter"
		else if card.super_type == "starter"	then "starter"
		else if card.super_type == "weakness"	then "weakness"
		else if card.super_type == "Weakness"	then "weakness"
		else                                     "superhero"
	}
	
	separator_script := {
		if card.sub_type == "" then ""
		else " - "
	}
	
############################################################## Set fields
set field:
	type: text
	name: title
	description: This information will not appear on the card.
set field:
	type: text
	name: code
	description: Recommended only 3 Capital digits. Will appear before card number. ex: LOB-XX101
set field:
	type: text
	name: language
	description: Recommended 2 - 3 Captital digits. Will appear before the card number, after the code. ex: XXX-EN101
set field:
	type: text
	name: description
	multi line: true
	description: This information will not appear on the card.
set field:
	type: text
	name: edition
	description: Editting this will set 1 edition for all the cards and will appear in the edition bar below the picture. ex-> LIMITED EDITION
set field:
	type: text
	name: cost
	description: Cost of the card.
set field:
	type: text
	name: designer
	description: Designer(s) of the set.
set field:
	type: text
	name: date
	description: Date
set field:
	type: text
	name: players
	description: Players
set field:
	type: boolean
	name: Extended Card Info
	initial: no
	description: Show set code and set language with card number
############################################################## Card fields
############################# Background stuff
card field:
	type: choice
	name: card type
	choice: superhero
	choice: hero
	choice: supervillain
	choice: villain
	choice: equipment
	choice: location
	choice: superpower
	choice: starter
	choice: weakness
	default: card_type()
############################# Name line
card field:
	type: text
	name: name
	identifying: true
	show statistics: false
	card list visible: true
	card list name: Name
	card list column: 1
	card list width: 150
	description: The name of the card
card field:
	type: choice
	name: order
	choice: blank
	choice: Ongoing
card field:
	type: text
	name: super type
	editable: false
card field:
	type: text
	name: sub type
card field:
	type: text
	name: type
	script:
		# Either just supertype, or subtype - supertype
		combined_editor(
			field1: card.super_type,
			separator: " — ",
			field2: card.sub_type,
			grey_until_needed: true,
			hide_when_both_empty: true,
			type_over1: " -",
			type_over2: "-"
		)
	card list visible: true
	card list name: Type
	card list column: 3
	card list width: 150
	description: The type of this card, type - to go the sub type
card field:
	type: choice
	name: card symbol
	choice: blank
	choice: DC
	choice: Marvel
	choice: SHIELD
	choice: Suicide Squad
	choice: HYDRA
	choice: Injustice League
	choice: HIVE
	choice: Brotherhood of Mutants
	choice: Avengers
	choice: Justice League of America
	choice: XMen
	choice: Teen Titans
	choice: Images
############################# Image
card field:
	type: image
	name: image
	show statistics: false
############################# Text box
card field:
	type: text
	name: text
	multi line: true
	save value: true
	show statistics: false
############################# Cost Field
card field:
	type: text
	name: legal
card field:
	type: text
	name: honor
card field:
	type: text
	name: cost
card list color script:
	input := card.card_type
	if      input == "action" then rgb(255,0,0)
	else if input == "thing"  then rgb(0,0,255)
	else if input == "rule" then rgb(0,0,0)
	else rgb(0,0,0)
############################# Keywords
has keywords: false
