It fixes several problems with the newly introduced improvements concerning Counters.
Added 8 successfully tested cards, 1 of them is DARK DEPTHS!
Daily_Build update
Complete list in the first comment.
Salmelo:"Here is another patch, this time adding counters to target specifications, so now you should be able to target things with counters on them as well as use counters for criterion for Lord, aslongas, foreach, etc.
I had to muddle the syntax a little bit though, so heres an example, taken from gwafa hazid, whom I added to the primitives to test with.
lord(creature[counter{0/0.1.Bribe}]|opponentbattlefield) cantattack
obviously the part we are worried about is the counter part, note that those are curly braces { } and periods . instead of parentheses ( ) and commas , this is so that it does not conflict with how targets are normally parsed, which it did before I changed those. Counters still work the same way everywhere else though, you only need to use { } and periods in target code.
Also, you can use counter{any} to specify that it should look for things with any kind of counter on them, not just specific ones, this is used by Kulrath Knight, for example.
I also consolidated most of the code used to parse counter specifications, as it seemed unnecessary duplicating it three times.
Anyway, aside from this major addition, I also added Gwafa Hazid, Profiteer; and Kulrath Knight to the primitives, as well as a test file for each to make sure it worked.
Hopefully y'all will find this patch useful.
Oh, and I should point out that it only works with one Counter in the target specification, i imagine if you put two in the same one then it would either overwrite the first with the second or merge them into some sort of hybrid counter monstrosity, either way, I wouldn't suggest it. "
Cards with vanishing are also codable now. Have a look at the comments for explanation.
daily_build.
"@movedTo" in combination with "autograveyard" WORKS!" Thanks to Abrasax!
Fixed 18 cards, 1 of them is Rancor. Now works 100%, so issue311 is fixed.
You find a list of all added and fixed cards in the first comment.
- Added remove/add counters as a cost, patch by Salmelo, thanks man!. See primitives/mtg.txt -> Thallid to see how it works
- added test for i286 by salmelo
- added basic display for counters (this needs improvement) by salmelo
Note: I replaced paragraphs (which Wagic can't display at the moment) with the sequence " -- ". If that's not desired, they can be easily replaced, but I think they improve readability. Previously, paragraphs where transcribed into slightly larger spaces, and I found that slightly confusing when reading the texts in-game.
Note: I checked all changes manually, so in the cases where the value *has* to be different for the card to work (e.g.Covetous Dragon), I left the values as they were. In these cases I added a comment to the card code which notes why the values need to be different, so that no one else breaks the card by "correcting" them.
Note 2: You may have noticed that I used a fixed sequence of lines for all cards. That was a byproduct of the file unification process, but I think it's also rather useful. Above the "text=" line are the lines that we need to code (abilities=, target=, auto= etc.). Below the "text=" line are the fixed values (mana=, type=, power= etc.) which we only need to touch if either the card gets errata'd, or we need to do some tricky coding (e.g. Covetous Dragon). So, in other words, everything below the "text=" line should be okay now in both files, and doesn't need to be checked when implementing or debugging a card.
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.