Changed logic of adding basic lands in deck generation and the add land function in limited deck editor to use lands from the sets of the cards in the decks. Added missing attributes to set definitions.

This commit is contained in:
LevelX2 2013-02-03 16:54:03 +01:00
parent a0d0fc8b7e
commit 5f3a8eb360
48 changed files with 190 additions and 52 deletions

View file

@ -48,6 +48,7 @@ public class AlaraReborn extends ExpansionSet {
super("Alara Reborn", "ARB", "seticon_mtgarb", "mage.sets.alarareborn", new GregorianCalendar(2009, 3, 25).getTime(), SetType.EXPANSION);
this.blockName = "Shards of Alara";
this.parentSet = ShardsOfAlara.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -15,6 +15,8 @@ public class Alliances extends ExpansionSet {
private Alliances() {
super("Alliances", "ALL", "", "mage.sets.alliances", new GregorianCalendar(1996, 6, 10).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Ice Age";
this.parentSet = IceAge.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 8;

View file

@ -45,6 +45,7 @@ public class Antiquities extends ExpansionSet {
private Antiquities() {
super("Antiquities", "ATQ", "", "mage.sets.antiquities", new GregorianCalendar(1994, 2, 1).getTime(), Constants.SetType.EXPANSION);
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -1,9 +1,9 @@
package mage.sets;
import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet;
import java.util.GregorianCalendar;
public class Apocalypse extends ExpansionSet {
private static final Apocalypse fINSTANCE = new Apocalypse();
@ -15,6 +15,8 @@ public class Apocalypse extends ExpansionSet {
private Apocalypse() {
super("Apocalypse", "APC", "", "mage.sets.apocalypse", new GregorianCalendar(2001, 5, 1).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Invasion";
this.parentSet = Invasion.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -45,6 +45,7 @@ public class ArabianNights extends ExpansionSet {
private ArabianNights() {
super("Arabian Nights", "ARN", "", "mage.sets.arabiannights", new GregorianCalendar(1993, 11, 1).getTime(), Constants.SetType.EXPANSION);
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -46,6 +46,7 @@ public class AvacynRestored extends ExpansionSet {
private AvacynRestored() {
super("Avacyn Restored", "AVR", "seticon_mtgavr", "mage.sets.avacynrestored", new GregorianCalendar(2012, 4, 4).getTime(), SetType.EXPANSION);
this.blockName = "Innistrad";
this.parentSet = Innistrad.getInstance();
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -46,6 +46,8 @@ public class BetrayersOfKamigawa extends ExpansionSet {
private BetrayersOfKamigawa() {
super("Betrayers of Kamigawa", "BOK", "", "mage.sets.betrayersofkamigawa", new GregorianCalendar(2005, 1, 4).getTime(), SetType.EXPANSION);
this.blockName = "Kamigawa";
this.parentSet = ChampionsOfKamigawa.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -52,5 +52,7 @@ public class Coldsnap extends ExpansionSet {
this.numBoosterUncommon = 3;
this.numBoosterRare = 1;
this.ratioBoosterMythic = 8;
this.parentSet = IceAge.getInstance();
this.hasBasicLands = false;
}
}

View file

@ -48,6 +48,7 @@ public class Conflux extends ExpansionSet {
super("Conflux", "CON", "seticon_conflux", "mage.sets.conflux", new GregorianCalendar(2009, 0, 31).getTime(), SetType.EXPANSION);
this.blockName = "Shards of Alara";
this.parentSet = ShardsOfAlara.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -52,5 +52,7 @@ public class DarkAscension extends ExpansionSet {
this.numBoosterUncommon = 3;
this.numBoosterRare = 1;
this.ratioBoosterMythic = 8;
this.parentSet = Innistrad.getInstance();
this.hasBasicLands = false;
}
}

View file

@ -17,6 +17,7 @@ public class Darksteel extends ExpansionSet {
super("Darksteel", "DST", "", "mage.sets.darksteel", new GregorianCalendar(2004, 1, 6).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Mirrodin";
this.parentSet = Mirrodin.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -49,6 +49,8 @@ public class Dissension extends ExpansionSet {
private Dissension() {
super("Dissension", "DIS", "", "mage.sets.dissension", new GregorianCalendar(2006, 4, 5).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Ravnika";
this.parentSet = RavnicaCityOfGuilds.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -15,6 +15,8 @@ public class Eventide extends ExpansionSet {
private Eventide() {
super("Eventide", "EVE", "", "mage.sets.eventide", new GregorianCalendar(2008, 6, 25).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Shadowmoor";
this.parentSet = Shadowmoor.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -46,6 +46,8 @@ public class Exodus extends ExpansionSet {
private Exodus() {
super("Exodus", "EXO", "", "mage.sets.exodus", new GregorianCalendar(1998, 5, 6).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Tempest";
this.parentSet = Tempest.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -45,6 +45,7 @@ public class FallenEmpires extends ExpansionSet {
private FallenEmpires() {
super("Fallen Empires", "FEM", "", "mage.sets.fallenempires", new GregorianCalendar(1994, 10, 1).getTime(), Constants.SetType.EXPANSION);
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -46,6 +46,8 @@ public class FifthDawn extends ExpansionSet {
private FifthDawn() {
super("Fifth Dawn", "5DN", "", "mage.sets.fifthdawn", new GregorianCalendar(2004, 5, 4).getTime(), SetType.EXPANSION);
this.blockName = "Mirrodin";
this.parentSet = Mirrodin.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -46,6 +46,8 @@ public class FutureSight extends ExpansionSet {
private FutureSight() {
super("Future Sight", "FUT", "", "mage.sets.futuresight", new GregorianCalendar(2007, 4, 4).getTime(), SetType.EXPANSION);
this.blockName = "Time Spiral";
this.parentSet = TimeSpiral.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -52,5 +52,7 @@ public class Gatecrash extends ExpansionSet {
this.numBoosterUncommon = 3;
this.numBoosterRare = 1;
this.ratioBoosterMythic = 8;
this.parentSet = ReturnToRavnica.getInstance();
this.hasBasicLands = false;
}
}

View file

@ -49,6 +49,8 @@ public class Guildpact extends ExpansionSet {
private Guildpact() {
super("Guildpact", "GPT", "", "mage.sets.guildpact", new GregorianCalendar(2006, 1, 3).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Ravnika";
this.parentSet = RavnicaCityOfGuilds.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -45,6 +45,7 @@ public class Homelands extends ExpansionSet {
private Homelands() {
super("Homelands", "HML", "", "mage.sets.homelands", new GregorianCalendar(1995, 9, 1).getTime(), Constants.SetType.EXPANSION);
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -46,6 +46,8 @@ public class Judgment extends ExpansionSet {
private Judgment() {
super("Judgment", "JUD", "exp_symbol_mtgjud", "mage.sets.judgment", new GregorianCalendar(2002, 5, 27).getTime(), SetType.EXPANSION);
this.blockName = "Odyssey";
this.parentSet = Odyssey.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -45,6 +45,7 @@ public class Legends extends ExpansionSet {
private Legends() {
super("Legends", "LEG", "", "mage.sets.legends", new GregorianCalendar(1994, 5, 1).getTime(), Constants.SetType.EXPANSION);
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -46,6 +46,8 @@ public class Legions extends ExpansionSet {
private Legions() {
super("Legions", "LGN", "", "mage.sets.legions", new GregorianCalendar(2003, 0, 25).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Onslaught";
this.parentSet = Onslaught.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -28,10 +28,11 @@
package mage.sets;
import java.util.GregorianCalendar;
import mage.Constants.SetType;
import mage.cards.ExpansionSet;
import java.util.GregorianCalendar;
/**
*
@ -47,7 +48,9 @@ public class MirrodinBesieged extends ExpansionSet {
private MirrodinBesieged() {
super("Mirrodin Besieged", "MBS", "seticon_mtgmbs", "mage.sets.mirrodinbesieged", new GregorianCalendar(2011, 1, 4).getTime(), SetType.EXPANSION);
this.blockName = "Mirrodin Besieged";
this.blockName = "Scars of Mirrodin";
this.parentSet = ScarsOfMirrodin.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -46,6 +46,8 @@ public class Morningtide extends ExpansionSet {
private Morningtide() {
super("Morningtide", "MOR", "", "mage.sets.morningtide", new GregorianCalendar(2008, 1, 1).getTime(), SetType.EXPANSION);
this.blockName = "Lorwyn";
this.parentSet = Morningtide.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -46,6 +46,8 @@ public class Nemesis extends ExpansionSet {
private Nemesis() {
super("Nemesis", "NMS", "", "mage.sets.nemesis", new GregorianCalendar(2000, 1, 5).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Masques";
this.parentSet = MercadianMasques.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -1,9 +1,9 @@
package mage.sets;
import java.util.GregorianCalendar;
import mage.Constants;
import mage.cards.ExpansionSet;
import java.util.GregorianCalendar;
public class NewPhyrexia extends ExpansionSet {
private static final NewPhyrexia fINSTANCE = new NewPhyrexia();
@ -14,7 +14,8 @@ public class NewPhyrexia extends ExpansionSet {
private NewPhyrexia() {
super("New Phyrexia", "NPH", "", "mage.sets.newphyrexia", new GregorianCalendar(2011, 4, 4).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Mirrodin Besieged";
this.blockName = "Scars of Mirrodin";
this.parentSet = ScarsOfMirrodin.getInstance();
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -46,6 +46,8 @@ public class PlanarChaos extends ExpansionSet {
private PlanarChaos() {
super("Planar Chaos", "PLC", "", "mage.sets.planarchaos", new GregorianCalendar(2007, 1, 2).getTime(), SetType.EXPANSION);
this.blockName = "Time Spiral";
this.parentSet = TimeSpiral.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 10;

View file

@ -46,6 +46,8 @@ public class Planeshift extends ExpansionSet {
private Planeshift() {
super("Planeshift", "PLS", "", "mage.sets.planeshift", new GregorianCalendar(2001, 1, 5).getTime(), SetType.EXPANSION);
this.blockName = "Invasion";
this.parentSet = Invasion.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -46,6 +46,8 @@ public class Prophecy extends ExpansionSet {
private Prophecy() {
super("Prophecy", "PCY", "", "mage.sets.prophecy", new GregorianCalendar(2000, 4, 27).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Masques";
this.parentSet = MercadianMasques.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -46,6 +46,8 @@ public class SaviorsOfKamigawa extends ExpansionSet {
private SaviorsOfKamigawa() {
super("Saviors of Kamigawa", "SOK", "", "mage.sets.saviorsofkamigawa", new GregorianCalendar(2005, 5, 3).getTime(), SetType.EXPANSION);
this.blockName = "Kamigawa";
this.parentSet = ChampionsOfKamigawa.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -47,7 +47,7 @@ public class ScarsOfMirrodin extends ExpansionSet {
private ScarsOfMirrodin() {
super("Scars of Mirrodin", "SOM", "seticon_mtgsom", "mage.sets.scarsofmirrodin", new GregorianCalendar(2010, 10, 1).getTime(), SetType.EXPANSION);
this.blockName = "Mirrodin Besieged";
this.blockName = "Scars of Mirrodin";
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -46,6 +46,8 @@ public class Scourge extends ExpansionSet {
private Scourge() {
super("Scourge", "SCG", "", "mage.sets.scourge", new GregorianCalendar(2003, 5, 17).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Onslaught";
this.parentSet = Onslaught.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -46,6 +46,8 @@ public class Stronghold extends ExpansionSet {
private Stronghold() {
super("Stronghold", "STH", "", "mage.sets.stronghold", new GregorianCalendar(1998, 1, 21).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Tempest";
this.parentSet = Tempest.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -45,6 +45,7 @@ public class TheDark extends ExpansionSet {
private TheDark() {
super("The Dark", "DRK", "", "mage.sets.thedark", new GregorianCalendar(1994, 7, 1).getTime(), Constants.SetType.EXPANSION);
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -46,5 +46,7 @@ public class TimeSpiralTimeshifted extends ExpansionSet {
private TimeSpiralTimeshifted() {
super("Time Spiral \"Timeshifted\"", "TSB", "", "mage.sets.timeshifted", new GregorianCalendar(2006, 9, 9).getTime(), SetType.EXPANSION);
this.blockName = "Time Spiral";
this.parentSet = TimeSpiral.getInstance();
this.hasBasicLands = false;
}
}

View file

@ -46,6 +46,8 @@ public class Torment extends ExpansionSet {
private Torment() {
super("Torment", "TOR", "", "mage.sets.torment", new GregorianCalendar(2002, 0, 26).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Odyssey";
this.parentSet = Odyssey.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -46,6 +46,8 @@ public class UrzasDestiny extends ExpansionSet {
private UrzasDestiny() {
super("Urza's Destiny", "UDS", "exp_symbol_mtguds", "mage.sets.urzasdestiny", new GregorianCalendar(1999, 6, 23).getTime(), SetType.EXPANSION);
this.blockName = "Urza";
this.parentSet = UrzasSaga.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -48,6 +48,8 @@ public class UrzasLegacy extends ExpansionSet {
private UrzasLegacy() {
super("Urza's Legacy", "ULG", "exp_symbol_mtgulg", "mage.sets.urzaslegacy", new GregorianCalendar(1999, 2, 6).getTime(), SetType.EXPANSION);
this.blockName = "Urza";
this.parentSet = UrzasSaga.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -46,6 +46,8 @@ public class Visions extends ExpansionSet {
private Visions() {
super("Visions", "VIS", "", "mage.sets.visions", new GregorianCalendar(1997, 0, 11).getTime(), Constants.SetType.EXPANSION);
this.blockName = "Mirage";
this.parentSet = Mirage.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -48,6 +48,8 @@ public class Weatherlight extends ExpansionSet {
private Weatherlight() {
super("Weatherlight", "WTH", "exp_symbol_mtgwth", "mage.sets.weatherlight", new GregorianCalendar(1997, 5, 31).getTime(), SetType.EXPANSION);
this.blockName = "Mirage";
this.parentSet = Mirage.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 1;
this.numBoosterCommon = 10;

View file

@ -48,6 +48,7 @@ public class Worldwake extends ExpansionSet {
super("Worldwake", "WWK", "seticon_WWK", "mage.sets.worldwake", new GregorianCalendar(2010, 0, 30).getTime(), SetType.EXPANSION);
this.blockName = "Zendikar";
this.parentSet = Zendikar.getInstance();
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;
this.numBoosterCommon = 11;

View file

@ -33,18 +33,16 @@ import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.mana.*;
import mage.cards.CardImpl;
import mage.choices.ChoiceImpl;
import mage.filter.common.FilterArtifactPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledLandPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -70,7 +68,7 @@ public class Realmwright extends CardImpl<Realmwright> {
this.addAbility(new AsEntersBattlefieldAbility(new RealmwrightEffect()));
// Lands you control are the chosen type in addition to their other types.
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new RealmwrightEffect2()));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RealmwrightEffect2()));
}
public Realmwright(final Realmwright card) {
@ -143,8 +141,7 @@ class RealmwrightEffect2 extends ContinuousEffectImpl<RealmwrightEffect2> {
String choice = (String) game.getState().getValue(source.getSourceId().toString() + "_Realmwright");
if (you != null && choice != null) {
for (Permanent land : lands) {
if (land != null) {
System.out.println("The land is " + land.getName());
if (land != null && !land.getSubtype().contains(choice)) {
switch (layer) {
case TypeChangingEffects_4:
if (sublayer == Constants.SubLayer.NA) {