Commit Graph

3767 Commits

Author SHA1 Message Date
omegablast2002@yahoo.com
e3d0ab8ba0 corrected a mistake i made with name and other manacost, I meant to erase the name from value not s this caused strange issues when a name was given to a "other" cost which contained an actual parseable mana cost inside.
do note tho, our text menues will not display "{" and "}" charectors, so its best to keep them out of "name(" anyways as they serve no purpose.
2011-10-10 14:20:50 +00:00
omegablast2002@yahoo.com
516089869d phased cards shouldn't be removed from the game by treason or the effects of unearth if they we're phased out by an effect during the turn in which they were to be destroyed. 2011-10-10 14:09:04 +00:00
omegablast2002@yahoo.com
060164acce copy function grants the source of the abilities the castMethod of "notcast" which is default, however for cards which are played, such as vesuva on "copy" it would be granted a "not_cast" as its play method, allowing players to play another card of the type that a restriction would normally prevent you from playing...this effected all cards which "copy" such as shapeshifters.
note: I do know it's as dirty as "mtgidbackup" but unfortunately I don't think there would be a simpler way to maintain it's cast method.
2011-10-10 13:41:38 +00:00
wagic.the.homebrew
c17d07d476 Minor simplification of MTGRules.cpp 2011-10-10 13:27:30 +00:00
wagic.the.homebrew
e17b20c9d8 Adding a test for issue 718 (vesuva land limit) 2011-10-10 12:47:58 +00:00
wagic.the.homebrew
f0964d9af8 Fix issue 563 (double strike VS regenerate)
-- also made "blocked" variable a private.
2011-10-10 12:29:52 +00:00
guzhenjie1@gmail.com
9b2654997e Added ID for all double faced card.
Corrected ID and typo of following cards:
Deranged Assistant
Gatstaf Shepherd
Ludevic's Test Subject
Mirror-Mad Phantasm
2011-10-09 10:38:03 +00:00
wagic.the.homebrew
9dbe0e2a53 Adding Italian cards translation by kabir94 (don't know why I didn't notice it before) 2011-10-09 07:43:15 +00:00
techdragon.nguyen@gmail.com
a33d862d4b updated XCode project to be on latest SDK
fixed a few minor warnings.
2011-10-09 07:06:32 +00:00
techdragon.nguyen@gmail.com
6f10ef8425 fixed last check in. Test suite passes. Added comments on possible null pointer exceptions.
Updated XCode project file to include AIPlayerBaka classes.
Added test suite to iOS build
2011-10-09 05:51:45 +00:00
wagic.the.homebrew
2bfe76e124 - Android: landscape only ( issue 668 )
- Android:  changed application package name ( issue 730 ) - also changed the publisherID to avoid confusion with the alpha, which is 3tied3 to org.libsdl.app
2011-10-09 04:53:21 +00:00
techdragon.nguyen@gmail.com
fbe2e44814 fixed memory leak in double tap gesture
fixed some compiler warnings
removed dead and useless code
2011-10-08 00:56:07 +00:00
Xawotihs
9f09bbeec3 Removed compilation warnings. 2011-10-07 15:25:15 +00:00
Xawotihs
c0c8688ede Fixed yet-another-retarded warning. 2011-10-05 21:26:40 +00:00
Xawotihs
c2ad12443f Removed compilation warning 2011-10-04 20:06:59 +00:00
punkeduard@gmail.com
71bab2ba7b fixed cards:
Bloodcrazed Neonate
Greatsword
Kite Shield
Swiftfoot Boots
Pride Guardian
2011-10-04 07:20:03 +00:00
omegablast2002@yahoo.com
bf42cc1922 updated rules. 2011-10-03 13:14:03 +00:00
omegablast2002@yahoo.com
fe91960980 moved all basic MTG related rules out of the engine and into rules.txt.
this allows users to create a mod without having to struggle with avoiding certain phase based or cost actions.
attackrule and attacker phase can be seperated now by not including auto=attackrule in your rules.txt....this means you can still have an attackers phase, but clicking the cards won't put the cards into attacker mode or add "attacker" to thier menu abilities. ect...

this also allows us to eventaully change/add to these base rules without having to create entirely new rules for them by modifying the base classes with new variables and so on.

