function checkAttribute(att) {
	if (this.attributes.indexOf(att)==-1)
		return false;
	else
		return true;
}
function renderCard() {
	frameType="";
	
	if (this.type=="Action - Duration")
		frameType="duration";
	else if (this.type=="Action - Reaction")
		frameType="reaction";
	else if (this.type=="Victory")
		frameType="victory";
	else if (this.type=="Treasure")
		frameType="treasure";
	else if (this.type=="Action - Victory")
		frameType="actionVictory";
	else if (this.type=="Treasure - Victory")
		frameType="treasureVictory";
	else 
		frameType="action";
	
	toReturn="<div class='"+frameType+"Frame'>";
		toReturn+="<span class='title'><center>"+this.name+"</center></span>";
		toReturn+="<span class='set'>Set: "+this.set+"</span>";
		toReturn+="<span class='clear'></span>";
		

		if (this.pcard!="")
			toReturn+="<span class='pcard'>+"+this.pcard+" card(s)</span>";
		if (this.paction!="")
			toReturn+="<span class='paction'>+"+this.paction+" action(s)</span>";
		if (this.pbuy!="")
			toReturn+="<span class='pbuy'>+"+this.pbuy+" buy(s)</span>";
		if (this.pcoin!="")
			toReturn+="<span class='pcoin'>+"+this.pcoin+" [treasure]</span>";

		if (this.text!="")
			toReturn+="<span class='text'><p>"+this.text+"</p></span>";

		if (this.treasure!="")
			toReturn+="<span class='treasure'>"+this.treasure+" [treasure]</span>";
		if (this.victory!="")
			toReturn+="<span class='victory'>"+this.victory+" [VP]</span>";
		
		toReturn+="<span class='cost'>Cost: "+this.cost+"</span>";
		toReturn+="<span class='clearDisplayLink'><a href='javascript:clearDisplay()'>X</a></span>";
		toReturn+="<span class='type'><center>"+this.type+"</center></span>";
	toReturn+="</div>"
	
	return toReturn;
}
function Card(a, b, c, d, e, f, g, h, i, j, k, l) {
	this.name=a
	this.set=b
	this.type=c
	this.cost=d
	this.attributes=e
	this.treasure=f
	this.victory=g
	this.pcard=h
	this.paction=i
	this.pbuy=j
	this.pcoin=k
	this.text=l
	this.toHTML=renderCard;
	this.is=checkAttribute;
	this.nameWithSet=this.name+" ("+setAbbreviations[this.set]+")";
}

setAbbreviations=new Array();
setAbbreviations["Alchemy"]="A";
setAbbreviations["Base"]="B";
setAbbreviations["Intrigue"]="I";
setAbbreviations["Promo"]="+";
setAbbreviations["Prosperity"]="P";
setAbbreviations["Seaside"]="S";

