Commit Graph

3365 Commits

Author SHA1 Message Date
omegablast2002@yahoo.com
654f4d34bb don't want to include players in this rule. 2011-04-29 14:59:12 +00:00
omegablast2002@yahoo.com
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"...
let me know if i missed some strange edge case somewhere. as far as i tested, it seems to work just fine.
2011-04-29 13:24:02 +00:00
solo81@web.de
95987c6d87 Removed NPH folder. Was unintended, sorry! 2011-04-28 22:19:59 +00:00
solo81@web.de
72e1d8079e Fixed Nullmage Shepherd + Sword of Feast and Famine. 2011-04-28 22:17:49 +00:00
omegablast2002@yahoo.com
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
2011-04-28 15:17:49 +00:00
omegablast2002@yahoo.com
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. 2011-04-28 12:35:14 +00:00
omegablast2002@yahoo.com
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. 2011-04-28 10:20:42 +00:00
wrenczes@gmail.com
531c7f20ae Turned back on the shadow drawing. This wasn't meant to be checked in, only temporarily disabled while debugging. 2011-04-28 08:49:53 +00:00
wrenczes@gmail.com
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.

Overall, drops ManaCost from 148 bytes to 120 (which in turn reduces CardPrimitive's memory footprint by the same amount, since it encapsulates a ManaCost).
2011-04-28 07:49:51 +00:00
wrenczes
8610531bf3 Fixes for exclusion/inclusion combinations of colors or abilities. 2011-04-28 05:01:06 +00:00
Xawotihs
7e4364b484 - Allows writing on sdcard
- Bound "back" key to menu, "volume down" to next phase and "volume down" to interrupt ... like on the N900 :)
2011-04-27 21:19:25 +00:00
guzhenjie1@gmail.com
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
2011-04-26 15:20:40 +00:00
omegablast2002@yahoo.com
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.
2011-04-26 14:49:15 +00:00
omegablast2002@yahoo.com
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.
2011-04-26 14:10:57 +00:00
omegablast2002@yahoo.com
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.
2011-04-26 12:47:27 +00:00
wrenczes@gmail.com
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. 2011-04-26 09:35:38 +00:00
wrenczes@gmail.com
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..?
(If you do have a reason to put it back, let's find a more compact way to write this.)
2011-04-26 06:15:58 +00:00
wrenczes@gmail.com
46168bfb6d Fixed tab alignment. No code changes. 2011-04-26 06:08:53 +00:00
omegablast2002@yahoo.com
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)
2011-04-25 14:48:03 +00:00
omegablast2002@yahoo.com
cf46404ed1 bracket around wrong section sorry! ai now again uses level up the way it was taught before. 2011-04-25 14:32:47 +00:00
Xawotihs
071facd43d "Full" fullscreen support on Android 2011-04-25 12:48:24 +00:00
omegablast2002@yahoo.com
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.
2nd, having levelup and counters return effs separately.
2011-04-25 12:00:33 +00:00
wrenczes@gmail.com
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.
Also thrown in are a couple of string to const string& conversions.
2011-04-25 11:20:07 +00:00
guzhenjie1@gmail.com
b8310838f4 Corrected Serene Offering, Stream of Acid and a typo in Blightsteel Colossus' text. 2011-04-25 10:31:42 +00:00
Xawotihs
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
2011-04-25 10:04:44 +00:00
wrenczes@gmail.com
7a1ed5278a Wrong #define. 2011-04-25 08:42:47 +00:00
wrenczes@gmail.com
3ea5e54d95 Tweaks to allow the file usage statistics utils to run on psp. 2011-04-25 06:26:19 +00:00
wrenczes@gmail.com
0b1808a989 Style formatting. 2011-04-25 05:28:53 +00:00
wrenczes@gmail.com
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). 2011-04-25 05:26:46 +00:00
wrenczes@gmail.com
ea2390e336 PSP specific compile error fix when Object Analytics is enabled. 2011-04-25 05:24:19 +00:00
guzhenjie1@gmail.com
e91a6a31a0 Added Preeminent Captain.
Thanks to Spiwy and Zeth!
2011-04-24 16:07:54 +00:00
guzhenjie1@gmail.com
4a308455d1 Corrected following cards:
Boggart Mob
Oculus
Snapback
Weed-Pruner Poplar
2011-04-24 14:11:02 +00:00
wrenczes@gmail.com
6fbc019ecc Added object analytics around ExtraCost & ManaCost; some formatting style cleanup. 2011-04-24 10:33:38 +00:00
Xawotihs
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.
2011-04-23 21:30:36 +00:00
Xawotihs
4ed7f10def - Added SDL, libjpeg and libpng
- Added Android project and Java files
2011-04-23 19:25:48 +00:00
wrenczes
d48176e390 Add ObjectAnalytics.h/.cpp to VS2008, QT projects. (Have we made an official call on deprecating 2008 yet?) 2011-04-23 17:05:22 +00:00
wagic.the.homebrew
e1e52f910d - removed unused variables in Menu. These where used for the old moving "W" which is probably not coming back any time soon... 2011-04-23 13:52:46 +00:00
wagic.the.homebrew
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 !!!
2011-04-23 13:24:19 +00:00
wrenczes@gmail.com
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.
I also profiled this after the fact, as we have an open bug on poor drawing performance on psp when in text mode - it turns out that in the AlternateRender() function, my numbers look like this: 10.2 seconds were spent in JBLFont::DrawString(); 0.5 seconds were spent in my new helper FormatText() call, so we know where the perf hit is now.

