Thursday, December 27, 2007

Merry Christmas - Legal Update

Hi all. All my legal problems probably started when I sent my resume to Wizards of the Coast. I thought the phone interview when well but then later SourceForge takes down my program. You can read about my interview with Wizards here.

Supposedly the abbreviation MTG is copyrighted so I need to rename my project. I got e-mail from SourceForge asking me what the new name should be so I suggested "Card Wariors". I know it is a very generic name but so is MTG Forge, lol.

To clear up some things. First, the legal letter show here was sent to SourceForge. SourceForge would be in the wrong if they didn't take my program down off of their site. SourceForge forwarded this e-mail me to. The e-mail doesn't mention anything specific other than changing the name. I responded to SourceForge that I will make any necessary changes, so they will send me a copy of the original DCMA notice that lists the specific infringment.

Personally I think if I renamed all of the card names and didn't download the card pictures that Wizards would be OK with my program. I have already written a text file with all of the renamed cards, although the new card names aren't as good as the originals. Wrath of God becomes Peaceful Solution, Ancestral Recall becomes Ancient Knowledge and Briarhorn turns into Thornwood.

Thursday, December 20, 2007

Land Destruction - MTG Forge Update

Hi all, a new version of MTG Forge has been released for $20. OK, ok just kidding its $10 dollars instead. Okay fine, it’s free, download it from here. You have to wait a few seconds, and then you can download the file. (Man, I really need to make some money. I was thinking about selling the new release for some real money while still giving away the 6 month old version. I could probably add a real user interface to make it play better.)

Many people have asked me about the source code so I made it part of the installation. Just look in the directory where you installed MTG Forge and there will be a file named something like "12-19-source.zip"

There are 25 new cards which brings the total number to a whopping 443. There are 12 new Lorwyn cards including the famous evoking brothers Shriekmaw and Mulldrifter. Mudbutton Torchrunner is just plainly a funny card and Sower of Temptation is insanely powerful. Some of the other random cards that I added were the token generators Centaur Glade and The Hive as well as the original blue “steal a creature” spell, Control Magic.

Land destruction was easy to program so I added Ice Storm, Sinkhole, and Stone Rain. It seems like every color has some type of land destruction. I also added the small 1/1 flyers Flying Men and Scryb Sprites.

You can now play with a randomly constructed deck. The two-color deck will have 26 land, 13 of each color, and a minimum of 19 creatures. This deck only has single copies of each card so that should make the games more unpredictable.

The computer is also a little bit more competitive. The computer’s land is artificially curved and he will draw nothing but steam (non-lands) after he gets 7 lands. So in the long game, the computer should be pretty tough.

Maybe it’s just me but with these new cards the computer seems more challenging. I’m not sure if it’s the land destruction or the creature removal, but some of the games were almost impossible to win. It seems like I am only winning 80% instead of 95% but I haven’t done any long term testing.

And I can't forget, Happy Holidays. Remember to wrap your presents and play creatures during your 2nd Main Phase. --Forge

Friday, December 14, 2007

Download

Good news, you can download the Windows version from here. There are a few pop-ups.

Start Download

Rare Commons

Hi everybody. I've tried to e-mail everyone a copy of my program that asked for it. Just send me another e-mail if I forgot you. I did receive a response from SourceForge. They are mediating the dispute between me and Wizards. Thing is a good thing because I want to make my program copyright friendly so I won't have this problem again in the future.

Here are two great magic articles that I really enjoyed. And every Magic fan should read these. First, why is a common a common? If you don't know, read one. In fact it seems pretty hard to design commons. Commons have to be functionally simple but yet different from everything that has already been printed.

Common Courtesy

Rares, a very disputed subject. Many people, including myself have said, "All good cards are rare." We all know this isn't true all of the time, but look at those Constructed decks and all I see are the money rares. To at least get a different perspective read this.

Rare, but Well Done

AI – Curve my mana

I was thinking about how to make the AI a little better. I thought if the computer’s land was curved out, the computer would seem a little smarter. The computer’s opening hand is all spells and the computer will draw a land for the next 5 turns. This maximizes the possibility of the computer playing a timely 1 or 2 mana spell. After a few more turns the computer draws 2 more lands.

The rest of the computer’s land is artificially moved to the bottom of the computer’s deck, so the computer will always top-deck something useful. The long game will favor the computer, but the AI is still very beatable since it just plays a random spell. Currently the computer cannot evaluate the board position or anything complicated like that.

I could have gone a step further and guaranteed that the computer would be able to play a spell for the first 6 turns of the game. I might do this later. I had a hard time sorting and alternating the computer’s land so that it would look like this: Mountain, Plains, Mountain, Plains, etc… That way the computer will always be able to play a double costed card like WW as early as turn 3 and always on turn 4.

Other ways to make the computer stronger would be to have him draw 2 cards per turn. I have rested doing this since it would break the illusion that the computer was playing by the rules, but I might test it out to see if it really helps the computer.

Tuesday, December 4, 2007

Quiz Show

I wanted to add some real Magic content but I wasn't sure what to write about. There is a lot of old content on magicthegathering.com that is really great. So enjoy this quiz. You have to guess is the card an instant or sorcery.

Take Quiz!!!


Another favorite article from Star City Games is about learning to sidebard. It points out that a deck idea isn't always bad if it looses, because a good sideboard could help it out. The article also points out that most games of Magic are indeed played using a sidebard.

Learn to Sidebard (Warning is does have some cussing.)

Legel Smegal

I've tried to e-mail everyone that wanted a copy of my program. If I missed someone leave a comment or send me a message at "mtgrares yahoo com" I'll try to post something new on Mondays.

No news is good news and I haven't heard anything from Sourceforge. I followed the guidelines, https://sourceforge.net/docs/H10/, and I sent a counter-notification to SourceForge (I want to call then SourceFrog for some reason). I haven't heard anything back from them yet.


Below is the badly formatted DCMA notice that I received. The original notice was sent to SourceForge and then they forwarded it to me.


Hello,