cards=new Array();
//Base set
cards[cards.length]=new Card("Adventurer", "Base", "Action", "6[treasure]", "", "", "", "", "", "", "", "Reveal cards from your deck until you reveal 2 Treasure cards. Put those Treasure cards in your hand and discard the other revealed cards.");
cards[cards.length]=new Card("Bureaucrat", "Base", "Action - Attack", "4[treasure]", "Attack", "", "", "", "", "", "", "Gain a silver card; put it on top of your deck. Each other player reveals a Victory card from his hand and puts it on his deck (or reveals a hand with no Victory cards).");
cards[cards.length]=new Card("Cellar", "Base", "Action", "2[treasure]", "", "", "", "", "1", "", "", "Discard any number of cards. +1 Card per card discarded.");
cards[cards.length]=new Card("Chancellor", "Base", "Action", "3[treasure]", "", "", "", "", "", "", "2", "You may immediately put your deck into your discard pile.");
cards[cards.length]=new Card("Chapel", "Base", "Action", "2[treasure]", "", "", "", "", "", "", "", "Trash up to 4 cards from your hand.");
cards[cards.length]=new Card("Council Room", "Base", "Action", "5[treasure]", "Buy", "", "", "4", "", "1", "", "Each other player draws a card.");
cards[cards.length]=new Card("Feast", "Base", "Action", "4[treasure]", "", "", "", "", "", "", "", "Trash this card. Gain a card costing up to 5[treasure].");
cards[cards.length]=new Card("Festival", "Base", "Action", "5[treasure]", "Buy, Combo", "", "", "", "2", "1", "2", "");
cards[cards.length]=new Card("Gardens", "Base", "Victory", "4[treasure]", "", "", "?", "", "", "", "", "Worth 1[VP] for every 10 cards in your deck (rounded down).");
cards[cards.length]=new Card("Laboratory", "Base", "Action", "5[treasure]", "", "", "", "2", "1", "", "", "");
cards[cards.length]=new Card("Library", "Base", "Action", "5[treasure]", "", "", "", "", "", "", "", "Draw until you have 7 cards in hand. You may set aside any Action cards drawn this way, as you draw them; discard the set aside cards after you finish drawing.");
cards[cards.length]=new Card("Market", "Base", "Action", "5[treasure]", "Buy", "", "", "1", "1", "1", "1", "");
cards[cards.length]=new Card("Militia", "Base", "Action - Attack", "4[treasure]", "Attack", "", "", "", "", "", "2", "Each other player discards down to 3 cards in his hand.");
cards[cards.length]=new Card("Mine", "Base", "Action", "5[treasure]", "", "", "", "", "", "", "", "Trash a Treasure card from your hand. Gain a Treasure card costing up to 3[treasure] more; put it into your hand.");
cards[cards.length]=new Card("Moat", "Base", "Action - Reaction", "2[treasure]", "Reaction", "", "", "2", "", "", "", "When another player plays an Attack card, you may reveal this from your hand. If you do, you are unaffected by that Attack.");
cards[cards.length]=new Card("Moneylender", "Base", "Action", "4[treasure]", "", "", "", "", "", "", "", "Trash a Copper from your hand. If you do, +3[treasure].");
cards[cards.length]=new Card("Remodel", "Base", "Action", "4[treasure]", "", "", "", "", "", "", "", "Trash a card from your hand. Gain a card costing up to 2[treasure] more than the trashed card.");
cards[cards.length]=new Card("Smithy", "Base", "Action", "4[treasure]", "", "", "", "3", "", "", "", "");
cards[cards.length]=new Card("Spy", "Base", "Action - Attack", "4[treasure]", "Attack", "", "", "1", "1", "", "", "Each player (including you) reveals the top card of his deck and either discards it or puts it back, your chouce.");
cards[cards.length]=new Card("Thief", "Base", "Action - Attack", "4[treasure]", "Attack", "", "", "", "", "", "", "Each other player reveals the top 2 cards of his deck. If they revealed any Treasure cards, they trash one of them that you choose. You may gain any or all of these trashed cards. They discard the other revealed cards.");
cards[cards.length]=new Card("Throne Room", "Base", "Action", "4[treasure]", "Combo", "", "", "", "", "", "", "Choose an Action card in your hand. Play it twice.");
cards[cards.length]=new Card("Village", "Base", "Action", "3[treasure]", "Combo", "", "", "1", "2", "", "", "");
cards[cards.length]=new Card("Witch", "Base", "Action - Attack", "5[treasure]", "Attack, Curse", "", "", "2", "", "", "", "Each other player gains a Curse card.");
cards[cards.length]=new Card("Woodcutter", "Base", "Action", "3[treasure]", "Buy", "", "", "", "", "1", "2", "");
cards[cards.length]=new Card("Workshop", "Base", "Action", "3[treasure]", "Buy", "", "", "", "", "", "", "Gain a card costing up to 4[treasure].");

