mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
removed string constructor in SuperTypePredicate
This commit is contained in:
parent
8b44327312
commit
813d84274a
87 changed files with 265 additions and 224 deletions
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -40,6 +39,8 @@ import mage.game.permanent.PermanentCard;
|
|||
import mage.game.permanent.PermanentToken;
|
||||
import mage.util.functions.ApplyToPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -130,7 +131,7 @@ public class CopyEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
permanent.getSuperType().clear();
|
||||
for (SuperType type : copyFromObject.getSuperType()) {
|
||||
permanent.getSuperType().add(type);
|
||||
permanent.addSuperType(type);
|
||||
}
|
||||
|
||||
permanent.removeAllAbilities(source.getSourceId(), game);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class CopyTokenEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
permanent.getSuperType().clear();
|
||||
for (SuperType type: token.getSuperType()) {
|
||||
permanent.getSuperType().add(type);
|
||||
permanent.addSuperType(type);
|
||||
}
|
||||
permanent.getAbilities().clear();
|
||||
for (Ability ability: token.getAbilities()) {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public class TransformAbility extends SimpleStaticAbility {
|
|||
}
|
||||
permanent.getSuperType().clear();
|
||||
for (SuperType type : sourceCard.getSuperType()) {
|
||||
permanent.getSuperType().add(type);
|
||||
permanent.addSuperType(type);
|
||||
}
|
||||
permanent.setExpansionSetCode(sourceCard.getExpansionSetCode());
|
||||
permanent.getAbilities().clear();
|
||||
|
|
|
|||
|
|
@ -44,10 +44,6 @@ public class SupertypePredicate implements Predicate<MageObject> {
|
|||
this.supertype = supertype;
|
||||
}
|
||||
|
||||
public SupertypePredicate(String supertype){
|
||||
this.supertype = SuperType.valueOf(supertype.trim().toUpperCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(MageObject input, Game game) {
|
||||
return input.getSuperType().contains(supertype);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public class CopyTokenFunction implements Function<Token, Card> {
|
|||
}
|
||||
target.getSuperType().clear();
|
||||
for (SuperType type : sourceObj.getSuperType()) {
|
||||
target.getSuperType().add(type);
|
||||
target.addSuperType(type);
|
||||
}
|
||||
|
||||
target.getAbilities().clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue