Commit Graph

68 Commits

Author SHA1 Message Date
omegablast2002@yahoo.com
d13e8904b5 massive update, additions and changelog in first comment. 2010-10-18 10:46:36 +00:00
wrenczes@gmail.com
e45735267b More work on cleaning up debug trace logs. Added getDisplayName() overrides to the Ability & NextGamePhase interrupts so that there's now more contextual info in the output log. You'll now see what game phase is being added/resolved on the stack, and instead of a generic 'StackAbility' entry, it'll tell you what source it's coming from.
Also deleted a few debug output traces that were truly uninformative.
2010-10-07 08:13:22 +00:00
wrenczes@gmail.com
291a0d0312 1) swap out the pattern of
CODE: SELECT ALL
#if defined (WIN32) || defined (LINUX)
  char    buf[4096], *p = buf;
  sprintf(buf, "Some debug message showing  variables %i and %i\n", variableA, variableB);
  OutputDebugString(buf);
#endif


new paradigm:
CODE: SELECT ALL
DebugTrace("Some debug message showing variables " << variableA <<" and " << variableB);


No more dealing with formatting sprintf crap, just stream out variables. Also, DebugTrace washes out in release automatically. (TODO, need to sweep through the rest of the app to apply the changes to all the cases where OutputDebugString() is being called)

2) added two traces to follow adding/resolving things on the stack;

3) changed the uninformative "stack object" string that was the default for base class interrupts to use typeinfo(*this).name() so that you can actually see the derived class in the trace output. Here's a sample of what my trace output looks like now:
Action added to stack: Devoted Hero
Resolving Action on stack: Devoted Hero
Action added to stack: class NextGamePhase
Resolving Action on stack: class NextGamePhase
Action added to stack: class NextGamePhase
Resolving Action on stack: class NextGamePhase
Action added to stack: class StackAbility
Resolving Action on stack: class StackAbility
Action added to stack: class DrawAction
Resolving Action on stack: class DrawAction

4) replaced some hardcoded 0 / -1 values with their proper enums.
2010-10-06 09:28:45 +00:00
wagic.the.homebrew@gmail.com
f3cc20eb31 Erwan
- Fix for issue 284 (Damage not triggering when creature dies in combat phase)
2010-09-25 05:15:09 +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
c83950a5d4 storm,cantwin/lose,additionallands,cast restricting 2010-09-04 00:16:20 +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
wagic.the.homebrew@gmail.com
f40af0b1cb Erwan
- Chinese patch by linshier
2010-07-31 14:41:04 +00:00
wagic.jeck
e9b6860923 Jeck - reverted fix for invalid issue 359. 2010-02-26 00:46:03 +00:00
wagic.jeck
5e0be442b0 Jeck - Removed "Reverse Triggers" option, as per issue 359. 2010-02-25 15:22:19 +00:00
jean.chalard
39c5a3d465 J :
* Fix u32 into JButtons.
* Add a few comments.
* Remove useless variables.
2010-02-24 17:28:17 +00:00
jean.chalard
56ce4a14ae J :
* Create the subsystem for keybindings.
2010-02-14 13:21:12 +00:00
jean.chalard
0a083f4385 J :
* Fixes for compilation on 64-bit architectures :
  string position-returning functions return size_t, not uint.
  Fix that.
* Fixes warnings with new gcc about non-fixed string AND no arguments.

NOTE : 64-bit architectures still do not compile. There are 2 different places
where printf is used with a specifier that is not large enough on 64-bit because
size_t is now a ulong and not a uint. The solution on GNU systems is the %zu
specifier, but as I'm not sure it is supported on windows I don't want to
introduce a huge hard-to-notice bug, so I'll do it at a time when I got a
windowser to back me up.
2010-01-25 09:58:30 +00:00
wagic.the.homebrew@gmail.com
da6d650c3d Erwan
-fix issue 128
2009-10-24 11:17:38 +00:00
wagic.the.homebrew@gmail.com
6f159fb39c Erwan - cache fixes - Code review highly appreciated, please criticize my code!
- fix issue 65 (quads when no image  load slowly in shop/deck editor)
- Possibly fix issue 92, please let me know if it reproduces
- Fix issue 97 (Deck editor: weird behavior of deck display)
- Fix issue 39 - please verify
- Issue 56 can probably be closed as well
- Fix issue 86
2009-10-13 14:16:30 +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
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
9704ee4a24 Erwan
- opponentshroud small bug fix
- added "kicker=" line and "kicker" auto keyword. See Vines of Vastwood (ZEN) for an example. WARNING: kicker= line has to be AFTER "mana=" line
- daily build
2009-09-27 09:53:29 +00:00
wagic.the.homebrew@gmail.com
7bc8bba6f1 Erwan
- fix issue 20 (triangle button usage inplay)
- close issue 27 (gold effect on the gold bar). Please feel free to change the gold glow if you come up with something better, but I consider this perfectly releasable now
- code cleanup
2009-09-24 12:32:08 +00:00
jean.chalard
28f93c035f J :
CAREFUL : this update REVERSES the triggers default actions.
* Make the right trigger opens the hand and the left trigger skips to
  next phase.
