Commit Graph

4041 Commits

Author SHA1 Message Date
solo81@web.de
a821b2752d Fixed issue757. 2011-11-13 19:34:38 +00:00
wagic.the.homebrew
3ed822f33b - Automated download of resource files for Android
-- There's still lots of things to figure out: scalability of the server (can we host the files someplace else? Can we have several servers in case one of them fails?), versioning, possibility to download several mods, etc... but this is the basic functionality and should be enough for the first version.
-- The Java file should probably be split...it's close to 1000 lines now :/
2011-11-13 08:43:07 +00:00
wagic.the.homebrew
fe83b6b4e8 - moved test for i718
- Added macros for Basic landcycling and cycling
2011-11-12 12:48:00 +00:00
wagic.the.homebrew
d654b050df - fix for issue 756 (cycling not working for first 7 drawn cards)
- minor cleanup of MTGGameZones.cpp
2011-11-12 10:14:27 +00:00
wagic.the.homebrew
a94e0a11cf Fixing Giant growth. This fixes the 5 failing tests from the test suite 2011-11-12 04:47:12 +00:00
solo81@web.de
9a93824539 1) Fixed issue758.
2) Finished updating cards with cycle.

3) Coded some cards with "@cycled...".

Astral Slide
Fleeting Aven
Invigorating Boon
Stoic Champion
Warped Researcher.