My name is Jacob Moorman; I am the Director of Operations for
SourceForge.net. You are receiving this mail because you are the
project administrator of the 'mtgforge' project, hosted by you on
SourceForge.net. We have recently received the following (forwarded)
DMCA request from the complainant (CC'd).

When cases like this arise, we always expeditiously forward the mail to
the project admin. Please review this message carefully and follow-up
as needed.

Following the DMCA requirements we have disabled public access to the
SourceForge.net-hosted space provided to your project.


You can read the specifics about our DMCA compliance in our Terms and
Conditions of Use page:
https://sourceforge.net/tos/tos.php#allegations_of_copyright_infringement_or_trademark_infringement



You can read our DMCA policy, including instructions for
counter-notification at:
https://sourceforge.net/docs/H10/


Thank you for your prompt attention to this serious matter.

Sincerely,

Jacob Moorman

CC: SourceForge legal
CC: Savvis (SourceForge.net datacenter provider)



Begin forwarded message:

> *From: *"Copyright@savvis.net "
> >
> *Date: *November 16, 2007 11:47:17 AM GMT-05:00
> *To: * >,
> >, > >,
>
> *Cc: *"Copyright@savvis.net "
> >
> *Subject: **Sourceforge - Savvis Case 1152152 - DMCA Notice -
> 66.35.250.203 - http://sourceforge.net/projects/mtgforge*
>
> Dear Administrator:
> SAVVIS has received notice that an IP address (see below) under your
> administrative control is distributing copyrighted works in violation

> of United States law, specifically, 17USC512 et seq., also known as
> the Digital Millennium Copyright Act ("DMCA").
> Please note that this activity is both illegal and in violation of
the
> SAVVIS Acceptable Use Policy ("AUP"), a copy of which may be reviewed

> at http://www.savvis.net/Customer/aup.html.
> Be advised that the DMCA places very stringent requirements on
SAVVIS,
> as the upstream provider, and that failure to resolve this issue in a

> timely manner could result in the termination of services to
offending
> IP's or sites. SAVVIS follows the DMCA time requirements very
> strictly: this issue must be resolved within 7 days of this notice to

> avoid active intervention under DMCA.
> If you require any assistance in resolving this, or any other SAVVIS
> security issue, please do not hesitate to contact me at any of the
> below points of contact.
> Sincerely,
> Jason R. Bradley GSEC
> Security/Abuse Engineer
> SAVVIS Security Services (S3)
> SAVVIS Communications
> 1 Savvis Parkway
> St. Louis, MO 63017
> 314-628-7821 - Desk
> 314.628.7050 - Fax
> **This message contains information which may be confidential and/or
> privileged. Unless you are the intended recipient (or authorized to
> receive for the intended recipient), you may not read, use, copy or
> disclose to anyone the message or any information contained in the
> message. If you have received the message in error, please advise the

> sender by reply e-mail at copyright@savvis.net
> and delete the message and any
> attachment(s) thereto without retaining any copies.**
>
> ************ORIGINAL COMPLAINT(S) BELOW*************
>
>
> *From:* Reynolds, Carin [mailto:cgreynolds@pbwt.com]
> *Sent:* Friday, November 16, 2007 10:01 AM
> *To:* Copyright@savvis.net
> *Subject:* DMCA Notice - http://sourceforge.net/projects/mtgforge
>
>
> November 16, 2007
>
> *_By Email_*
> copyright@savvis.net
>
> DMCA Designated Agent
> SAVVIS Communications Corporation
> One SAVVIS Parkway
> Town & Country, Missouri 63017
>
> *Re: DMCA Notice – **http://sourceforge.net/projects/mtgforge*
>
> *_Infringement of Wizards of the Coast, Inc. Copyrights and
Trademarks_*
>
> Dear Copyright Agent:
>
> We are counsel for Wizards of the Coast, Inc. (“Wizards”), the
owner
> of the copyrights and trademarks to the MAGIC: THE GATHERING®
trading
> card game. We recently became aware that you are the service
provider
> for www.sourceforge.net , which has
posted
> an online version of Wizards’ MAGIC: THE GATHERING® trading card
game
> at http://sourceforge.net/projects/mtgforgecalled “MTG Forge”
(“MTG”
> is a commonly used acronym for MAGIC: THE GATHERING®). The “MTG
> Forge” game is described as “a robust Java implementation of card
game
> Magic The Gathering that enforces the rules.” We have attempted
> repeatedly to contact the owner of this site, but have received no
> response and the infringing game has not yet been removed.
>
> This unauthorized copying of Wizards’ MAGIC: THE GATHERING®
trading
> card game constitutes copyright infringement in violation of 17
U.S.C.
> § 501. The unauthorized use of the MAGIC: THE GATHERING® name
> violates the federal trademark laws, including 15 U.S.C. §§ 1114(1)

> and 1125(a), by creating a likelihood of confusion with respect to
> Wizards’ authorization or sponsorship of or association with the
“MTG
> Forge” trading card game and the sourceforge.net website. This
> unauthorized use of the MAGIC: THE GATHERING® trademark is also
likely
> to dilute its distinctive quality in violation of 15 U.S.C. §
1125(c)
> and the anti-dilution laws of numerous states.
>
> Pursuant to the Digital Millennium Copyright Act (“DMCA”), we
have a
> good faith belief that the “MTG Forge” game identified above
infringes
> Wizard’s copyrights and other intellectual property rights, and is
not
> authorized by Wizards or its agents. We are authorized to act on
> Wizards’ behalf regarding these matters. The information provided
in
> this communication is accurate to the best of my knowledge and is
> provided under penalty of perjury.
>
> On behalf of Wizards, we therefore request that you act promptly to
> remove or disable access to the infringing “MTG Forge” game from
the
> sourceforge.net website*.*
>
> This letter does not purport to be a complete statement of the facts
> or the law and is without prejudice to Wizards’ legal and equitable

> rights.
>
> Sincerely yours,
>
> Carin G. Reynolds, Esq.
> *Patterson Belknap Webb & Tyler LLP*
> 1133 Avenue of the Americas
> New York, NY 10036-6710
>
> /tel/: 212.336.2104
> /fax/: 212.336.2277
> cgreynolds@pbwt.com
>
>
> ----------------------------------------------
> Privileged/Confidential Information may be contained in this message.
If you are not
> the addressee indicated in this message (or responsible for delivery
of the message to
> such person), you may not copy or deliver this message to anyone. In
such case, you
> should destroy this message and kindly notify the sender by reply
email. Please advise
> immediately if you or your employer do not consent to Internet email
for messages of this
> kind.
>
> ----------------------------------------------
>
> IRS Circular 230 disclosure: Any tax advice contained in this
communication (including
> any attachments or enclosures) was not intended or written to be
used, and cannot be
> used, for the purpose of (i) avoiding penalties under the Internal
Revenue Code or (ii)
> promoting, marketing or recommending to another party any transaction
or matter addressed
> in this communication. (The foregoing disclaimer has been affixed
pursuant to U.S.
> Treasury regulations governing tax practitioners.)
>
>
==============================================================================
>
>
> This message contains information which may be confidential and/or
> privileged. Unless you are the intended recipient (or authorized to
> receive for the intended recipient), you may not read, use, copy or
> disclose to anyone the message or any information contained in the
> message. If you have received the message in error, please advise the

> sender by reply e-mail and delete the message and any attachment(s)
> thereto without retaining any copies.

--
Jacob Moorman
Director of Operations, SourceForge.net
jmoorman@corp.sourceforge.com
moorman@sourceforge.net

**************************************************************************
This email may contain confidential and privileged material for the
sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient,
please contact the sender and delete all copies.
***************************************************************************

Friday, November 30, 2007

AI – Curve my mana

My e-mail is on the fritz. Yahoo used to be so good but I might have to change to gmail. I'll try to send everyone a copy of my program on Monday.

I was thinking about how to make the AI a little better. I thought if the computer’s land was curved out, the computer would seem a little smarter. The computer’s opening hand is all spells and the computer will draw a land for the next 5 turns. This maximizes the possibility of the computer playing a timely 1 or 2 mana spell. After a few more turns the computer draws 2 more lands.

The rest of the computer’s land is artificially moved to the bottom of the computer’s deck, so the computer will always top-deck something useful. The long game will favor the computer, but the AI is still very beatable since it just plays a random spell. Currently the computer cannot evaluate the board position or anything complicated like that.

I could have gone a step further and guaranteed that the computer would be able to play a spell for the first 6 turns of the game. I might do this later. I had a hard time sorting and alternating the computer’s land so that it would look like this: Mountain, Plains, Mountain, Plains, etc… That way the computer will always be able to play a double costed card like WW as early as turn 3 and always on turn 4.

Other ways to make the computer stronger would be to have him draw 2 cards per turn. I have rested doing this since it would break the illusion that the computer was playing by the rules, but I might test it out to see if it really helps the computer.

Thursday, November 29, 2007

DCMA Counter-Notification

Hopefully I got a copy of MTG Forge to everyone that requested it. If you didn't get a copy, send me an e-mail or leave me a comment. I just laughed at everyones comments that had "Send me a copy of your awesome program" That was just really funny at the time.

The notice I was sent was covered under the DCMA and I was given an option of generating a counter-notification. This counter-notification would let me get the original copy of the DCMA letter sent to Sourceforge which would let me change the bits of my program that were copyrighter. The Firemox project, formerly the Magic-Project, is still up and seem to have only changed the ability name. For example they renamed Cycling to something else. They didn't change the card names, which I thought may be the problem.

I'm not sure if I have an ice cube's change is hades, but I at least tried. --Forge

Tuesday, November 27, 2007

Comments

Hi, I just wanted to reply to everyone's comments. The e-mail was sent to Sourceforge about copyright infringement. The DMCA Notice said that the acronym "MTG" infringed upon Wizard's copyright. (That would be easy to fix.) But that the program MTG Forge also infringed upon Magic Online.


I did notice recented that the Magic-Project became Firemox. I'm not sure what they changed in order to comply. I think I could change all the card names and that would be legal but I'm not sure. The pictures were not in the program MTG Forge but maybe just linking to the pictures was illegal. I'm hoping that by changing the card names and other things that the project will be hosted at a later time on sourceforge.

A couple of months in October I had a phone interview with Wizard's. They knew about my program but it didn't seem to concern them one way or another. They didn't comment about it at all.

Currently I have a new version that I'll e-mail to anyone that is interested. My e-mail is on the top-right of the screen, so just send me something short like "Send me your awesome program" and I'll send you the new version. If anyone knows of a site that wants to host my program (I just need somewhere that people can download it), let me know. Thanks for all your comments.


--Forge

Monday, November 26, 2007

Cease and Desist

I guess it was just a matter of time. I finally received a cease and desist letter from Wizards of the Coast legal counsel. They said I violated their copyright. I didn't know Wizards copyrighted all of their card names, but maybe they do. I presume they don't copyright the rules but I'm not clear on that point. Just wanted to tell everyone.
--Forge

Hello,

My name is Jacob Moorman; I am the Director of Operations for
SourceForge.net. You are receiving this mail because you are the
project administrator of the 'mtgforge' project, hosted by you on
SourceForge.net. We have recently received the following (forwarded)
DMCA request from the complainant (CC'd).

When cases like this arise, we always expeditiously forward the mail to
the project admin. Please review this message carefully and follow-up
as needed.

Following the DMCA requirements we have disabled public access to the
SourceForge.net-hosted space provided to your project.


You can read the specifics about our DMCA compliance in our Terms and
Conditions of Use page:
https://sourceforge.net/tos/tos.php#allegations_of_copyright_infringement_or_trademark_infringement



You can read our DMCA policy, including instructions for
counter-notification at:
https://sourceforge.net/docs/H10/


Thank you for your prompt attention to this serious matter.

Sincerely,

Jacob Moorman

CC: SourceForge legal
CC: Savvis (SourceForge.net datacenter provider)



Begin forwarded message:

> *From: *"Copyright@savvis.net "
> >
> *Date: *November 16, 2007 11:47:17 AM GMT-05:00
> *To: *>, > >, > >, >
> *Cc: *"Copyright@savvis.net "
> >
> *Subject: **Sourceforge - Savvis Case 1152152 - DMCA Notice -
> 66.35.250.203 - http://sourceforge.net/projects/mtgforge*
>
> Dear Administrator:
> SAVVIS has received notice that an IP address (see below) under your
> administrative control is distributing copyrighted works in violation

> of United States law, specifically, 17USC512 et seq., also known as
> the Digital Millennium Copyright Act ("DMCA").
> Please note that this activity is both illegal and in violation of
the
> SAVVIS Acceptable Use Policy ("AUP"), a copy of which may be reviewed

> at http://www.savvis.net/Customer/aup.html.
> Be advised that the DMCA places very stringent requirements on
SAVVIS,
> as the upstream provider, and that failure to resolve this issue in a

> timely manner could result in the termination of services to
offending
> IP's or sites. SAVVIS follows the DMCA time requirements very
> strictly: this issue must be resolved within 7 days of this notice to

> avoid active intervention under DMCA.
> If you require any assistance in resolving this, or any other SAVVIS
> security issue, please do not hesitate to contact me at any of the
> below points of contact.
> Sincerely,
> Jason R. Bradley GSEC
> Security/Abuse Engineer
> SAVVIS Security Services (S3)
> SAVVIS Communications
> 1 Savvis Parkway
> St. Louis, MO 63017
> 314-628-7821 - Desk
> 314.628.7050 - Fax
> **This message contains information which may be confidential and/or
> privileged. Unless you are the intended recipient (or authorized to
> receive for the intended recipient), you may not read, use, copy or
> disclose to anyone the message or any information contained in the
> message. If you have received the message in error, please advise the

> sender by reply e-mail at copyright@savvis.net
> and delete the message and any
> attachment(s) thereto without retaining any copies.**
>
> ************ORIGINAL COMPLAINT(S) BELOW*************
>
>
> *From:* Reynolds, Carin [mailto:cgreynolds@pbwt.com]
> *Sent:* Friday, November 16, 2007 10:01 AM
> *To:* Copyright@savvis.net
> *Subject:* DMCA Notice - http://sourceforge.net/projects/mtgforge
>
>
> November 16, 2007
>
> *_By Email_*
> copyright@savvis.net
>
> DMCA Designated Agent
> SAVVIS Communications Corporation
> One SAVVIS Parkway
> Town & Country, Missouri 63017
>
> *Re: DMCA Notice – **http://sourceforge.net/projects/mtgforge*
>
> *_Infringement of Wizards of the Coast, Inc. Copyrights and
Trademarks_*
>
> Dear Copyright Agent:
>
> We are counsel for Wizards of the Coast, Inc. (“Wizards”), the
owner
> of the copyrights and trademarks to the MAGIC: THE GATHERING®
trading
> card game. We recently became aware that you are the service
provider
> for www.sourceforge.net , which has
posted
> an online version of Wizards’ MAGIC: THE GATHERING® trading card
game
> at http://sourceforge.net/projects/mtgforgecalled “MTG Forge”
(“MTG”
> is a commonly used acronym for MAGIC: THE GATHERING®). The “MTG
> Forge” game is described as “a robust Java implementation of card
game
> Magic The Gathering that enforces the rules.” We have attempted
> repeatedly to contact the owner of this site, but have received no
> response and the infringing game has not yet been removed.
>
> This unauthorized copying of Wizards’ MAGIC: THE GATHERING®
trading
> card game constitutes copyright infringement in violation of 17
U.S.C.
> § 501. The unauthorized use of the MAGIC: THE GATHERING® name
> violates the federal trademark laws, including 15 U.S.C. §§ 1114(1)

> and 1125(a), by creating a likelihood of confusion with respect to
> Wizards’ authorization or sponsorship of or association with the
“MTG
> Forge” trading card game and the sourceforge.net website. This
> unauthorized use of the MAGIC: THE GATHERING® trademark is also
likely
> to dilute its distinctive quality in violation of 15 U.S.C. §
1125(c)
> and the anti-dilution laws of numerous states.
>
> Pursuant to the Digital Millennium Copyright Act (“DMCA”), we
have a
> good faith belief that the “MTG Forge” game identified above
infringes
> Wizard’s copyrights and other intellectual property rights, and is
not
> authorized by Wizards or its agents. We are authorized to act on
> Wizards’ behalf regarding these matters. The information provided
in
> this communication is accurate to the best of my knowledge and is
> provided under penalty of perjury.
>
> On behalf of Wizards, we therefore request that you act promptly to
> remove or disable access to the infringing “MTG Forge” game from
the
> sourceforge.net website*.*
>
> This letter does not purport to be a complete statement of the facts
> or the law and is without prejudice to Wizards’ legal and equitable

> rights.
>
> Sincerely yours,
>
> Carin G. Reynolds, Esq.
> *Patterson Belknap Webb & Tyler LLP*
> 1133 Avenue of the Americas
> New York, NY 10036-6710
>
> /tel/: 212.336.2104
> /fax/: 212.336.2277
> cgreynolds@pbwt.com
>
>
> ----------------------------------------------
> Privileged/Confidential Information may be contained in this message.
If you are not
> the addressee indicated in this message (or responsible for delivery
of the message to
> such person), you may not copy or deliver this message to anyone. In
such case, you
> should destroy this message and kindly notify the sender by reply
email. Please advise
> immediately if you or your employer do not consent to Internet email
for messages of this
> kind.
>
> ----------------------------------------------
>
> IRS Circular 230 disclosure: Any tax advice contained in this
communication (including
> any attachments or enclosures) was not intended or written to be
used, and cannot be
> used, for the purpose of (i) avoiding penalties under the Internal
Revenue Code or (ii)
> promoting, marketing or recommending to another party any transaction
or matter addressed
> in this communication. (The foregoing disclaimer has been affixed
pursuant to U.S.
> Treasury regulations governing tax practitioners.)
>
>
==============================================================================
>
>
> This message contains information which may be confidential and/or
> privileged. Unless you are the intended recipient (or authorized to
> receive for the intended recipient), you may not read, use, copy or
> disclose to anyone the message or any information contained in the
> message. If you have received the message in error, please advise the

> sender by reply e-mail and delete the message and any attachment(s)
> thereto without retaining any copies.

--
Jacob Moorman
Director of Operations, SourceForge.net
jmoorman@corp.sourceforge.com
moorman@sourceforge.net

**************************************************************************
This email may contain confidential and privileged material for the
sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient,
please contact the sender and delete all copies.
***************************************************************************

Wednesday, November 21, 2007

Rip Off Wizards

I suspect that some people think that I wrote MTG Forge to rip off Wizards, although no one has ever mentioned it. I wrote MTG Forge because it is a different, alternative way to play Magic. Speed chess and other variations don’t take away from regular chess, but they enhance it, and let people view the same game in a different way. Hopefully offshoots like speed chess and MTG Forge help people improve their skills.

I also doubt MTG Forge prevents people from buying cards. In a few of my e-mails people actually said that they went out and bought cards that were in my program because they were so fun to play with. Kiki-Jiki, Mirror Breaker was one such example. Personally I buy about one booster pack per set, I’m a big spender (cough, laughter). Although I do like reading Wizards daily articles and adding cards that stand out, like Thoughtseize.

MTG Forge was designed just to play a quick game of Magic against the computer. This was an unfilled niche and MTG Forge is still the “niche leader.” (I love the phrase “niche leader” and you will see that in future articles, lol.) Without waiting for a human opponent the game seems 100% faster. I really enjoy playing a 5 minute game of Magic.

I am very proud that MTG Forge lets users play sealed or draft. Constructing a powerful sealed deck is very fun and a personal favorite. You never know what crazy card pool you will have. I know sealed is considered the lesser, easier brother compared to drafting, but sealed can be very fun it its own right.

Drafting is similar to real life and lets the user encounter common problems such a bad mana curve, too few creatures, or weak color selection. I’ve stumbled upon all three of those problems and some of my draft decks play worse than my sealed ones. (I have probably included cards that are “too good,” like Ancestral Recall, so drafting is probably too easy compared with real card sets like Lorwyn.) My program does not try to compete with paper Magic or Magic Online, but instead lets the user have a different experience.

Friday, November 16, 2007

Programming Magic Cards is Easy

I am currently slowly working on MTG Forge 2.0 and it is difficult of course. I want to be able to program cards that I currently cannot do. With version 2.0 I am rebuilding everything from scratch which means that the old card code won’t work with the new code. Also, my progress is slow because real life gets in the way.

The really hard part about version 2.0 isn’t really just the cards. It already has such great cards like Iridescent Angel, Dark Ritual, Hypnotic Specter, Loxodon Warhammer, and enchantments like Spirit Link. The hard part is all of the other stuff that supports the cards like the user interface, combat, reading and writing files for the deck builder, and handling mouse input.

When adding cards to version 1.0, I only have to think about the card functionality. Does the card have a target? Does the card do something weird? Does it have an effect that ends at end of turn? I can conveniently forget about all the other code except the 100 or so lines that make up a specific card.

After not looking at MTG Forge’s source code for a week or two it is hard to understand everything that is going on. For truly bad source code see InputControl’s getInput method. It is 120 lines long and is hard to read and understand. It selects the next phase like Declare Attackers or the first Main phase.

Thankfully most of my other code isn’t so bad, but it is still hard to for other people to understand. I tried very hard making the Java code for each card readable. The code below is the Mirrodin card Tanglebloom and it is taken from the current version of MTG Forge. You can compare and contrast this article with my previous essay “Programming Magic Cards is Hard.”



//taken from CardFactory.getCard()

//Tanglebloom is an artifact that costs 1 and has an ability “1, tap: You gain 1 life.”
if(cardName.equals("Tanglebloom"))
{
//1 is the mana cost for the ability
final SpellAbility sp = new Ability_Tap(card, "1")
{

//the computer will only play the ability during his second main phase
public boolean canPlayAI()
{
return AllZone.Phase.getPhase().equals(Constant.Phase.Main2);
}

public void resolve()
{
AllZone.GameAction.getPlayerLife(card.getController()).addLife(1);
}

};//SpellAbility

card.addSpellAbility(sp);

//the text that is on the card
sp.setDescription("1, tap: You gain 1 life.");

//the text that is shown when on the stack
sp.setStackDescription("Tanglebloom - " +card.getController() +" gains 1 life.");

//the Input class handles all input
//Input_PayManaCost extends Input and lets the user pay the mana cost
sp.setBeforePayMana(new Input_PayManaCost(sp));

Tuesday, November 13, 2007

Pretty Card Pictures

You know how your friend likes to have all foil lands, well I sort of understand that now. I’ve become obsessed with the prettiest picture of each card. The default picture that Wizard’s provides for some of the old cards like Juzam Djinn and the moxes are pretty bad. They are faded and hard to read. So I fired up my old MicroProse Magic game and took screen captures of a few cards since it displays each card in a clear, large window. Now my virtual Mox Ruby looks better than its 1,000 dollar equivalent.

By default, all the lands are Unhinged, which are very pretty of course. The current pricing guide has them at $1 a piece, so MTG Forge is saving you money right off the bat. Now if I could only find a set of foil, Unhinged lands, I would be very happy.

Foil cards are nice to look at also. I know foil cards do the same thing but they look so darn cool. I used to have a foil Firebolt, until I accidentally erased it. I still have a foil Wonder that I am very proud of and you do to if MTG Forge downloaded your card pictures for you.

When choosing the card pictures that MTG downloads I tried to pick the “prettiest” version of each card. Take Counterspell for example, there are about six versions ranging from Alpha’s frilly 3 finger salute to Seventh’s edition “I can float in mid-air.” The version that MTG downloads is from Mercadian Masques. Most cards don’t have multiple card pictures to choose from but you could still track down a foil or a special rewards version. I’ve changed from being a card collector to an art dealer. Now if I could only track down a foil Serra Angel from 10th :) (I hate reminder text, don’t you?)

Thursday, November 8, 2007

CardFactory - Longest Method

I try to discuss both Magic and computer programming in my blog but sometimes I need to address just the boring, technical side of programming. I’ll try to make it as “user friendly” as possible but feel free to skip this if it gets too technical for you.

Cardfactory.java is one of the key objects in MTG Forge, it makes cards. CardFactory is a huge class weighing in at 423 kb and 14,000 lines (with many blank lines for readability). It is the largest class in MTG Forge and is 10 times bigger than the user interface Gui_Display2.

CardFactory’s intention is just to make cards. The longest method in CardFactory is getCard(String cardName, String owner) which returns a new Card object. This one method is 14,000 lines long, insane I know, but I have never had any trouble with it. Each card is subdivided with brackets, limiting the scope of all variables, much like a method of a class. Look at the code at the end of this article for an example of Wrath of God.

I needed some way of returning a variety of different card objects. I could have cloned objects or used another mechanism. In the new version of MTG Forge, each object is in its own separate class. So the file Wrath_of_God.java holds all of the code for Wrath of God.

I have tried to use many good software practices and design patterns. MTG Forge’s user interface just observes. SpellAbility’s resolve method is abstract, much like the command pattern. All of the mouse input uses the state pattern. The state pattern is crucial and without it I wouldn’t know how to handle the variety of user input that Magic requires. MTG Forge would not exist without the state pattern.

The two most common classes are Card and SpellAbility. The Card class is used like a physical card and exists in your hand, play, graveyard, or library. SpellAbility handles the effect that spells and abilities do when they resolve. SpellAbility has an abstract resolve method where the functionality of a card is programmed. For example the resolve method for Wrath of God would destroy everything. A Card object can hold one or more SpellAbility objects.

A Card object representing Elvish Piper which has an activated ability, will have two SpellAbilities. One will be the normal summon creature spell that puts it into play and the other SpellAbility will represent the activated ability. A Card object representing Wrath of God will only hold one SpellAbility object. Combining the classes for both spells and abilities into one class was a pivotal moment during the development of MTG Forge.

For more information about programming cards for MTG Forge, download the file 10-18-mtgforge-source.zip from sourceforge.net/projects/mtgforge and read compile.htm. To see how Magic cards can be encoded as XML files see sourceforge.net/projects/firemox
God or Damnation

//code snippet from CardFactory.java.getCard(String cardName, String owner)
//mana cost and card text is read from the file “cards.txt”
//a Card object name “card” is created earlier in the method

if(cardName.equals("Wrath of God") cardName.equals("Damnation"))
{
//the Spell class extends SpellAbility and ensures that sorceries
//and instants can only be played at the appropriate times

SpellAbility spell = new Spell(card)
{
public void resolve()
{
CardList all = new CardList();
//AllZone is a global, static class that holds all of the zones
//for each player: play, graveyard, hand, library
all.addAll(AllZone.Human_Play.getCards());
all.addAll(AllZone.Computer_Play.getCards());

for(int i = 0; i < all.size(); i++)
{
Card c = all.get(i);
if(c.isCreature())
AllZone.GameAction.destroyNoRegeneration(c);
//GameAction is a global, static class that does common game activities
//like drawing a card, shuffling library, destroying a creature, etc...
}
}//resolve()

//the computer will only play this card if canPlayAI() returns true
public boolean canPlayAI()
{
CardList human = new CardList(AllZone.Human_Play.getCards());
CardList computer = new CardList(AllZone.Computer_Play.getCards());

human = human.getType("Creature");
computer = computer.getType("Creature");

//the computer will at least destroy 2 more human creatures
return computer.size() < human.size()-1 AllZone.Computer_Life.getLife() < 7;
}//canPlayAI()
};//SpellAbility
card.addSpellAbility(spell);
return card;
}//if Wrath of God or Damnation

Monday, November 5, 2007

MTG Forge Memories

It is amazing how fun a game like Magic can be. I’m sure other trading card games must be a lot of fun, but Magic seems to beat them all. I wish you could play any card as a land, but hey, what’s Magic if you aren’t mana flooded/screwed?

I love some of the moments that happen while playing MTG Forge. Like tonight where the computer totally won the match using Liliana Vess. Usually Vess doesn’t really matter. I can generally hold her off by just discarding a spare land or something, but not this time. The computer kept making me discard and then raised a bunch of creatures from the grave. Thankfully I don’t have to admit defeat a human being. I was only beaten by software.

Sometimes MTG Forge’s AI is just brilliant or crazy or both. Picture this scenario. The computer just played Wrath of God and thankfully I still have a creature or two in my hand that I play. POW, another Wrath comes my way. I’m not sure if the computer is smart or dumb, but it won that game. The computer sometimes surprises me and that is probably as good as the AI gets right now.

I would love to make the computer able to win a tournament, but by that time we will all be living on Mars, well probably. Oh the pains of trying to program both long-term and short-term planning. I would like to make the computer have different personalities. Sometimes it might be really aggressive and other times just passive.

The computer needs to be a little unpredictable just like a real human opponent in order to make the game interesting. Maybe given the same situation the computer will sometimes block and sometimes not block, providing a little bit of tension. It does take a little bit of interest out of the game knowing when the computer will and won’t block. Keep playing MTG Forge and post any stories that you remember.

Monday, October 29, 2007

Cut and Paste Cards

The secret to programming is really cut-and-paste. If you have never used cut and paste, you aren’t really using a computer. OK, let’s say I want to program Eternal Witness, what cards have I programmed that are really similar? Well, Gravedigger is 99% the same, so I just copy the code and make a few, small tweaks. Voila, another card is added!! Oblivion Ring and Oubliette are both “brothers from a different color” and I practically used the same code for both cards.

Shock, Char, Psionic Blast, Cackling Flames, Volcanic Hammer, and Firebolt are all essentially the same card, burn is burn. Infest and Pyroclasm both use exactly the same code. Wrath of God and Damnation are perfect twins also. At first glance it doesn’t seem that Terramorphic Expanse and Sakura-Tribe Elder have much in common but these unlikely relatives share the same code. I was curious about cards like Coercion so I also added similar cards like Distress, and Thoughtseize (probably Lorwyn’s most popular chase rare). Mishra's Factory and Blinkmoth Nexus are both lands that turn into creatures, so I copied the code and just changed the specifics like power, toughness, and creature types.

The hardest cards are ones that do something new and weird. Recently I programmed Cranial Extraction, and that code was a little long. It is a really cool card, but it did something brand new, and “brand new” equals “more work.” Each of the planeswalkers are 200 lines because they each had 3 abilities, which is pretty unusual. Incendiary Command was also another tough card, because two of the options let the user choose a target. If Incendiary Command didn’t require any targets, the card would have been a lot easier to program.

Thursday, October 25, 2007

MTG Forge Achievements

The XBox 360 started the phenomenon of achievements. In a nutshell, achievements are bonuses you get for doing specific, difficult actions in a video game. Some achievements are “do 10 one hit kills,” or “score 10,000 points in 1 minute,” things which take some effort to complete.

Hopefully in the future MTG Forge will have a variety of challenging achievements. Here are my top 10 achievements for MTG Forge. See how many you can get.

1. Destroy 6 of your opponent’s creatures with Hex.
2. Use only Relentless Rats and Swamps to win a match.
3. Play a constructed deck with 7 different lands.
4. Win 2 constructed matches with a creatureless deck. +2 if you do this while drafting.
5. Win with a green/blue deck in draft or sealed. (My favorite color combination.)
6. Get a -1/1 creature into play. (Hint: it involves 2 black cards and graveyard recursion)
7. Use Damnation in a draft or sealed game.
8. Win with a Planeswalker, use Liliana Vess for an extra challenge.
9. Destroy an enchantment. Only 2 cards in MTG Forge allow you to do this.
10.Get Sliver Legion into play. +1 if you don’t use a certain green creature.

Monday, October 22, 2007

Programming Lorwyn

MTG Forge has a few cards from Lorwyn, around 12. Many are just plain creatures that haven’t been done before. Thankfully I was able to program 3 planeswalkers: Liliana Vess, Garruk Wildspeaker, and Chandra Nalaar. Vess is definitely the weakest, and Chandra is the strongest, since he can burn your opponent for 10, ouch!!!

The blue planeswalker looks really, really weak and I’m not too interested in him. The white one looks OK, but I’m not over-the-top enthusiastic about him. Planeswalkers seem good as a “I’ll put one or two in my deck to surprise my opponent.” Like legendary cards, having 3 or 4 of them in your library seems like overkill. I have died to them occasionally in sealed games, and to me that is the sign of a good card. As an odd factoid, according to Wizard’s September Magic podcast, planeswalkers were supposed to be Future Sight but they got pushed back, who knew?

Oblivion Ring seemed cool so I added it. Ring is a 2W Enchantment that says “When Oblivion Ring comes into play, remove another target nonland permanent from the game.” Don’t forget that it can get rid of planeswalkers too.

Incendiary Command was an insane card that probably took 2 hours to program. In my phone interview with Wizards, I was asked how I would program Lorwyn’s Command cards so I told them. Later that night I thought it would be cool if I could add one of them to MTG Forge so I picked the hardest one. I’m not sure how good Incendiary Command is, but I do smile thinking of all the time I spent coding it.

Thursday, October 18, 2007

Discard That Card - MTG Forge Update

A new version of MTG Forge is out with 14 more cards, including some Lorwyn cards. Download it from here

For whatever reason the card Thoughtseize intrigued me so I decided to add it to MTG Forge. Thoughtseize is a Lorwyn card that follows Black’s variations on “choosing a card in your opponents hand and making him discard it.” Thoughtseize says, “Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. You lose 2 life.” So for one black mana you get to make your opponent discard something good, that it is worth giving up 2 life. In my short playtesting with it I made my opponent discard a planeswalker that killed me in the previous game. That felt really satisfying seeing Garruk Wildspeaker in the graveyard.

Since I programmed Thoughtsneeze, I might as well add some cards with the same ability because I could just cut-and-paste most of the code. So I fired up Apprentice to look for cards and found that Distress was essential the same card; it only costs B more and doesn’t have any life loss. They say that old Magic cards don’t die, they just are reincarnated. It is intriguing to see a common remade as a rare but maybe it happens all the time.

Ok, back to discard, I also added Cranial Extraction, Coercion, and Distress. So black now has 4 more quality discard spells to add to his arsenal. And just a word of warning, the computer will always remove something good with Cranial Extraction so beware.

Monday, October 15, 2007

Free Software

Writing software and giving it away is an interesting concept. For one thing, (good) software tends to be really hard to write. That is the reason most free software aka “open source” has such horrible user interfaces. User interfaces are hard to get right; they tend to confuse users. For those not “in the know,” open source software could theoretically be modified by anyone, so it is more flexible than Windows which comes in a “one size fits all” variety. This is theoretical because modifying an existing program’s source code is like trying to renovate a freeway without closing it. It is possible to do, but rarely done.

Usually free software is written to “scratch an itch” of the programmer, which is entirely true in my case. I loved the old Shandalar Magic game, as well as the interactive Magic tutorial that came with the starter pack. I wanted to play Magic against the computer, just plain and simple. I also wanted to be able to play sealed and draft games if possible. I also wanted to use modern cards, rather than Shandalar’s Alpha-Legends odd set of cards. Shandalar didn’t have any fatties without horrible drawbacks.

I’ll continue to work on MTG Forge and add a few cards here and there, but basically my itch has been scratched. MTG Forge has been downloaded 8,000+ times and Star City Games has published an article about it. I still have the impossible dream of adding tons more cards and I continue to work on the next version of MTG Forge. I would love to be able to program all of Lorwyn, but I would be doing very good if I could just do 10th Edition. The combat part of the program needs to be rewritten in order to implement first and double strike, which will be a pain. Programming the actual cards isn’t too hard if everything else is done. The cards are just the icing on the cake.

Hopefully this explains a little bit about who writes free software as well as why. I have also explained why free software tends to be buggy and hard to use. Personally, I feel like more free games should be written, since games are fun. I would love to play someone’s version of Marvel/DC’s VS or any other trading card game for that matter. The best way to support your favorite free software project is by sending e-mail, hint hint. I (Forge) can be reached at “mtgrares yahoo com”

Friday, October 5, 2007

Lorwyn Is Here

I feel like Paul Revere, and I paraphrase, “Lorwyn is here, Lorwyn is here.” Well at least the card pictures are here. This webpage has visual spoilers for every Magic set and personally I’ve downloaded them all, just so I can peruse them at my leisure. Unfortunately the Lowryn spoiler isn't up yet, so you have to settle for the random picture spoiler here.

For those of you who want to understand Lorwyn at a glance here is the lowdown. Tribal is back. Elves, goblins, elementals, shapeshifters, giants, and kithkin are all types of creatures that you will see. Each race is comprised of two colors in order to add more variety to the game. For example, there are green as well as black elves. Elementals and shapeshifters are “sub-races” that are sprinkled throughout all 5 colors. A few new sorceries and enchantments also have a creature type like Elf or Goblin. And lest I forget, Planeswalkers are new also. MTG Forge has 3 of these very fine cards and you can download it from http://sourceforge.net/projects/mtgforge/

Every block has some sort of mana fixing, and Lowyn is not an exception. As Ravnica’s duel lands rotate out of Standard, a new cycle takes their place. There are 4 other lands like the one below that reward you for playing tribal decks. (Yes, the lands are rare also. Rare lands are tough on the checkbook.) Who will win, the green Elves of Lockwood Forest or the black zombie Elves of Bayou Canyon? Tune in next time for the exciting result.

Gilt-Leaf Palace
Land
As Gilt-Leaf Palace comes into play, you may reveal an Elf card from your hand. If you don't, Gilt-Leaf Palace comes into play tapped.
tap: Add B or G to your mana pool.

Monday, October 1, 2007

My Job Interview With Wizards

Congratulations to me, I had a phone interview with Wizards of the Coast. I e-mailed Wizards about my program MTG Forge and they seemed a little interested. I hope to be hired as a programmer or at least a computer guy of some type, hey somebody has to keep those printers working.

The two people interviewing me were Elf, the lead programmer of Magic Online, you can look up his real name if you really want to, and some HR lady that had a British accent (sorry I forgot your name). Elf also said that he helped develop Marvel and DC’s VS game, cool. As a joke I wanted to ask Elf did he ever use goblins, but I didn’t have the courage to.

The funniest part was when Elf asked, “Why did you program MTG Forge?” And I said something like, “Well it let’s me play with expensive cards that I don’t own.” Elf sort of laughed and said that Randy Buehler (head Wizards guy) would have a fit if he heard my answer. I was telling the truth though. Who really owns a copy of Library of Alexandria?

All in all the interview went fine and I made small talk by asking how much did it snow in Washington. For what’s its worth, they said Washington was pretty moderate, since it is near the ocean, and it only snows once in awhile, who knew? I live in sunny, sunny, hot, hot Florida, so I think anything above Georgia is north. Hopefully I’ll be hired, but if not, I can always brag to my friends about the time I almost got a job at Wizards.

Thursday, September 27, 2007

MTG Forge 2.0

I am in the process of rebuilding MTG Forge from the ground up. That means all of the cards have to be reprogrammed from scratch, none of the old cards will work with the new version. Today I just programmed the mana pool. This will allow cards like Early Harvest to work correctly as well as any cards that generate mana like Dark Ritual.

I like the Scourge land Temple of the False God that gives you 2 colorless mana if you have 5 or more land in play. The idea of lands producing more than 1 mana is just cool. Currently MTG Forge cannot implement Ravnica’s bounce lands because they generate 2 mana. Oddly enough Ravnica’s expensive duel lands were easy to program since they only generate 1 mana.

This is a rough outline of the features for 2.0 that I am shooting for. X spells and abilities like Fireball and Blaze. The computer is able to play counter spells, instants during combat, and at end of turn. (The computer can already use Remove Soul, yeah!!!) Phase stops, so you can set which phases to stop at, like end of turn. (Thankfully I have this tiny part already done, go me!!)

The ability to make a sideboard and use it during a match. (I have no idea if the computer should use his sideboard, maybe yes, maybe no. To begin with, it will be a no, since it is easier to program.) Quest mode where you start with a crappy deck and you have to win/buy better cards. Puzzle mode where you have to win by the next turn.

And hopefully being able to program most of the cards in a set like 10th Edition or maybe Lorwyn, so you can play real block decks. I’ve enjoyed programming old rares like Ancestral Recall and Flametongue Kavu, but they lack cohesion. I almost forgot, but I want to be able to code cards like Hypnotic Specter that trigger on combat damage or just regular damage.

Obviously this is sort of a long wish list and I might not be able to get it all done, we’ll see. Just a word of warning, MTG Forge 2.0 is still about 6 months away and will probably only have 50 cards, so you will have to enjoy the current version for awhile :)

Monday, September 24, 2007

Chandra Nalaar

Chandra is the 3rd planeswalker to be revealed and she is the most powerful so far. For a list of all planeswalkers and all known Lorwyn cards see here. Chandra costs 3RR and immediately pings your opponent for 1 or destroys any creature with a toughness of 6 or less. So all in all, Chandra will do something when she hits the board. If left unchecked for 3 turns she will deal 10 damage to you and to each of your creatures, OUCH!!! So you either have to win before she blows up your world or attack her with everything that you have.

In my opinion Liliana Vess is the weakest of the three planeswalkers. She needs your opponent (or yourself) to discard some quality creatures in order to return them to play. In general this is a weak strategy, but she combos well with cards like Damnation. Garruk Wildspeaker is a little better since he can generate three 3/3s or cast Overrun (all your creatures get +3/+3 and trample until end of turn). So Garruk would do well in a swarm deck, he works best if there are creatures that can be pumped up. Chandra is the best because she doesn’t have any requirements, she doesn’t need creatures in play or in the grave. Direct damage is always a surefire way to win and Chandra does that in spades. At worst she is a 5 mana fog.

Thursday, September 20, 2007

Banned From Star City Games

Please pardon me while I rant and rave. Skip this article if you don’t want pure, biased opinion. I was banned from the Star City Games forums for one week because I advertised my program, MTG Forge, too much. Wow, talk about criticism. I did post a short advertisement in the Constructed – Type II forum and it has already gotten 500 views in only 3 days, so does that really sound off-topic? I just programmed 3 Planeswalkers, the newest, greatest cards ever, that aren’t even released yet and I get banned for telling people about that? Am I missing something? Star City published my article but they don’t want me to talk about it in their forums?

In the history of Magic there are only 4 notable pieces of software: Magic Online, Apprentice, Magic Workstation and now MTG Forge. A new piece of significant Magic software is written as often as your Mom changes her hairstyle. MTG Forge is absolutely free and I personally feel like I’m giving away gold here, although I’m sure some people would disagree. MTG Forge is aimed at the casual crowd and is infinitely replayable. (Your top 4 could include Magic Set Editor since it lets you make your own cards.)

So maybe people always get banned for doing something that they feel passionately about. Miles Davis made a few electric/jazz/rock/funk albums and people either loved it or hated it, but at least his work evoked emotion. I think everyone who plays Magic Online would have a good time playing MTG Forge. Help me spread the word!!! Have you ever been banned?

Tuesday, September 18, 2007

My Opinion on Planeswalkers

Shoot, I really wished I loved them, but I don’t. They seem like the ultimate casual card. Every kitchen table player will want one but everybody else will think they are just a novelty. Liliana Vess is both discard and graveyard recursion wrapped together, but she doesn’t win games. She can break stalemates and she is probably really good against a blue control deck, but she is painfully slow.

At best you will be using her discard ability on turn 5, but your opponent isn’t dumb, so he’ll probably just discard a land or something. She could go off on turn 7 with her super-duper return all creatures from all graveyards into play under your control, but that only matters if there are enough good creatures to make a difference. On the upside I did make a fun mono-black deck with Vess that had Damnation, Delirium Skeins (Each player discards 3 cards) and Royal Assassin that was pretty good.

I think Garruk Wildspeaker is a little bit better. For 2GG you can get a 3/3 now and two more 3/3 creatures later, not a bad deal at all. I guess he isn’t strictly card advantage, but at least he is creature advantage. If you don’t want to get more creatures, you can always untap two lands now, which is always a good thing, and then pump up all your creatures on your very next turn. Garruk is best in an aggressive swarm deck, because he is even a better pump than Tromp the Domains.

Garruk just seems more powerful because he pressures your opponent while Vess is some sort of crazy combo card that works sometimes. I could win with Vess but only if I was already winning and was just stalling in order to use her abilities. Even the computer never beat me with Vess because she is too slow. I would just ignore her and win anyways. Hopefully the other planeswalkers are a little bit better.

Thursday, September 13, 2007

Programming Planeswalkers

Wizards has been hyping planeswalkers more than the new 2008 Chevrolet Mustang (I’m pretty sure Chevrolet doesn’t make Mustangs but I just needed a snappy analogy.) In short planeswalkers come into play with loyalty counters. These counters are used to pay for the abilities on the planeswalker. One ability can be played each turn, otherwise the planeswalkers would be insane.

So far each planeswalker has one ability that adds counters to itself. Planeswalkers can be attacked, so during combat you can attack either your opponent or his planeswalker. Blocking works like normal, you can block creatures that are attacking you or your planeswalker. If a planeswalker receives any damage, then remove a counter. When all the counters are removed, put it in the graveyard. See here for the complete list of rules.

So far Liliana Vess and Garruk Wildspeaker are programmed into MTG Forge. I had some code named “Combat” that handled combat, attacking and blocking, so I just had to add a 2nd copy of the Combat code that handles creatures that are attacking/blocking the planeswalker. It probably took me 30 minutes to understand my previous rewritten combat code to figure out that it would work for planeswalker combat also. Actually I had to change one whole line so the code would work for both types of combat.

The planeswalker abilities were harder to program and each planeswalker takes up about 200 lines of code. This is the first time MTG Forge has had an ability that effectively costs 0, so I had do some fancy pants programming. The code is pretty hacked together but it works.


Restricting the abilities to once per turn also added to the messy parts of the code, but thankfully it works. The computer AI for Liliana Vess is approximately 10 lines and I was a little surprised it was that easy, thank goodness for good software design. All in all adding the extra combat and Vess and Garruk probably took around 10 hours.

Monday, September 10, 2007

Useless Magic Facts

Yes you can amaze your friends with obscure trivia this is probably correct. (Note: you will only astound your friends if they like Magic, if they don’t, well, get new friends.)

Well let’s start with some big numbers. How many unique card names are there? 9,148 This includes the unsets and vanguard. Same question, no unsets and vanguard. 8,847 Just answering a simple question like “How many Magic card are there?” is a tough, that is a lot of cards for me to count, ha ha that was a joke.

Onward, and upward for more useless info….processing….How many times has Wizards re-printed the same card in different sets? 5,379 For example Chromatic Star was first printed in Time Spiral but was reprinted in 10th Edition. My number might be off some, but it seems right. Wizards has reprinted a whole buncha cards a whole buncha times, all for flavor reasons I’m sure, lol. Why make up new cards when you can just print old ones?

How many cards have double X mana costs? 8 cards, Builder's Bane, Chalice of the Void, Conflagrate, Decree of Justice, Meteor Shower, Orochi Hatchery, Part Water, and Recall. What card has the highest mana cost? Well not counting Gleemax with a cost of 10,000. Autochthon Wurm has a converted cost of 15. No one pays the whole 15, that would just be stupid, because Auto Wurm has convoke.

How many cards cost 0? 36 How many creatures have a power of 6? 133 How many cards have a toughness of 4? 528 What card has the most single colored mana symbols? Rushwood Elemental, it costs GGGGG And finally how many cards require all 5 colors to cast? 10 cards, Atogatog, Coalition Victory, Cromat, Genju of the Realm, Karona, False God, Last Stand, Scion of the Ur-Dragon, Sliver Legion, Sliver Overlord, Sliver Queen. I also remember that Bringer of the Black Dawn and his 4 bundies have an alternate casting cost of WUBRG. I’m not sure that anyone ever got a Bringer into play, but at least everyone talked about them, c’est la vie.

Thank you, thank you, join me next time when I count the number of hairs on my knuckles, good night.

Friday, September 7, 2007

Shandalar

Here is a look at another Planeswalker. A new version of MTG Forge will be released soon that has planeswalkers. Vess is already programmed.

There exists an old MicroProse game called Duels of the Planeswalkers but many players “in the know” refer to it as Shandalar, which is the name of the in-game world. I downloaded my version from http://www.the-underdogs.info/ Shandalar is pretty good, it has three main parts. One, you can play against the computer using all of the cards, a la constructed. Two, you can play in a sealed deck tournament. I found this very impressive and it actually inspired me to write MTG Forge. Three, you enter the world of Shandalar and try to collect cards in order to defeat the 5 evil wizards, one for each color.

Defeating the wizards in Shandalar takes a good amount of time or luck. It is sort of like a primitive Diablo, you fight creatures (duel) and try to build your deck into something competitive. You usually start out with a handicap, you will be at 9 life and your opponent might have 16 life. Sometimes your opponent even starts the duel with a creature in play, which is really astonishing the first time you see it. Starting out with even Llanowar Elves in play is a huge advantage. All of the duels are for ante (you win or lose a random card from your deck), so you need to win because losing will mess up your deck.

The graphics are very basic, you have to remember that the game was made in 1996. Shandalar looks like a very basic RPG where you walk around from town to town encountering random fiends and completing basic fetch quests. It takes a long time to assemble an optimized deck, so you will often use whatever decent cards that you have around. The duels tend be to short because both you and your opponent start out with less than 20 life, so aggro is the definite way to go. Not being able to mulligan really hurts because you often get mana flooded or screwed. It is still pretty interesting if you want to try it sometime. The last guy has 100 life and finally I did beat him (you just have to play him, you don’t have to win). I did rid Shandalar of evil for 1,673 years. :)

