@Override public Effect copy() { return new BecomesChosenCreatureTypeTargetEffect(this); }
effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source))); game.addEffect(effect, source); return true;
public UnnaturalSelection(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); // {1}: Choose a creature type other than Wall. Target creature becomes that type until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesChosenCreatureTypeTargetEffect(true), new GenericManaCost(1)); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public Imagecrafter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}: Choose a creature type other than Wall. Target creature becomes that type until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesChosenCreatureTypeTargetEffect(true), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public MistformMutant(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); this.subtype.add(SubType.ILLUSION); this.subtype.add(SubType.MUTANT); this.power = new MageInt(3); this.toughness = new MageInt(4); // {1}{U}: Choose a creature type other than Wall. Target creature becomes that type until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesChosenCreatureTypeTargetEffect(true), new ManaCostsImpl<>("{1}{U}")); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
@Override public boolean apply(Game game, Ability source) { Permanent sourcePerm = game.getPermanent(source.getSourceId()); if (sourcePerm == null) { return false; } Effect effect = new BecomesChosenCreatureTypeTargetEffect(nonWall, duration); effect.setTargetPointer(new FixedTarget(sourcePerm, game)); return effect.apply(game, source); }
@Override public boolean apply(Game game, Ability source) { Permanent sourcePerm = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (sourcePerm == null) { return false; } Permanent enchantedPerm = game.getPermanent(sourcePerm.getAttachedTo()); if (enchantedPerm == null) { return false; } Effect effect = new BecomesChosenCreatureTypeTargetEffect(); effect.setTargetPointer(new FixedTarget(enchantedPerm, game)); return effect.apply(game, source); }
public TrickeryCharm(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); // Choose one - Target creature gains flying until end of turn this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); // or target creature becomes the creature type of your choice until end of turn Mode mode = new Mode(); mode.addEffect(new BecomesChosenCreatureTypeTargetEffect()); mode.addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addMode(mode); // or look at the top four cards of your library, then put them back in any order. mode = new Mode(); mode.addEffect(new LookLibraryControllerEffect(4)); this.getSpellAbility().addMode(mode); }