Tests will follow!
2011-11-09 23:08:54 +00:00
Xawotihs
8c6a0cf9ae Fixed issue 753. 2011-11-09 22:15:26 +00:00
omegablast2002@yahoo.com
3dcd85944c updated cycling cards, I cheated at this and did a replace :cycling with {cycle):draw:1 so forgive me if it screwed up a cycle card...it should be brain dead easy to fix. 2011-11-09 14:29:28 +00:00
omegablast2002@yahoo.com
d2752a5a22 converted cycling into a cost type to bring it more inline with MTGrules {cycle}, also added the cycled trigger @cycled(tc):
this cost type sends both the event for discard and the event for cycled trigger, it no longer automatically draws a card, that is part of this cost ability instead.
standard cycling is autohand={cycle}:draw:1 controller
its trigger is
auto=@cycled(*|myhand):damage:2 target(creature)
"whenever you cycle a card deal 2 damage to a target creature."
2011-11-09 14:27:56 +00:00
omegablast2002@yahoo.com
db6c4795bf removed and moved exalted test 2011-11-09 11:59:03 +00:00
omegablast2002@yahoo.com
86fb600c96 2011-11-09 11:58:21 +00:00
omegablast2002@yahoo.com
ec66ecc101 fixed bug with exalted not ending if source is killed. 2011-11-09 11:56:16 +00:00
wagic.the.homebrew
1f313aa7a4 Adding test for issue 754 2011-11-08 04:04:51 +00:00
Xawotihs
ad5edc224d Symbian^3 compilation fixes. 2011-11-07 23:32:02 +00:00
omegablast2002@yahoo.com
eda32239ab switched it to observer random.... 2011-11-07 22:47:25 +00:00
omegablast2002@yahoo.com
52db4b9ac4 added random avatar fetching for game modes in which you don't fight a specific deck...
fixed a crash from random deck game modes where it was trying to check against a selected deck...but there is no selected deck in random.
(side effect of this is that i can not bypass this, the stat still need to be run through without causing choas so i set it to deckname "" and id 0...we *might* need to find a different id...though it didn't seem to effect deck 0 as the name does not match)
2011-11-07 22:16:02 +00:00
Xawotihs
1ef9489ea0 Fixed compilation on Windows and avoid crashing when the TestSuite is interrupted. 2011-11-06 19:58:23 +00:00
Xawotihs
e50fdba648 - Replaced static parts by per-instance parts of of several classes when they were not threadsafe (AIMomirPlayer, SimpleMenu, Trash, AIAction, MTGCardInstance, ATutorialMessage, MTGRules). The direct consequence is that we could consumme more memory. So, tell me if you have problems with low memory devices (PSP), there are some threadsafe optimizations that could be implemented if needed.
- Reworked the testsuite to be able to work multithreaded. This is deactivated by default everywhere except in QT_CONFIG as one testcase still refuses to pass in multithreaded mode. On my 4 cores linux desktop, the 650 tests passes now in 4 seconds (1 fails).
- Replaced usage of CardSelectorSingleton by a card selector per game observer.
- Modified the resource manager to be optionnal and per game observer instance instead of being a singleton. Two reasons here : threading AND Open Gl access. I only updated the crashing parts called from the game observer, so most of the code is still using the single instance. Beware of copy-paste concerning resources ...
- Cleaned up the game observer constructors
- Fixed several problems in action logging code while testing proliferate decks
- Cleaned up Threading implementation based on QThread
2011-11-06 17:31:44 +00:00
omegablast2002@yahoo.com
b0cb955c53 converted ifthenability into an activatedabilty from mtgability so that it can be targeted without the use of workarounds... 2011-11-05 23:47:43 +00:00
Xawotihs
e4117212cb Fixed the _test references. In details:
renamed generic/triggers_at_movedto_i179.txt
removed Eradicate.txt
renamed frogmite.txt
renamed gelatinous_generations.txt
removed hope_charm_i267.txt
renamed lightmine_field1.txt
removed martial_coup.txt
removed martial_coup2.txt
renamed safe_passage.txt
renamed and fixed soul's_grace_POWERLIFEGAIN.txt
renamed thellon_of_havenwood.txt
removed tolsimir_wolfblood.txt
removed wave_of_reckoning.txt
renamed winds_of_Rath.txt
2011-11-05 17:11:17 +00:00
Xawotihs
1ce9c75b9c Fixed warning on Windows introduced in latest commit. 2011-10-30 18:33:23 +00:00
Xawotihs
2f4dd4cd2a - Added poison counter check into the testsuite
- Decorelated the testsuite AI timer from the game timer to be able to have reproduceable results with AI tests.
- Created a random generator wrapper class
- Used two seperate instances of this random generator for AI and for the game
- Added methods to load randoms into AI from a testcase
- Fixed a probleme with undo and premade decks introduced in r4035
- Added basic test to test AI proliferate code
- Cleaned up goblin_artillery test
- Added AI tests into the testsuite test list
- Fixed looping bug into the multi target AI code
2011-10-30 14:31:27 +00:00
wagic.the.homebrew
53b9bc412f Fix for issue 749 (autohand/autograveyard/etc... don't work for player2) 2011-10-30 09:35:04 +00:00
omegablast2002@yahoo.com
1806e5463d got rid of restriction "fourth turn" it was incorrect from day one (opps), previous commit changed serra's avanger to "turn:7" which is actually your 4th turn. 2011-10-29 11:27:40 +00:00
omegablast2002@yahoo.com
a48011fe2c serra's avanger.... 2011-10-29 11:20:21 +00:00
Xawotihs
b0a720e8c7 Returned the code as it was. In my test, Proliferate works as before... meaning, I got it crashing several times like before my changes. I still need to rework this code to have it log correctly its actions. 2011-10-27 23:36:29 +00:00
Xawotihs
5f9e8e2588 Fixed stupid problems introduced in previous commit. Bloody GCC with Werror is simply not enough :( 2011-10-27 18:58:54 +00:00
Xawotihs
c3dc51aed1 I just played 3 long games and I was able to undo two fully and got an assert on the third one after more than 1000 actions... so I commit what I have:
- Modified undo to stop at "next phase" action
- Added "muligan" and "force library shuffling" to the list of logged action
- Fixed random logging
- Fixed double logging of actions
- Merged all the "next game" functions into a single one
- Created a PlayerType type instead of using int
- Moved the player loading code into the GameObserver and out of GameStateDuel to avoid having player references in both and simplify the initialization and termination. Tweeked a bit the humanplayer class to be able to do that.
- Added a "load" menu available in testsuite mode, I use that to load problematique game. To use it, just copy-paste a game from the traces into Res/test/game/timetwister.txt. Game in traces starts by "rvalues:..." and ends by "[end]"
- Added some untested and commented out code in GuiCombat to use the mouse/touch to setup the damage on the blockers
- Broke the network game ... hoh well, I'll repair it when everything else works !!
- various code cleanup and compilation fixes on Linux
2011-10-26 22:14:12 +00:00
punkeduard@gmail.com
45f09972ad Some fixes to primitives/mtg.txt
Falkenrath Marauders
Witchbane Orb
Nin, the pain artist
walking corpse
Amphin Cutthroat
Serra Avenger

added Gideon's Lawkeeper
2011-10-26 05:24:17 +00:00
omegablast2002@yahoo.com
3757ae2b1a fixed a crash that would occur when you select a player deck then cancel without selecting an ai deck....this also reviles a strange bug, instead of going back to main screen it put you into deck editor. 2011-10-25 11:52:34 +00:00
wagic.the.homebrew
4c42636bd5 - Fixed issues and memory leaks related to decks unlocking
- Fixed an issue where a GameObserver could be null for some mana costs associated to a targetChooser
2011-10-22 13:38:43 +00:00
wagic.the.homebrew
91e9881903 Fix for issue 476 (Test suite debug error in VC++) 2011-10-20 13:22:54 +00:00
Xawotihs
84a074aede Added action logging during attack/block of the AI player. To do that, I wrapped some of the direct access from the player to the action layer into the game observer.
First version where I managed to finish a normal game while undoing several actions until the end. There are still some problems in direct damage spells and interruption management. I added several assert in the code to catch them.
2011-10-16 22:16:47 +00:00
techdragon.nguyen@gmail.com
8554076f3c removed dead code "shuffleTopToBottom()" method. 2011-10-15 21:10:05 +00:00
techdragon.nguyen@gmail.com
189351d82c modified signatures to allow it to pass compilation in XCode 2011-10-15 19:32:00 +00:00
techdragon.nguyen@gmail.com
a1d278a140 updated XCode project file with new class definition 2011-10-15 18:30:12 +00:00
techdragon.nguyen@gmail.com
1018f392b3 changed shuffleTopToBottom method to use STL library to shuffle cards vector.
* This resolves a compiler warning found in XCode.

NOTE: This method is not even called in the code anywhere.  The only reference I can find is in the AladdinsLamp.fire() method, but it's commented out.  This method sounds like it should exist, but nothing is using it.  Was this not working before for Aladdin's lamp, and commented out to get it to sort of work?
2011-10-15 18:29:43 +00:00
wagic.the.homebrew
6825082d6d - Add a simple macro system for auto lines (the goal is to help mostly with repetitive card auto lines such as the ones we have in MotD mod) Check the MotD mod for examples.
-- I added an AbilityParser.cpp file, mid term goal is to move AbilityFactory there, so that MTGAbility.cpp becomes a bit less big.
-- I tried to add the file reference in Makefiles, but only tested windows compilation so far
- Fixed bugs related to "castRestriction" variables in MTGAbility. these variables were declared in both the parent and children classes, leading to bugs and duplicate code/content

The test suite passes
2011-10-15 16:19:29 +00:00
techdragon.nguyen@gmail.com
28069e980b modified iOS touch algorithm to match Android deployment. 2011-10-15 13:48:57 +00:00
wagic.the.homebrew
c32a3b6aa1 Fix a memory leak in test suit player constructor 2011-10-15 02:37:11 +00:00
wagic.the.homebrew
101f2d9ece Adding Google Ads library 2011-10-15 02:06:29 +00:00
wagic.the.homebrew
512f214374 Fix Miraculous Recovery 2011-10-15 02:01:21 +00:00
Xawotihs
5777475340 Fixed a mismatch between the action produced on player click and the related action parsing 2011-10-13 21:34:30 +00:00
Xawotihs
cd4c7ae085 Fixed a crash on undo on windows, and another one when you tried it before any action was done. Undo is still present in the menu even if there is nothing to undo. 2011-10-13 20:58:32 +00:00
Xawotihs
0b6044551a - Added new code for serialization/deserializaiton of full games including initial game and all the player actions.
- Added an undo menu using this code (beware, it's still very very alpha).
- Removed various warning
- Cleaned up avatar loading
- Added full random lists load/save including the deck shuffling (not sure if I could not replace that with seed load/save)
- Moved momir and Co rules configuration out of GameStateDuel
- Create a GameType type to avoid mixing int everywhere
2011-10-13 19:43:51 +00:00
rodrigodemoura@gmail.com
663058cdab Remove all _Myfirs from vectors. 2011-10-13 18:00:16 +00:00
guzhenjie1@gmail.com
71949f636d Corrected Undead Alchemist and rarity of Skaab Ruinator. 2011-10-13 14:44:32 +00:00
rodrigodemoura@gmail.com
e6b199f599 Modifications to make the game more generic.
Included in a new modrules.xml tags.
 <cardgui>
   <background> Stores information concerning the colors </ background>
   <renderbig> Stores information to draw the card </ renderbig>
  <rendertinycrop> Stores information to draw the card </ rendertinycrop>
 </ cardgui>

 Change the variables array for vectors
2011-10-13 12:25:58 +00:00
guzhenjie1@gmail.com
dee49728aa Removed all { } inside "name(" code in following cards:
Azorius Herald
Boros Fury-Shield
Dryad's Caress
Ogre Savant
Patagia Viper
Plaxmanta
Ribbons of Night
Rolling Spoil
Seed Spark
Steamcore Weird
Tin Street Hooligan
Vigor Mortis

Replaced all counter(1/1), counter(1/2) and counter(2/2) to counter(1/1,1), counter(1/2,1) and counter(2/2,1).
2011-10-11 12:46:43 +00:00
omegablast2002@yahoo.com
6fa016ca54 corrected my logic, for some reason i remember clearly already having moved this line, but i guess it didn't make it into the last change i did to choosecard function. THIS is what it was meant to do...
also corrected an issue with the changed logic of ALife eff return. you have to take into account that "{cost}:life:200" <---is not targeted so there is no player targeting involved with such code, making the eff return always 0 in cases where you don't have {cost}:target(player) life:200...i might need to review the eff returns to check that there are not other cases similar to this, :P my original code there was messy but took that into account. so careful with refactors in this area.
to see how this function was intended to work, try the following lines on any card

auto={t(creature|opponentbattlefield)}:life:233
auto={s(creature|mybattlefield)}:damage:4 target(player)
2011-10-11 11:14:55 +00:00