Tuesday, September 4, 2007

Planeswalkers

Take a look at this card, isn’t it different somehow? Planeswalkers have been a part of Magic’s history since the beginning and now they are getting their own new card type. Magic’s first new card type since, well, ever!!! Planeswalkers are to be introduced in Magic’s next release, Lorwyn, and were first mentioned on the Future Sight card Tarmogoyf. Get the latest info on Lorwyn from mtgsalvation.com, I hate to advertise another site but they have pretty good spoilers.

Supposedly there are just 5 planeswalkers in Lorwyn, one for each color. I was excited to see an actual planeswalker card this early but unfortunately it still leaves me a little bit clueless. It seems that these new planeswalkers (boy that’s a big word) come with some rules attach that regrettably isn’t mentioned on the card (good luck to newbies).


Let’s review what we can learn from the card. One, it costs 3BB, that’s obvious but you have to start somewhere. Two, the 5 in the lower right corner seems to indicate some kind of resource like strength or magical ability that is left. Personally I call this new resource "magic mana." Three, this new resource is used to activate the abilities of the card, notice the similar shapes outlining the numbers. Four, there is a way to increase your supply of the new resource.
OK, this is pure speculation but I believe there can be only one planeswalker in play at a time. It seems like it would be weird if two planeswalkers were in play together, but it would better emulate a wizard-vs-wizard duel. Shoot, I wish I could figure out how to pay "+1". The rest of the abilities seem simple since they have a negative sign to show that you are actually subtracting something like magical mana.