//Intrigue
cards[cards.length]=new Card("Baron", "Intrigue", "Action", "4[treasure]", "Buy", "", "", "", "", "1", "", "You may discard an Estate card. If you do, +4[treasure]. Otherwise, gain an Estate card.");
cards[cards.length]=new Card("Bridge", "Intrigue", "Action", "4[treasure]", "Buy", "", "", "", "", "1", "1", "All cards (including cards in players' hands) cost 1[treasure] less this turn, but not less than 0[treasure].");
cards[cards.length]=new Card("Conspirator", "Intrigue", "Action", "4[treasure]", "", "", "", "", "", "", "2", "If you've played 3 or more Actions this turn (counting this): +1 Card, +1 Action.");
cards[cards.length]=new Card("Coppersmith", "Intrigue", "Action", "4[treasure]", "", "", "", "", "", "", "", "Copper produces an extra 1[treasure] this turn.");
cards[cards.length]=new Card("Courtyard", "Intrigue", "Action", "2[treasure]", "", "", "", "3", "", "", "", "Put a card from your hand on top of your deck.");
cards[cards.length]=new Card("Duke", "Intrigue", "Victory", "5[treasure]", "", "", "?", "", "", "", "", "Worth 1[VP] per Duchy card in your deck.");
cards[cards.length]=new Card("Great Hall", "Intrigue", "Action - Victory", "3[treasure]", "Hybrid", "", "1", "1", "1", "", "", "");
cards[cards.length]=new Card("Harem", "Intrigue", "Treasure - Victory", "6[treasure]", "Hybrid", "2", "2", "", "", "", "", "");
cards[cards.length]=new Card("Ironworks", "Intrigue", "Action", "4[treasure]", "Buy", "", "", "", "", "", "", "Gain a card costing up to 4[treasure]. If it iss an... Action card, +1 Action; Treasure card, +1; Victory card, +1 Card.");
cards[cards.length]=new Card("Masquerade", "Intrigue", "Action", "3[treasure]", "", "", "", "2", "", "", "", "Each player passes a card in their hand to the player on their left. You may trash a card from your hand.");
cards[cards.length]=new Card("Mining Village", "Intrigue", "Action", "4[treasure]", "Combo", "", "", "1", "2", "", "", "You may trash this card immediately. If you do, +2[treasure]");
cards[cards.length]=new Card("Minion", "Intrigue", "Action - Attack", "5[treasure]", "Attack", "", "", "", "1", "", "", "Choose one: +2[treasure]; or discard your hand, +4 Cards, and each other player with at least 5 cards in hand discards his hand and draws 4 cards.");
cards[cards.length]=new Card("Nobles", "Intrigue", "Action - Victory", "6[treasure]", "Hybrid", "", "2", "", "", "", "", "Choose one: +3 Cards, or +2 Actions.");
cards[cards.length]=new Card("Pawn", "Intrigue", "Action", "2[treasure]", "", "", "", "", "", "", "", "Choose two: +1 Card, +1 Action, +1 Buy, +1[treasure]. (The choices must be different.)");
cards[cards.length]=new Card("Saboteur", "Intrigue", "Action - Attack", "5[treasure]", "Attack", "", "", "", "", "", "", "Each other player reveals cards from the top of his deck until revealing one costing 3[treasure] or more. He trashes that card and may gain a card costing at most 2[treasure] less than it. He discards the other revealed cards.");
cards[cards.length]=new Card("Scout", "Intrigue", "Action", "4[treasure]", "", "", "", "", "1", "", "", "Reveal the top 4 cards of your deck. Put the revealed Victory cards into your hand. Put the other cards on top of your deck in any order.");
cards[cards.length]=new Card("Secret Chamber", "Intrigue", "Action - Reaction", "2[treasure]", "Reaction", "", "", "", "", "", "", "Discard any number of cards. +1[treasure] per card discarded. - When another player plays an Attack card, you may reveal this from your hand. If you do, +2 cards, then put 2 cards from your hand on top of your deck.");
cards[cards.length]=new Card("Shanty Town", "Intrigue", "Action", "3[treasure]", "Combo", "", "", "", "2", "", "", "Reveal your hand. If you have no Action cards in hand, +2 Cards.");
cards[cards.length]=new Card("Steward", "Intrigue", "Action", "3[treasure]", "", "", "", "", "", "", "", "Choose one: +2 Cards; or +2; or trash 2 cards from your hand.");
cards[cards.length]=new Card("Swindler", "Intrigue", "Action - Attack", "3[treasure]", "Attack, Curse", "", "", "", "", "", "2", "Each other player trashes the top card of his deck and gains a card with the same cost that you choose.");
cards[cards.length]=new Card("Torturer", "Intrigue", "Action - Attack", "5[treasure]", "Attack, Curse", "", "", "3", "", "", "", "Each other player chooses one: he discards 2 cards; or he gains a Curse card, putting it in his hand.");
cards[cards.length]=new Card("Trading Post", "Intrigue", "Action", "5[treasure]", "", "", "", "", "", "", "", "Trash 2 cards from your hand. If you do, gain a silver card; put it into your hand.");
cards[cards.length]=new Card("Tribute", "Intrigue", "Action", "5[treasure]", "", "", "", "", "", "", "", "The player to your left reveals then discards the top 2 cards of his deck. For each differently named card revealed, if it is an... Action Card, +2 Actions; Treasure Card, +2[treasure]; Victory Card, +2 Cards.");
cards[cards.length]=new Card("Upgrade", "Intrigue", "Action", "5[treasure]", "", "", "", "1", "1", "", "", "Trash a card from your hand. Gain a card costing exactly 1[treasure] more than it.");
cards[cards.length]=new Card("Wishing Well", "Intrigue", "Action", "3[treasure]", "", "", "", "1", "1", "", "", "Name a card, then reveal the top card of your deck. If it is the named card, put it in your hand.");

//Seaside
cards[cards.length]=new Card("Ambassador", "Seaside", "Action", "3[treasure]", "", "", "", "", "", "", "", "Reveal a card from your hand. Return up to 2 copies of it from your hand to the Supply. Then each other player gains a copy of it.");
cards[cards.length]=new Card("Bazaar", "Seaside", "Action", "5[treasure]", "Combo", "", "", "1", "2", "", "1", "");
cards[cards.length]=new Card("Caravan", "Seaside", "Action - Duration", "4[treasure]", "Duration", "", "", "1", "1", "", "", "At the start of your next turn, +1 Card.");
cards[cards.length]=new Card("Cutpurse", "Seaside", "Action - Attack", "4[treasure]", "Attack", "", "", "", "", "", "2", "Each other player discards a Copper card (or reveals a hand with no Copper).");
cards[cards.length]=new Card("Embargo", "Seaside", "Action", "2[treasure]", "", "", "", "", "", "", "2", "Trash this card. Put an Embargo token on top of a Supply pile. - When a player buys a card, he gains a Curse card per Embargo token on that pile.");
cards[cards.length]=new Card("Explorer", "Seaside", "Action", "5[treasure]", "Buy", "", "", "", "", "", "", "You may reveal a Province card from your hand. If you do, gain a Gold card, putting it into your hand. Otherwise, gain a Silver card, putting it into your hand.");
cards[cards.length]=new Card("Fishing Village", "Seaside", "Action - Duration", "3[treasure]", "Combo, Duration", "", "", "", "2", "", "1", "At the start of your next turn: +1 Action, +1[treasure].");
cards[cards.length]=new Card("Ghost Ship", "Seaside", "Action - Attack", "5[treasure]", "Attack", "", "", "2", "", "", "", "Each other player with 4 or more cards in hand puts cards from his hand on top of his deck until he has 3 cards in his hand.");
cards[cards.length]=new Card("Haven", "Seaside", "Action - Duration", "2[treasure]", "Duration", "", "", "1", "1", "", "", "Set aside a card from your hand face down. At the start of your next turn, put it into your hand.");
cards[cards.length]=new Card("Island", "Seaside", "Action - Victory", "4[treasure]", "Hybrid", "", "2", "", "", "", "", "Set aside this and another card from your hand. Return them to your deck at the end of the game.");
cards[cards.length]=new Card("Lighthouse", "Seaside", "Action - Duration", "2[treasure]", "Duration, Reaction", "", "", "", "1", "", "", "Now and at the start of your next turn: +1[treasure]. - While this is in play, when another player plays an Attack card, it doesn't affect you.");
cards[cards.length]=new Card("Lookout", "Seaside", "Action", "3[treasure]", "", "", "", "", "1", "", "", "Look at the top 3 cards of your deck. Trash one of them. Discard one of them. Put the other one on top of your deck.");
cards[cards.length]=new Card("Merchant Ship", "Seaside", "Action - Duration", "5[treasure]", "Duration", "", "", "", "", "", "", "Now and at the start of your next turn: +2[treasure]");
cards[cards.length]=new Card("Native Village", "Seaside", "Action", "2[treasure]", "Combo", "", "", "", "2", "", "", "Choose one: Set aside the top card of your deck face down on your Native Village mat; or put all the cards from your mat into your hand.");
cards[cards.length]=new Card("Navigator", "Seaside", "Action", "4[treasure]", "", "", "", "", "", "", "2", "Look at the top 5 cards of your deck. Either discard all of them, or put them back on top of your deck in any order.");
cards[cards.length]=new Card("Outpost", "Seaside", "Action - Duration", "5[treasure]", "Duration", "", "", "", "", "", "", "You only draw 3 cards (instead of 5) in this turn's Clean-up phase. Take an extra turn after this one. This can't cause you to take more than two consecutive turns.");
cards[cards.length]=new Card("Pearl Diver", "Seaside", "Action", "2[treasure]", "", "", "", "1", "1", "", "", "Look at the bottom card of your deck. You may put it on top.");
cards[cards.length]=new Card("Pirate Ship", "Seaside", "Action - Attack", "4[treasure]", "Attack", "", "", "", "", "", "", "Choose one: Each other player reveals the top 2 cards of his deck, trashes a revealed Treasure that you choose, discards the rest, and if anyone trashed a Treasure you take a Coin token; or, +1[treasure] per Coin token you've taken with Pirate Ships this game.");
cards[cards.length]=new Card("Salvager", "Seaside", "Action", "4[treasure]", "Buy", "", "", "", "", "1", "", "Trash a card from your hand. +Coins equal to its cost.");
cards[cards.length]=new Card("Sea Hag", "Seaside", "Action - Attack", "4[treasure]", "Attack, Curse", "", "", "", "", "", "", "Each other player discards the top card of his deck, then gains a Curse card, putting it on top of his deck.");
cards[cards.length]=new Card("Smugglers", "Seaside", "Action", "3[treasure]", "Buy", "", "", "", "", "", "", "Gain a copy of a card costing up to 6 Coins that the player to your right gained on his last turn.");
cards[cards.length]=new Card("Tactician", "Seaside", "Action - Duration", "5[treasure]", "Duration", "", "", "", "", "", "", "Discard your hand. If you discarded any cards this way, then at the start of your next turn, +5 Cards, +1 Buy, and +1 Action.");
cards[cards.length]=new Card("Treasure Map", "Seaside", "Action", "4[treasure]", "", "", "", "", "", "", "", "Trash this and another copy of Treasure Map from your hand. If you do trash two Treasure Maps, gain 4 Gold cards, putting them on top of your deck.");
cards[cards.length]=new Card("Treasury", "Seaside", "Action", "5[treasure]", "", "", "", "1", "1", "", "1", "When you discard this from play, if you didn't buy a Victory card this turn, you may put this on top of your deck.");
cards[cards.length]=new Card("Warehouse", "Seaside", "Action", "3[treasure]", "", "", "", "3", "1", "", "", "Discard 3 cards.");
cards[cards.length]=new Card("Wharf", "Seaside", "Action - Duration", "5[treasure]", "Buy, Duration", "", "", "", "", "", "", "Now and at the start of your next turn: +2 Cards, +1 Buy");

