mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[MOC] Implement Sandsteppe War Riders
This commit is contained in:
parent
5399b4c362
commit
8aaf118a5c
2 changed files with 95 additions and 0 deletions
94
Mage.Sets/src/mage/cards/s/SandsteppeWarRiders.java
Normal file
94
Mage.Sets/src/mage/cards/s/SandsteppeWarRiders.java
Normal file
|
@ -0,0 +1,94 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.keyword.BolsterEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SandsteppeWarRiders extends CardImpl {
|
||||
|
||||
public SandsteppeWarRiders(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// At the beginning of combat on your turn, bolster X, where X is the number of differently named artifact tokens you control.
|
||||
this.addAbility(new BeginningOfCombatTriggeredAbility(new BolsterEffect(SandsteppeWarRidersValue.instance), TargetController.YOU, false));
|
||||
}
|
||||
|
||||
private SandsteppeWarRiders(final SandsteppeWarRiders card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SandsteppeWarRiders copy() {
|
||||
return new SandsteppeWarRiders(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum SandsteppeWarRidersValue implements DynamicValue {
|
||||
instance;
|
||||
private static final FilterPermanent filter = new FilterControlledArtifactPermanent();
|
||||
|
||||
static {
|
||||
filter.add(TokenPredicate.TRUE);
|
||||
}
|
||||
|
||||
private static final Hint hint = new ValueHint("Different artifact token names you control", instance)
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return game
|
||||
.getBattlefield()
|
||||
.getActivePermanents(filter, sourceAbility.getControllerId(), sourceAbility, game)
|
||||
.stream()
|
||||
.map(MageObject::getName)
|
||||
.filter(Objects::nonNull)
|
||||
.filter(s -> !s.isEmpty())
|
||||
.distinct()
|
||||
.mapToInt(x -> 1)
|
||||
.sum();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SandsteppeWarRidersValue copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "differently named artifact tokens you control";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "X";
|
||||
}
|
||||
}
|
|
@ -233,6 +233,7 @@ public final class MarchOfTheMachineCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Root Out", 311, Rarity.COMMON, mage.cards.r.RootOut.class));
|
||||
cards.add(new SetCardInfo("Saheeli's Artistry", 234, Rarity.RARE, mage.cards.s.SaheelisArtistry.class));
|
||||
cards.add(new SetCardInfo("Saheeli, Sublime Artificer", 338, Rarity.UNCOMMON, mage.cards.s.SaheeliSublimeArtificer.class));
|
||||
cards.add(new SetCardInfo("Sandsteppe War Riders", 39, Rarity.RARE, mage.cards.s.SandsteppeWarRiders.class));
|
||||
cards.add(new SetCardInfo("Schema Thief", 24, Rarity.RARE, mage.cards.s.SchemaThief.class));
|
||||
cards.add(new SetCardInfo("Scrap Trawler", 373, Rarity.RARE, mage.cards.s.ScrapTrawler.class));
|
||||
cards.add(new SetCardInfo("Sculpting Steel", 374, Rarity.RARE, mage.cards.s.SculptingSteel.class));
|
||||
|
|
Loading…
Reference in a new issue