After staring at Liliana Vess for 15 minutes I’ve made a few educated guesses that seem to make sense. Vess comes into play with 5 counters and she has 3 abilities that add or subtract those counters. Her first ability reads "+1: Target player discards a card" which seems to say "add another counter to Vess and make your opponent discard a card." (You could target yourself if you had a juicy creature in hand.) But the ability to make your opponent discard his whole hand for 5 mana is too strong, so I came to this conclusion. You can only play a planeswalker’s ability once per turn, probably only during your upkeep. This would limit you to only be forcing your opponent to discard one card per turn, which is more acceptable, while making you wait until turn 8 until you can put all creatures from all graveyards into play under your control.


I know my guesses are no better than anyone else’s, but at least I tried. So the first planeswalker Liliana Vess is revealed yet remains a mystery, but hopefully not for long. I’m sure the first split cards were pretty confusing to players also.

Thursday, August 30, 2007

Programming Magic 3

The AI (artificial intelligence) is the most important aspect of MTG Forge. Yes, Magic is a fun game, but you need to have a challenging opponent.

I’ll let you in on a little secret. I don’t have the Internet at home. Are some of you shocked? I don’t have cable either, ha. Double shock!! But don’t worry I have used Magic Online and at first I was very impressed with everything. The games played very smoothly and I understood the phase stops and everything. Unfortunately after awhile I got irritated waiting on my opponents and “random” disconnects when I was winning. The high card prices also frustrated me, so MTG Forge was born. My goal was to provide fast, fun games of Magic. I am very happy that MTG Forge is able to simulate drafting and sealed games. Currently sealed is my favorite and I often make 2-3 decks with the same pool of cards in order to see which configuration works the best. Sometimes I play “speed Magic” and see how fast I can click and still win.

