Two example codes:
[card]
name=Alabaster Leech
auto=lord(*[white]|myhand) white:+1
autoexile=all(*|myhand) resetcost
autograveyard=all(*|myhand) resetcost
autohand=all(*|myhand) resetcost
autolibrary=all(*|myhand) resetcost
text=White spells you cast cost {W} more to cast.
mana={W}
type=Creature
subtype=Leech
power=1
toughness=3
[/card]
[card]
name=Helm of Awakening
auto=lord(*|myhand) colorless:-1
auto=lord(*|opponenthand) colorless:-1
autoexile=all(*|myhand) resetcost
autograveyard=all(*|myhand) resetcost
autohand=all(*|myhand) resetcost
autolibrary=all(*|myhand) resetcost
text=Spells cost {1} less to cast.
mana={2}
type=Artifact
[/card]
autoexile=all(*|myhand) resetcost
autograveyard=all(*|myhand) resetcost
autohand=all(*|myhand) resetcost
autolibrary=all(*|myhand) resetcost
----> This code section is necessary, because manacost altering cards will keep their effect even when they have left the battlefield. RESETCOST erases all alterations which have no existing source on the battlefield anymore.
2) Added the new keyword TRANSFORM, which is similar to BECOMES. The main difference is that you can change single parameters of a permanent (color,type,...).
Example codes:
[card]
name=Memnarch
auto={1}{U}{U}:target(*) transforms(artifact)
auto={3}{U}:moveTo(myBattlefield) target(arifact)
text={1}{U}{U}: Target permanent becomes an artifact in addition to its other types. (This effect lasts indefinitely.) -- {3}{U}: Gain control of target artifact. (This effect lasts indefinitely.)
mana={7}
type=Legendary Artifact Creature
subtype=Wizard
power=4
toughness=5
[/card]
[card]
name=Dralnu's Crusade
auto=lord(goblin) 1/1
auto=lord(goblin) transforms(zombie,black)
text=Goblin creatures get +1/+1. -- All Goblins are black and are Zombies in addition to their other creature types.
mana={1}{B}{R}
type=Enchantment
[/card]
Important notes concerning TRANSFORM:
- IF YOU TARGET A CREATURE THE EFFECT IS PERMINENT.
- IF YOU TARGET THE SOURCE THE EFFECT IS UNTIL END OF TURN.
- IF YOU USE LORD THE EFFECT LAST TIL PERMINENT SOURCE LEAVES PLAY.
These restrictions will probably be changed in the near future!
3) Added 57 successfully tested cards.
Card list ---> first comment
4) Changed the name of several tokens: "()" used to cuase crashes when used in the name-line.
5) Added the new keyword NONBATTLEZONE for leaves play trigger optimizing. It can be used to replace the phrase "EXILE,GRAVEYARD,HAND,LIBRARY".
I will add tests for test suite in one of the next revisions!!
####### TEST SUITE PROVEN ########
All these cards are creatures which have a certain effect when being cast ("played" from owners hand).
Their code profits from the fact that KICKER is not optional in Wagic: This means that whenever you are able to pay Myojin's kicker cost for example (in this case it is {0} --> rate: 100%), it will enter the battlefield with a Divinity counter on it.
- Myojin won't get the Divinity counter
----> when brought into play from the hand with cards like Elvish Piper.
----> when brought into play from any other zone.
Zethfox: "Opponenthand gui access, cards that target(*|opponenthand) can now be coded as such, target chooser will activate allowing you to click the new icon under the avatar of the opponent and open the opponents hand Gui so you may select the target card."
Cards in opponents hand are only viewable when target choosing would allow you to enter that zone! ;)
- Added the new keyword "NAME". (by Zethfox).
When used in an autoline it replaces an autoline's "ability" text with a custom ability name.
The basic phrase is: "auto=name(whatever you want) &&".
Example card:
[card]
name=Order of the Stars
abilities=defender
auto=choice name(white) && counter(0/0,1,White) all(this)
auto=choice name(blue) && counter(0/0,1,Blue) all(this)
auto=choice name(black) && counter(0/0,1,Black) all(this)
auto=choice name(red) && counter(0/0,1,Red) all(this)
auto=choice name(green) && counter(0/0,1,Green) all(this)
auto=this(counter{0/0.1.White}) protection from white
auto=this(counter{0/0.1.Blue}) protection from blue
auto=this(counter{0/0.1.Black}) protection from black
auto=this(counter{0/0.1.Red}) protection from red
auto=this(counter{0/0.1.Green}) protection from green
text=Defender (This creature can't attack.) -- As Order of the Stars enters the battlefield, choose a color. -- Order of the Stars has protection from the chosen color.
mana={W}
type=Creature
subtype=Human Cleric
power=0
toughness=1
[/card]
The popup window for this card will now contain a list with
"white,"blue","black","red" and "green"
instead of
"ability","ability","ability","ability","ability".
This will make a lot of cards much easier to handle!
- Added 42 successfully test using one (or both) new keywords.
Card list --> First comment
Note that we did not add tests for both new keywords:
It is simply not possible to write them yet! They will follow as soon as they are possible. We guarantee that everything we submitted in this revision has been tested excessively!
Added ARC (although the set does not have official abbreviation. I putted the scheme in a separate todo.dat, mainly because I'm lazy of adding all the scheme alphabetically ordered into the todo.dat. Some cards do not have official ID now I've used ID from the numbering sequence of ARC that were unusued, will provide a full list later for tracking purpose.
modified the m11 cards.dat name, otherwise it does not load correctly.
moved some cards from mtg.txt into a "borderline.txt", probably some others should be added...
Daily build
The engine always handled it as "REGENERATE" and thus had to be renamed. Its new name is "CANTREGEN". It has been tested excessively by me and Zethfox. Now all cards with the former "cantregenerate" work as they should.
- I also added a test for "CANTREGEN" (Incinerate).
- Added the new keyword "FOG" (by Zethfox).
This is an equivalent for "PREVENTALLCOMBATDAMAGE", which only worked for instants and sorceries. "Fog" works only for permanents and is used in combination with the newly introduced parameter "ONESHOT"!
- I also added 2 tests for "FOG" (Maze of Ith, Spore Frog).
Both additions lead to several issue fixes:
Fixed issue286.
Fixed issue328.
Fixed issue332.
Fixed issue416.
- Removed Demonic Torment, Gaseous Form, General's Kabuto, Sandskin. Those cards never worked and could even not be fixed with "FOG".
- Optimized the code of the dragon-lair land-cycle from PLS and added 2 tests for them.
- Added 8 successfully tested cards. Card list -> first comment.