I tryed everything for weeks, adding lines of codes with no success...Finally the answer was so simple as 2 lines of code...
Also added/removed from code Spitting earth and corrupt... Need to chase and remove all the lookalike/alias in the rest of the code. And also as usual will require further testing...
Grü.
L.
Test suite passed with exception of Hymn of rebirth ?? also at least dingus egg is also OK.
Ideally the whenever thing should be coupled with a kind of targetchooser thing to be put in the parser (would also allow colored cards...) ..
Todo: add a may ability option since lot of cards with this function use "may" (e.g. Deathgreeter - ALA and Leonin Elder - MRD)
I did not remove the now obsolete code dingus egg and ankh of mishra...will wait until new portion of code is tested more..
Grü
- Replaced the BasicAbilities Array with a map. This reduces the size of MTGCard from >500 bytes to 392. Should be cool for people who have memory issues
PLEASE REVIEW this one.
I removed all unusued portion of code, some other cleaning work could be performed (will discuss in forum).
Also just added "@each" as triggered ability in order to have it work properly with most cards "currentplayer" should be added to the TargetChooser.
- Magic 2010: Combat Damages don't go on the stack anymore
- Comp rules: "goes to graveyard" effects don't go on the stack anymore
- Regenerate "fixed" (untested)
- Basic "ReplacementEffect" mechanism for damage prevention. Can be extended to other replacement effects with some limits.
- TODO: Damages don't go on the stack, the abilities that create them do.
Few comments:
I spent quite some time to make it work... made some test all working but experienced some random crash in windows version (debugging did not help much) don't know if i broke something or if it is due to other SVN addition.
Some other cards are similar and could be hardcoded/aliased (Overtake - MRQ, Ray of Command - ICE,MIR, Slave of Bolas - ARB, Spinal Embrace INV, Unwilling Recruit EVE) we could discuss about them...
I think it is the last card that was missing for the red premade 10E deck. Now 10E has 255 cards and is the set with the most cards...
Grü.
L.
* Add the rolling phasebar.
* This is a preview version. It shares most of the code with the definitive
version, but when the real code is checked in, this will be deleted.
Added Graveborn Muse (just missing one muse now, too complicated for me).
Added Beacon of destruction,unrest and immortality.
Added Traumatize
Added Verdant Force
All tested (except beacon of unrest) and working.
Added "untap all" to the parser (not tested but should work since it is the same as tap all)
Modified "cantbeblockedby" also still don't function properly, atm it cause the creature to be "unblockable"... Should work, I don't get it !!! (Why ???)
Also added Seedborn Muse (like all the Muse a very Powerfull card), especially as combo with cards that "DOESNOTUNTAP" during your untap phase...
I tested Elven Riders successfully, but not juggernaut yet... Also if this new keyword function correctly we remove abilities like FEAR and UNBLOCKABLE... Needs to be further tested...
Feedback and extensive test are welcome on this one...
Added ability DOESNOTUNTAP , see _cards.dat from 10E (Colossus of sardia, dehydratation). Test suite OK. The ability does not work with enchant creature (as for protection from...) So Dehydratation is hardcoded (can be aliased if necessary) Small bug with dehydratation, will untap creature when cast... WHY ? Any Idea/Solution welcome...
- Magic 2010 - inplay becomes Battlefield. Wagic is still compatible with both, but try to use "battlefield" from now on. For example moveTo(battlefield) instead of moveTo(inPlay)
- Magic 2010 - "Removed from game" becomes "Exile". Wagic is still compatible with both, but try to use "exile" from now on. For example moveTo(exile) instead of moveTo(removedFromGame)
- Magic 2010 - "End of turn" step becomes "end" step. Wagic is still compatible with both, but try to use "end" from now on. for example: "@next end" rather than "@next endofturn" (not sure this is more clear than before, but at least it's consistent with the rules)