OK, back to the nitty-gritty of the AI. The AI of course has many different parts. The main skeleton is named ComputerAI_General and it calls the other parts of the AI depending on the phase. This part of the AI has code which handles playing a land, paying for a card, attacking, and blocking. Each of these separate parts has its own code, for instance ComputerUtil_Attack2 decides which creatures the computer will attack with.

The AI is roughly divided up into 2 parts. Code that is built into each specific card and code that attacks, blocks, plays a land, and pays for cards. Some AI is built into each card. For instance, the computer will target creatures with a defense of 2 or less when choosing targets for Shock. The AI code in Shock chooses the targets and decides when the computer should play it. All of the cards and their AI is crammed in CardFactory, which is roughly 10,000 lines long. Yes it is really, really long.

The AI is sub-optimal sometimes when playing cards like Wrath of God and Giant Growth. When playing Giant Growth, the computer will target a creature that will attack but won’t target a 2/2 if you have a 2/3 blocker. The computer will also not use regeneration effects or counter spells unlike the old Magic game Duels of the Planeswalkers, also known as Shandalar. I find it impressive that Shandalar did do some things right and occasionally even pulls off some pretty good 2-card combos. I am very pleased how MTG Forge’s AI worked out. It is smart enough to provide a good game which was my goal. I have played MTG Forge more than probably anyone else, I’m guessing 100+ hours, but I still love it. Maybe next version I’ll add something that shows the “total time played” so you could see how much you really love Magic and of course for bragging rights. :)

