Commit Graph

2801 Commits

Author SHA1 Message Date
Xawotihs
3cb652087d iOS frontend and XCode project 2010-12-12 15:58:47 +00:00
solo81@web.de
32d614e23b Fixed Baku Altar (activation cost). 2010-12-12 13:22:35 +00:00
solo81@web.de
b609fa2cb1 Fixed Energy Storm. 2010-12-12 11:51:52 +00:00
wrenczes@gmail.com
4d0296d628 Fixed issue 551, "this vector contains over 1 million members" crash.
Thanks to Mike for helping me with the repro & debug session on his machine.
2010-12-12 09:44:45 +00:00
Xawotihs
01ac3d1a55 - cleanup image dependencies in QT project 2010-12-11 22:46:15 +00:00
techdragon.nguyen@gmail.com
fe75493ffa No code change. Reformat code 2010-12-11 22:42:48 +00:00
Xawotihs
b3650bcccf - deactivate testsuite if _DEBUG is not defined 2010-12-11 22:39:35 +00:00
Xawotihs
ce7f62cac3 - Qt project cleanup, in particulary removed testsuite and traces in
release.
2010-12-11 22:32:06 +00:00
solo81@web.de
e2440af09e Fixed Goblin Piledriver.
It had a typo in its abilities-line.
2010-12-11 17:35:56 +00:00
wagic.the.homebrew@gmail.com
6ea7eb2b87 Erwan
- fix for issue 292 . This fixes the classical theme, which had been broken by the initial fix for the final Saga glitch
2010-12-11 16:00:59 +00:00
omegablast2002@yahoo.com
c54de679d4 couple bug fixes, a slight refactor,
ok here goes, first, fixed a crash that would happen when ever a player would gain more then 2000 life or take more then 2000 damage...the buffer was becoming corrupted i imagine because it was too small, increasing it to 10 slots allowed players to successfully take massive amounts of damage, highest i bothered checking was about 35k gained/lost, no crash...

2nd, removed the and refactored cantcaster rule, moved it to stateEffects() and renamed stateeffects to better reflect what it will be handling,

removed sneak attack rule and moved it into stateeffects

the following ints have been converted into bool, 
all the cantcasters, canputlandsintoplay is becoming a bool, the amount of lands you can play is now handled by a new varible int landsPlayerCanStillPlay (this is for my ability additional lands increase in support on perminents coming after the release)

the changes to bools were for an obvious reason, they were all ints pretending to be bools, my varibles were confusing as you would often see code like this if(cantblahblah > 0)
which to another coder might not make any sense.

these varible ints were returning 0 as false and 1 as true...changed them all to bools, same goes for putlandsinplay int, in half the places it was being used as a bool, AND it was tracking the amount, when i was coding additional land ability, this made it impossible to maintain correct amounts without damaging the rest of the code.
as a bool, controlled by stateeffects, it can now be used correctly as a bool in all cases, and the stateEffects manages the switch on it to false if you no longer have any landsPlayerCanStillPlay left.

the refactor on cantcaster was also a bug fix, it was reported to me that cantcasters were not correctly working, sometimes ai or player would still be allowed to play a card with one in play, because of the old way i had it setup somecases of bothcantcaster were reseting the cantcast to 0, basically making the check do nothing.

it is now handled in stateeffects if you have one in play, then its true, if not then false...this returns very accurate tracking of the cards instantly instead of checking as cards enter or left play.

the "both" versions now have their own bools to avoid future conflicts with the single player cantcast...

