Commit Graph

168 Commits

Author SHA1 Message Date
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
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.jeck
608255e251 Jeck - Fix signed/unsigned in AllAbilities (please review), bug fixes for trophy room (new status now saves). 2009-12-13 14:36:58 +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
cc46be7fbe Erwan
-close issue 171 (remove Soul net from the game)
2009-12-13 10:21:33 +00:00
wagic.the.homebrew@gmail.com
f9c810058d Erwan
-closing issue 165 (glasses of urza). Removed the card from the game, won't fix.
2009-12-13 09:48:29 +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
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
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
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
wagic.laurent
226c132946 Laurent - Code Clean-Up removed some Hardcode replace with softcode, mostly RV. Tested most of them (except exile from ALL but that should be the same as Swords to plowshares)...
Did not manage to remove/softcode The Rack.
2009-12-07 16:16:01 +00:00
wagic.the.homebrew@gmail.com
57a320dbef Erwan
- fix issue 211 (circle of protection VS Black knight)
2009-12-03 14:14:27 +00:00
wagic.the.homebrew@gmail.com
a58e414a5f Erwan
- fix issue 226 (holy day)
- fix issue 213 (random deck NB of cards)
2009-12-03 13:40:48 +00:00
wagic.the.homebrew@gmail.com
ea3ed7061f Erwan
- Lords are now taken into account in AI statistics. (To display information, uncomment RENDER_AI_STATS in config.h)
- fixed a potential segfault with NoFizzle
2009-12-03 02:05:03 +00:00
wagic.the.homebrew@gmail.com
dfbdd1e4e5 Erwan
-added WParsedInt (X, p, t, manacost) for "Draw" effects. See prosperity
- Fixed denizen of the deep (P02), it had broken the test suite, sorry for that!
2009-12-01 12:43:18 +00:00
wagic.jeck
2430aa66a6 Jeck - Added "nofizzle" ability (ala Great Sable Stag), please review.
I'm fairly certain this works as intended, cards with nofizzle "can be targeted by spells that try to counter it (such as Cancel). Those spells will resolve, but the part of their effect that would counter [it] won't do anything. Any other effects those spells have will work as normal."

