Commit Graph

267 Commits

Author SHA1 Message Date
Psyyringe
1f2a5bd4bd Psyringe - softcoded Great Defender (LEG), provided test script. 2009-12-29 00:39:16 +00:00
Psyyringe
49536fce44 Psyringe - introducing new ability: cantBeBlockedBy(T). T can be any targez specification, like "wall", "creature[flying]", etc. See added cards for examples. Note: This ability currently has the same restrictions as "protection from(T)", i.e. it can't be used in activated abilities or instants/sorceries. It *can* be used for creatures,auras, and other continuous abilities (e.g. an enchantment which grants "unblockable by walls" to all rats should be possible, although I didn't test that). There are 47 cards which use the phrase "can't be blocked by", so we should be able to get another fair mount of cards out of that.
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).
2009-12-28 18:19:17 +00:00
wagic.the.homebrew@gmail.com
b366994397 Erwan
-manual test for issue 140
2009-12-28 13:04:24 +00:00
Psyyringe
667a7f6a8e Psyringe - reverted Urza's lands to abrasax' original way of coding them, plus minor adjustments. The previously used code made themwork only once. Added a test script for that condition. Also removed test script for Thought Courier (which would fail now, since the card was removed in a recent revision).
Thanks to TheDark for the bug report on Urza's lands.

Note that the lands still don't work entirely correct, they give you the option to tap them for one mana even when they shouldn't anymore. This can be fixed when aslongas(cards) <1 is working.
2009-12-27 19:43:36 +00:00
Psyyringe
6135774016 Psyringe - added two test scripts for cycling, and a bug demonstartion script for a conflict between cycling and casting instants/sorceries. 2009-12-27 00:20:42 +00:00
Psyyringe
dd2c815780 Psyringe - Fixed Urza's Tower and its associated test. Thanks to TheDark for the bug report. 2009-12-26 18:55:01 +00:00
Psyyringe
f57aacd020 Psyringe - fixed Enchantress's Presence (ONS). Triggers which fire upon "playing a card" need to be coded with "from(mystack), not "from(myhand)" - the latter would only trigger if you put the card into play without casting it.
Thanks to TheDark for the bug report.
2009-12-26 18:43:16 +00:00
Psyyringe
086dab7a7a Psyringe - adding test script for Enchantress's Presence, following a non-reproducible bug report. 2009-12-26 18:09:14 +00:00
Psyyringe
5c3b3f1d03 Psyringe - added quantifiable target restrictions. Whenever you use square brackets [] to specify attributes of a target, you can use the operators <=, >= and = to specify quantities for power, toughness, and/or converted manacost. See added cards for examples.
Limitations:
- Operators for "greater than", "less than", "unequal" have not been implemented, but if a card actually needs them, you can use a preceding minus sign to negate a comparison. Example: -power=3 means "power not equal to 3", -toughness<=3 means "toughness>3".
- You can't use spaces when specifying such restrictions. Write "power<=3" instead of "power <= 3"
- You now need to use a space before the "<" and ">" commands that count the matches for lord(), foreach(), all() and aslongas(). So far we always did use spaces in front of them without actually needing to, now we need to.
- manacost restrictions don't take "X" costs into account. Example: Mistmeadow Skulkin (FUT) has protection from manacost>=3. Blaze has a converted manacost of 1, but when you cast it with an X of 2, then it actually has a converted manacost of 3 while on the stack, and Mistmeadow Skulkin would be protected from it, but currently it isn't.

Please review the code, I'll add a few remarks/questions of my own.
2009-12-26 01:50:33 +00:00
Psyyringe
ddb9ce251b Psyringe - Fixed Delusions of Mediocrity (ULG). Solution is inelegant. How useful would a trigger @movedfrom be, or (alternatively) the option to specify zones as "|*" ("anywhere") or as "|-battlefield" ("any zone but the battlefield")? Here's how this card could be coded then:
Now: auto=@movedTo(this|graveyard,library,hand,exile) from(battlefield) ...

Alternatives:
auto=@movedFrom(this|battlefield) ...
auto=@movedTo(this|*) from(battlefield) ...
auto=@movedTo(this|-battlefield) from(battlefield) ...

