Commit Graph

442 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
05a72de5bc Erwan
- Card Primitives system. Check Royal Assassin in RV, 10E, M10
- Please review, is sets/primitives a good directory? Should we rename MTGCard into "CardPrint"? 
- Unfortunately for now it is not possible to "override" a Primitive. A card that links to a primitive but also defines new "values" will create its own data and ignore the data in the "linked" primitive for the time being. I hope to solve that at some point...
2009-12-27 12:14:36 +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
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
4eb6850c41 Erwan
- update french translation
2009-12-22 10:58:55 +00:00
wagic.the.homebrew@gmail.com
b892bce44c Erwan
- Fixing issue 234 (segfault risk with "becomes")
2009-12-18 14:47:07 +00:00
jean.chalard
1cc89e63c6 J :
* Fix a compilation problem on PSP.
2009-12-17 17:44:27 +00:00
jean.chalard
54791762b1 J :
* Fix a bug where valid directories would be ignored and invalid ones
  would be accepted for profiles and themes.
* Fix a compilation fault when compiling in debug mode.
2009-12-17 17:29:24 +00:00
wagic.jeck
b7b48a0ab3 Jeck - "Fix" to issue 247 (see issue for notes), added additional award ("Collection valued over 10,000 credits"), minor enhancement to trophy room UI (floating "O - Details" notification).
The new award will need some art before we ship, but it won't take too much work to add that :)
2009-12-15 18:03:42 +00:00
d32.wagic
002851a943 Daddy32: Tasks Mode
Gives the user the opportunity to earn some credits for performing various tasks.

Known bugs removed, tested stability-wise, not so much game-wise.
Lots of to-dos and ideas still remaining, better balance between task difficulty and their rewards needed - please comment.

Usage:
Enter shop, open menu, select 'See available tasks'.
All tasks in the list are active, until they expire ('Days left'; day passes after each duel (won, lost or quited)).
You can finish any of the tasks and get bonus. For particular task, the bonus gets a bit smaller every day (until expiration).
2009-12-13 22:12:14 +00:00
wagic.jeck
d873b573f8 Jeck - Minor improvement to delayed loading in card spoiler. 2009-12-13 16:34:35 +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
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
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
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
wagic.jeck
61c9772a66 Jeck - Included missing file for r1460, updated trophy room. Trophies now render from bottom left, so any size png can be used. 2009-12-12 11:24:23 +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.jeck
70411f025f Jeck - Trophy room added, triangle is now dedicated alt-render toggle. Hopefully I'm not forgetting anything... 2009-12-12 10:23:28 +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
85adde6c61 Erwan
-shortcut to reset the GU is now start+square
2009-12-06 11:34:00 +00:00
wagic.the.homebrew@gmail.com
0d2c6cf3e5 Erwan
- Adding external rules mechanism. It is very crude for the moment, but I hope it will grow. Have a look at Rules/mtg.txt for basic usage
2009-12-06 04:47:29 +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
5af8d83c03 Erwan
- cleanup ingame music patch. Let's not use this patch until we fix issue 144 maybe?
2009-11-29 06:11:02 +00:00
wagic.the.homebrew@gmail.com
ec553ddfb8 Erwan
- Yeshua's patch for ingame music
2009-11-29 05:52:12 +00:00
wagic.the.homebrew@gmail.com
66a505969e Erwan
- fix issue 215
- added test for purple screen (this is the small white square on top of the loading screen)
2009-11-23 08:25:27 +00:00
wagic.jeck
f4f11f9018 Jeck - Quick fix to issue 212. I'll do some debugging to make certain there aren't any other causes, but this is the major problem-- language and theme options had the same id, so were saving in the same place. 2009-11-23 05: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
a96b3b50aa Jeck - Quick fix to r1305. Because card text is only loaded on reboot, language can not be a per profile option. Switching profiles would result in partially translated cards. 2009-11-19 09:58:12 +00:00
wagic.jeck
e27fbac7be Jeck - Language is now a per-profile option settable in the options menu. Also, game no longer crashes when no language files are present. 2009-11-19 03:13:55 +00:00
wagic.jeck
0085c9b548 Jeck - Quick fix to issue 198, options loading. Unknown options are now preserved: this should prevent any future options lossage... assuming the file loads properly. 2009-11-19 01:58:18 +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.jeck
ca4c1ca2a8 Jeck - Removed WOTC trademark cheat profile. 2009-11-18 10:24:43 +00:00
wagic.jeck
37ad16d90e Jeck - Basic set metadata support. Also a minor improvement to WGuiImage.
* Metadata is currently only used in exactly one place: the set's "Pretty Name" is displayed when the set is first unlocked. 
* WGuiImage now has a function to set scaling.
2009-11-18 09:27:24 +00:00