
During my last forays into the Wagic code, I implemented something that might be useful for others too - a "Cheat mode" to aid development. It's mainly aimed at AI deck developers, but others may find it useful too. If you try it out, please review my code. I think this one is clean enough to be submitted to SVN (if the feature itself is approved), but I'm only coding in C++ for a week, so I'm in a bad position to judge the quality of my code.
Current feature list:
- "Cheat mode" option. This is a simple on/off setting in the "General Options" tab. However, you'll only see this option if you enter the options menu with a profile called "Cheetah". (I hope the quality of my code is better than the quality of my puns.) So, to access cheat mode, you have to create and activate a profile called "Cheetah", save it, then leave and re-enter the options menu. Then you'll see (and can activate) the "Enable cheat mode" option. It's a bit hidden, but hey, that's what cheat modes are supposed to be.

The cheat mode setting gets saved in the profile together will other settings. The most convenient way to use the cheat mode is to keep the "Cheetah" profile and use it for testing, development, etc. You can still *play* with your regular profile, without any worries that using the cheat mode might screw something up.
Since the cheat mode is an option, it can be tested from anywhere in the code with "if(options[Options::CHEATMODE].number)".
- "Complete Collection" function. When cheat mode is switched on, then a new menu item will appear in the deck editor: Complete Collection. If you click on it, the game will add cards to your collection, so that you have at least 4 of every card in the game. This is basically the functionality of a "Collection Tool" integrated into Wagic. Personally I find it a bit more convenient to use, because I don't have to start an external program. Also, the "Complete Collection" function will never *reduce* the amount of those cards from which you already have more than 4. So if you have 30 Relentless Rats in your collection, now you don't have to worry any more that using a collection tool will reset the number to 4.
Since this function has to do some serious number crunching, I implemented it in the MTGDeck class (instead of DeckDataWrapper) and avoided calls to other methods (like "add"). It takes about 2 seconds on my PC to add 4 instances each of 5400 cards to the collection. Let me know if it's still too slow on the PSP. I could squeeze out some more speed if I had to (if all else fails, setting all card numbers to 4 would be faster).
- "Deck integrity" function. When cheat mode is switched on, and you load a deck for which you don't have all cards in your collection, then the missing cards will not be removed from the deck. Instead they will be added to your collection.
This means you can load and edit a deck that used 20 Swamp cards with id=129756, and you won't be missing a third of a deck even though you previously only had 4 of these swamps.
The added cards will stay in your collection if you save the deck where they came from. So, if you once loaded a deck with 16 Relentless Rats, and clicked "save", you will afterwards have 16 Relentless Rats in your collection, ready to be used in your own deck building.
- Money cheat. When you buy an item in the shop, and cheat mode is switched on, you now have an option to steal 1,000 credits from the shopkeeper. You can click the respective button as often as you want. This function might come in handy to test the contents of booster packs, or if you need money to test something else once the economy aspect of the game has further developed.
Source code is included (sorry about the high number of files - the code changes are actually pretty small, sometimes there's just a single line added to a file, but many files were affected).
Let me know what you think.

Edit: Download removed, it's obsolete now. The feature has been integrated into the SVN version of Wagic since r1224.
[EDIT ABRA - renamed topic]