[OTJ] Implement Roxanne, Starfall Savant

This commit is contained in:
Susucre 2024-03-30 14:53:08 +01:00
parent 6f7047c763
commit c42e67ea0f
7 changed files with 100 additions and 2 deletions

View file

@ -0,0 +1,59 @@
package mage.cards.r;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility;
import mage.abilities.common.TapForManaAllTriggeredManaAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.mana.AddManaOfAnyTypeProducedEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SetTargetPointer;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledArtifactPermanent;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.permanent.token.MeteoriteToken;
import java.util.UUID;
/**
* @author Susucr
*/
public final class RoxanneStarfallSavant extends CardImpl {
private static final FilterPermanent filter = new FilterControlledArtifactPermanent("you tap an artifact token");
static {
filter.add(TokenPredicate.TRUE);
}
public RoxanneStarfallSavant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.CAT);
this.subtype.add(SubType.DRUID);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
// Whenever Roxanne, Starfall Savant enters the battlefield or attacks, create a tapped colorless artifact token named Meteorite with "When Meteorite enters the battlefield, it deals 2 damage to any target" and "{T}: Add one mana of any color."
this.addAbility(new EntersBattlefieldOrAttacksSourceTriggeredAbility(new CreateTokenEffect(new MeteoriteToken(), 1, true)));
// Whenever you tap an artifact token for mana, add one mana of any type that artifact token produced.
this.addAbility(new TapForManaAllTriggeredManaAbility(
new AddManaOfAnyTypeProducedEffect(), filter,
SetTargetPointer.PERMANENT
));
}
private RoxanneStarfallSavant(final RoxanneStarfallSavant card) {
super(card);
}
@Override
public RoxanneStarfallSavant copy() {
return new RoxanneStarfallSavant(this);
}
}

View file

@ -128,6 +128,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet {
cards.add(new SetCardInfo("Rictus Robber", 102, Rarity.UNCOMMON, mage.cards.r.RictusRobber.class));
cards.add(new SetCardInfo("Rise of the Varmints", 179, Rarity.UNCOMMON, mage.cards.r.RiseOfTheVarmints.class));
cards.add(new SetCardInfo("Rooftop Assassin", 103, Rarity.COMMON, mage.cards.r.RooftopAssassin.class));
cards.add(new SetCardInfo("Roxanne, Starfall Savant", 228, Rarity.RARE, mage.cards.r.RoxanneStarfallSavant.class));
cards.add(new SetCardInfo("Ruthless Lawbringer", 229, Rarity.UNCOMMON, mage.cards.r.RuthlessLawbringer.class));
cards.add(new SetCardInfo("Scorching Shot", 145, Rarity.UNCOMMON, mage.cards.s.ScorchingShot.class));
cards.add(new SetCardInfo("Shackle Slinger", 65, Rarity.UNCOMMON, mage.cards.s.ShackleSlinger.class));

View file

@ -34,7 +34,7 @@ public class TapForManaAllTriggeredAbility extends TriggeredAbilityImpl {
setTriggerPhrase("Whenever " + filter.getMessage() + " for mana, ");
}
public TapForManaAllTriggeredAbility(TapForManaAllTriggeredAbility ability) {
private TapForManaAllTriggeredAbility(TapForManaAllTriggeredAbility ability) {
super(ability);
this.filter = ability.filter.copy();
this.setTargetPointer = ability.setTargetPointer;

View file

@ -28,7 +28,7 @@ public class TapForManaAllTriggeredManaAbility extends TriggeredManaAbility {
setTriggerPhrase("Whenever " + filter.getMessage() + " for mana, ");
}
public TapForManaAllTriggeredManaAbility(TapForManaAllTriggeredManaAbility ability) {
private TapForManaAllTriggeredManaAbility(TapForManaAllTriggeredManaAbility ability) {
super(ability);
this.filter = ability.filter.copy();
this.setTargetPointer = ability.setTargetPointer;

View file

@ -0,0 +1,38 @@
package mage.game.permanent.token;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.mana.AnyColorManaAbility;
import mage.constants.CardType;
import mage.target.common.TargetAnyTarget;
/**
* @author Susucr
*/
public final class MeteoriteToken extends TokenImpl {
public MeteoriteToken() {
super("Meteorite", "colorless artifact token named Meteorite with "
+ "\"When Meteorite enters the battlefield, it deals 2 damage to any target\" "
+ "and \"{T}: Add one mana of any color.\"");
cardType.add(CardType.ARTIFACT);
// When Meteorite enters the battlefield, it deals 2 damage to any target.
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it"), false);
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
// {T}: Add one mana of any color.
this.addAbility(new AnyColorManaAbility());
}
private MeteoriteToken(final MeteoriteToken token) {
super(token);
}
@Override
public MeteoriteToken copy() {
return new MeteoriteToken(this);
}
}