p.s. Sid Meier is credited as both a game designer and programmer in Shandalar.

Monday, August 27, 2007

Programming Magic 2

Magic is a big game. Chess and checkers is a breeze to program compared to the juggernaut of Magic. Thankfully our brains often divide big tasks into smaller ones and that is how I programmed MTG Forge.

The user interface is one separate part and can be independently changed if needed. Phases are important, so a different part of the code (an object) keeps track of the phases and mostly just advances the phase to the next one. Clicking on a card in your hand usually means that you want to play a spell. The code then lets you tap your land for mana and is called Input_PayManaCost. If you click on a card in play, the card is checked to see if it has any abilities and if it has more than one ability the user is given a choice. If the ability has a mana cost, Input_PayManaCost is used again.

Combat is pretty complicated so different code handles attacking and blocking. Input_Attack lets you declare your attackers and checks for a number of things like is the creature untapped, does not have summoning sickness, not already attacking (it checks for duplicates), and does not have the keyword defender. Input_Block handles blocking and just checks to see if the blocker is untapped and able to block. Input_Block also checks to make sure a flying attacker can only be blocked by another flyer, or a creature like Giant Spider with reach. A few creatures like Daggerclaw Imp cannot block.

Combat is still not done because if there are multiple blockers you get to assign damage. Although this situation is rare it helps to solve the problem that “the biggest creature always wins” like in Yu-Gi-Oh. Once you get to the Combat Damage phase, if your creature is going to receive any damage, it will show how much damage after the “Assigned Damage” label in the upper right of the screen. Bouncing your creature during the Combat Damage step will still allow your creature to deal damage but not to receive any. Giant Growth effects should be played during the “After Declare Blockers” phase.

