-------------------------
Crosis, the Purger
Dromar, the Banisher
Numot, the Devastator
Rith, the Awakener
Treva, the Renewer
Vorosh, the Hunter
Fixed 2 Legendary Dragons
-------------------------
Oros, the Avenger
Teneb, the Harvester
If we have like UEOP ( until end of phase| until end of step ) keyword this will be perfect, but for now I use oneshot. :)
- Optimized 163 cards (Card list --> First comment).
Most of them profit from the much more detailed combat trigger system and the new types of damage prevention.
- Added 17 tests to save Zethfox's additions for the future.
- Fixed issue182.
- Several creatures with upkeep costs.
- Almost all creatures with Echo.
- Force of Nature and Lord o f the Pit are softcoded now.
Card list -> First comment
Fixed issue389.
Most of the cards are based on the last adds by salmelo, while some few cards could have been added for half a year or more.
2 weeks of intensive testing are over, and I think all cards will do what they should but if you still find something discussable after testing them by yourself, plz post it here!
Card list -> First post.
- matched card names of flip cards and split cards in _cards.dat and mtg:todo.dat
- removed the now superfluous todo.dat files, the file mtg_todo.dat replaces these.
Also re-enabled the cards which had their names changed to make them work. (Example: the card code for "Vorosh, the Hunter" only works if thecomma is removed from the card's name.) These cards are a maintenance hazard since they a) require changes to _cards.dat if their names are corrected later, b) disrupt translation, and c) cause problems for external tools like MTG Studio which have the correct names in their database. However, only a few cards are affected by this, and I didn't want to remove them because Dr. Solomat has invested quite some effort top make them work. I added comments to these cards in mtg.txt as well as in the respective _cards.dat files to reduce the risk of further maintenance problems for these cards. In any case changing a card's name to make it work should be considered as a makeshift solution at best, please try to prevent it when possible.
After weeks of hard work, I can proudly present you this huge package of cards, based only on already existing card code elements.
Some examples and important notes:
- Cards that get buried if you don't fulfill a condition
1. when they enter the battlefield (Hidden Horror[WEL]; Mercenary Knight, Thundering Wurm [both POR])
2. during your upkeep (Endless Wurm[USG]).
- Cards that allow to draw a card, then discard a card when entering the battlefield or damaging an opponent (Owl Familiar[POR], Looter il-Kor[TSP]).
IMPORTANT NOTE: Those cards work only correctly because the draw effect resolves before the discard effect.
Instants and Sorceries with such effects or permanents that have an activation cost for drawing, then discarding a card won't work because the two effects don't trigger in the correct order.
- Land cycle from Visions and Planeshift (both very puzzling, but working perfectly!)
I also updated World enchantments (tested & working, see rules for them in Gatherer!)
Several card fixes.
If you have any questions, post them! ;)
- IMPORTANT: Legendary is not an ability anymore, creating cards with super types should be much more natural. You can now say "type=Snow Land", and stuff like that. No backward compatibility!!!
Important: I just realized that the fix to Reiver Demon will probably lead to problems later on. The problem is this: Reiver Demon has an ability "When yu play this from your hand ...". This was coded as @moveto(this|mybattlefield) from(mayhand). Which doesn't work, because the card doesn't actually enter the battlefield from the hand, it enters from the stack. So, "@moveto(this|mybattlefield) from(maystack)" has the desired effect. However, IIUC, spells played from anywhere else (e.g. from the graveyard, if they allow that) should be placed on the stack to. Hence, the "fixed" trigger will also fire in this case, which is wrong.
This means that we can't actually code "played from ..." entirely correct at the moment. Is there a solution for this?
According to the rules, only a copy of a spell enters the stack (never the spell itself), so could the "from()" part access where the card actually came from?
Do we need an @played trigger to differentiate between moving a card and actually playing it?
Notes to programmers:
1. This feature uses an awful lot of copy-pasta, using "protetcion from()" as a base. While I'm learning the architecture, it's easier for me to have a dedicated single-purpose piece of code to work with, than trying to create multi-purpose code. I'm aware that this isn't a very elegant approach though, and I hope to be able to refactor additions like this into multi-purpose code once I have a better understanding of the architecture as a whole.
2. Please check the questions I'll add in my next code comments, specifically about AI integration and activated abilities / instants / sorceries.
3. I did have a crash (with the debugger complaining about stack corruption around the cd variable) during testing. I wasn't able to reproduce it though. I did have to clean the solution in-between when I updated to the primitives system, so perhaps there was this cleaning solved whatever corruption was in my files. I'm mentioning the issue in case someone has an idea on where my code might be risky (I'm still probne to making beginners mistakes).
- fix issue 168 (kudzu)
- Fix issue 162 (copy VS shroud). This fix introduces a new keyword: NotATarget() instead of Target(). (Which was the best way for me to keep some kind of backward compatibility/ not alter the code too much / fix the bug)
text=Destroy target creature. It can't be regenerated. That creature's controller puts a 3/3 green Ape creature token onto the battlefield.
auto=bury && token(Ape,creature,3/3,green) targetcontroller"
Doesn't work, if cast on creature the player is controlling, it works, but when cast on opponent's creature, token ends up on player's side.
* mtgid now defaults to 0.
* TextScroller will not update when empty.
* Cache now moves WCachedResources we're finished with to a garbage pool for later use (to reduce memory fragmentation).
* Demo still crashes... but I'm thinking that has to do with fragmentation, not a leak?