[DFT] Implement Road Rage

This commit is contained in:
theelk801 2025-02-02 10:19:27 -05:00
parent b908e790f4
commit 5fde30378e
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,61 @@
package mage.cards.r;
import mage.abilities.dynamicvalue.AdditiveDynamicValue;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.target.common.TargetCreatureOrPlaneswalker;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RoadRage extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent("Mounts and Vehicles you control");
static {
filter.add(Predicates.or(
SubType.MOUNT.getPredicate(),
SubType.VEHICLE.getPredicate()
));
}
private static final DynamicValue xValue = new AdditiveDynamicValue(
new PermanentsOnBattlefieldCount(filter), StaticValue.get(2)
);
private static final Hint hint = new ValueHint(
"Mounts and Vehicles you control", new PermanentsOnBattlefieldCount(filter)
);
public RoadRage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
// Road Rage deals X damage to target creature or planeswalker, where X is 2 plus the number of Mounts and Vehicles you control.
this.getSpellAbility().addEffect(new DamageTargetEffect(xValue)
.setText("{this} deals X damage to target creature or planeswalker, " +
"where X is 2 plus the number of Mounts and Vehicles you control"));
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker());
this.getSpellAbility().addHint(hint);
}
private RoadRage(final RoadRage card) {
super(card);
}
@Override
public RoadRage copy() {
return new RoadRage(this);
}
}

View file

@ -159,6 +159,7 @@ public final class Aetherdrift extends ExpansionSet {
cards.add(new SetCardInfo("Risen Necroregent", 102, Rarity.UNCOMMON, mage.cards.r.RisenNecroregent.class));
cards.add(new SetCardInfo("Risky Shortcut", 103, Rarity.COMMON, mage.cards.r.RiskyShortcut.class));
cards.add(new SetCardInfo("Riverpyre Verge", 260, Rarity.RARE, mage.cards.r.RiverpyreVerge.class));
cards.add(new SetCardInfo("Road Rage", 145, Rarity.UNCOMMON, mage.cards.r.RoadRage.class));
cards.add(new SetCardInfo("Roadside Assistance", 26, Rarity.UNCOMMON, mage.cards.r.RoadsideAssistance.class));
cards.add(new SetCardInfo("Roadside Blowout", 58, Rarity.UNCOMMON, mage.cards.r.RoadsideBlowout.class));
cards.add(new SetCardInfo("Rocketeer Boostbuggy", 220, Rarity.UNCOMMON, mage.cards.r.RocketeerBoostbuggy.class));