Commit Graph

50 Commits

Author SHA1 Message Date
techdragon.nguyen@gmail.com
acd7bb1aa4 reformatting code according to guidelines defined at
http://wololo.net/forum/viewtopic.php?f=35&t=2235&start=10
2010-11-16 00:55:16 +00:00
wrenczes@gmail.com
5a1e8e6ffe More reorganization work around CardSelector and the singleton pattern. Broke the source for the singleton into its own separate source file, to keep things clean. Also broke apart a circular header dependency: CardSelector defines and uses a SelectorZone, which is a member inside of CardView. CardView in turn is used heavily by CardSelector. Instead SelectorZone is now defined within CardView (where it's set & controlled anyway).
I've also added my current work on the zone navigation system (class Navigator) - it's currently turned off for now (the override for this is inside of CardSelectorSingleton's Instance() call, simply comment out the NEW CardSelector and uncomment out the NEW Navigator line.)  It's functional, but I want to do more testing before considering wiring it into the game options or something similar.  (Also, note that it currently doesn't support the mouse functionality added by DJardin.)

Lastly, there's a bug crash fix in ActionStack that I tripped across while testing - basically, an illegal index value would have us walk off the bounds of a vector.
2010-10-31 07:50:53 +00:00
wrenczes
d5f3e4cfea Enabled precompiled headers for the build. This cuts the win compile time in debug by at least half on my laptop; on the psp compile, it shaves it down by ~ 45 seconds. I only did a cursory inspection of what to add to PrecompiledHeader.h, there's probably more that we can throw in there for more incremental speed improvements.
Also fixed the project includes so that we don't need to always use the indirect include path, ie:
#include "../include/foo.h" -> #include "foo.h"

I'm don't know much about make files - if I busted the linux build, mea culpa, but I think we're okay on that front too.  For future reference, here's the most straightforward link on the topic of adding pch support to make files:

http://www.mercs-eng.com/~hulud/index.php?2008/06/13/6-writing-a-good-makefile-for-a-c-project
2010-10-24 05:55:24 +00:00
wrenczes@gmail.com
e2de03d987 Some organisational prep work before I start working on a new navigation method (ie replacement for CardSelector). The current design was to allocate a CardSelector and pass in its pointer to a variety of classes via their constructors. To simplify things, now we use a singleton style pattern with an Instance() function - this means that when I implement a new class to replace CardSelector, I only need to modify what's returned by the singleton callback - as long as the new pointer class supports the same function calls, it'll be a straight drop-in. 2010-10-22 08:41:44 +00:00
omegablast2002@yahoo.com
d13e8904b5 massive update, additions and changelog in first comment. 2010-10-18 10:46:36 +00:00
wrenczes@gmail.com
211deca011 I'm still planning on a more ambitious navigation mod, but this is a simple interim change to the existing navigation model that allows you to use the up/down keys to navigate directly to an avatar. This means that if you open your card hand & need to cast a spell that targets the enemy avatar, you can simply hit the up key a couple of times instead of navigating left (through potentially a huge number of cards if you're in a long, drawn out match). 2010-10-18 04:01:18 +00:00
Xawotihs
e8ecd74361 Mouse support in graveyards an library browsing during battle 2010-10-13 22:28:19 +00:00
Xawotihs
bb6267bbe4 Fixed possible deadlock added in the mouse support code 2010-10-12 21:53:41 +00:00
Xawotihs
93b1656f13 Added left mouse click support for menu, submenu and battle 2010-10-10 21:59:18 +00:00
wagic.the.homebrew@gmail.com
a6e4fba26b Erwan
- fix issue 304 (Momir + persist)
- some minor cleanup
2010-09-25 09:13:30 +00:00
omegablast2002@yahoo.com
75c0733a38 Condensed castrestrictions/handsize rule massively. handled by 1 rule now and checked in one pass. 2010-09-24 19:26:32 +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
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
44ae17122e added affinity.... 2010-09-06 14:22:00 +00:00
omegablast2002@yahoo.com
99b058c221 complete revamp of alternative cost, changes in comment 2010-09-06 05:38:04 +00:00
omegablast2002@yahoo.com
e65b3f223f Complete Overhaul of the cantcast abilities, changes in first comment. 2010-09-04 15:16:57 +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
jean.chalard
39c5a3d465 J :
* Fix u32 into JButtons.
* Add a few comments.
* Remove useless variables.
2010-02-24 17:28:17 +00:00
wagic.the.homebrew@gmail.com
23fe54ae6f Erwan
- fix issue 153 (Tokens should go to graveyard)
- "token" keyword can now be used in the parser with things such as Creature[-token] for "noncreature token"
- Let's stop using "token" as a type
2010-01-03 10:08:36 +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.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
6f1772e938 Erwan
-fix issue mentioned at http://wololo.net/forum/viewtopic.php?f=4&t=371&p=6296#p6296 . I touched a very sensitive area of the code so please let me know if something goes wrong with this revision with spells or abilities that involve targets and/or sacrifice
2009-10-24 14:15:08 +00:00
wagic.the.homebrew@gmail.com
2c863867d2 Fix for issue 29, please review both code and result, thanks :) 2009-10-05 12:07:38 +00:00
wagic.the.homebrew@gmail.com
620ea034b8 Erwan
-Issue 26: added an option for Mana Display. This needs a bit testing, but it should also lower the priority of "manapool slowness" as this mode probably fixes performance issue as well.
-I can't seem to be able to "save" some options (hand position, mana display) ion the windows version, does this change break something ?
2009-10-04 06:01:00 +00:00
wagic.the.homebrew@gmail.com
48c57a4fed Erwan
- fix issue 36 (Life points hidden by big card)
2009-09-26 11:08:20 +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
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
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
jean.chalard
5b473a1505 J :
* Fix almost all tests.
* This version "nearly" works.
2009-09-07 14:37:32 +00:00
jean.chalard
b6781e82f1 J :
* Add the Trash facility and use it for CardViews.
* Fix a graphical bug with card shadows.
* Fix a graphical bug with limitors.
* Enhance the graphical appearance of cards going to graveyard.
2009-09-05 11:44:34 +00:00
jean.chalard
c8af1836a0 J :
* Fix a bug where some event chains could result in reading from a
  freed memory space.
2009-09-04 17:21:34 +00:00
jean.chalard
01fe3b76f7 J :
* Minor bugfixes (mostly graphical bugs)
2009-09-04 16:58:17 +00:00
jean.chalard
2e7570fdea J :
* Add some pretty printers to help debugging.
2009-09-04 13:22:15 +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
wagic.the.homebrew@gmail.com
5afd1a45a2 Erwan
-some memory leaks fixes
2009-08-29 14:16:58 +00:00
jean.chalard
2ff279fad8 J :
* Order blocker interface.
2009-08-28 13:57:12 +00:00
wagic.the.homebrew@gmail.com
99aa284431 Erwan
-code cleanup
-memory leaks fixes
2009-08-27 13:32:12 +00:00
wagic.the.homebrew@gmail.com
a18b163b17 Erwna
-replace "new" with "NEW" for memory leak detection
2009-08-27 12:48:54 +00:00
wagic.the.homebrew@gmail.com
fb0dccb7f3 Erwan
-added possibility for tester to take control of the test suite
2009-08-25 11:55:07 +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
258e08786d Erwan
- fixed a few cards
- removed extra phasebar
- doesnotuntap and protection from... will now work as auras
2009-08-10 13:22:22 +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
2f3259fd55 J :
* Add the rolling phasebar.
* This is a preview version. It shares most of the code with the definitive
  version, but when the real code is checked in, this will be deleted.
2009-06-22 14:45:27 +00:00
wagic.the.homebrew@gmail.com
dd56962910 Erwan
- Events are now sent to GameObserver rather than ActionLayer
2009-06-13 03:49:52 +00:00
wagic.the.homebrew@gmail.com
34c139a15d Erwan
-fixed bugs with lifelink
2009-04-05 09:01:31 +00:00
wagic.the.homebrew
e389ea5062 Erwan
- Moved the "putintoplay" rule as a standard MTGAbility
- reverted bad encoding for MTGGuiPlay
2009-01-22 13:25:00 +00:00
jean.chalard
3e9ff2b580 J :
* Change the name of debug.h into config.h and use the new RESPATH define.
2008-12-25 16:28:03 +00:00
jean.chalard
c97dd1f260 J :
* Remove ^M's.
* Re-indent automatically.
* Remove whitespace at the end of lines.
2008-11-12 13:45:42 +00:00
wagic.the.homebrew
d45e3b101b 2008-11-02 09:50:16 +00:00