So MTG Forge is made up of these large pieces paying the mana cost, attacking, blocking, and the user interface. Currently MTG Forge cannot handle any X spell like Fireball or Blaze because the “pay mana cost” part of the program cannot handle it, also the card would have to know what mana was used to pay for it. In order to add First Strike only the combat portion of MTG Forge would have to be changed. Dividing up the program into large modules helps

Thursday, August 23, 2007

Constructed Blues

For some reason I don’t play MTG Forge’s constructed mode (all the cards) very often and in fact it is my least favorite mode. When you have all the cards, constructed mode feels fake for some reason. On the other hand sealed and draft games are super fun. Currently my favorite format is sealed since it takes less time and I enjoy playing different color combinations to see what colors are the strongest.

In real life when I played constructed on Magic Online it felt different because I never had all the cards that I really wanted. I never had some chase rare and only a handful of useful uncommons to choose from. For me it was trying to make the best constructed deck with my puny card pool, which is currently how I view limited games. It was exciting to win against a better more expensive deck with lowly commons and uncommons.

Pro Magic players have said time and time again that drafting is infinitely more fun that constructed. Basically constructed is solvable. By solvable I mean that there will be one or more tier 1 decks and the rest are rubbish. Ideally the tier 1 constructed decks would work like rock-paper-scissors. Deck A beats B, B beats C, and C beats A, so it all goes in a circular fashion. If there is only a single tier 1 deck then the format becomes stale. Personally Dragonstorm seemed like the best deck until 10th rolled around, stripping it of Seething Song. Back when Mirrodin was around, Arcbound Ravager decks ruled the roost and were eventually banned. But the damage was already done, sales and tournament attendance was down.

