[OTJ] Implement Visage Bandit

This commit is contained in:
Susucre 2024-03-29 20:19:21 +01:00
parent 37cdec4e06
commit 758df67d74
2 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,60 @@
package mage.cards.v;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.effects.common.CopyPermanentEffect;
import mage.abilities.keyword.PlotAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.util.functions.CopyApplier;
import java.util.UUID;
/**
* @author Susucr
*/
public final class VisageBandit extends CardImpl {
public VisageBandit(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.subtype.add(SubType.SHAPESHIFTER);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// You may have Visage Bandit enter the battlefield as a copy of a creature you control, except it's a Shapeshifter Rogue in addition to its other types.
this.addAbility(new EntersBattlefieldAbility(
new CopyPermanentEffect(StaticFilters.FILTER_CONTROLLED_CREATURE, new VisageBanditCopyApplier()),
true, null, "You may have {this} enter the battlefield as a copy of " +
"a creature you control, except it's a Shapeshifter Rogue in addition to its other types.", ""
));
// Plot {2}{U}
this.addAbility(new PlotAbility("{2}{U}"));
}
private VisageBandit(final VisageBandit card) {
super(card);
}
@Override
public VisageBandit copy() {
return new VisageBandit(this);
}
}
class VisageBanditCopyApplier extends CopyApplier {
@Override
public boolean apply(Game game, MageObject blueprint, Ability source, UUID copyToObjectId) {
blueprint.addSubType(SubType.SHAPESHIFTER, SubType.ROGUE);
return true;
}
}

View file

@ -119,6 +119,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet {
cards.add(new SetCardInfo("Tumbleweed Rising", 187, Rarity.COMMON, mage.cards.t.TumbleweedRising.class));
cards.add(new SetCardInfo("Unscrupulous Contractor", 112, Rarity.UNCOMMON, mage.cards.u.UnscrupulousContractor.class));
cards.add(new SetCardInfo("Vial Smasher, Gleeful Grenadier", 235, Rarity.UNCOMMON, mage.cards.v.VialSmasherGleefulGrenadier.class));
cards.add(new SetCardInfo("Visage Bandit", 76, Rarity.UNCOMMON, mage.cards.v.VisageBandit.class));
cards.add(new SetCardInfo("Vraska Joins Up", 236, Rarity.RARE, mage.cards.v.VraskaJoinsUp.class));
cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when mechanic is implemented