[ONE] small change to Unctus's Retrofitter

This commit is contained in:
theelk801 2023-04-23 20:58:07 -04:00
parent 37c57424e8
commit cba8cdf092

View file

@ -5,7 +5,6 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
import mage.abilities.keyword.ToxicAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
@ -13,11 +12,12 @@ import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.custom.CreatureToken;
import mage.target.common.TargetControlledPermanent;
import mage.target.TargetPermanent;
import java.util.UUID;
public class UnctussRetrofitter extends CardImpl {
public UnctussRetrofitter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.addSubType(SubType.PHYREXIAN);
@ -25,17 +25,15 @@ public class UnctussRetrofitter extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(3);
//Toxic 1
// Toxic 1
this.addAbility(new ToxicAbility(1));
//When Unctus's Retrofitter enters the battlefield, up to one target artifact you control becomes an artifact
//creature with base power and toughness 4/4 for as long as Unctus's Retrofitter remains on the battlefield.
EntersBattlefieldTriggeredAbility entersBattlefieldTriggeredAbility =
new EntersBattlefieldTriggeredAbility(new UnctussRetrofitterBecomesCreatureEffect());
entersBattlefieldTriggeredAbility.addTarget(new TargetControlledPermanent(
0, 1, StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT, false
// When Unctus's Retrofitter enters the battlefield, up to one target artifact you control becomes an artifact creature with base power and toughness 4/4 for as long as Unctus's Retrofitter remains on the battlefield.
Ability ability = new EntersBattlefieldTriggeredAbility(new UnctussRetrofitterBecomesCreatureEffect());
ability.addTarget(new TargetPermanent(
0, 1, StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT
));
this.addAbility(entersBattlefieldTriggeredAbility);
this.addAbility(ability);
}
private UnctussRetrofitter(final UnctussRetrofitter card) {
@ -50,14 +48,14 @@ public class UnctussRetrofitter extends CardImpl {
class UnctussRetrofitterBecomesCreatureEffect extends BecomesCreatureTargetEffect {
public UnctussRetrofitterBecomesCreatureEffect() {
super( new CreatureToken(4, 4, "4/4 artifact creature")
.withType(CardType.ARTIFACT), false, false, Duration.WhileOnBattlefield);
UnctussRetrofitterBecomesCreatureEffect() {
super(new CreatureToken(4, 4, "4/4 artifact creature")
.withType(CardType.ARTIFACT), false, false, Duration.Custom);
this.staticText = "up to one target artifact you control becomes an artifact creature with base power and " +
"toughness 4/4 for as long as {this} remains on the battlefield";
}
public UnctussRetrofitterBecomesCreatureEffect(final UnctussRetrofitterBecomesCreatureEffect effect) {
private UnctussRetrofitterBecomesCreatureEffect(final UnctussRetrofitterBecomesCreatureEffect effect) {
super(effect);
}
@ -68,7 +66,7 @@ class UnctussRetrofitterBecomesCreatureEffect extends BecomesCreatureTargetEffec
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
Permanent sourcePermanent = source.getSourcePermanentIfItStillExists(game);
if (sourcePermanent == null) {
this.discard();
return false;