[LCI] Implement Restless Ridgeline

This commit is contained in:
Susucre 2023-10-28 16:18:54 +02:00
parent 486f457ed6
commit 4543babd72
2 changed files with 72 additions and 0 deletions

View file

@ -0,0 +1,71 @@
package mage.cards.r;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.mana.GreenManaAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterAttackingCreature;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.game.permanent.token.custom.CreatureToken;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author Susucr
*/
public final class RestlessRidgeline extends CardImpl {
static final FilterAttackingCreature filter = new FilterAttackingCreature("another target attacking creature");
static {
filter.add(AnotherPredicate.instance);
}
public RestlessRidgeline(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// Restless Ridgeline enters the battlefield tapped.
this.addAbility(new EntersBattlefieldTappedAbility());
// {T}: Add {R} or {G}.
this.addAbility(new RedManaAbility());
this.addAbility(new GreenManaAbility());
// {2}{R}{G}: Restless Ridgeline becomes a 3/4 red and green Dinosaur creature until end of turn. It's still a land.
this.addAbility(new SimpleActivatedAbility(new BecomesCreatureSourceEffect(
new CreatureToken(3, 4, "3/4 red and green Dinosaur creature")
.withColor("RG").withSubType(SubType.DINOSAUR),
CardType.LAND, Duration.EndOfTurn
), new ManaCostsImpl<>("{2}{R}{G}")));
// Whenever Restless Ridgeline attacks, another target attacking creature gets +2/+0 until end of turn. Untap that creature.
Ability ability = new AttacksTriggeredAbility(
new BoostTargetEffect(2, 0)
);
ability.addEffect(new UntapTargetEffect()
.setText("untap that creature"));
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
}
private RestlessRidgeline(final RestlessRidgeline card) {
super(card);
}
@Override
public RestlessRidgeline copy() {
return new RestlessRidgeline(this);
}
}

View file

@ -81,6 +81,7 @@ public final class TheLostCavernsOfIxalan extends ExpansionSet {
cards.add(new SetCardInfo("Resplendent Angel", 32, Rarity.MYTHIC, mage.cards.r.ResplendentAngel.class));
cards.add(new SetCardInfo("Restless Anchorage", 280, Rarity.RARE, mage.cards.r.RestlessAnchorage.class));
cards.add(new SetCardInfo("Restless Prairie", 281, Rarity.RARE, mage.cards.r.RestlessPrairie.class));
cards.add(new SetCardInfo("Restless Ridgeline", 283, Rarity.RARE, mage.cards.r.RestlessRidgeline.class));
cards.add(new SetCardInfo("Roar of the Fifth People", 189, Rarity.MYTHIC, mage.cards.r.RoarOfTheFifthPeople.class));
cards.add(new SetCardInfo("Saheeli, the Sun's Brilliance", 239, Rarity.MYTHIC, mage.cards.s.SaheeliTheSunsBrilliance.class));
cards.add(new SetCardInfo("Sanguine Evangelist", 34, Rarity.RARE, mage.cards.s.SanguineEvangelist.class));