I compared before & after on the psp with this mod, and the difference really isn't perceptible.  (It's still juddery, but no worse than before.)  I'll look at the DrawString() call next to see if we can make it any faster, although at first glance it looks like a pain.
2011-04-23 09:54:19 +00:00
wrenczes@gmail.com
fc67e1515a Added some calls for tracking dynamic allocations to the InstanceCounter. 2011-04-23 08:43:34 +00:00
wrenczes@gmail.com
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:
class Foo
#ifdef TRACK_OBJECT_USAGE
      : public InstanceCounter<Foo>
#endif

Then, use this macro somewhere in the class body:
SUPPORT_OBJECT_ANALYTICS(Foo)

Lastly, add whatever information you want to trace out to the function ObjectAnalytics::DumpStatistics().

Here's a sample of the output of what I've instrumented so far:

-----------------------------------------------------------
Object Usage Stats

CardPrimitive current count: 7899
CardPrimitive current byte usage: 2053740
CardPrimitive max count: 7908
CardPrimitive max byte usage: 2056080

MTGCard current count: 13973
MTGCard current byte usage: 670704
MTGCard max count: 13982
MTGCard max byte usage: 671136

MTGCardInstance current count: 180
MTGCardInstance current byte usage: 172080
MTGCardInstance max count: 189
MTGCardInstance max byte usage: 180684

-----------------------------------------------------------
2011-04-23 05:16:53 +00:00
wagic.the.homebrew
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" ) 2011-04-23 04:55:00 +00:00
wagic.the.homebrew
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)
2011-04-23 04:01:42 +00:00
omegablast2002@yahoo.com
4c127f1a59 flipped the default avatar so evil twins stare at each other instead of away from :D 2011-04-22 19:11:47 +00:00
wrenczes@gmail.com
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.
Also fixed a subtle memory pooling issue in the RenderCountersBig() routine:  if you're in regular card display mode, the idea is that formatted text is only fetched if you flip into alternate render mode.  However, in this function, if counters are being drawn, it would fetch the formatted text in order to determine where to draw the counters, EVEN IF the counters count was zero.  So it had nothing to draw, but it meanwhile pooled the formatted strings into memory anyway.
2011-04-22 16:04:41 +00:00
wrenczes@gmail.com
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) 2011-04-22 13:33:42 +00:00
wrenczes@gmail.com
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).
2011-04-22 13:12:36 +00:00
omegablast2002@yahoo.com
1827e99780 fixed a typo in liquid metal coating. 2011-04-22 12:00:03 +00:00
omegablast2002@yahoo.com
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... 2011-04-22 11:18:47 +00:00
omegablast2002@yahoo.com
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"...

2nd, minor tweaks to player avatar, every tme i saw it i was like "i need to do something about that", the avatar getting completely sucked into the corner just looked bad imo, so i about doubled the "inactive" size, so it looks a little more uniform with the opponents avatar. also move the library and grave icons just a thin hair to the left so they don't grossly overlap the players avatar as much when active, and increased the dark box theyre contained in my just a few pixels.

3rd, something else thats really bothered me to no end was that the title text of simple menus which display the cards name which owns the box was using small face font, which on pc was *barely* ok...but on psp(smaller devices) looks like white smears and dots. i changed it to share the font and size used inside the menubox itself, the end result is a lot nicer look...and alot easier to read on psp. now if only we can convince wololo that "spades" is alot like a lava lamp, cool at first, but *extremely* dated. the menu box should have a much slicker look, maybe rounded corners instead and lose the street light poles?

minor fix for phaseaction, becuase of the nature of this ability finding a happy safe medium without losing function is tough. hopefully this corrects it for good.

dropped cast methods menutext returns to lower case, for uniformity.
2011-04-22 11:17:20 +00:00