* Add an option to reverse triggers (and thus revert to old style).
2009-09-23 07:25:39 +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.the.homebrew@gmail.com
7ce2c563e1 Erwan
- Fixed empty ActionStack "interrupt" messages
- If no attackers are declared, go straight to Combat end phase
- Once First strike damage is declared, attacking player needs to "actively" request a next phase event to go to the next damage step
- Second Damage step is called "Combat Damage (2)"
- UserRequestNextPhase is to be used knowing that it might not succeed
- Step change for GuiCombat is now computed at GameObserver::nextGamePhase

Note: Combat damage to creatures is not assigned when AI attacks. As this seems to be a problem with the previous SVN version, I4m still committing this change
2009-09-13 12:42:18 +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
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
wagic.the.homebrew@gmail.com
a7bef9142c Erwan
-removing unpackDamageStack/repackDamageStack obsolete functions
2009-09-02 12:59:55 +00:00
wagic.the.homebrew@gmail.com
794eec8bb8 Erwan
-code cleanup
-fix one card in TSP
2009-08-31 10:17:28 +00:00
jean.chalard
6dab048a9e J :
* Interface for damage assignment.
2009-08-31 02:00:33 +00:00
wagic.the.homebrew@gmail.com
890c893c94 Erwan
-a few warning fixes
2009-08-27 13:11:29 +00:00
wagic.jeck
6728794ce9 Jeck - Quick crashfix when loading without a profiles directory, slight keypad modifications. 2009-08-27 03:17:25 +00:00
wagic.the.homebrew@gmail.com
846f3b2ffc Erwan
- Fixed some segfaults in Test suite
2009-08-23 10:22:54 +00:00
jean.chalard
3349f974f1 J :
* New interface.
* This breaks a lot of things. It is not feature-equivalent. It
  probably doesn't compile under windows and doesn't work on PSP.
* Damage is not resolved any more. This will have to be fixed.
* Blockers can't be ordered any more. This will have to be fixed.
* A lot of new art is included.
2009-08-22 05:59:43 +00:00
wagic.the.homebrew@gmail.com
4f76f50cdd Erwan - fizzle spells that have invalid targets 2009-08-09 11:18:05 +00:00
wagic.the.homebrew@gmail.com
94e199d92a Erwan
- some cleanup (gcc warnings)
2009-07-26 07:27:27 +00:00
wagic.the.homebrew@gmail.com
bf8d4fd827 Erwan
- bug fixes (civic wayfinder, fault line)
- target's quad is displayed for generictargetabilities
- added menutext for powertoughnessmodifier
2009-07-26 03:15:52 +00:00
wagic.the.homebrew@gmail.com
8cc2fc9d52 Erwan
- The AI can now use May Abilities
2009-07-25 11:43:36 +00:00
wagic.the.homebrew@gmail.com
719c218552 Erwan
- fixed Beacon of unrest bug
- Fixed Kraken's eye bug
2009-07-25 02:57:30 +00:00
wagic.the.homebrew@gmail.com
328aa1c9f4 Erwan
- reduced price of boosters
- Sets need to be unlocked in order to be accessed from the shop
- Added a "refresh" option in the shop
2009-07-23 13:44:50 +00:00
wagic.the.homebrew@gmail.com
2ba5fcb955 Erwan
- Added "@movedTo(...) trigger. See argothian enchantress in USG
2009-07-14 13:29:12 +00:00
wagic.the.homebrew@gmail.com
d8ac4a49b1 Erwan
-translation updates (including fr.txt)
2009-07-05 09:06:51 +00:00
wagic.the.homebrew@gmail.com
b1e35a6bcb Erwan
- Moved "extraPayment" cancel verification into ActionLayer (was in GuiLayers)
- added "HUDDisplay" MTGAbility (displays damage/graveyard info)
- Added option to NOT interrupt own's spells and abilities. Allows smoother gameplay. We should add a "quick options" menu ingame to change those options on the fly
2009-07-04 14:10:21 +00:00
jean.chalard
dd054c4963 J :
* ostream printing of JGui objects.
2009-05-23 08:34:50 +00:00
wagic.the.homebrew@gmail.com
f94df3862b Erwan
- Added translation mechanism, and basic french translation as an example
2009-05-16 15:23:26 +00:00
wagic.the.homebrew@gmail.com
42e6521155 Erwan
- Added "stack" as a zone in the perser
- Added "fizzle" keyword in the parser for counterspells
2009-05-11 13:23:09 +00:00
wagic.the.homebrew@gmail.com
ab48516788 Erwan
- Yet another attempt at fixing counterspells. Needs testing
2009-05-10 13:31:33 +00:00
wagic.the.homebrew@gmail.com
12bd665409 Erwan
- add Mercadian Masques, Mirrodin, Odyssey -> let's do some cleanup!
- Attempt at solving a bug with AI+psychic venom (manaburn), not tested
- Added Abrasax's monocolor AI decks
- Momir better randomizer
- Removed 64 Abilities limitation, I hope...
2009-04-11 02:02:10 +00:00
wagic.the.homebrew
58700417da Erwan
- Added Waldorf's changes
2009-03-03 11:03:38 +00:00