mirror of
https://github.com/correl/mage.git
synced 2024-12-29 03:00:15 +00:00
ONE: Added card "Unctus's Retrofitter" and its abilities and effects (#10044)
Co-authored-by: Daniel Eberhard <daniel.h.e@gmx.de>
This commit is contained in:
parent
577c94b877
commit
5dbbaf8ba0
2 changed files with 79 additions and 0 deletions
78
Mage.Sets/src/mage/cards/u/UnctussRetrofitter.java
Normal file
78
Mage.Sets/src/mage/cards/u/UnctussRetrofitter.java
Normal file
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.u;
|
||||
|
||||
import mage.MageInt;
|
||||
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.*;
|
||||
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 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);
|
||||
this.addSubType(SubType.ARTIFICER);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
//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
|
||||
));
|
||||
this.addAbility(entersBattlefieldTriggeredAbility);
|
||||
}
|
||||
|
||||
private UnctussRetrofitter(final UnctussRetrofitter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnctussRetrofitter copy() {
|
||||
return new UnctussRetrofitter(this);
|
||||
}
|
||||
}
|
||||
|
||||
class UnctussRetrofitterBecomesCreatureEffect extends BecomesCreatureTargetEffect {
|
||||
|
||||
public UnctussRetrofitterBecomesCreatureEffect() {
|
||||
super( new CreatureToken(4, 4, "4/4 artifact creature")
|
||||
.withType(CardType.ARTIFACT), false, false, Duration.WhileOnBattlefield);
|
||||
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) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnctussRetrofitterBecomesCreatureEffect copy() {
|
||||
return new UnctussRetrofitterBecomesCreatureEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent == null) {
|
||||
this.discard();
|
||||
return false;
|
||||
}
|
||||
return super.apply(layer, sublayer, source, game);
|
||||
}
|
||||
}
|
|
@ -254,6 +254,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tyvar's Stand", 190, Rarity.UNCOMMON, mage.cards.t.TyvarsStand.class));
|
||||
cards.add(new SetCardInfo("Tyvar, Jubilant Brawler", 218, Rarity.RARE, mage.cards.t.TyvarJubilantBrawler.class));
|
||||
cards.add(new SetCardInfo("Unctus, Grand Metatect", 75, Rarity.RARE, mage.cards.u.UnctusGrandMetatect.class));
|
||||
cards.add(new SetCardInfo("Unctus's Retrofitter", 76, Rarity.UNCOMMON, mage.cards.u.UnctussRetrofitter.class));
|
||||
cards.add(new SetCardInfo("Unnatural Restoration", 191, Rarity.UNCOMMON, mage.cards.u.UnnaturalRestoration.class));
|
||||
cards.add(new SetCardInfo("Urabrask's Anointer", 152, Rarity.UNCOMMON, mage.cards.u.UrabrasksAnointer.class));
|
||||
cards.add(new SetCardInfo("Urabrask's Forge", 153, Rarity.RARE, mage.cards.u.UrabrasksForge.class));
|
||||
|
|
Loading…
Reference in a new issue