added a case for the fancy moving text, some move to library effects were incorrectly returing fetch.
2010-12-10 20:51:50 +00:00
wrenczes@gmail.com
f894056e74 Fixed the order of initializers to make the psp warnings go away. (Stupid gcc, I don't understand why it cares about the order of initializers in the first place...) 2010-12-10 10:25:35 +00:00
wrenczes@gmail.com
4ac3c01cb0 Fixed the include guards. This had disabled the _CrtSetDbgFlag() call, so we were no longer detecting memory leaks in debug under Win32 when exiting the app. Ouch!
(Confirmed that the leak I just fixed was present & reported by the debugger with this change in place.)
2010-12-10 09:18:29 +00:00
wrenczes@gmail.com
4fd67bd1fd line endings -> Unix. No code changes here. 2010-12-10 08:38:09 +00:00
wrenczes@gmail.com
f8368d01c4 Found & fixed two memory leaks:
- computeActions would leak a ManaCost.  This was fairly minor.
- AIPlayer::SelectAbility had a major leak.  Basically, there's some code that pulls a random number for an efficiency check - if the action's efficiency value was below that random number, the action pointer was cleared, and none of the actions that were to be discarded would be deleted out of the rankings map.  I've switched out the rankings container to not contain action pointers, but real action objects, so regardless what kind of logic is implemented, the map will properly clear out its objects upon destruction.
2010-12-10 08:37:41 +00:00
Xawotihs
40c1ed074b Fixed Qt windows project and activated precompiled header 2010-12-09 21:21:55 +00:00
Xawotihs
1e9746a2eb Fixed Qt project on Linux 2010-12-09 19:52:57 +00:00
omegablast2002@yahoo.com
1fe35da5b3 forgot to change back one line i changed, this is part of the manual revert i did earlier. 2010-12-09 18:34:23 +00:00
omegablast2002@yahoo.com
5d0029a2eb fixed "*square* No to all" choice...
someone just forgot that both cases need to check if the interupt decision is 2 before changing it back to 0 (interupt) btw, once a stack is ready any NEW stack actions added, such as Ai interrupting your choice to not interrupt you will see the new stack actions to either cancel manuelly or "no to all"

sorry its not a bug fix for crashes! im really not skilled enough yet to fix the kinds of crashes were having.
2010-12-09 17:37:11 +00:00
wagic.the.homebrew@gmail.com
6360734ea3 Erwan
-Attempt at fixing issue 538. This is a wild guess, but basically 1 000 000 bytes is NOT enough to decompress a 512*512*4 texture (32bits png). We need at least 1MB (1024*1024) AND some additional space for the decompression process. Based on that, bumped the 1 000 000 (minimum contiguous ram necessary to start decompressing a picture) to 1 500 000. I've had pretty good results so far but this needs confirmation
- GameObserver <- changes from Win to *nix carriage returns.
2010-12-09 13:47:04 +00:00
omegablast2002@yahoo.com
5713a45006 reverting this test back to yesterday 2010-12-09 13:32:34 +00:00
omegablast2002@yahoo.com
5d96f68d21 reverted my changes in rev 2774 which intruduced bugs, coincidently stumbled across what really fixed triggers substep, which was moving it into stateeffects...this revert reintruduces the double interrupt offer to combatdamage in some specail cases. 2010-12-09 13:31:09 +00:00
techdragon.nguyen@gmail.com
b595091855 moved tests for rakdos pit dragon into bugs folder until issue 555 is resolved. 2010-12-09 07:58:58 +00:00
techdragon.nguyen@gmail.com
dbb3e04de1 replacing old tests with new more complete tests for radkos pit dragon.
Note: currently two of the four tests fail due to issue 555 which is unresolved.
2010-12-09 06:14:33 +00:00
techdragon.nguyen@gmail.com
36c096a33c fixed line endingsin AIPlayer.cpp
modified debug output for Manacost.  ToString() wasn't defined correctly.  I refactored the output
for Dump() to just call ToString().
2010-12-09 01:37:49 +00:00
techdragon.nguyen@gmail.com
833bd4714d reformatted indentations as they were slightly off.
refactored latest changes to group similar menu texts.
2010-12-09 01:28:25 +00:00
omegablast2002@yahoo.com
585eae1852 added fancy location based move menutext return to lord...it was a case we must have messed when we were trying to get rid of generic "move" messages...lord returns ability menutext which in case of amover is "move"...and "all(" is a lord. so ran into a deck where i had a couple "move" menus display and i didnt know which i was choosing, moving creatures to hand or moving theirs to grave...
death to generic messages!!!
2010-12-08 20:16:27 +00:00
omegablast2002@yahoo.com
f227c4775d moved phase pass automation into stateeffects() where it should have been from the start, it really shouldnt be run as part of "update()" it bothered me enough to actually move it. 2010-12-08 15:33:02 +00:00
omegablast2002@yahoo.com
682af98bf7 moot pointed out i made a boo boo in STANDARDABILITYGRANT thanks you! forgot to add the "suggest good" part of the condiation...as we dont act to give a creature the ability 2 times. (atleast until stacking abilities are added) 2010-12-08 14:37:39 +00:00
omegablast2002@yahoo.com
079d2dbd22 updated this test as it uses the trigger step, note: the 7 or so trigger based test dont want to actually test in test suite...i tried correct a typo in the _test.txt they have an extra "S"...but still they did not get tested...any ideas? if you can get them testing, please remember the combat ones need an extra next directly before the "next for combatdamage. 2010-12-08 14:34:17 +00:00
omegablast2002@yahoo.com
6348940dc6 added a automatic move forward if trigger step if playmode == test suite...this will still trigger the steps actual functions and test that are using trigger step will require an extra "next" test that are not using trigger step for anything will not need the extra "next" 2010-12-08 14:32:12 +00:00
wagic.the.homebrew@gmail.com
70a1a03fee Erwan - reverting r2779 per my comment in that revision 2010-12-08 14:18:41 +00:00
wrenczes@gmail.com
2a442ad2f5 Swapped the DeckMenu background from a png to a jpg, as the transparency wasn't being used at all in the image, so it wasn't buying us anything. Flipped the rendering order so that the background is now truly drawn in the background (ie first), and everything else is drawn on top.
(Make sure you update your res/graphics folder on your psp!)
2010-12-08 11:02:25 +00:00
guzhenjie1@gmail.com
d638ac28b1 Fix Graypelt Hunter and Doomsday Specter. 2010-12-08 10:51:04 +00:00
techdragon.nguyen@gmail.com
def9a8b229 added additional debug statement to show current turn. 2010-12-08 08:21:54 +00:00
wrenczes@gmail.com
bfb6f396df Removed a spurious call to GetInstance(). 2010-12-08 07:58:20 +00:00
wrenczes@gmail.com
5c819a3b3c Found & fixed a crash while testing trample. The bug: if the AI's player hand dropped to zero cards. This broke in r2696.
Zeth, please review, I put in a comment where there's something that doesn't make sense- probably an early change that's now obsolete.
2010-12-08 07:53:51 +00:00
omegablast2002@yahoo.com
d3a4745686 did a couple things here, fixed issue507 but also, very very very possibly fixed issue548, tho i will leave the closing of those 2 tickets to wololo, as he was the one who originally reported them.
another issue i fixed, when last trigger would be resolving in "trigger" substep, the game was moving to next combatstep before you could finish it, NOW the game correctly finishes resolving any triggers that might have fired off in "Triggers" substep, THEN it adds combatdamage step to the stack. this also fixes an issue where if you were multiblocked and combattriggers fired off, then your trigger would be UNDER the "ordering window" and unresolvable.

added waitingforanwsers return to userRequestNextGamePhase
when youre "waiting for anwsers" that means you have a menu box open and the game is waiting for you to decide....this was one of the causes of the rush to combat damage while youre still selecting something on a menu.

moved Trigger step call to requestnextgamephase into stateEffects() and out of updates, works MUCH better this way. i wonder why this isnt handling more of the automated functions, i suggest we consider moving the autopassphase into stateEffects() also as it will most likely be handled much better in there then in the update function.


also,
adjust Ailessons on Adrawer, it was still getting a little too excited about drawing cards. 
moved around the eff setting on grantingability lessons.
having it set to 0 BEFORE actually giving it a value was conter productive.

added a peice of commented out code in "isintop" function that if you uncomment will allow you to have Ai ALWAYS multiblock you.

im pushing this in as i feel comfortable with the positives and havent really come across an adverse effect yet.
however i am just one person and testing something like this is much easier with alot more then 1 person on it.
2010-12-07 17:58:46 +00:00
wagic.the.homebrew@gmail.com
c28c14171f Erwan
-fix for issue 489 (protection prevents some triggers to happen)
2010-12-07 14:12:04 +00:00
techdragon.nguyen@gmail.com
7676ad5e79 removed blank entry. caused an error to appear in console on startup 2010-12-07 05:43:23 +00:00
Xawotihs
594b3abf1e Qt project fixes on Mac 2010-12-06 22:30:25 +00:00
Xawotihs
e8f5d2d349 iOS texture management fixes 2010-12-06 22:25:28 +00:00
Xawotihs
13f467a9ef Activated QT image support, removed freetype, jpeg, png, gif libs dependencies in the Qt project. 2010-12-06 20:06:03 +00:00
omegablast2002@yahoo.com
8ba23dd99f Bug Fix for issue 464, multipling the secs you set to interrupt by the amount of unresolved stack actions. this extends you time giving you essentially X sec of interrupt offer for each stack action.
exsample, 3 unresolved stack actions. with interrupt set to 5 secs, will allot you 15 secs to decide the first action, then 10 secs to decide the 2nd action, then 5 secs to decide the last action.

note: its multiplicative, this does not make each stack action into 15 sec interrupt.

as they resolve "extraTime" gets recalculated.
2010-12-06 12:12:53 +00:00
omegablast2002@yahoo.com
336cf0bc32 jace's erasure fix, this is only temporary until i add all the abilitie varibles, currently theres no system beside a workaround we use "thisforeach(varible) effect" to return a value, when im done with the varible returning for abilities then the code will be replaced with @drawn(controller):may deplete:cardamount. for now tho this makes the addDraw send 1 event for each card drawn, essentially making all the @drawn cards 100%. 2010-12-06 11:28:11 +00:00
wrenczes
ed321e2df5 Linux specific changes to allow linking against Boost::threads. Not used by the current build. Also turned off 'unused' warnings in QTCreator to match more closely the warnings that we pay attention to in the psp build. 2010-12-06 07:44:16 +00:00
wrenczes@gmail.com
ffd3b7b074 At Z's request, fixed Issue 184, ExtraCost types with targets such as Siege-Gang Commander/Drowner of secrets combined with targeted abilities bug.
This one was a bit of a doozy to fix correctly, but the actual fix ended up being fairly simple - the upshot is that TargetAbility never checked for whether an extra cost needed setting prior doing a target selection.  While at it, I discovered and fixed another bug:  if you're in the middle of an extra cost choice (like sacrifice, for instance) and hit the next phase button, the game would let you proceed, and then hang in an endless loop.

While at it, did a little cleanup/refactoring around GameObserver's waitForExtraPayment - any time a bool has something that sounds like a verb, it probably deserves to be a function.  Now it is. (I needed to refactor it anyway, as I reused that code for the next phase hang.)

Note that after this fix, I had to patch two test cases (siege_gang_commander.txt & seismic_assault.txt) - since I've change the selection order (ie a target ability with a sacrifice cost requires the cost to be paid up front before picking the target), this means that tests involving targeting & sacrifices need to switch the order of the cards to pass.
2010-12-06 06:49:36 +00:00
solo81@web.de
4de3b4a3c0 Fixed Twisted Image. 2010-12-05 15:23:45 +00:00
wagic.the.homebrew@gmail.com
c7a17a0e57 Erwan
- some code cleanup, as I am trying to figure out the root cause for issue 548
2010-12-05 14:13:42 +00:00
omegablast2002@yahoo.com
59864cbcb7 removed a variable mike readded accidently(?) which i converted into a static local variable 2010-12-04 21:59:08 +00:00