Suggestions? How many cards would benefit from such an addition?
2009-12-25 22:44:05 +00:00
wagic.the.homebrew@gmail.com
4be7d5ebd3 Erwan
- pumped version up to 0.10.1
- Added fleshformer, so that conflux gets 80 cards :)
2009-12-23 06:21:30 +00:00
wagic.the.homebrew@gmail.com
2984bb7405 Erwan
- fix issue 265
2009-12-22 15:04:56 +00:00
wagic.the.homebrew@gmail.com
54142cc816 Erwan
- fix a segfault with Shivan Gorge
- Fix a memory leak in the AI
- Commit a test for issue 265
2009-12-22 13:11:08 +00:00
wagic.the.homebrew@gmail.com
b892bce44c Erwan
- Fixing issue 234 (segfault risk with "becomes")
2009-12-18 14:47:07 +00:00
wagic.the.homebrew@gmail.com
fa772f0528 Erwan
-adding test case for issue 251
2009-12-17 12:52:59 +00:00
jean.chalard
033adea8e4 J :
* Move this test to where it really belongs.
2009-12-17 03:14:33 +00:00
jean.chalard
09b37e4f5a J :
* Add a test for damage assignment for deathtouch.
2009-12-16 15:28:55 +00:00
wagic.the.homebrew@gmail.com
9f8a394a9f Erwan
- Test for invalid issue 249. closing the issue
2009-12-15 12:05:55 +00:00
Psyyringe
5b38c6b6a3 Psyringe - added some test scripts for 5DN equipment. Also found some differences between my local version and the recently uploaded one and merged those. 2009-12-13 18:21:10 +00:00
leungclj
1b3b600ca2 JON4TH4N - fixed my last revision 2009-12-13 16:47:24 +00:00
leungclj
1e503bc86e JON4TH4N - added more cycling cards, added gempalm avenger and test script, it passed 2009-12-13 16:34:38 +00:00
leungclj
f35ec32653 JON4TH4N - added a few cards with attach, need testing, new daily_build please.
- also need to test equipment a bit more, think I found a bug.
-test script for Resounding Thunder
2009-12-13 12:29:47 +00:00
wagic.the.homebrew@gmail.com
86c72b7d15 Erwan
-fix issue 239 (skullcage)
2009-12-13 11:18:55 +00:00
wagic.the.homebrew@gmail.com
ee4e9f2262 Erwan
-fix issue 161 (brass man can untap outside of upkeep). Use "myUpkeepOnly" keyword. Other keywords such as "myDrawOnly" of course work. Haven't implemented "opponent" yet, is it needed ?
2009-12-13 10:18:37 +00:00
wagic.the.homebrew@gmail.com
927382ac8b Erwan
-Remove disrupting scepter from the game, closing issue 163
2009-12-13 09:45:10 +00:00
wagic.the.homebrew@gmail.com
ee3286ff2a Erwan
-Fix issue 206 (rain of filth)
2009-12-13 09:33:51 +00:00
wagic.the.homebrew@gmail.com
f7bd1dcef4 Erwan
- Fix issue 210 (Resuscitate)
2009-12-13 07:20:31 +00:00
wagic.the.homebrew@gmail.com
a7493154fa Erwan
- 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)
2009-12-13 07:03:28 +00:00
wagic.the.homebrew@gmail.com
999256e6ab Erwan
- fixed divergent growth (issue 243). Unfortunately the underlying issue is quite complex, and Wagic doesn't handle it very well. Basically, all "until end of turn" effects run the risk of being partially deleted before the end of the turn, leading to segfaults or memory leaks. This is because some abilities' "clone" method doesn't actually clone them entirely... The fix for divergent growth is a hack that works only for lords+mana producer combination, but I need a more "generic fix" in the long run...
2009-12-13 05:59:17 +00:00
wagic.the.homebrew@gmail.com
7cc072bf77 Erwan
- fix a memory leak with "Prevent All combat damages" ability
- Fix issue 242 (Equip can be used outside of the main phases)
- introducing "attach" keyword. Same as equip but can be used anytime. Untested
- introducing "asSorcery" keyword. Can be used the same way as "myTurnOnly" on activated abilities to restrict their usage. Untested. Other similar keywords will follow, please let me know which ones would be useful
2009-12-13 03:28:50 +00:00
leungclj
f84cd15c4b JON4TH4N - added a few more cards + test script 2009-12-12 17:26:26 +00:00
Psyyringe
b4e9541cb8 Psyringe:
- added Warren Instigator (ZEN) and test script. Thanks to Niegen for finding it.
- temporarily removed angry_mob6.txt from the test suite and added it to the "bugs" section, since the script occasionally fails and we haven't found the reason yet. See issue 240.
- added test script for Fog Bank
- added recently uploaded equipment scripts to test suite (not sure why the weren't added upon uploading them, looks like an oversight)
- fixed another bug in recently uploaded MRD file, it contained Vulshok Morningstar (a DST card with a wrong 9ED id and was inserted at the wrong position in the alphabetical order).
2009-12-12 17:10:08 +00:00
leungclj
e65d1bda75 JON4TH4N - added a few more cards 2009-12-12 15:46:09 +00:00
wagic.the.homebrew@gmail.com
512f649147 Erwan
- Adding cycling. Check Akroma's vengeance in ONS for an example. Note that this uses autohand instead of auto, this is important! You can also use autograveyard. 
- All "auto" activated abilities should work with autohand, so this is not only for cycling, but could be used for other abilities as well. For example autohand={3}:cycling can also be written autohand={3}{S}:Draw:1
2009-12-12 11:09:13 +00:00
leungclj
11b2a4b288 JON4TH4N - (SHM)(EVE) added equipment and test script 2009-12-12 08:21:54 +00:00
leungclj
826f7e5116 JON4TH4N - (5DN) added equipment, fixed twitch test, improved equip_shroud test 2009-12-12 07:23:43 +00:00
leungclj
aa27e4ca16 JON4TH4N - (10E) added equipment 2009-12-12 06:57:26 +00:00
leungclj
9f38fa5b06 JON4TH4N - improved test 2009-12-11 00:53:43 +00:00
leungclj
c779c626b2 JON4TH4N - (ZEN) equipment added, please look at the todo, and perhaps expand on "mytgt" or "this" 2009-12-10 17:50:45 +00:00
wagic.the.homebrew@gmail.com
ca35754273 Erwan
- Adding equipments. They work like auras, except you have to add an "auto={cost}:equip" line. See Behemoth sledge in ARB for an example. Please test a lot before committing, thanks :)
2009-12-10 13:44:05 +00:00
Psyyringe
12d2c87aef Psyringe - added test script for Rampage(2/2,1) - result of hunting a bug that didn't reproduce 2009-12-10 12:13:02 +00:00
Psyyringe
847dd111ca Psyringe - removed a stray comment in the rules text of Scout's Warning (FUT). Added a test script to check that card's functionality. Note that the card doesn't exactly what the rules text says (but it's probably close enough). 2009-12-10 11:35:27 +00:00
Psyyringe
0ec6c7bf37 Psyringe - 5DN overhaul: added 6 cards (some borderline) and fixed 11 bugs. Added test scripts for most added cards. Please check/review as I'm still inexperienced with card code.
Additions:
- Added Avarice Totem. Code works, but uses a trick to circumvent a parser limitation. Feedback welcome.
- Added Fangren Pathcutter. Code works, but will fail if Fangren Pathcutter gets removed during the combatattackers phase (currently unlikely though). Feedback welcome.
- Added Goblin Cannon (spectacularly useless card, but codeable)
- Added Silent Arbiter (code works pretty well imho)
- Added Skullcage (doesn't work correctly yet due to bug; issue will be opened shortly)
- Added Thought Courier (has wrong sequence of actions, but is acceptable imho)

Bugfixes:
- Arachnoid didn't have Reach
- Battered Golem was missing a "may"
- softcoded Beacon of Creation
- Beacon of Destruction was missing an alias
- Beacon of Immortality was missing an alias
- Cackling Imp couldn't use its ability
- removed Crucible of Worlds (didn't work on several accounts)
- Krark-Clan Ironworks had an incorrect {T} cost
- Krark-Clan Ogre had an incorrect cost
- Screaming Fury was missing a target
- Skyhunter Skirmisher had double strike spelled wrong

Other:
- experimented with several more cards but couldn't implement them correctly, check the comments in todo.dat for details.
2009-12-08 08:39:34 +00:00
Psyyringe
c5e106ba27 Psyringe - removed leftover "human" command in test script for Karn's touch (sorry. problems to concentrate today) 2009-12-05 10:47:07 +00:00
Psyyringe
5c2be8229e Psyringe - adding test script for issue 233. Fixing targeting issue with Karn's Touch (card still doesn't work though, see issue 233). Also (unrelated) adding script for (non-reproducible) problem reported in i232. 2009-12-05 10:37:40 +00:00
Psyyringe
78946f6d64 Psyringe - removed now obsolete notice in Urza's lands test script - sorry, forgot that in the previous release. Also (unrelated) fixed rarity of Akroma, Angel of Wrath (LGN) 2009-12-04 13:37:20 +00:00
Psyyringe
35a6ff3730 Psyringe - updated Urza's lands (ATQ) and their test script, using code suggested by abrasax, fixing a minor issue with them (see r1376). 2009-12-04 13:34:12 +00:00
Psyyringe
3264220b6d Psyringe - added some cards with the nofizzle ability.
Question: I also tried to code Root Sliver (LGN) with the line "auto=lord(sliver|stack) nofizzle", but this didn't work, Slivers could still be countered. Did I choose a wrong approach, or is there a limitation of the lord ability with regard to spells on thee stack?
2009-12-04 04:55:54 +00:00
Psyyringe
93852a386e Psyringe - fixed tanglesap test. A forest was present in the INIT and DO stages, but not accounted for in the Assert stage. 2009-12-03 17:47:50 +00:00
Psyyringe
1a8bd648d8 Psyringe - added test scripts for recently added cards and mechanics (nofizzle, manacost, X-effects). Also added thorough testing for Angry Mob to help clearing up recent discussion. 2009-12-03 17:37:05 +00:00