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...
omegablast2002@yahoo.com
2011-10-03 13:13:37 +00:00
74f17946c9
Commented out my wonderful deserialization template for the moment as it causes problems on Windows
Xawotihs
2011-10-02 16:12:22 +00:00
86131f7ea0
Cleande up the deserialization code
Xawotihs
2011-10-02 14:11:30 +00:00
7e1566fe77
Corrected Carrion Beetles and Reveillark.
guzhenjie1@gmail.com
2011-10-02 11:07:15 +00:00
2cabab17e2
- Fixed Skirsdag High Priest's id. This is the last fix for issue 741
wagic.the.homebrew
2011-10-02 09:11:50 +00:00
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)
wagic.the.homebrew
2011-10-02 09:05:39 +00:00
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)
wagic.the.homebrew
2011-10-02 01:03:45 +00:00
483c767492
Fix players vector (had a couple of 4 players game with the new code), added more cleanup
Xawotihs
2011-10-01 23:49:37 +00:00
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.
omegablast2002@yahoo.com
2011-10-01 21:29:22 +00:00
70ab70651a
fixed a few bad lines in mtg.txt...doc, elvish baserker had some pretty interesting abilities.
omegablast2002@yahoo.com
2011-10-01 21:28:05 +00:00
bf37948823
Fixed shop touch/mouse support
Xawotihs
2011-10-01 21:22:34 +00:00
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.
omegablast2002@yahoo.com
2011-10-01 18:42:43 +00:00
0d279cbf42
Forgot header in previous commit.
Xawotihs
2011-10-01 17:57:31 +00:00
0dc9c4e274
Fixed a leak introduced in r3976
Xawotihs
2011-10-01 17:56:40 +00:00
24df6bbb6f
Fixed a crash occurring at booster purchase
Xawotihs
2011-10-01 17:29:33 +00:00
daf362f736
Simplified the parsing, now the TestSuite reworks on Windows.
Xawotihs
2011-10-01 17:07:11 +00:00
d47ece1202
Fixed rules parsing on Windows
Xawotihs
2011-10-01 15:06:24 +00:00
b36653787e
Fixed compilation problems on Window
Xawotihs
2011-10-01 14:24:07 +00:00
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.
Xawotihs
2011-10-01 13:30:30 +00:00
d6db0c4f63
Simplified some restriction-parsing related functions
wagic.the.homebrew
2011-10-01 03:07:58 +00:00
d7e9ee7796
Changed the code of all cards with a trigger (@...) and ":aslongas()". Example: Bloodhall Ooze.
solo81@web.de
2011-09-29 21:16:24 +00:00
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.
omegablast2002@yahoo.com
2011-09-25 17:02:39 +00:00
e2829102aa
corrected the test, it was missing choice 0 to gain the life.
omegablast2002@yahoo.com
2011-09-25 16:57:35 +00:00
35030ca2ce
- Fixed buggy implementation of JGEGetTime on Qt - cleanup up link between wheelmouse and scroll events - added support for pause/resume
Xawotihs
2011-09-25 14:20:55 +00:00
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
omegablast2002@yahoo.com
2011-09-25 13:51:33 +00:00
3a2264febb
just changing some comments in svn...
omegablast2002@yahoo.com
2011-09-25 13:41:12 +00:00
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.
omegablast2002@yahoo.com
2011-09-25 13:38:15 +00:00
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.
omegablast2002@yahoo.com
2011-09-24 18:42:37 +00:00
404137b144
Added two tests for Morbid.
solo81@web.de
2011-09-24 13:34:08 +00:00
df3b2a7fa6
Corrected several card ids from ISD.
solo81@web.de
2011-09-24 12:27:44 +00:00
9938e1a57c
ISDs _card.dat was missing the "_". Now it works.
solo81@web.de
2011-09-23 20:11:57 +00:00
f04a0dd338
better handling of cards with restrictions for ai. if we can't play it, then don't make it nextcardtoplay.
omegablast2002@yahoo.com
2011-09-23 19:48:17 +00:00
7ba6c8e85d
Added Innistrad (ISD). 200 cards out of 264 were codable for now.
solo81@web.de
2011-09-23 19:12:26 +00:00
2bb651c5b4
fixed a crash in "white" rendering when you don't actually have the graphic for "white".
omegablast2002@yahoo.com
2011-09-23 19:05:10 +00:00
eb13d9a0f9
- Mark "equipment" abilities as good for AI (used for MotD)
wagic.the.homebrew
2011-09-23 10:54:01 +00:00
fe88b747c0
- fix for ACounterTracker (this fixes the ability - it wasn't working before - as well as the memory leak) - fix "release" build in VC++ - Let AI play creatures with ACounterTracker by making that ability a "positive" one (used for MotD)
wagic.the.homebrew
2011-09-23 10:24:20 +00:00
c633dc805f
- Adding "connected cards" color rendering - Made "booster" check mod-dependent in test suite
wagic.the.homebrew
2011-09-23 07:24:24 +00:00
0b66caebf2
Fix PSP compilation issue I introduced in my previous change
wagic.the.homebrew
2011-09-23 00:15:32 +00:00
83cdf5c151
1) Removed all "{0}" from the upcost bracket of all cards with Echo. Once it was needed to work around a bug, but now that the bug is fixed.
solo81@web.de
2011-09-22 23:34:11 +00:00
f649fee465
- Minor refactor of a few files: removed some unnecessary calls, etc...
wagic.the.homebrew
2011-09-22 10:07:05 +00:00
ee4c7e23bd
- fixed memory leaks introduced in previous revision - removed incorrect casts of MTGCardInstance into Spell objects. - AI Test system now allows you to put decks in ai/bakaA and ai/bakaB instead of ai/baka. This allows to let AIPlayerBaka and AIPlayerBakaB play with specific decks - Test suite speed improvement. Improved the card name cache. Test suite now runs in 850 seconds instead of 950 on my machine. - minor code cleanup
wagic.the.homebrew
2011-09-22 04:43:05 +00:00
997b154d46
volcanic eruption updated to use prex
omegablast2002@yahoo.com
2011-09-21 20:28:01 +00:00
4419ed4637
changed some logic for getting the pre x without shellcasting(?) spell...the variable word "prex" now returns the difference between the cards cost and the curentmanapool...giving us the value of pre x.some cards might need updating, doc can confirm it....
omegablast2002@yahoo.com
2011-09-21 20:27:29 +00:00
15f0143a8f
AIPlayer minor tweaks: - In order to clarify getEfficiency, started creating "getEfficiency" functions specific to each type of ability (see example with Damager). This won't reduce the file size but should make things bit clearer - Minor cleanup of getEfficiency - bug fixes in getEfficiency
wagic.the.homebrew
2011-09-21 15:10:06 +00:00
11095f3339
added new functionality to AAMover... you can now do moveto(targetzone) and((ability)) moveto(mybatlefield) and((transforms((zombie,black)) forever))
omegablast2002@yahoo.com
2011-09-21 14:06:32 +00:00
ab7eb1b93e
fixed an error in my last commit.
omegablast2002@yahoo.com
2011-09-21 12:37:44 +00:00
4dbe69dacf
fixed ai mana finding which broke in previous ai changes(maybe during the split or fixing the memleak)
omegablast2002@yahoo.com
2011-09-21 12:12:34 +00:00
807e818e92
add the manapool at the end of gotpayments, only once. otherwise we get false amounts.
omegablast2002@yahoo.com
2011-09-21 11:07:41 +00:00
e9ce574bca
- Fix a memory leak in AI "payTheManaCost" - Minor fixes in AI code - Attempt at preventing the AI from interrupting itself while it's selecting targets. I don't know why this happens, and my fix didn't work. I believe it shouldn't be possible to interrupt when there is an active targetChooser, please let me know if this is an incorrect assumption.
wagic.the.homebrew
2011-09-21 03:54:47 +00:00
206f3b4d3f
fixed a crash that happens in thisforeach when the matches is a negitive value.
omegablast2002@yahoo.com
2011-09-20 17:03:31 +00:00
44d9951246
Adding a system to compare two AI implementations (AIPlayerBaka and AIPlayerBakaB). This can be used to make sure a change to the AI is not making the AI weaker, for example.
wagic.the.homebrew
2011-09-20 11:32:24 +00:00
e3e0233b8a
changed a couple wParsed ints to assign the spell or NULL rather then relying in card to cast it as NULL.
omegablast2002@yahoo.com
2011-09-20 03:13:52 +00:00
fbfac78b09
- Split AIPlayer and AIPlayerBaka in 2 files. Moved all "AI" specific code into AIPlayerBaka, as much as possible. -- This is a copy/paste and shouldn't have any impact on the logic. I just moved some functions from AIPlayer to AIPlayerBaka - Added back the possibility to select a different Resource folder with file Res.txt - Fix a crash when a token id does not exist
wagic.the.homebrew
2011-09-20 03:06:06 +00:00
839d197835
fixed the memleak i introduced.
omegablast2002@yahoo.com
2011-09-19 20:31:36 +00:00
bb65d2dc12
- various compilations fixes for Symbian - small cleanups of the TestSuite and Player classes
Xawotihs
2011-09-19 19:49:45 +00:00
180462f73c
bug fix for an issue with multitarget, after a multitarget ability resolves the first time, i never set the tc->done back to false, so the first card clicked will think it is done every time after the first. setting tc->done to false after targetability resolve.
omegablast2002@yahoo.com
2011-09-19 11:32:11 +00:00
c0ab80a1bc
fixed a bug in targetchoosing where a player would get stuck in a targetchooser under certain situations as follows: opponent play an ability, player interupts and clicks a card with TargetChooser which has no valid targets; player then tries to cancel targetchooser, instead the stack is displayed again, player is then locked in a TargetChooser unable to click other cards.
omegablast2002@yahoo.com
2011-09-18 10:34:40 +00:00
4ab6dfd3da
extended countertrack and teach( to creatures for use with countertracking...isolated equipment rule that states it can't equip a card it can't target in testDestroy(we want the equipments to stay on a creature even after it's hands are full :)
omegablast2002@yahoo.com
2011-09-17 23:27:00 +00:00
c5203a9caf
Touch/mouse support for storyflow.
Xawotihs
2011-09-17 21:27:36 +00:00
c96d2fea55
Fix for issue 734 (creating profile on a fresh install is completely broken.)
wagic.the.homebrew
2011-09-17 08:42:13 +00:00
a6c458d0cb
ifthen ability sometimes wasn't grabbing the right target, i now pass it through MTGAbility creations target.
omegablast2002@yahoo.com
2011-09-15 11:50:04 +00:00
d04b4eca38
ai bug fixes, minor refactor of phaseaction/phaseactionmulti/upcost/upcostmulti, counter cost was safed wrong, sorry!, and fixed parsing of upcost..it was chopping the last bracket of the cost when used for things like echo, it required us to add {0} to those cost...that is no longer required.
omegablast2002@yahoo.com
2011-09-14 20:35:04 +00:00
9c9ce69259
safing up countercost related items, some possible crashes were found now that counter cost can be targeted. they should have really been there from the start.
omegablast2002@yahoo.com
2011-09-14 12:20:46 +00:00
6ea7e00803
added countertrack(counterstring) MTGAbility what this does currently is remove a counter of the type counterstring and when the ability is destroyed it puts the counter back for us. meant for weapons used as follows. auto=teach(creature) countertrack(0/0,1,hand)
omegablast2002@yahoo.com
2011-09-13 14:33:13 +00:00
713cb2aa45
<anyamount> does not have a targetMin.
omegablast2002@yahoo.com
2011-09-13 13:01:20 +00:00
c39c94c71a
commented out puresteels ability.
omegablast2002@yahoo.com
2011-09-13 05:06:10 +00:00
23f056f39c
added restriction keyword "morbid" it has very specific rules that can not be done with current support...it can be used anywhere existing restrictions can be used.... example card.. [card] name=Morkrut Banshee auto=if morbid then choice target(creature) -4/-4 ueot power=4 toughness=4 mana={3}{b}{b} [/card]
omegablast2002@yahoo.com
2011-09-12 20:15:51 +00:00
3c7a6abbeb
changed avatar of discord to a better version.
omegablast2002@yahoo.com
2011-09-12 18:40:33 +00:00
8ebc7dc6ed
made cumulativeupcost a little more user friendly, it also now follows the rules more correctly(MTG rules:partial payments can not be made on cumulative cost, it's all or nothing).. it will only need to be clicked once for payment now, instead of once per counter.
omegablast2002@yahoo.com
2011-09-12 17:00:13 +00:00
a42abc3017
multitargeted effects that require a minimum amount of targets should always be directed to the target_ok_full check. they can not be ended early by clicking the source.
omegablast2002@yahoo.com
2011-09-12 16:08:11 +00:00
0e52a20b8b
heres a shocker, first time ever...zeth removes a card from wagic supported.... puresteel paladin...removed from supported...added to unsupported. I have no idea why, but this card has cause a surge of completely different bug reports, crashes, strange interactions between cards, you name it...im surprised we didn't receive a report that it caused someone dog to die of heartworms....
omegablast2002@yahoo.com
2011-09-12 15:41:44 +00:00
70208685f1
Optimized the card code of Merfolk Looter and 15 similar cards.
solo81@web.de
2011-09-11 22:25:29 +00:00
e9f16d371b
Card text update. -- The phrase "is put into a graveyard from battlefield" has been officially changed to "dies" a relatively long time ago.
solo81@web.de
2011-09-11 21:44:32 +00:00
fc52b31326
Added 15 tests to secure the latest card code package for future changes.
solo81@web.de
2011-09-11 16:07:33 +00:00
2a0e6ac2d7
just init order fix. sorry about that!
omegablast2002@yahoo.com
2011-09-11 14:36:52 +00:00
a36b69cdb1
fixed a error in parent push back for equips, and using card which was casted, instead of target....minor tweak
omegablast2002@yahoo.com
2011-09-11 09:39:57 +00:00
89d6936eb0
Shimian Specter....aparently everyone on the forums uses this card.
omegablast2002@yahoo.com
2011-09-11 08:03:57 +00:00
f46ec14ce6
Fix for the mouse lag on windows. The issue with the mouse events lagging badly is that the while loop on SDL_WaitEventTimeout means that we'll wait consecutively 10 ms per mouse event, so we get flooded & never call onUpdate until the mouse stops moving. Replaced the gate with a simple for loop that guarantees that we call onUpdate at least once every 50 ms. We can try to tweak the value for better framerates, but this value seemed to be in the right ballpark.
wrenczes@gmail.com
2011-09-11 02:41:14 +00:00
1e0268eb07
added parents and children TargetChooser ok this target chooser is set apart from the others becuase it focuses on relationship between cards instead of other forms of checking, also i made sure to add a method for deeper Targeting. it is the same as any other target chooser when it comes to writeing the syntax and can be used in almost every way a normal one can. here is what i mean by deeper targeting this targetchooser allows you to denote a nested targetchooser.
omegablast2002@yahoo.com
2011-09-10 23:23:40 +00:00
6a8f7374cb
added weapon handling for connect, please be sure to code these weapons as follows target=*|mybattlefield auto={0}:equip auto=connect notice i declare the equip before the connect, this is becuase connect will use the equip ability of the card to handle it. target= can be used for connecting them now as the first time equip. please remember to use teach( or autoskill= to avoid giving abilities forever to a target...this makes equipments hybrid auras.
omegablast2002@yahoo.com
2011-09-10 21:28:20 +00:00
c0e8dcb1c9
this is the first basic rules of kais mod. added parentchildrule which currently only handles the removel of children if a parent dies, but will be extended to handle other actions based on event receiving that deal with child and parent association.
omegablast2002@yahoo.com
2011-09-10 19:37:44 +00:00
4e963c168f
added gesture recognizers for all keys. refactored some of the initialization code left place holder for Zoom in/out with pinch recognizer. The idea here is to make a virtual function like OnScroll for Zoom so we can take care of the zoom features natively. reorganized some of the method declarations.
techdragon.nguyen@gmail.com
2011-09-09 19:03:45 +00:00
5d09bb8a13
removed unused variables moved debug framerate message to be 10px higher. current position covers the credit count on the game shop screens. changed hard coded numeric values for menu ids to Labels. ( this was done only to GameStateAward )
techdragon.nguyen@gmail.com
2011-09-09 17:38:39 +00:00