forked from External/mage
* removed and renamed SubTypeList * updated subtype test * refactored Changeling to be an ability that actually does something * moved isAllCreatureTypes into SubTypes class * renamed copyTo method to copyFrom * added removeAllCreatureTypes where usable * replaced some subtype methods * replaced some more subtype methods * replaced subtype mass add/remove methods * updated more subtype methods * fixed some errors * made common shared creature type predicate * refactored another card involving subtypes * Added usage of object attribute in subTypes's write operations; * Refactor: use same param styles in subtype methods * Refactor: simplified usage of copy appliers; * Refactor: fixed code usage in CopyApplier Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
38 lines
1.3 KiB
Java
38 lines
1.3 KiB
Java
|
|
package mage.cards.c;
|
|
|
|
import java.util.UUID;
|
|
import mage.abilities.common.EntersBattlefieldAbility;
|
|
import mage.abilities.effects.Effect;
|
|
import mage.abilities.effects.common.CopyPermanentEffect;
|
|
import mage.cards.CardImpl;
|
|
import mage.cards.CardSetInfo;
|
|
import mage.constants.CardType;
|
|
import mage.filter.common.FilterArtifactPermanent;
|
|
import mage.util.functions.CardTypeCopyApplier;
|
|
|
|
/**
|
|
*
|
|
* @author KholdFuzion
|
|
*
|
|
*/
|
|
public final class CopyArtifact extends CardImpl {
|
|
|
|
public CopyArtifact(UUID ownerId, CardSetInfo setInfo) {
|
|
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}");
|
|
|
|
// You may have Copy Artifact enter the battlefield as a copy of any artifact on the battlefield, except it's an enchantment in addition to its other types.
|
|
Effect effect = new CopyPermanentEffect(new FilterArtifactPermanent(), new CardTypeCopyApplier(CardType.ENCHANTMENT));
|
|
effect.setText("as a copy of any artifact on the battlefield, except it's an enchantment in addition to its other types");
|
|
this.addAbility(new EntersBattlefieldAbility(effect, true));
|
|
}
|
|
|
|
public CopyArtifact(final CopyArtifact card) {
|
|
super(card);
|
|
}
|
|
|
|
@Override
|
|
public CopyArtifact copy() {
|
|
return new CopyArtifact(this);
|
|
}
|
|
}
|