//Alchemy
cards[cards.length]=new Card("Alchemist", "Alchemy", "Action", "1[potion]3[treasure]", "Potion", "", "", "2", "1", "", "", "When you discard this from play, you may put this on top of your deck if you have a Potion in play.");
cards[cards.length]=new Card("Apothecary", "Alchemy", "Action", "1[potion]2[treasure]", "Potion", "", "", "1", "1", "", "", "Reveal the top 4 cards of your deck. Put the revealed Coppers and Potions into your hand. Put the other cards back on top of your deck in any order.");
cards[cards.length]=new Card("Apprentice", "Alchemy", "Action", "5[treasure]", "", "", "", "", "1", "", "", "Trash a card from your hand. Plus 1 Card per Coin it costs. +2 Cards if it has a Potion in its cost.");
cards[cards.length]=new Card("Familiar", "Alchemy", "Action - Attack", "1[potion]3[treasure]", "Attack, Curse, Potion", "", "", "1", "1", "", "", "Each other player gains a Curse.");
cards[cards.length]=new Card("Golem", "Alchemy", "Action", "1[potion]4[treasure]", "Combo", "", "", "", "", "", "", "Reveal cards from your deck until you reveal 2 Action cards other than a Golem card. Discard the other cards, then play the Action cards in either order.");
cards[cards.length]=new Card("Herbalist", "Alchemy", "Action", "2[treasure]", "Buy", "", "", "", "", "1", "1", "When you discard this from play, you may put one of your Treasures from play on top of your deck.");
cards[cards.length]=new Card("Philosopher's Stone", "Alchemy", "Treasure", "1[potion]3[treasure]", "Potion", "", "", "", "", "", "", "When you play this, count your deck and discard pile. Worth 1 Coin per 5 Cards total between them (rounded down).");
cards[cards.length]=new Card("Possession", "Alchemy", "Action", "1[potion]6[treasure]", "Potion", "", "", "", "", "", "", "The player to your left takes an extra turn after this one, in which you can see all cards he can and make all decisions for him. Any card he would gain on that turn, you gain instead; any cards of his that are trashed are set aside and returned to his discard pile at the end of turn.");
cards[cards.length]=new Card("Scrying Pool", "Alchemy", "Action - Attack", "1[potion]2[treasure]", "Attack, Potion", "", "", "", "1", "", "", "Each player (including you) reveals the top card of his deck and either discards it or puts it back, your choice. Then reveal cards from the top of your deck until you reveal one that is not an Action. Put all of your revealed cards into your hand.");
cards[cards.length]=new Card("Transmute", "Alchemy", "Action", "1[potion]", "Potion", "", "", "", "", "", "", "Trash a card from your hand. If it is an. . . Action card, gain a Duchy; Treasure card, gain a Transmute; Victory card, gain a Gold.");
cards[cards.length]=new Card("University", "Alchemy", "Action", "1[potion]2[treasure]", "Buy, Combo, Potion", "", "", "", "2", "", "", "You may gain an Action card costing up to 5 Coins.");
cards[cards.length]=new Card("Vineyard", "Alchemy", "Victory", "1[potion]", "Potion", "", "", "", "", "", "", "Worth 1 [VP] for every three Action cards in your deck (rounded down).");

