Magic is great game full of wonderful, complicated cards. Today I'm going to talk about some of the hardest, thorniest cards to implement.
MTG Forge has 2,100 cards so there are plenty of complicated cards to choose from. The planeswalkers stand out in my mind. I had to add an extra combat phase which wasn't too hard (although MTG Forge still suffers from the flaw that if your opponent has two planeswalkers, you can only attack one of them). The planeswalker's abilities were the hardest part because I had to write the code from scratch which involves some very heavy hacking.
Many planeswalkers have rather common effects but Elspeth, Knight-Errant ultimate ability says "For the rest of the game, artifacts, creatures, enchantments, and lands you control are indestructible" which isn't something easy like dealing damage, it generates an ongoing effect. Each of the planeswalkers took about 220 lines.
Both Adarkar Valkyrie and Kiki-Jiki Mirror Breaker both have abilities that copy creatures and each take up about 100 lines of code. Adarkar Valkyrie lets you "steal" a creature if it is put into the graveyard and Kiki-Jiki lets you copy one of your creatures for one turn, then it is sacrificed. Both cards are extremely fun to use because of the broad variety of creatures that have effects when they enter or leave the battlefield. Flametongue Kavu is a perfect example. He is a 4/2 and does 4 damage to one creature when it enters the battlefield. Combine him with Kiki-Jiki to really turn up the heat.
Incendiary Command was very hard to program but the card isn't that useful. It weighs in at around 200 lines. I coded it after my (failed) phone interview with Wizards. The head guy who called himself Elf or something, asked me how I would implement the 5 card cycle of Commands. I answered him then furiously coded Incendiary Command that night.
I eagerly e-mailed him the next day and ... well nothing happened. For some reason I chose Incendiary Command which is the weakest card in the cycle. When I add cards I usually like to get more bang for my buck, like a super big creature or a devastating spell. I wouldn't even pay 25 cents for Incendiary Command, it is a crap rare indeed. I would rather use the cheaper Pyroclasm which only costs 1R and deals 2 damage to each creature.
Kiki-Jiki is unusual because it creates tokens that have a name, typically tokens are nameless.