Monday, May 23, 2011

Forge Commits

Committing is posting your code from your individual computer to the server where the code is stored.  The Forge project has 50 or more commits a day, which is very impressive.

Every commit is just one small change.  Let's take a look at a few.

The AI will use ZoneAffecting more often at the end of human turn.

This means that the AI will try to use more effects at end of turn.  ZoneAffecting is a scripting keyword which is used to create cards.

Another small step towards Mana Drain script-only.

Harding coding cards is a really big pain, so the more scripting the better.

Fixed Akki Coalflinger. Improved AI of Pyrohemia and Swans of Bryn Argoll.

This commit changed 3 things.  Apparently Akki Coalflinger wasn't working (an update probably broke him) and the AI has a hard time using complex cards like Pyrohemia (which deals damage to all creatures) and Swans of Bryn Argoll, which ignores damage but turns that damage into card drawing (1 damage = 1 card drawn by your opponent).

Doomgape is not correct. It can not be scripted at this time.

I think the comment says it all. 

Converted March of Souls to script. 

March of Souls can be scripted and the java code for the card can be removed.  (I coded March of Souls back in the day because it was so unusual.  It destroys everything like Wrath of God but also creates 1/1 tokens for every creature on the board.  Usually March of Souls was worse than Wrath but in a jam it might help.)

Converted Lorthos the Tidemaker to script.

Always a good thing. 


Added Magus of the Moon and Blood Moon.

Both cards turn non-basic lands into mountains.

Make sure state-based effects are checked when a land is played by either player, not just the computer.

State effects can get very complicated and it is hard to make sure that they are called at the right time.  Basically state effect needs to be called/checked after anything happens in Magic, which is generally when somebody plays a land or an ability/spell is put on the stack or resolved off of the stack.

Forge is composed of literally millions of these small programming changes.  Thanks to the development team for their hard work.

1 comment:

tehdiplomat said...

"Every commit is just one small change."
This is not quite true. Most of the 50 changes a day are small changes, but every few weeks we do have one very large change that can affect dozens of files (or if they affect the scripting structure, thousands)