Commit Graph

2256 Commits

Author SHA1 Message Date
Tobias Loose 94c3ac9ad9 Fix FTBFS 2013-11-17 21:02:08 +01:00
Tobias Loose 5419d87e4e Get rid of two more define groups. 2013-11-17 20:22:03 +01:00
Tobias Loose 446ed20758 Fix typo ActionLayer::receiveEventPlus(...)
This method is rarely used, however it returned 0 after adding stuff.
It now returns the sum.
2013-11-17 19:39:46 +01:00
Tobias Loose 7a48c5e087 Fix some cppcheck warnings (mostly style and postfix vs prefix iteration) 2013-11-17 19:36:24 +01:00
Tobias Loose 3ca2f1c1ed Replace defines in Damage.h with enums. 2013-11-17 17:12:58 +01:00
Tobias Loose 146872797b ActionElement.h: Replace defines, remove superfluous ";"
Defines do not follow scope rules, but enums do. Enum classes
even utilize strong type checking (but i am not sure about compiler
support for c++11 on all target platforms).
2013-11-17 16:08:29 +01:00
Tobias Loose c6dc51c7d3 Simplify Damage::resolve a bit 2013-11-17 15:37:56 +01:00
Dmitry Panin 2835bdf767 Fixed issue with Cranial Plating.
Issue
	attach then equip: plating will give bonus to both creatures
Fix
	Changed "attach" to "retarget target(creature|mybattlefield)"
	as this doesnot admit this bug
	Attach should become deprecated in future
