-- The problem was that the previous fix for keybindings actually fixed dead code for the PSP version... the real call to Defaultbindings was still happening in JGE's code...so the fix made the call twice.
-- Note: shouldn't we use ResetBindings instead of JGECreateDefaultBindings? The former resets the bindings before assigning the default ones...
http://code.google.com/p/wagic/issues/detail?id=706
these types were converted into part of the "types" enum and are no longer considered a subtype in the engine.
as they appear before Subtypes::LAST_TYPE they are to return "" as their subtype search result.
i figured there was no harm in including them in the types list filtering as they were moved from subtypes becuase they were some of the most frequently used subtypes.
otherrestriction=type(creature|mybattlefield)~lessthan~type(creature|opponentbattlefield)-3
which means, if the statement above is true you can play the card....if you subtract 3 from the amount the opponent has in creatures, and you are still less then the opponent...then that means he has atleast 4 more creatures than you do.
so right after the type(blah) you can add +number or -number...and it will modify the amount to compare.
so i converted it from string comparisons and counting the battlefield..into targetchoosers with declarable operator.
simplified the code from the mess it was before into something alot easier to card code with.
example before:
mytypemin:less type(land),opponenttypemin:* type(land)
becomes
type(land|mybattlefield)~lessthan~type(land|opponentbattlefield)
the new syntax is:
type(targetchooser)~operator~number
type(targetchooser)~operator~type(targetchooser)
the operator are:
morethan
lessthan
equalto
1) prevent the textureQuad map from containing references to cards when we're returning a temp (card backdrop) image in the threaded version.
2) we had two copies of the pspicon image in the cache (ie the regular & managed). Changed the reference in the DeckMenu code to use the managed instance.
3) Fixed a problem with a default constructor param that would set RESOURCE_LOCKED on certain images. I noticed that the 'NEW' image was locking itself in the cache because no resource modes was being passed in, so the default constructor param was setting it to locked. This seems like a bad idea - if you're not explicitly locking a resource in the call, that shouldn't be the default behaviour.
Also added an assert safeguard to catch the possibility of 'overlocking' an image resource, as this probably means the image fetching routine is being abused somehow.
The problem was, the game would initialize first, reading the
keybindings from the configuration, and THEN set up the default key
bindings.
I think this affects only PSP, X, SDL and Qt. A quick scan of the
windows version code looks to me that the order is correct and the
problem should not exist, but I may be mistaken. The iPhone version
looks to me like it has no keybindings at all, though the call is
there ; I put the call in the right order so that the problem does
not happen in the future if we implement some key bindings for it.
If someone can check for windows...
this is basically one activation for the existence of the trigger, meaning if it is used on a card, and the trigger exist for inplay, it will only activate one time while that card is inplay, it will activate again if the card leaves play and is put back in play again by another effect,
this was originally added for cards such as the hidden enchantment cycle.
-- Tutorial Messages are an ability like any other, except it can only be displayed once. Subsequent calls are ignored, the ability is removed from the game as soon as it is added
-- This allows to add event triggered messages ingame. Messages are either text, or images (I don't have an image sample, but rules/classic.txt has a few examples that might help)
-- only tested on Windows, although I made sure the PSP version compiles. Hopefully I also made the necessary for it to work in the touch version (touching the screen should be enough to close the tuto message)
-- Room for improvement: possibility to choose a title in text mode, possibility to have some messages depending on others (e.g.: don't show message X until message Y has been shown), improve some of the abilities and triggers to give more flexibility, add events outside of game, to allow tuto messages in deck creator, etc...
Faceless Devourer - It should not be able to target itself
Sunscape Familiar - abilities=flying -> defender
diamond valley - Sacrifice only creatures you control
Vow of Lightning - typo in the name
Sporeback Troll - fixed mana cost
Crovax the Cursed - fixed card text
TBD: right now every up finger generates this event. We probably want to throttle it to only be an event if the velocity exceeds some arbitrary threshold; similarly, if we generate a flick event, we probably don't want to simultaneously generate a finger up action (ie JGE_BTN_OK).