Patch: Different sets for quest shop lands
 Posted: 30 Oct 2012, 10:31
Posted: 30 Oct 2012, 10:31As I said in another topic before, as a little warmup I'm working on implementing more varied lands in quest mode shop - currently it's always M10 for basic lands and ICE for snow-covered lands. The patch I'm submitting here (I don't have SVN commit access as of yet and I kind of want at least someone else to try this out before committing anyway) will make sure that each time the quest shop is regenerated, for each type of land and snow-covered land, a set will be chosen randomly (moreover, if a quest format is restricted, then the choice of random sets will be constrained to that quest format). Also, for the initial random card pool in quest mode, except for prebuilt deck lands, other basic lands are also randomly chosen from various sets (currently it's limited to one set per land type, so all Swamps will be from one set, all Forests from another, etc.). Hopefully this can get upstream eventually, at least after some more testing (I did test the basics, both in format-enforced and non-format-enforced mode, but who knows what I could have missed, it's my return to the project after ~2 years of being away from it :\ ).
The big question is: should I leave it on a per-type basis (so, all Islands from one set, etc.), or should I switch it to a per-card basis (so, each Island can be from its own set)? Each approach has its pros and cons, I think.
P.S. It's a NetBeans-generated diff file, I think it should be no different from any other diff file, but... I don't know, to be honest.
P.P.S. Currently the randomized land generator is an overload for the normal land generator. This way it can get removed (or the old version can be used when necessary) just in case.
P.P.P.S. Did my best to try and follow the original coding style, but not sure if I did everything right. Also, the code is likely to be a bit refactorable (due to my limited knowledge of the code base, I had to make some assumptions about what can be done and what can't be done, and certain things are likely to be possible in a more efficient and less cluttery way). I'm open to suggestions if anything needs to be done.
Anyways, here it is. Feedback is welcome.
EDIT: Ok it's uploaded now.
- Agetian
			The big question is: should I leave it on a per-type basis (so, all Islands from one set, etc.), or should I switch it to a per-card basis (so, each Island can be from its own set)? Each approach has its pros and cons, I think.
P.S. It's a NetBeans-generated diff file, I think it should be no different from any other diff file, but... I don't know, to be honest.
P.P.S. Currently the randomized land generator is an overload for the normal land generator. This way it can get removed (or the old version can be used when necessary) just in case.
P.P.P.S. Did my best to try and follow the original coding style, but not sure if I did everything right. Also, the code is likely to be a bit refactorable (due to my limited knowledge of the code base, I had to make some assumptions about what can be done and what can't be done, and certain things are likely to be possible in a more efficient and less cluttery way). I'm open to suggestions if anything needs to be done.
Anyways, here it is. Feedback is welcome.

EDIT: Ok it's uploaded now.
- Agetian