2013-11-17 01:49:51 +04:00
Dmitry Panin afc903e31b Added different names for attach and equip
+ moved implementation of AEquip to .cpp
2013-11-17 00:44:37 +04:00
xawotihs 017f6dd1ed Deactivated part of the traces outputted by the testsuite to make Travis
happy.
2013-10-30 22:58:04 +01:00
xawotihs 784d127a6e I think I got it ... messy / not appearing at the end of folders in the
travis linux where it appears fine on mine :(
2013-10-30 22:28:09 +01:00
xawotihs f6c47b85e3 More debug 2013-10-30 22:02:43 +01:00
xawotihs 74280aef1d Added some traces in the primitives and sets loading. 2013-10-30 20:50:34 +01:00
Dmitry Panin 6bbe290762 Fixed bug with syncopate to consume all the mana available
Now pay[[{x}]] is not supported because of this.
use "pay[[{value:storedx}]]" instead
2013-10-30 12:39:08 +04:00
xawotihs db1c552321 Tries to work around crash of the testsuite in Travis. 2013-10-30 00:20:58 +01:00
xawotihs f08f0ad3b9 Merge branch 'master' of https://github.com/WagicProject/wagic
Conflicts:
	JGE/include/JTypes.h
2013-10-29 23:36:07 +01:00
xawotihs a3a1bc2b79 Created a dedicate console Qt based wagic application and run it in the
travis file.
2013-10-29 22:38:37 +01:00
Michael Nguyen b17d9d3f85 Merge branch 'master' of github.com:WagicProject/wagic 2013-10-28 15:35:45 -07:00
Michael Nguyen 84ca7457b5 updaed for iOS6 2013-10-28 15:20:35 -07:00
Unknown 224c94e890 Included some testsuite into qtmain and updated travis file to try to use it. 2013-10-27 23:06:29 +01:00
Dmitry Panin cf50b7d403 Fizzle unless pay x (thanks to excessum)
- saves source card in storedSourceCard for ATransform
- adds support for WParsedInt in pay as "pay[[{value:WParsedInt}]]":

name=Spell Rupture
target=*|stack
auto=if cantargetcard(*|opponentstack) then transforms((,newability[pay[[{value:power:highest:creature:opponentbattlefield}]] name(pay {value} mana) donothing?fizzle])) forever
text=Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control.
mana={1}{U}
type=Instant

- adds support for {x} in *some* “pay” abilities (Syncopate):

name=Syncopate
target=*|stack
auto=transforms((,newability[pay[[{x}]] name(pay {value} mana) donothing?fizzleto(exile)])) forever
text=Counter target spell unless its controller pays {X}. If that spell is countered this way, exile it instead of putting it into  its owner's graveyard.
mana={X}{U}
type=Instant

- support of "name(pay {value} mana)" in pay abilities to show actual number to pay (see example above)
2013-10-27 13:47:00 +04:00
Dmitry Panin b8b6153cc5 Reworked AVanishing (fixed bugs + more fair implementation) 2013-10-27 13:42:48 +04:00
Dmitry Panin 461eedd626 Fixed bug with preventing Melira from putting +1/+1 counters on creatures you control 2013-10-27 13:42:48 +04:00
xawotihs 4ac376b5f2 Ignored non-source extensions 2013-10-24 21:53:46 +02:00
Xawotihs@gmail.com 1f0485ff8e Support for running the testsuite in command line programs for continuous integration.
Here is a small example inspired from SDLmain.c:

g_launcher = new JGameLauncher();
InitGame();
MTGCollection()->loadFolder("sets/primitives/");
MTGCollection()->loadFolder("sets/", "_cards.dat");
options.reloadProfile();
TestSuite testSuite("test/_tests.txt");
int result = testSuite.run();
DestroyGame();
delete g_launcher;
return result;
2013-10-23 22:08:30 +00:00
Xawotihs@gmail.com 98861dd916 Fixed memory leaks and refactored a bit the ManaCost class while I was at it. 2013-10-19 14:29:17 +00:00
pankdm b5794ad328 Small fixes (misstype, formatting, target p2) 2013-10-18 06:38:15 +00:00
pankdm 38b4213f9c Refactored formatting for easier reading of the code 2013-10-18 06:38:03 +00:00
pankdm 5c3eb2c405 Changed the owner of ManaCost in LifeorManaCost to itself 2013-10-18 06:37:31 +00:00
pankdm f7eded7417 Devotion mechanics (thanks to excessum for patch)
+ some refactoring:
extrManaCost --> ExtraManaCost
unattachCost --> UnattachCost
2013-10-18 06:37:09 +00:00
pankdm 9d2a2454b2 Fixed: exile was not meaning both exiles
and revised Crypt Incursion
2013-10-18 06:35:52 +00:00
pankdm 8b16074647 Fixed memory leak in menuability (thanks to excessum) 2013-10-18 06:34:42 +00:00
pankdm 43ba9aa13d Fixed parsing of "if(ifnot) ... then may ... " 2013-10-18 06:34:23 +00:00
pankdm 0c6d77daa0 Refactored FizzleToZone
Get rid of common code
Better naming of zone (where we put spell after countering)
More generic syntax: fizzleto(X) where X in [hand, exile, librarytop]
which will give more flexibility later
2013-10-08 23:18:42 +00:00
pankdm 17fdedb648 Draft of the "fizzle to zone"
(credit goes to excessum)
2013-10-08 23:17:43 +00:00
pankdm da7c336dc2 Removed debug code that was added by mistake 2013-10-01 14:49:31 +00:00
pankdm be76c8a4f1 Fixed issue with cantbeblockerof and cantbeblockedby vs protection 2013-10-01 14:47:39 +00:00
Xawotihs@gmail.com 490752e9da - Removed dependencies on Boost/string in mtg sources
- Removes dependencies on Boost/shared_ptr in mtg sources only for WP8 for the moment
- Various compilation fixes on WP8
2013-09-30 21:25:17 +00:00
pankdm 7894ca3ace Refactored ABlink: extracted common code as method "returnCardIntoPlay" 2013-09-27 19:25:28 +00:00
pankdm 3761684816 Fixed blinking (until EOT) of creature with X in cost 2013-09-26 14:17:39 +00:00
pankdm 00ebc8c8eb Fixed issue with blinking creature that has X in cost 2013-09-23 20:27:52 +00:00
pankdm 54d1126c58 Small fix in TestSuite
"Update" should pass "dt" since the last update, not since the beginning the game.
2013-09-23 19:44:03 +00:00
pankdm 11f541a627 Fixed:
Edge of autumn
	Mirrorworks

	Clone of the card now have the same image as original
	Issue with cloning and trigger "nontoken * enters"

	Blitzkrig rules
	Hermit druid rules
2013-09-23 19:40:12 +00:00
pankdm 8626451977 Fixed uninitialized value
Due to this, activated abilities with {X} in cost sometimes were having X=0 when playing
(This appeared only in Debug mode)
2013-09-16 20:18:36 +00:00
pankdm 4aa5dec51a Fixed some warnings
+ added compile flags to mute some warnings that don't have an obvious fix
2013-09-16 17:42:07 +00:00
wagic.the.homebrew@gmail.com bd25b12fb2 Fix for issue 962 (Hexproof) by Dmitri 2013-09-15 02:57:29 +00:00
omegablast2002@yahoo.com 7917a70b1b forgot to reset the opponents miracle on beforebegins. i knew i had coded the miracle to be player independent :P 2013-06-19 13:33:24 +00:00
omegablast2002@yahoo.com 2fa3f468b4 added menutext overriding to transforms.
castcard-> is now the copied spell x.
2013-06-19 11:46:09 +00:00
omegablast2002@yahoo.com b61cd2f69a megapatch contents
added
"whenever a creature enters the battlefield you may pay {1}, if you do gain one life"
conditional may pay({cost}) effect 
this version is a super type ability, and can only be used in certain combos.

to nest you will need to use it in its subtype pay[[{cost}]] effect
pay keyword can have sideeffects coded as follows
pay[[{1}]] life:1?life:-1
pay one mana and gain 1 life, if you dont then you lose one life. notice no space between the abilities and the question mark.

added castcard()
a method to cast a targeted card, this contains the following subkeywords which can be used in combinations
(normal)
(restricted)
(copied)
(noevent)
castcard(restricted copied noevent) for example will cast a card that is a copy or the spell without sending a cast event only when the spell is castable.
"normal" subkeyword cast the actual spell, not a copy.

extended the use of exiledeath to everyzone, any card going from any zone to graveyard is placed in exile if it has exiledeath.

limited swipe left to open hand only when hand is closed view.

"moveto(" can now be named.
2013-06-18 01:41:34 +00:00
anthonycalosa@gmail.com 95bbe06c7e added swipe on Story Mode. So if playing a duel on story mode, you can cancel with swipe down. 2013-06-13 04:34:20 +00:00