Commit Graph

96 Commits

Author SHA1 Message Date
omegablast2002@yahoo.com
98e34c4eca changed some of the ability names as requested, autoformatted ability.cpp as it was getting pretty messy. added @attackedalone( trigger. added "removefromcombat" mtgability. im going on vacation, whoosh :P 2010-10-18 15:56:32 +00:00
omegablast2002@yahoo.com
d13e8904b5 massive update, additions and changelog in first comment. 2010-10-18 10:46:36 +00:00
omegablast2002@yahoo.com
cf63c83754 Fixed a bug/exploit with declaring attackers and @tapped triggers. 2010-10-03 14:19:52 +00:00
omegablast2002@yahoo.com
65673ca0b2 added support for no max hand size, added nonstatic lifetotal checks, added a check for how many equips a card has, added a fix for a typo in affinityswamp. 2010-09-17 17:37:18 +00:00
omegablast2002@yahoo.com
b507053a1d fixed storm spellcount, affinity/manaredux invis mana, added true "retrace" added 3 new extra cost types. 2010-09-14 17:15:33 +00:00
omegablast2002@yahoo.com
c408e5d588 added support for {X}{X} in cost, added support for token(creature, X/X or XX/XX)*XX or X or #. added discard card at random as cost type {d} 2010-09-12 16:15:24 +00:00
omegablast2002@yahoo.com
99da45f400 Added support for "buyback" and "flashback" with optional auto=buyback/flashback line support. 2010-09-10 18:00:37 +00:00
omegablast2002@yahoo.com
45f37b7545 fix windswept_heath.txt missing choice 1, added unearth support without workaround, tweaked alternative cost, added treason/sneak attack ability, added frozen. 2010-09-01 21:31:27 +00:00
omegablast2002@yahoo.com
0b4dde558b added support for alternative casting cost, evoke, added support for phantom cycle,hydras, added support for exile/bounce as casting cost 2010-08-30 18:45:38 +00:00
omegablast2002@yahoo.com
98d908f403 added support for "prevent next [number] damage" to player/creature. 2010-08-28 19:50:26 +00:00
omegablast2002@yahoo.com
fd8b1788f0 removed a little peice of another project that snuck into bloddthirst patch. 2010-08-27 11:04:58 +00:00
omegablast2002@yahoo.com
aef30e6e0d added bloodthirst:number ability 2010-08-26 16:05:48 +00:00
solo81@web.de
477439773b - Fixed the "CANTREGENERATE" keyword (by Zethfox).
The engine always handled it as "REGENERATE" and thus had to be renamed. Its new name is "CANTREGEN". It has been tested excessively by me and Zethfox. Now all cards with the former "cantregenerate" work as they should.

- I also added a test for "CANTREGEN" (Incinerate).


- Added the new keyword "FOG" (by Zethfox). 
This is an equivalent for "PREVENTALLCOMBATDAMAGE", which only worked for instants and sorceries. "Fog" works only for permanents and is used in combination with the newly introduced parameter "ONESHOT"!

- I also added 2 tests for "FOG" (Maze of Ith, Spore Frog).

Both additions lead to several issue fixes:
Fixed issue286.
Fixed issue328.
Fixed issue332.
Fixed issue416.

- Removed Demonic Torment, Gaseous Form, General's Kabuto, Sandskin. Those cards never worked and could even not be fixed with "FOG".


- Optimized the code of the dragon-lair land-cycle from PLS and added 2 tests for them.

- Added 8 successfully tested cards. Card list -> first comment.
2010-08-09 23:49:31 +00:00
wagic.the.homebrew@gmail.com
755bb04475 Erwan
- updated pt translation (thanks to almosthumane)
- Added/updated some Themes by Ilya B
- Added a random wallpaper loading at loading screen (see wallpapers.txt in Res/graphics)
- Saving decks and collection should now be a bit more secure (attempt at minimizing issue 393)
2010-05-02 12:49:36 +00:00
salmelo16
be1a52f660 Update this(X) so that it works with spells as well as activated abilities. Also fixed a bug were this(X) did not work with targeting.
Adds Martial Coup
2010-04-17 19:45:57 +00:00
wagic.jeck
78b864666e Jeck - Fix for issue 338. Please see the note in that issue for details. 2010-02-17 20:35:37 +00:00
wagic.jeck
b348ab5d24 Jeck - Added and tested "oneblocker" ability, which allows for cards that "can't be blocked by more than one creature.". I've put in Stalking Tiger (I think... these primitives are cool! I just added the prim and all of a sudden it was in 10E), but this should also add Charging Rhino, Familiar Ground, "Huang Zhong, Shu General", Ironhoof Ox, Krosan Vorine, Norwood Riders, Vorrac Battlehorns, "Yuan Shao, the indecisive".
Test and more cards (the ones I can figure out how to do) forthcoming.
2010-02-08 18:18:44 +00:00
wagic.the.homebrew@gmail.com
1f88c30cfd Erwan
-code cleanup
2010-01-31 06:56:40 +00:00
wagic.the.homebrew@gmail.com
ffbcd3f2d0 ERwan
-fix issue 297
- also removed the "untapBlockers" system. The idea was nice but incorrectly implemented, and only 2 cards were using it so far.
2010-01-17 12:05:40 +00:00
wagic.the.homebrew@gmail.com
69c5dee979 Erwan
- 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!!!
2010-01-03 03:11:30 +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
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
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
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
d85b1d66de Erwan
-fix issue 187 (Double Strike + First Strike)
2009-11-15 10:23:37 +00:00
wagic.the.homebrew@gmail.com
60e9b2c1df Erwan
-fix issue 146
2009-11-03 10:31:57 +00:00
wagic.jeck
f3ad432d9b Jeck - Applied booster rarity sorting patch (issue 133), added horsemanship ability.
* The horsemanship ability literally required only one line of code, and could add an additional ~36 cards to Dr. Solomat's PT3 set. It seems functional, but someone please double check it anyways, as I've not worked with much of the actual game code yet.
2009-11-01 20:21:32 +00:00
wagic.the.homebrew@gmail.com
60845ee3b3 Erwan
- fix issue 111
2009-10-24 13:06:02 +00:00
wagic.the.homebrew@gmail.com
2c1a44ed43 Erwan
-fix for issue 123 (Cockatrice)
2009-10-22 13:08:33 +00:00
wagic.the.homebrew@gmail.com
273b0672e4 Erwan
- various optimization fixes
2009-10-19 11:37:47 +00:00
wagic.the.homebrew@gmail.com
0e74773b57 Erwan
- Fix issue 105 (threaten on own creature)
2009-10-15 14:36:24 +00:00
wagic.jeck
0bff0c564b Jeck - Fixed potential bug in INTIMIDATE. Please review. 2009-10-13 23:00:59 +00:00
wagic.the.homebrew@gmail.com
46ef86b9d8 Erwan
- some performance improvements
- "daily build". The daily build was compiled in "profile" mode. If you have problems running the exe, or problems with Visual Studio please let me know
2009-10-08 12:17:07 +00:00
wagic.the.homebrew@gmail.com
59eb79fc47 Erwan
- fix issue 94 (enchant enchantments)
2009-10-01 13:33:40 +00:00
wagic.the.homebrew@gmail.com
25ab86ab88 Erwan
- fix issue 57 - needs verification when one of the quads is not here /both -  target is player/card - ability/spell
2009-09-30 15:02:57 +00:00
wagic.the.homebrew@gmail.com
833fbba6c2 Erwan
- fix issue 22 (Graveyard display messed up)
- fix issue 38 (graveyard and library unusable)
- fix issue 59 (can't cancel a spell with a target)
2009-09-26 10:03:52 +00:00
wagic.the.homebrew@gmail.com
1534397f2b Erwan
-fix issue 33
2009-09-25 14:06:31 +00:00
wagic.the.homebrew@gmail.com
7577a588ec Erwan
-fix issue 47 (all creatures have haste)
2009-09-23 09:31:15 +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
wagic.jeck
d55fc91112 Jeck - [Requires JGE rebuild] Extensive cache improvements.
* Numerous cache fixes, reduced filesystem access.
 * Cache fails very gracefully. 
 * Cache is now a templated class, with individual caches per data-type.
 * Much easier to extend.
 * Extensively debugged. Try compiling with -DDEBUG_CACHE.
 * Caches limits can be set on a per-item basis.
 * hgeParticleSystemInfo are now cached, mana particles now fall back to defaults.
 * Samples are not cached, but track filesystem misses using the cache backbone. 
 * Avatars are cached. Default baka avatar is now baka.jpg, to prevent collision with player.

A note on the retrieval types: 
  RETRIEVE_MANAGE puts a resource into a seperate, managed resource list.
    Managed resources are guarenteed valid for the lifetime of the program. 
    Retrieving a managed quad promotes the associated texture to managed. Don't do that by mistake.
    Calls to Resources.Refresh() will attempt to reload managed resources in place.

  RETRIVE_LOCK (and by extension, RETRIEVE_VRAM), returns a resource after locking it.
    A resource may have many locks, and remains in cache until they are all released. 
    If the resource is managed, it returns it unmodified.

A note on quads:
Unlike all other RetrieveWhatever() functions, the default behavior for RetrieveQuad is RETRIEVE_LOCK. Worse, Release(JQuad*) is slow, and will /always/ release one lock from the associated texture.   

There's a long and complicated explanation for this, involving support for live relinking of textures to existing quads, but basically what it means is that we only use RetrieveQuad for quads we intend to store and later Release(). If a temporary quad is needed, the preferred method is to use NEW JQuad* and SAFE_DELETE with RetrieveTexture(). RetrieveTempQuad is also provided, but is only guaranteed until the next call to the cache.

Note that RetrieveCard has none of these problems.
2009-09-14 08:28:49 +00:00
wagic.the.homebrew@gmail.com
23fb17e58e Erwan
- Added deathtouch (TODO: update Combat rules for damage on multiple blockers)
- Added intimidate (untested)
2009-09-12 12:40:14 +00:00
wagic.the.homebrew@gmail.com
f9a2d8283a Erwan
- A few card fixes
2009-09-08 13:07:19 +00:00
jean.chalard
5b473a1505 J :
* Fix almost all tests.
* This version "nearly" works.
2009-09-07 14:37:32 +00:00
wagic.the.homebrew@gmail.com
c1accf5c6e Erwan
- fix global effect cards (wrath of god) VS protection 
- Removed/updated a few debug outputs
2009-09-06 01:11:51 +00:00
wagic.the.homebrew@gmail.com
380014b2a6 Erwan
-removed memory leak introduced in r.789
-added "blocked" bool in MTGCardInstance
2009-09-05 09:17:30 +00:00
jean.chalard
2e7570fdea J :
* Add some pretty printers to help debugging.
2009-09-04 13:22:15 +00:00
wagic.jeck
f220d2e9b9 Jeck - Cache and resource manager merged, streamlined.
This is pretty major, so there'll probably be something wrong with it... even though I did spend a few hours looking.
NOTES:
 * If you've Retrieved it, don't delete it--- Use resources.Release(Whatever). 
    Textures automatically release subordinate quads.
 * Most of the time, use resources.RetrieveQuad to grab a quad. Should handle everything for you.
    RetrieveQuad will load the required texture, if needed.
    Only managed resources have a resource name ("back", "simon", etc). 
    Managed resources can be retrieved with GetTexture/GetQuad/GetWhatever.
    Non managed quads lookup by position/dimensions, defaulting to the whole texture.
 * Use resources.RetrieveTexture only when you need to do something special to it. 
    Calling retrieve texture with RETRIEVE_MANAGE will permanently add a texture to the manager
    RETRIEVE_LOCK and RETRIEVE_VRAM will lock a texture. It will not leave the cache until
    Release(JTexture*) is called, or as a last resort during cache overflow.
 * Try to only store (as a class member) pointers to textures retrieved with RETRIEVE_MANAGE. 
    All others may become invalid, although locked textures do have a high degree of stability. It's
    pretty safe to store a locked texture if you're not going to load much between uses.

There's a lot going on here, so I might have missed something... but it runs through the test suite alright.

TODO: 
 * When called without any arguments, RetrieveQuad sometimes leaves a thin border around the image. 
    This can be bypassed by specifying a quad one or two pixels less than the image size. Why?
 * I've had a crash while runing the Demo mode, something to do with receiveEventMinus? 
    This hasn't exactly reproduced on a clean SVN copy, (being a hang, rather than a crash) so 
    I've probably done something to worsen the problem somehow? I'll look into it tomorrow.
 * Clean up lock/unlock system, memory usage. Streamline interface, consider phasing out calls using GetWhatever() format.
2009-09-03 09:28:16 +00:00
jean.chalard
7214248494 J :
* Some more tweaking for combat.
* This still doesn't work, but it's closer.
2009-09-03 02:16:53 +00:00
jean.chalard
f407fa31ef J :
* Display the avatar in the damaged list if the attacker has trample.
2009-08-31 12:35:16 +00:00