b7cc42ed67
Moved "reset damage on creatures at cleanup phase" outside of the engine and made it an ability. This is mostly because I need this for the mod I'm working on, but I hope it can be used by others
wagic.the.homebrew
2011-05-02 14:02:12 +00:00
53f45a8b8e
cleanup: Remove "computeXX" functions and XX variables, these were always returning X/2 in all cases. Test suite passes
wagic.the.homebrew
2011-05-02 11:28:04 +00:00
13dd07973e
Removing "oldSchoolDeathtouch", as it seems Cockatrice and Thicket Basislisk are now softcoded. Zeth, Dr.Solomat, please review :)
wagic.the.homebrew
2011-05-02 08:44:02 +00:00
2c4efb9cd5
Fixed Urabrask the Hidden in mtg.txt.
solo81@web.de
2011-05-01 16:36:51 +00:00
e100bd826c
Refactor of the parser. The goal is to reduce maintenance cost, by refactoring some of the most frequent "copy/paste" we have in there. This removes roughly 500 lines, going from 4850 to 4350 lines. I'm getting closer to my goal of getting this file back to 4000 lines :) Crossing fingers I didn't break anything major. The test suite passes, though I expect some edge case bugs to appear. Apologies in advance, I think this change is worth it.
wagic.the.homebrew
2011-05-01 15:53:13 +00:00
14c56f0510
Corrected following cards: Gitaxian Probe Glasses of Urza Ingenious Thief Lay Bare Peek Persecute Sorcerous Sight Talas Explorer Telepathic Spies Walker of Secret Ways Wanderguard Sentry
guzhenjie1@gmail.com
2011-05-01 15:39:42 +00:00
e31dd9dbf5
Corrected some typo in NPH cards.dat
guzhenjie1@gmail.com
2011-05-01 12:22:17 +00:00
ed420d4f97
1. Added ",sourceinplay" to:
solo81@web.de
2011-05-01 11:08:56 +00:00
d58e3fe30b
Updated Astrolabe and Barbed Sextant by adding the "once" tag to their [phaseaction] code.
solo81@web.de
2011-05-01 10:23:25 +00:00
d28847d929
Updated all Clockwork creatures by adding the "once"-tag to their phaseaction code.
solo81@web.de
2011-05-01 10:11:38 +00:00
a9ca76e77e
Added New Phyrexia (NPH).
solo81@web.de
2011-05-01 09:44:30 +00:00
8b6400e12d
Cleanup of some trigger parsing
wagic.the.homebrew
2011-04-30 15:52:48 +00:00
0933294ca4
Fix an issue where pressing "triangle" on the PSP in the play menu would crash the game
wagic.the.homebrew
2011-04-30 13:43:12 +00:00
847a11f6ec
fix an issue where the PSP would not find the rule files
wagic.the.homebrew
2011-04-30 11:28:25 +00:00
cde63ed4be
Fix for issue 640 (Keldon Marauders crash on PSP)
wagic.the.homebrew
2011-04-30 06:44:17 +00:00
3a4eef68ae
Fixed an uninitialized var.
wrenczes@gmail.com
2011-04-30 00:42:17 +00:00
cd07248df5
UPDATE YOUR rules FOLDER!!! - This is some Work in progress to make Wagic less "game" dependent. This change especially is an attempt at moving away from some dangerous patents owned by some company. It introduces "modrules.xml", a global configuration file describing dynamic settings for any given Wagic mod. It is very basic for now, but allows to customize a bit. In particular, it allows to remove the concept of shop and deck editor from the game, dynamically generate the main menu, and represent card activation with a mask rather than a rotation. I have a sample in progress which I hope to submit in the days to come, a proof of concept (nothing fancy yet) for another type of game using these ideas, as well as a few other things I introduced recently. In the future, I am hoping to extend modrules.xml so that it entirely describes the rules of a given card game. the other files in rules.txt will describe "extensions" to the core rules, just like they do right now, so this new file does not make them obsolete.
wagic.the.homebrew
2011-04-29 17:30:57 +00:00
654f4d34bb
don't want to include players in this rule.
omegablast2002@yahoo.com
2011-04-29 14:59:12 +00:00
0fba6994a6
fixed a reported bug with @vampired, it was tricky, but ultimately i had to move the building of vampevent outside of TRVampired...the reason being that all instances of TRVamp were able to send and react to other instances of it sending out "vampevents", so move it into rules so only one object handles that, also changed the method it was handled, it now maps the cards with a 2nd vector of the vampires...basically "this card was dealt damage by X, Y, Z this turn"...
omegablast2002@yahoo.com
2011-04-29 13:24:02 +00:00
72e1d8079e
Fixed Nullmage Shepherd + Sword of Feast and Famine.
solo81@web.de
2011-04-28 22:17:49 +00:00
669f8744b6
changed a previous fix a bit, also, altho this is not the "layers system" and we don't really support it, i thought i could atleast support the reapply of p/t bonuses from counters for atransformer... and while messing around i found out that i forgot an important check in the new kicker with menu, to check if the card was still in the hand :P
omegablast2002@yahoo.com
2011-04-28 15:17:49 +00:00
59a8afb745
reinstating a piece of counters code i commented out which was originally explained to me as a "bug" when infact i found a ruling on it which was added during timespiral block...putting a +1/+1 counter on a creature which has a -1/-1 counter on it does indeed cancel out BOTH counters. good thing i didn't delete it.
omegablast2002@yahoo.com
2011-04-28 12:35:14 +00:00
7840e3cde8
fixed a issue where token workaround revealed that 2 "may" abilities back to back screws up "isInterrupting" player variable..this was only when the may ability contained manaproducers, which truely no longer use the stack in any format.
omegablast2002@yahoo.com
2011-04-28 10:20:42 +00:00
531c7f20ae
Turned back on the shadow drawing. This wasn't meant to be checked in, only temporarily disabled while debugging.
wrenczes@gmail.com
2011-04-28 08:49:53 +00:00
ba0f5c4191
Reduced ManaCostHybrid's internals to uint8_t instead of ints. Removed the hardsized array of ManaCostHybrid pointers, and replaced it with a vector of objects, got rid of all the unnecessary new/delete code everywhere. Also deleted "extraCostsIsCopy" from ManaCost - unused variable.
wrenczes@gmail.com
2011-04-28 07:49:51 +00:00
8610531bf3
Fixes for exclusion/inclusion combinations of colors or abilities.
wrenczes
2011-04-28 05:01:06 +00:00
7e4364b484
- Allows writing on sdcard - Bound "back" key to menu, "volume down" to next phase and "volume down" to interrupt ... like on the N900 :)
Xawotihs
2011-04-27 21:19:25 +00:00
86042c206a
Added "once" limit for following cards with phaseaction[endofturn]: Blood Frenzy Brood of Cockroaches Celestial Sword Goatnapper Crazed Armodon Dark Maze Dragon Whelp Farrelite Priest Giant Caterpillar Initiates of the Ebon Hand Mogg Cannon Puffer Extract Rainbow Vale Rukh Egg Season of the Witch Surprise Deployment Transluminant
guzhenjie1@gmail.com
2011-04-26 15:20:40 +00:00
6e6ccddbde
fixed a crash witnessed when ai was trying to get the efficiency return of aamover the ai had a target, but the ability did not have a target, when "destinationZone()" was run, the game would crash due to a null pointer. increase the "random" chance to use unknown, the old method almost always returned 0.
omegablast2002@yahoo.com
2011-04-26 14:49:15 +00:00
ef942d46b5
2 changes, comparing counters to p instead of isAi(), and hope to close off an edge case where ai would get stuck cycling through setting the target of a may ability. caught it stuck 2 times while watching demo. i watched demo for close to an hour without seeing any adverse effect, and without getting stuck, tho this is so hard to debug, since there is no call stack loaded for this case when it happens.
omegablast2002@yahoo.com
2011-04-26 14:10:57 +00:00
2e25d24f20
2 changes first, subjecting manaproducers built unnested to the same restrictions/limits/sideffects as thier activated ability counterparts... 2nd allowing either "," or " " to be a seperator for the variables in phaseaction so they can be used in transformer "newability" if i recieve another bug about phaseaction, im scrapping it completely and recoding it from the ground up.
omegablast2002@yahoo.com
2011-04-26 12:47:27 +00:00
a73fd4e99f
Converted CardPrimitive's basicAbilities from a map<int, int> to a bitset. With 92 abilities, that means our base container for abilities is now 16 bytes in size (down from 28), and is a fixed size, whereas the map would grow by 8 bytes per added ability.
wrenczes@gmail.com
2011-04-26 09:35:38 +00:00
425e49e608
Cleaned up some type conversion warnings.
wrenczes@gmail.com
2011-04-26 06:16:49 +00:00
f5bd6b2794
Removed ABasicAbilityModifierUntilEOT. Zeth, please review - I started to try to fix the array notation of this class, but then realized that the compiler was optimizing out this class entirely out of the binary - it's not currently used at all. Is this deprecated, and just got left behind..?
wrenczes@gmail.com
2011-04-26 06:15:58 +00:00
f2a52edba7
- wait for SDL events intead of pooling them, this allow very smooth CPU usage - added texture deactivate around each renderer call implemented in opengl es 1.1. It fixes a couple of artifacts but a couple are remaining - added a compilation switch to allow simulation of opengl es 1.1 on desktop
Xawotihs
2011-04-25 21:26:12 +00:00
9de076db75
added",once" tag for phaseaction, to denote that the effect is only to happen once before forcedestroy is declared. auto=@movedTo(graveyard) from(this|battlefield):phaseaction[endofturn,once] token(Bird,Creature Bird,4/4,red,flying)
omegablast2002@yahoo.com
2011-04-25 14:48:03 +00:00
cf46404ed1
bracket around wrong section sorry! ai now again uses level up the way it was taught before.
omegablast2002@yahoo.com
2011-04-25 14:32:47 +00:00
071facd43d
"Full" fullscreen support on Android
Xawotihs
2011-04-25 12:48:24 +00:00
934e0af004
moved the eventsending for drawing cards into the resolve of adrawer. tho i think this will make this event unusable for "card draw replacement effects"...it really doesn't matter as i don't see card draw replacement being added to wagic any time soon, if ever.
omegablast2002@yahoo.com
2011-04-25 12:00:33 +00:00
1cbf3db582
Reducing the memory footprint: reworked the concept of 'colors' in CardPrimitives. What used to be an array of ints (ie 28 bytes) is now contained in a single byte, we use bit masking to support setting multiple colors on this variable. This also eliminates a lot of silly loops for setting colors in the code - now it's a straight byte copy.
wrenczes@gmail.com
2011-04-25 11:20:07 +00:00
b8310838f4
Corrected Serene Offering, Stream of Acid and a typo in Blightsteel Colossus' text.
guzhenjie1@gmail.com
2011-04-25 10:31:42 +00:00
137ccdf446
- Activated debug and orientation management in Android manifest - Coded double-click and orientation change for Android - Clean up debug code badly introduced in opengl code in r3529 - updated Qt project to link against boost on linux
Xawotihs
2011-04-25 10:04:44 +00:00
56ab3ac5cf
Minor code cleanup: removed a path to fetch thumbnails in the non-threaded code - at this point, it's trying to draw in text mode, so this shouldn't be here (it was always stepped over because of the options flag, so it was never executing anyway).
wrenczes@gmail.com
2011-04-25 05:26:46 +00:00
ea2390e336
PSP specific compile error fix when Object Analytics is enabled.
wrenczes@gmail.com
2011-04-25 05:24:19 +00:00
e91a6a31a0
Added Preeminent Captain. Thanks to Spiwy and Zeth!
guzhenjie1@gmail.com
2011-04-24 16:07:54 +00:00
e82362d50a
Missed a part of my psp side change for the ClearScreen change. Now the BeginScene call is consistent with the pc side, and calls clear.
wrenczes@gmail.com
2011-04-24 11:55:04 +00:00
6fbc019ecc
Added object analytics around ExtraCost & ManaCost; some formatting style cleanup.
wrenczes@gmail.com
2011-04-24 10:33:38 +00:00
be2a4ee4ec
Mostly formatting cleanup, but a couple of openGL related fixes : don't call state change functions if their params haven't changed. In particular, we call ClearScreen() in several places in the code, but BeginScene() already does this. According to several openGL performance guides I skimmed through, if you call clear more than once per frame draw, performance will suffer.
wrenczes@gmail.com
2011-04-24 10:00:37 +00:00
9fdb3fbe3a
Style formatting. No code changes.
wrenczes@gmail.com
2011-04-24 08:52:12 +00:00
832904dce1
- Defined keys translation for SDL config - Added boost thread files, that fixes all the threading/compiling/linking problems on Android ... - Added opengles 1.1 code, there are still some bugs I need to tackle ... and I should realy split this file now !!! - Added Android debug traces - Hardcoded resources to "/sdcard/Wagic/Res" for the moment on Android - Added a wagic SDL project for desktop, and the related SDL frontend used for Android. This frontend is currently mostly desktop based, it needs some work to be fully useable with touch and gesture on Android.
Xawotihs
2011-04-23 21:30:36 +00:00
4ed7f10def
- Added SDL, libjpeg and libpng - Added Android project and Java files
Xawotihs
2011-04-23 19:25:48 +00:00
d48176e390
Add ObjectAnalytics.h/.cpp to VS2008, QT projects. (Have we made an official call on deprecating 2008 yet?)
wrenczes
2011-04-23 17:05:22 +00:00
e1e52f910d
- removed unused variables in Menu. These where used for the old moving "W" which is probably not coming back any time soon...
wagic.the.homebrew
2011-04-23 13:52:46 +00:00
66ad0f4694
- Files in Res/rules are now loaded dynamically. This allows people to add their own mods fairly easily - also has a basic support for unlocks (does not yet allow people to create their own unlock rules, though...) - Some things are still hardcoded and should progressively move to these rules files (such as Game Type, how random decks are created, etc...) - Test suite doesn't foolishly ask you to choose a game mode (momir, etc...) anymore - UPDATE YOUR Res/rules/ folder !!!
wagic.the.homebrew
2011-04-23 13:24:19 +00:00
ba07ca2334
Improvement on my last change for reducing the formatted text caching: chopped it out altogether. I ran some profiling to see how much time on the psp it took to process the formatting on the description text (ie word wrapping it into several lines to fit on a card), and it ends up taking an average of 0.14 ms per card. For context, 60 fps is 16 ms. So clearly the formatting time is not the bottleneck here, and we gain no real performance caching the text, but lose memory due to pooling. So I cut it out entirely of the base class and we format on the fly during renders.
wrenczes@gmail.com
2011-04-23 09:54:19 +00:00
fc67e1515a
Added some calls for tracking dynamic allocations to the InstanceCounter.
wrenczes@gmail.com
2011-04-23 08:43:34 +00:00
bd56723bc0
Checkpoint on a utility helper class. Basically, if you have a class that you want to count the numbers of instances, you do this:
wrenczes@gmail.com
2011-04-23 05:16:53 +00:00
8e4de36588
- unsupported.txt cleanup + conflicts cleanup (had to partly comment out some cards for which we don't have a clean solution yet, "multipart cards" are basically 2 cards that share the same Multiverse ID, such as "Day // night" )
wagic.the.homebrew
2011-04-23 04:55:00 +00:00
fafa785778
- Cleaned up "borderline" primitives, split into borderline and crappy, which is closer to the way I intended the system to work initially. - moved mtg_todo.dat into "unsupported.txt"...there are many parsing issues that I need to solve, but give it a try (set the grade level to "unsupported" in your advanced options, and restart the game) , it bumps the number of unique cards to almost 12000 :) (of course, these new cards don't work, that's the point of the "unsupported" grade)
wagic.the.homebrew
2011-04-23 04:01:42 +00:00
4c127f1a59
flipped the default avatar so evil twins stare at each other instead of away from :D
omegablast2002@yahoo.com
2011-04-22 19:11:47 +00:00
224b140f9f
First pass at reducing the overall memory footprint: moved GetFormattedText() out of CardPrimitives and into MTGCard. The idea being, only keep the formatted text around for cards that are actually in use.
wrenczes@gmail.com
2011-04-22 16:04:41 +00:00
58e340f30c
Removed the precompiled header include from JSocket, as the precompiled header is actually in the mtg project and this is cross pollination. Moreover, mtg specific header changes that we might put in the precompiled header will cause this file in JGE to recompile each time. If we think it'll improve things, we could put in a separate precompiled header in JGE, but I'm not sure it's enough of a gain to bother.
wrenczes@gmail.com
2011-04-22 14:59:10 +00:00
cca2fb92ec
Optimized a heavily thrashing reallocation (temporary string construct) inside the resource manager. (Also contains a few more PSPENV->PSP consolidations, this should have been part of my last submit)
wrenczes@gmail.com
2011-04-22 13:33:42 +00:00
ae227a7cb8
Minor project cleanup: - Consolidated duplicate PSP / PSPENV defines; - removed some ancillary file crap from the 2010 projects; - pulled 1xx references from the makefiles; - consolidated multiple #defines for OutputDebugString into one header (previously was split between config.h & DebugRoutines.h).
wrenczes@gmail.com
2011-04-22 13:12:36 +00:00
1827e99780
fixed a typo in liquid metal coating.
omegablast2002@yahoo.com
2011-04-22 12:00:03 +00:00
feee31a360
updated kicker test by adding "choice 1" pay kicker, it will have no effect on "always pay" option, but if a player has "offer choice" they will still pass...
omegablast2002@yahoo.com
2011-04-22 11:18:47 +00:00
ad56dfa8d0
3 things here first as requested, kicker will now act like the other cost, offering a menu choice, heres the catch tho, it was also thought up that we should maintain the "pay automatically" method of it as it feels more natural to some(even tho as per MTG rules its supposed to be a choice). so here is what i did that i hope satisfies everyone, i added a new menu option under advanced tab..."kicker payment" with 2 setting, by defualt "always pay" but also an option to "always offer choice"...
omegablast2002@yahoo.com
2011-04-22 11:17:20 +00:00
b4e3608412
Fixed a subtle bug with the Random player deck choice - I kept getting my first deck every time. It turns out that the 'random' implementation was actually multiplying the random seed by a value of 1001, which isn't prime - I have seven player decks on my one dev system, which divides neatly into that multiplier.
wrenczes@gmail.com
2011-04-22 00:44:13 +00:00
223b067234
Removed what looks like a leftover temporary trace.
wrenczes@gmail.com
2011-04-22 00:09:10 +00:00
5e6c0c612e
Fixed the breakage in the Deck Editor Menu, where the app would hang, looping on trying to word wrap a string. Erwan, pls review. Char is signed here, I'm not sure what the compiler warning was that you saw - NDK related? Does it treat all chars as unsigned?
wrenczes@gmail.com
2011-04-21 23:51:05 +00:00
aaa169f86c
Consolidated some loose strings into constant declarations in order to reduce allocation thrashing on temporary string constructs. I'm sure there are more, but "back_thumb", "back", and "backdrop.jpg" were the ones that showed up most in memory profiling.
wrenczes@gmail.com
2011-04-21 22:48:22 +00:00
8f51c1d1fe
Removed a test relict from Fieldmist Borderpost.
solo81@web.de
2011-04-21 15:19:01 +00:00
8ff6839c8d
Some preparation work for new platform support. - Added a "PSP" compile-time define to clean up some compile time checks (replaced !WIN32 && !LINUX && !IOS with PSP) -- Wil, I am aware that this is redundant with the PSPENV variable you introduced recently, I think we can clean that up easily -- This looks like lots of changes, but most of the time I just moved some blocks here and there -- tested on VC 2010, PSP, and a bit of NDK -- I might have broken maemo, iOS, or Linux compilation, can you guys check? - Fixed some warnings reported by NDK - NDK still does not compile because recent boost additions (mutex, etc...) are apparently not supported
wagic.the.homebrew
2011-04-21 13:16:11 +00:00
0a6a5697f5
Updated all other cards with "other=cost". Same improvement as in last revision.
solo81@web.de
2011-04-21 12:24:10 +00:00
2139291115
Updated all cards with Evoke by adding "name(Evoke)" to their "other=..." line. This small addition makes the choice menu of those cards more readable.
solo81@web.de
2011-04-21 11:47:07 +00:00
4db75ac2fe
Updated all cards with Kicker.
solo81@web.de
2011-04-21 10:20:22 +00:00
8bf983e2e5
Flagged numerous peices of code that have local variables that are masking either member variables or variables scoped outside the current scope. I've marked all the ones I found with the following TODO comment:
techdragon.nguyen@gmail.com
2011-04-21 10:04:32 +00:00
8ed84aa97d
Issue 634: Fixed. Had to clear the DeckManager whenever the player deck selection screen is displayed. TODO: Need to implement a caching mechanism that caches the deck information based on deck selection and not a global one. Currently DeckManager is effectively treating the DeckMetaData as global data.
techdragon.nguyen@gmail.com
2011-04-21 08:32:32 +00:00
29eea1d39c
fixed a memory leak. Not sure how it got introduced but the destructor for DeckManager now does the heavy lifting for memory cleanup and not the static method EndInstance().
techdragon.nguyen@gmail.com
2011-04-21 06:35:44 +00:00
d212f08618
Added a missing forward class declaration to fix the psp build. I'm surprised that VS2010 didn't complain...
wrenczes@gmail.com
2011-04-21 05:51:21 +00:00
920282017b
Added ManaCost & ExtraCost to the startup traces of certain class sizes.
wrenczes@gmail.com
2011-04-21 03:22:09 +00:00
7bf6374fc7
Another minor change to eliminate an unneeded #include.
wrenczes@gmail.com
2011-04-21 03:21:15 +00:00
39870c91f6
Removed GameApp.h from GameOptions.h - this should help prevent the precompiled header from rebuilding constantly when any header is touched, as GameApp.h ends up pulling virtually every other header by some level of indirection. We really need though to sit down at some point & refactor the inclusion tree. It's a big yarn ball at the moment.
wrenczes@gmail.com
2011-04-21 02:35:51 +00:00