now GameFormat supports "Restricted" cards (ex: power 9 in Vintage)

This commit is contained in:
Maxmtg
2014-01-14 07:13:48 +00:00
parent ca103655bd
commit 563c089b9d
3 changed files with 62 additions and 21 deletions

View File

@@ -65,7 +65,7 @@ public final class GameFormatQuest extends GameFormat {
* @param allowSetUnlocks
*/
public GameFormatQuest(final GameFormat toCopy, boolean allowSetUnlocks) {
super(toCopy.getName(), toCopy.getAllowedSetCodes(), toCopy.getBannedCardNames(), toCopy.getIndex());
super(toCopy.getName(), toCopy.getAllowedSetCodes(), toCopy.getBannedCardNames(), toCopy.getRestrictedCards(), toCopy.getIndex());
allowUnlocks = allowSetUnlocks;
}
@@ -96,7 +96,7 @@ public final class GameFormatQuest extends GameFormat {
* @param setCode String, set code.
*/
public void unlockSet(final String setCode) {
if (!canUnlockSets() || this.allowedSetCodes.isEmpty() || this.allowedSetCodes.contains(setCode)) {
if (!canUnlockSets() || this.allowedSetCodes_ro.isEmpty() || this.allowedSetCodes_ro.contains(setCode)) {
return;
}
this.allowedSetCodes.add(setCode);