IMPORTANT: UPDATE YOUR RULES FOLDER, OR NOTHING WILL WORK FOR YOU.
2011-10-03 13:13:37 +00:00
Xawotihs
74f17946c9 Commented out my wonderful deserialization template for the moment as it
causes problems on Windows
2011-10-02 16:12:22 +00:00
Xawotihs
86131f7ea0 Cleande up the deserialization code 2011-10-02 14:11:30 +00:00
guzhenjie1@gmail.com
7e1566fe77 Corrected Carrion Beetles and Reveillark. 2011-10-02 11:07:15 +00:00
wagic.the.homebrew
2cabab17e2 - Fixed Skirsdag High Priest's id. This is the last fix for issue 741 2011-10-02 09:11:50 +00:00
wagic.the.homebrew
3decbe7f1d - Fix Android compilation issues
- Added a "cachesize" option (not available from the menu, but can be manually edited in players/options.txt, for example cachesize=200 means 200MB of cache). The hardcoded cache on windows/linux is 20MB, which is not enough for Hi Res cards (60 is better, 200 is great)
2011-10-02 09:05:39 +00:00
wagic.the.homebrew
9e572ee416 - Moved "game mode" types of awards outside of a code, and inside of a configuration file (rules/awards.dat). No code is required anymore to create such an award (momir, hermit basic, etc...)
- fixed compilation errors in GameObserver (windows)
2011-10-02 01:03:45 +00:00
Xawotihs
483c767492 Fix players vector (had a couple of 4 players game with the new code), added more cleanup 2011-10-01 23:49:37 +00:00
omegablast2002@yahoo.com
76a8f406ec converted the player arrays into vectors, so we can test is a player is actually there at the time we are trying to access its variables.
this fixes 2 crashes I found, the first, 2 color random mode would crash on load.
2nd, ai vs ai testing would randomly crash, this should fix that also.
I noticed 2 color random mode is now trying to search for it's rules and sometimes flashes for a brief moment "error cant read file" or something like that....I could not find the source of that, it doesn't cause it to crash however it causes it to take a sec longer to load, this is before this commit btw, so the issue is still there.
it was trying to load the rules, flashed the error then crashes...i fixed the crash but not the rules error.

please review, i might have left in useless stuff...
I also did notice something, the way we are creating players is kind of all over the place. imo this is bad, it made this conversation extra hard becuase you create one player over here, another type over there, the human over in this direction, back track and create another somewhere else...this needs to be taken into account for a refactor, all player creation should happen in the same function, and at the same times...

the reason these 2 crashes existed was becuase players were being created before "gameobserver" in some modes, and in other modes, no player would exist at the time game was creating to set the player. but we then later call the same function when we actually load the player using the method specific to a mode.

this just leads to headaches, I mean no offense, just a general observation i made when converting this players array. unfortunately that kind of refactor is just a little beyond my coding ability.
2011-10-01 21:29:22 +00:00
omegablast2002@yahoo.com
70ab70651a fixed a few bad lines in mtg.txt...doc, elvish baserker had some pretty interesting abilities. 2011-10-01 21:28:05 +00:00
Xawotihs
bf37948823 Fixed shop touch/mouse support 2011-10-01 21:22:34 +00:00
omegablast2002@yahoo.com
fe20ae0c24 fixed a crash when AiAction calls player->getObserver in multiclick.
important note: AiAction you always want to call "owner" becuase "player" here means single target spell has a target and the target is "player". I didn't come up with the variable name, sorry it is very confusing in this spot of the code.
2011-10-01 18:42:43 +00:00
Xawotihs
0d279cbf42 Forgot header in previous commit. 2011-10-01 17:57:31 +00:00
Xawotihs
0dc9c4e274 Fixed a leak introduced in r3976 2011-10-01 17:56:40 +00:00
Xawotihs
24df6bbb6f Fixed a crash occurring at booster purchase 2011-10-01 17:29:33 +00:00
Xawotihs
daf362f736 Simplified the parsing, now the TestSuite reworks on Windows. 2011-10-01 17:07:11 +00:00
Xawotihs
d47ece1202 Fixed rules parsing on Windows 2011-10-01 15:06:24 +00:00
Xawotihs
b36653787e Fixed compilation problems on Window 2011-10-01 14:24:07 +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
d6db0c4f63 Simplified some restriction-parsing related functions 2011-10-01 03:07:58 +00:00
solo81@web.de
d7e9ee7796 Changed the code of all cards with a trigger (@...) and ":aslongas()". Example: Bloodhall Ooze.
This is its new code:
[card]
name=Bloodhall Ooze
auto=@each my upkeep restriction{type(*[black]|myBattlefield)~morethan~0}:may counter(1/1)
auto=@each my upkeep restriction{type(*[green]|myBattlefield)~morethan~0}:may counter(1/1)
text=At the beginning of your upkeep, if you control a black permanent, you may put a +1/+1 counter on Bloodhall Ooze. -- At the beginning of your upkeep, if you control a green permanent, you may put a +1/+1 counter on Bloodhall Ooze.
mana={R}
type=Creature
subtype=Ooze
power=1
toughness=1
[/card]

This new version, using one of Zeth's latest additions ("restriction{...}"), shows to be a nice improvement concerning the ingame experience: NOW, the trigger will only show up in the interruption window if the restriction is matched. In the old version, it always showed up in the restriction window whenever the trigger potentially could trigger, even if the restriction was not matched.

"restriction{}" also gives us more options in coding new cards. This is one of them:

[card]
name=Library of Alexandria
auto={T}:add{1}
auto={T}:draw:1 restriction{type(*|myhand)~equalto~7}
text={T}: Add {1} to your mana pool. -- {T}: Draw a card. Activate this ability only if you have exactly seven cards in hand.
type=Land
[/card]

A famous and powerful classic! And you can for sure only tap it to draw a card if you have 7 cards in it.


Exchanged the Multikicker test for another one. The older one was doing trouble.
2011-09-29 21:16:24 +00:00
guzhenjie1@gmail.com
4ea2446a15 Corrected Sejiri Steppe. 2011-09-29 16:26:28 +00:00
omegablast2002@yahoo.com
3e58366430 corrected "mountains" ==>" mountain" 2011-09-27 13:38:21 +00:00
omegablast2002@yahoo.com
fea034281d added support for suspend x...
suspend(0)={g}{x}

cards with x in thier suspend cards will suspend for x turns...x can not be 0 as per mtg rules.
2011-09-27 01:47:08 +00:00
solo81@web.de
29e9cad492 Fixed Tetravite token. 2011-09-25 21:15:45 +00:00
solo81@web.de
28dbb4de96 Fixed One-Eyed Scarecrow. 2011-09-25 21:01:31 +00:00
omegablast2002@yahoo.com
3417799eda removed the phase restrictions enum from activatedability, it inherited this from MTGAbility, the only difference is actiavted ability had opponentturnonly listed as 69, so in some cases it would be 60 and sometimes 69, it will now always be 60 following the enum in mtgability. 2011-09-25 17:02:39 +00:00
omegablast2002@yahoo.com
e2829102aa corrected the test, it was missing choice 0 to gain the life. 2011-09-25 16:57:35 +00:00
omegablast2002@yahoo.com
e117cf82c9 just moving parserestrictions under the parsecastrestrictions...so they are together rather then an entire page apart :) no code change, it just bugged me :P 2011-09-25 13:51:33 +00:00
omegablast2002@yahoo.com
3a2264febb just changing some comments in svn... 2011-09-25 13:41:12 +00:00
omegablast2002@yahoo.com
e8ea5a28d7 added a space to the parsing of who in @next and @each....this space always existed in the coding we use however i am now making it required, the reason is that now we have tool which can include tc's and "s" was finding opponent and my in the tcs effecting the triggeratphase it created. this should correct that issue. 2011-09-25 13:38:15 +00:00
omegablast2002@yahoo.com
96cbe18be0 taught ai basic extracost targeting...by basic i mean its not going to choose a token creature over its 20/20 flyer for the target of an extracost...it will target whatever it can for the cost. but atleast it can handle extra cost which are targeted now, rather then ignore them completely.
also removed a peice of aiplayer::render, that was moved into aiplayerbaka.....
2011-09-24 18:42:37 +00:00
solo81@web.de
404137b144 Added two tests for Morbid. 2011-09-24 13:34:08 +00:00