remove deprecated String subtype methods

This commit is contained in:
Ingmar Goudt 2019-01-03 06:35:36 +01:00
parent a995643512
commit e1630b3c6f
4 changed files with 5 additions and 42 deletions

View file

@ -14,12 +14,7 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.common.FilterInstantOrSorceryCard;
import mage.game.ExileZone;
import mage.game.Game;
@ -36,7 +31,7 @@ public final class LivingLore extends CardImpl {
public LivingLore(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.subtype.add("Avatar");
this.subtype.add(SubType.AVATAR);
this.power = new MageInt(0);
this.toughness = new MageInt(0);

View file

@ -8,10 +8,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.constants.*;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
@ -26,8 +23,7 @@ public final class SnickeringSquirrel extends CardImpl {
public SnickeringSquirrel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
this.subtype.add("Squirrel");
this.subtype.add("Advisor");
this.subtype.add(SubType.SQUIRREL, SubType.ADVISOR);
this.power = new MageInt(1);
this.toughness = new MageInt(1);

View file

@ -301,7 +301,7 @@ public class CardInfo {
return sl;
}
for (String s : subtypes.split(SEPARATOR)) {
sl.add(s);
sl.add(SubType.fromString(s));
}
return sl;
}

View file

@ -20,20 +20,6 @@ public class SubTypeList extends ArrayList<SubType> {
Collections.addAll(this, subTypesList);
}
@Deprecated
public boolean addAll(List<String> subtypes) {
return addAll(subtypes.stream()
.map(SubType::byDescription)
.collect(Collectors.toList()));
}
@Deprecated
public boolean removeAll(List<String> subtypes) {
return removeAll(subtypes.stream()
.map(SubType::byDescription)
.collect(Collectors.toList()));
}
public boolean add(SubType... subTypes) {
return Collections.addAll(this, subTypes);
}
@ -42,18 +28,4 @@ public class SubTypeList extends ArrayList<SubType> {
return super.removeAll(Arrays.stream(subTypes)
.collect(Collectors.toList()));
}
@Deprecated
public boolean add(String s) {
SubType subType = SubType.byDescription(s);
if (subType != null) {
return add(subType);
}
return false;
}
@Deprecated
public boolean contains(String s) {
return contains(SubType.byDescription(s));
}
}