Commit Graph

24 Commits

Author SHA1 Message Date
Tobias Loose
9ee44ca091 Substitute more char arrays with strings 2013-11-29 11:51:22 +01:00
omegablast2002@yahoo.com
b20b75df33 this patch focuses on giving wagic a more defined turn structure. 2012-03-13 16:48:48 +00:00
Xawotihs
3514476812 - Created a GamePhase type to ease debug.
- Modified the testsuite and gameobserver to be able to replay all the testcases based on the actions logged during the first pass. This allows to test the action logging and replay used during undo. It's only activated in multithreaded mode and it does not work on Momir tests.
-  Modified choice logging and replay to use menuId instead of ability index, as, for some obscur reasons related to Lord, those ability indexes may change.
- Fixed bug in nextphase logging wrongly generating click actions
- Added a "stack" zone to the click ability logging to be able to replay properly interrupt
- Fixed a wonderful bug mixing card names with zone names in the actions execution engine
- Added a "combatok" action logging/execution
- Added a "clone" virtual method to MTGCardInstance and Token to be able to clone correctly the right object type. Used that in MTGGameZones::removeCard
2011-11-29 21:50:16 +00:00
Xawotihs
9adb9d625d - reworked the testsuite and the rules (storyflow) to use the same game deserialization code, moved that code to the players and zone classes
- removed every references to the gameobserver singleton. This object can now be instantiated several times as it's needed for minmax. To be able to do that, I mostly added a reference to a gameobserver from any targetable object (cards, players, spells) and abilities.
2011-10-01 13:30:30 +00:00
wagic.the.homebrew
472d593563 remove "cleanup" phase being automatically added to custom phase ring. People who want it should add it manually in their custom ring. 2011-05-07 04:48:56 +00:00
wagic.the.homebrew
13dd07973e Removing "oldSchoolDeathtouch", as it seems Cockatrice and Thicket Basislisk are now softcoded. Zeth, Dr.Solomat, please review :) 2011-05-02 08:44:02 +00:00
wagic.the.homebrew
e100bd826c Refactor of the parser. The goal is to reduce maintenance cost, by refactoring some of the most frequent "copy/paste" we have in there. This removes roughly 500 lines, going from 4850 to 4350 lines. I'm getting closer to my goal of getting this file back to 4000 lines :)
Crossing fingers I didn't break anything major. The test suite passes, though I expect some edge case bugs to appear. Apologies in advance, I think this change is worth it.
2011-05-01 15:53:13 +00:00
omegablast2002@yahoo.com
eb8a22223b omitted a unneeded include. 2011-03-02 21:35:31 +00:00
omegablast2002@yahoo.com
64a234ef44 added support for customphasering construction in rules txt...
exsample

[INIT]
mode=mtg
[PLAYERS]
life:2000
poisoncount:4
customphasering:untap,firstmain,firstmain,draw,firstmain,upkeep,draw
auto=shuffle
auto=draw:7
auto=@each my draw:draw:1
auto=maxPlay(land)1

by default every turn will have normal order we've always been use to
however
before begins --required added automatically
anything you want in any order
anything you want in any order
anything you want in any order
anything you want in any order
anything you want in any order
anything you want in any order
anything you want in any order
anything you want in any order
cleanup---required added automatically
after end of turn---required added automatically

svntax 
customphasering:blah,blah,blah
listed in the order you want it to go. you can repeat a phase as often as you want, you can omit phases.

please note, this was not designed with MTG in mind..some of the rules require certain phases to work...this is for CUSTOM game building...i repeat NOT DESIGNED FOR MTG...tho it can be used with most(almost all, with the exception of those which require certain phases to work, exsample, ninjitsu will only work in a phasering which contains blockers and attackers)

enjoy.....
2011-03-02 21:33:42 +00:00
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
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
5595c0d3d8 More OutputDebugString() -> DebugTrace changes. 2010-10-06 10:45:29 +00:00
wagic.the.homebrew@gmail.com
b1079942af Erwan
- Reward system in Story mode (currently, either credits or random set)
- Rules now accept for player 2 to start (see story mode "block" stage)
- Story mode now has an autosave/autoload mechanism. This is for convenience but also to prevent people from abusing the reward mechanism too easily.
- possibility to choose an avatar for both players through the rules (see example in story mode)
2010-05-09 08:14:01 +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
11ffebf29f Erwan
-bug fix (credits cheat with empty deck evil twin mode)
-bug fix ("combat ends" message instead of "Combat Damage(2)" in stack)
2009-09-15 13:35:08 +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
0454fb20ec Erwan
- fixed textures cache bug
- fixed one card in TMP
2009-08-31 12:22:43 +00:00
wagic.the.homebrew@gmail.com
846f3b2ffc Erwan
- Fixed some segfaults in Test suite
2009-08-23 10:22:54 +00:00
wagic.the.homebrew@gmail.com
3e7ecb3016 Erwan
- fixed a bug (crash if a card that had an ability until end of turn would be put into the graveyard before the end of the turn)
- Added a new game Mode : Random 1 or 2 color.
2009-07-18 08:50:14 +00:00
jean.chalard
5466a7004c J :
* Fix a number of warnings
2009-01-18 14:13:13 +00:00
jean.chalard
3bb2c431c9 J :
* Split constants file to have them in a single place.
2009-01-06 13:07:28 +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
62a7a0e211 Erwan
- a few extra cards in Alara
- Added missing phaseRing files (sorry...)
2008-11-09 07:34:40 +00:00