So back to limited games, they have more variety and that is why I love them. (I know there are a variety of alternative formats like peasant, all commons and uncommons, and singleton, where you only have 1 copy of each card.) What formats do you play?

Monday, August 20, 2007

Programming Magic 1

Programming some parts of Magic: The Gathering is simple while others are quite hard. First question, how many zones does Magic have? From the comprehensive rules 217.

“There are normally six zones: library, hand, graveyard, in play, stack, and removed from the game. Some older cards also use the ante and phased-out zones. Each player has his or her own library, hand, and graveyard. The other zones are shared by all players.”

Even though the answer is six, each player has his own library, hand, and graveyard, so the more correct answer is that Magic has a total of nine zones. MTG Forge uses a CardList, an ArrayList that only holds Card objects, for each zone. MTG Forge actually has more than 9 zones because it divides up zones into the stack, human hand, human graveyard, human removed from game, and corresponding computer hand, computer graveyard, computer removed from game. The zones are relatively straight forward to program because the only actions you can do is add a card, remove a card, and find a card.

Some complications occur when finding a card because multiple cards with the same name may be in play at the same time. How do you differentiate between different cards with the same name? The answer was in the old MicroProse game called Duels of the Planeswalkers, also known as just Shandalar, http://www.the-underdogs.info/game.php?id=1550 It had an option that allowed you to turn on the card’s number. So the answer is to give every card a unique number and to find cards based on that number, which is the method I use in MTG Forge. Magic Online most certainly uses the same method but it is transparent to the user since it is more user friendly and identifies the target with fancy arrows.

I know assigning cards different unique number isn’t exciting, but it is a critical part of programming Magic. Most programming is very, very boring, and it takes a great deal of time to get anything working. So I’m very happy with MTG Forge :)

Thursday, August 16, 2007

Wild Draft

Do you remember that old TV show that was named the “Wild Wild Wild West,” well I wanted to name this column “Wild Wild Wild Draft.” Thankfully the sane part of my brain booted up and I decided against it. What sort of draft makes you choose between a Mox and Meloku the Clouded Mirror? The choices are antagonizing. One of my draft decks featured 2 Moxes, 3 Serendib Efreets, Ancestral Recall, and Keiga, the Tide Star, which makes it the most expensive limited deck ever.

No I wasn’t drafting Alpha, but I was drafting some of the best cards from Alpha and from all of Magic’s history. I wrote this little program called MTG Forge that lets you play and draft against the computer. Someone suggested drafting all of the cards programmed with no rarity, so Juzam Djinn comes up as often as a common land. I thought it was an insane idea, but I tried it. This sort of crazy drafting is the most fun ever. Picking between Flametongue Kavu and Rorix Bladewing is just grueling. What is better, Wonder or Regrowth? Does Godless Shrine beat Terror or vice versa?

The version of MTG Forge that I'm talking about is named "“08-06-mtgforge-crazy-limited” As always you can download MTG Forge from http://sourceforge.net/projects/mtgforge

OK, so I open my first pack and what do I see. The standout cards are Birds of Paradise, Helldozer, Jokulhaups, Keiga, the Tide Star, and Kiki-Jiki, Mirror Breaker. Man, I wish I could open a booster like this in real life. I read once that a game, video or otherwise, is made up of interesting choices, unlike life. Drafting like this gives you a ton of interesting choices. Once you draft a Mox, you will never go back.

Monday, August 13, 2007

Remembering Card Names

I love reading and comparing Magic articles. Does this writer agree with that one? Do they have the same opinion on anything? But I do detest having to look up about half or more of the cards to see what they really do. Yes we all know Shock deals 2 damage, but what does Sudden Impact do? I remember most cards by their art and I presume most other people do the same. I do tend to remember the card better if I have actually played with it.

To look up cards I could just click on the card, but I’m not online all the time, so I just use Apprentice. It may not be fancy, but it gets the job done. A few online stores show you the card text when your mouse is over that card, which I think is great. You can quickly lookup the cards you don’t know without all the cutting-and-pasting that I do.

I could do a whole side project that takes a web page and adds all the info when your mouse hovers over a card. I probably won’t, but it still would be a fun project that hopefully would be used by other sites also. I personally don’t know much about Javascript but it is supposed to be easy right? Just my two cents. :)

How many card names do you know?

Friday, August 10, 2007

MTG Forge – Crazy Draft Version

I really enjoy playing limited games on MTG Forge. Sealed is a nice challenge and is fun because I win and drafting is a harder challenge, but still very winnable. And best of all no money is exchanged for little bits of colored cardboard, you know what I mean right? Ok down to my point, I released a new version of MTG Forge called “08-06-mtgforge-crazy-limited” that lets you play draft and sealed with all of the cards with no rarity. You will see a Mox Jet as often as Llanowar Elves. As always you can download MTG Forge from http://sourceforge.net/projects/mtgforge

This type of flat rarity makes draft/sealed games more explosive than monkeys fishing with dynamite. Do you draft a duel land or a big, game-winning creature? The decisions are hard, but a lot of fun. No real archetypes exist since you are seeing cards from a pool of 400. I wanted to call this release of MTG Forge “Johnny Edition,” but I doubted anyone would know what I was talking about. MagicTheGathering.com column “House of Cards” writer, whatever his name is, writes articles that related to “Johnnys.” Supposedly Johnnys like surprises and crazy combos, but I’m not sure.

Also a word of warning, it is harder to win. Instead of winning 95% of the time, you will drop to about 70% because sometimes the computer will drop some bombs and there is no way to recover. So yes you will probably lose a fourth of all your games, get ready to be served.

I did do a few bug fixes. Akroma, Angel of Fury now has flying. I thought Akroma, Angel of Wrath was hard to cast at 7 (5WW), but she really costs 8 (5WWW). Animate Dead and Beacon of Unrest didn’t set the controller of the card correctly, so things like Soul Warden would give your opponent life instead of you. And the computer could target artifact creatures with Ashes to Ashes, which is a no-no. Ashes is an insane card, it basically destroys TWO creatures for only 5 life. I think it is even more unfair than Wrath of God. I removed Ashes from the sealed and drafting card set.

Once I drafted two Serra Angels, two Moxes, and two Glorious Anthems. It was a thing of beauty. What was your craziest draft?