Still, I don't work much with card logic, so it's possible this has some kind of unintended side effect.
2009-12-01 11:50:42 +00:00
wagic.the.homebrew@gmail.com
f924546dcc Erwan
- Code cleanup
- fix issue 142 . This will lead to other issues for some cards. These issues can be fixed by using targetcontroller/controller...etc
- Added a few cards
2009-11-21 09:40:14 +00:00
wagic.the.homebrew@gmail.com
da9a82cff4 Erwan
- removed some unused code. Please review!
- Added protection from() auto keyword. It is still possible to use protection from [color] in abilities, but when it is not possible, please use protection from([target]) in auto=
2009-11-21 07:26:26 +00:00
wagic.the.homebrew@gmail.com
a7a3ecb596 Erwan
- remove dead code
2009-11-21 03:24:31 +00:00
wagic.jeck
68ecdb0d05 Jeck - Fix a PSP compiler error. (I'd never heard of an "X will be initialized before Y" error before, but the compiler is always right :) ) 2009-11-19 00:14:03 +00:00
wagic.the.homebrew@gmail.com
1d55211245 Erwan
- Added ">" and "<" for foreach and aslongas. Can be used to code threshold cards. See black vise (RV) and korsan beast (ODY)
2009-11-18 14:37:28 +00:00
wagic.the.homebrew@gmail.com
7f9d22e0aa Erwan
-fixed a memory leak
- Added P02 and PTK 
- New way to create tokens in the parser, much more flexible, see the Hive in RV. Tokens can now be written as other cards, with a rarity of "T". I suggest their id to be the negative value of the card that generates them when possible. Naming convention for images is the same as before: a negative id such as -1138 will need a [id]t.jpg image (1138t.jpg). Positive ids work as "normal" pictures
2009-11-18 13:14:08 +00:00
wagic.the.homebrew@gmail.com
e2d282637c Erwan
- Activated abilities can now use the extra "myTurnOnly" keyword
- {0} Activated abilities should now work
- Fixed issue 166 (instill energy)
2009-11-14 14:17:01 +00:00
wagic.the.homebrew@gmail.com
9ca552093e Erwan
- Added "PreventAllCombatDamage" [from(...)] [to(...)] keyword. Please test it on a few cards before we "mass" use it. As a side effect, fixed issue 155 (ebony horse target).
2009-11-14 11:35:29 +00:00
wagic.the.homebrew@gmail.com
5781060d83 Erwan
- fix issue 179 (@movedTo battlefield triggers when a creature changes controller)
- fix issue 176 (Ray of Command)
2009-11-14 08:28:29 +00:00
wagic.the.homebrew@gmail.com
7b2ac9e610 Erwan
- added "targetplayer" functionality to ManaProducer objects. As a collateral benefit, this fixes issue 191 (seismic spike)
2009-11-14 07:07:58 +00:00
wagic.the.homebrew@gmail.com
ce0051e545 Erwan
- fix issue 154 (dragon whelp)
- Fix issue 157 (erg raiders)
- fix issue 169 (living artifact)
- fix issue 159 (stonebrow) although I believe this card doesn't work correctly...
2009-11-12 13:57:22 +00:00
wagic.the.homebrew@gmail.com
e059890446 Erwan
-reduced SFX Quality. This seems to fix the Bug with samples getting silent on the PSP (issue 112), and improves loading times. If you think this is unacceptable, let's discuss it
- AI now should play fetchlands' ability, although still not "efficiently"
- Fix a bug where the game would crash if a card has a valid alias to a hardcoded card that is in no _cards.dat (starwars mod cards aliasing a MTG card)
2009-11-12 11:39:47 +00:00
wagic.jeck
c501d96336 Jeck - TEMPORARY fix for AllAbilities, which was preventing PSP compilation. Please address this, as I'm not certain what the intended return value was. 2009-11-01 22:40:33 +00:00
wagic.the.homebrew@gmail.com
18293ba07c Erwan
-fix Issue 150 (hypnotic specter)
2009-11-01 12:15:37 +00:00
wagic.the.homebrew@gmail.com
83bc12a275 Erwan
- Fix issue 102 (Rampage not working correctly)
2009-10-20 13:24:12 +00:00
wagic.the.homebrew@gmail.com
273b0672e4 Erwan
- various optimization fixes
2009-10-19 11:37:47 +00:00
wagic.laurent
adba482340 -Laurent Added @damaged, cards to 10E and LEG, small correction to ALA, ARB, CHK, EVE and ZEN
- Added @damaged works fine (tested with thieving magpie), please test your additions if you plan to add some cards with this keyword and report if buggy. As the other trigger, you cannot have a target unless there is a may ability.
- Added 2 cards to 10E - Reminisce and Thieving Magpie both tested and working.
- Added 2 cards to LEG - Jovial Evil and Spiritual Sanctuary (not tested yet) but should work.
2009-10-15 09:30:09 +00:00
wagic.laurent
009239d645 Laurent - Added Shuffle still require testing.
Wanted to add a bunch of cards that use "shuffle" as a keyword.. after the remedy from Herr Doktor in R1050 and the removal of oblation from ONS  it gave me the idea that this could be implemented... I wanted to add some cards like darksteel collosus (M10) with something like auto=@movedto(this|graveyard) from(battlefield):moveto(mylibrary) && shuffle well the above does not work ...

Anyway... i'm not sure the shuffle keyword is working... I don't really have a way to test it. Also if some willing soul could have a quick look would be great..

some cards could be added like Boggart Forager (LRW), Oblation (ONS)...
2009-10-05 17:16:56 +00:00
leungclj
5ca1292344 J0N4TH4N - (RV) update, removed a few hardcoded cards
-minor update on other sets
2009-10-04 17:13:44 +00:00
leungclj
8ab5b5cfd5 J0N4TH4N - readded back "AUntapManaBlocker" 2009-10-04 01:55:53 +00:00
leungclj
f882fd437b J0N4TH4N - removed hard code for Dreamborn Muse 2009-10-04 01:39:23 +00:00
wagic.the.homebrew@gmail.com
78da055dd2 Erwan
-Adding "becomes(types,p/t,color abilities)" to the parser. Please do not use yet as it requires more testing
2009-09-30 12:28:50 +00:00
wagic.the.homebrew@gmail.com
d9464f53c2 Erwan
-fix a crash when the AI tries to use a spell with X in the manacost
2009-09-28 14:12:50 +00:00
wagic.the.homebrew@gmail.com
f7331b7066 Erwan
- Fix one card in ZEN
- Fix AI and counters (issue 75, see tests/manual/torture_ai.txt)
- Fix counters target
2009-09-28 13:34:49 +00:00
wagic.the.homebrew@gmail.com
cbacfdbfd7 Erwan
- Added "X" cost for token multiplier
-"daily" build
2009-09-27 07:15:23 +00:00
wagic.the.homebrew@gmail.com
515c5ef0db Erwan
-new trigger: @tapped(...
-Parser now supports X for P/T. WARNING: this does not work for activated abilities. And currently this works only for P/T but will be added progressively to other things
2009-09-27 03:41:28 +00:00
wagic.the.homebrew@gmail.com
0bf83b6bf5 Erwan
- fixed a bug with Flagstones of Trokair. There was no easy fix (cloned objects deleting stuff from their parents...) and I ended up using a "garbage collect at end of turn" technique the way I did with the ActionStack. As a result, the memory print of a turn will become bigger, and even more bugs might occur at the end of a turn... I'm ready to discuss this, although I think it's the best solution (in terms of result/amount of work) given the way abilities work right now
- Test suite now gives the number of failed/success at the end of the tests
2009-09-26 14:25:29 +00:00
wagic.the.homebrew@gmail.com
ac120266a9 Erwan
-fix issue 48 (dragon claw endless ability list)
-switched incorrect unsigned int to size_t
2009-09-25 15:35:19 +00:00
wagic.the.homebrew@gmail.com
f5ddbd2396 Erwan
-Issue 31 fixed. Land and tokens don't use the stack anymore. Taking control of a card in opponent's battlefield doesn't trigger "spell cast" triggers either
2009-09-22 14:45:01 +00:00