//Prosperity
cards[cards.length]=new Card("Loan", "Prosperity", "Treasure", "3[treasure]", "", "1", "", "", "", "", "", "When you play this, reveal cards from your deck until you reveal a Treasure. Discard it or trash it. Discard the other cards.");
cards[cards.length]=new Card("Trade Route", "Prosperity", "Action", "3[treasure]", "Buy", "", "", "", "", "1", "", "+1[treasure] per token on the Trade Route map.<br>Trash a card from your hand.<hr>Setup: Put a token on each Victory card Supply pile. When a card is gained from that pile, move the token to the Trade Route mat.");
cards[cards.length]=new Card("Watchtower", "Prosperity", "Action - Reaction", "2[treasure]", "Reaction", "", "", "", "", "", "", "Draw until you have 6 cards in hand.<hr>When you gain a card, you may reveal this from your hand. If you do, either trash that card, or put it on top of your deck.");
cards[cards.length]=new Card("Bishop", "Prosperity", "Action", "4[treasure]", "", "", "", "", "", "", "1", "+1[VP]<br>Trash a card from your hand. +[VP] equal to half its cost in coins, rounded down.<br>Each other player may trash a card from his hand.");
cards[cards.length]=new Card("Monument", "Prosperity", "Action", "4[treasure]", "", "", "", "", "", "", "2", "+1[VP]");
cards[cards.length]=new Card("Quarry", "Prosperity", "Treasure", "4[treasure]", "", "1", "", "", "", "", "", "While this is in play, Action cards cost $2 less, but not less than $0.");
cards[cards.length]=new Card("Talisman", "Prosperity", "Treasure", "4[treasure]", "", "1", "", "", "", "", "", "While this is in play, when you buy a card costing $4 or less that is not a Victory card, gain a copy of it.");
cards[cards.length]=new Card("Worker's Village", "Prosperity", "Action", "4[treasure]", "Buy, Combo", "", "", "1", "2", "1", "", "");
cards[cards.length]=new Card("City", "Prosperity", "Action", "5[treasure]", "Combo", "", "", "", "2", "", "", "If there are one or more empty Supply piles, +1 Card. If there are two or more, +1[treasure] and +1 Buy.");
cards[cards.length]=new Card("Contraband", "Prosperity", "Treasure", "5[treasure]", "Buy", "3", "", "", "", "1", "", "When you play this, the player to your left names a card. You can't buy that card this turn.");
cards[cards.length]=new Card("Counting House", "Prosperity", "Action", "5[treasure]", "", "", "", "", "", "", "", "Look through your discard pile, reveal any number of Copper cards from it, and put them into your hand.");
cards[cards.length]=new Card("Mint", "Prosperity", "Action", "5[treasure]", "", "", "", "", "", "", "", "You may reveal a Treasure card from your hand. Gain a copy of it.<hr>When you buy this, trash all Treasures you have in play.");
cards[cards.length]=new Card("Mountebank", "Prosperity", "Action - Attack", "5[treasure]", "Attack", "", "", "", "", "", "2", "Each other player may discard a Curse. If he doesn't, he gains a Curse and a Copper.");
cards[cards.length]=new Card("Rabble", "Prosperity", "Action - Attack", "5[treasure]", "Attack", "", "", "3", "", "", "", "Each other player reveals the top 3 cards of his deck, discards the revealed Actions and Treasures, and puts the rest back on top in any order he chooses.");
cards[cards.length]=new Card("Royal Seal", "Prosperity", "Treasure", "5[treasure]", "", "2", "", "", "", "", "", "While this is in play, when you gain a card, you may put that card on top of your deck.");
cards[cards.length]=new Card("Vault", "Prosperity", "Action", "5[treasure]", "", "", "", "2", "", "", "", "Discard any number of cards. +1[treasure] per card discarded.<br>Each other player may discard 2 cards. If he does, he draws a card.");
cards[cards.length]=new Card("Venture", "Prosperity", "Treasure", "5[treasure]", "", "1", "", "", "", "", "", "When you play this, reveal cards from your deck until you reveal a Treasure. Discard the other cards. Play that Treasure.");
cards[cards.length]=new Card("Goons", "Prosperity", "Action - Attack", "6[treasure]", "Attack, Buy", "", "", "", "", "1", "2", "Each other player discards down to 3 cards in hand.<hr>While this is in play, when you buy a card, +1[VP].");
cards[cards.length]=new Card("Grand Market", "Prosperity", "Action", "6[treasure]", "Buy", "", "", "1", "1", "1", "2", "You can't buy this if you have any Copper in play.");
cards[cards.length]=new Card("Hoard", "Prosperity", "Treasure", "6[treasure]", "", "2", "", "", "", "", "", "While this is in play, when you buy a Victory card, gain a Gold.");
cards[cards.length]=new Card("Bank", "Prosperity", "Treasure", "7[treasure]", "", "", "", "", "", "", "", "When you play this, it`s worth 1[treasure] per Treasure card you have in play (counting this).");
cards[cards.length]=new Card("Expand", "Prosperity", "Action", "7[treasure]", "", "", "", "", "", "", "", "Trash a card from your hand. Gain a card costing up to 3[treasure] more than the trashed card.");
cards[cards.length]=new Card("Forge", "Prosperity", "Action", "7[treasure]", "", "", "", "", "", "", "", "Trash any number of cards from your hand. Gain a card with cost exactly equal to the total cost in coins of the trashed cards.");
cards[cards.length]=new Card("King's Court", "Prosperity", "Action", "7[treasure]", "", "", "", "", "", "", "", "You may choose an Action card in your hand. Play it three times.");
cards[cards.length]=new Card("Peddler", "Prosperity", "Action", "8[treasure]", "", "", "", "1", "1", "", "2", "During your Buy phase, this costs 2[treasure] less per Action card you have in play, but not less than 0[treasure].");

//Promo
cards[cards.length]=new Card("Black Market", "Promo", "Action", "3[treasure]", "", "", "", "", "", "", "2", "Reveal the top 3 cards of the Black Market deck. You may buy one of them immediately. Put the unbought cards on the bottom of the Black Market deck in any order.");
cards[cards.length]=new Card("Envoy", "Promo", "Action", "4[treasure]", "", "", "", "", "", "", "", "Reveal the top 5 cards of your deck. The player to your left chooses one for you to discard. Draw the rest.");
cards[cards.length]=new Card("Stash", "Promo", "Treasure", "5[treasure]", "", "2", "", "", "", "", "", "When you shuffle, you may put this anywhere in your deck.");

/*
function Card(a, b, c, d, e, f, g, h, i, j, k, l) {
	this.name=a
	this.set=b
	this.type=c
	this.cost=d
	this.attributes=e
	this.treasure=f
	this.victory=g
	this.pcard=h
	this.paction=i
	this.pbuy=j
	this.pcoin=k
	this.text=l
}
*/

function cardSort(a, b) {
	if (a.name > b.name) return 1;
	if (b.name > a.name) return -1;
	return 0;
}

cards.sort(cardSort);
