diff --git a/Mage.Sets/src/mage/cards/h/HeroOfTheDunes.java b/Mage.Sets/src/mage/cards/h/HeroOfTheDunes.java new file mode 100644 index 00000000000..05e452ca19b --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HeroOfTheDunes.java @@ -0,0 +1,71 @@ +package mage.cards.h; + +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicate; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ManaValuePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class HeroOfTheDunes extends CardImpl { + + private static final Predicate predicate + = new ManaValuePredicate(ComparisonType.FEWER_THAN, 4); + private static final FilterCard filter + = new FilterCard("artifact or creature card with mana value 3 or less from your graveyard"); + private static final FilterCreaturePermanent filter2 + = new FilterCreaturePermanent("creatures you control with mana value 3 or less"); + + static { + filter.add(Predicates.or( + CardType.ARTIFACT.getPredicate(), + CardType.CREATURE.getPredicate() + )); + filter.add(predicate); + filter2.add(TargetController.YOU.getControllerPredicate()); + filter2.add(predicate); + } + + public HeroOfTheDunes(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Hero of the Dunes enters the battlefield, return target artifact or creature card with mana value 3 or less from your graveyard to the battlefield. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + + // Creatures you control with mana value 3 or less get +1/+0. + this.addAbility(new SimpleStaticAbility(new BoostAllEffect( + 1, 0, Duration.EndOfTurn, filter2, false + ))); + } + + private HeroOfTheDunes(final HeroOfTheDunes card) { + super(card); + } + + @Override + public HeroOfTheDunes copy() { + return new HeroOfTheDunes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java index ea71b7547fd..4b3ca408b97 100644 --- a/Mage.Sets/src/mage/sets/TheBrothersWar.java +++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java @@ -83,6 +83,7 @@ public final class TheBrothersWar extends ExpansionSet { cards.add(new SetCardInfo("Harbin, Vanguard Aviator", 212, Rarity.RARE, mage.cards.h.HarbinVanguardAviator.class)); cards.add(new SetCardInfo("Haywire Mite", 199, Rarity.UNCOMMON, mage.cards.h.HaywireMite.class)); cards.add(new SetCardInfo("Heavyweight Demolisher", 160, Rarity.UNCOMMON, mage.cards.h.HeavyweightDemolisher.class)); + cards.add(new SetCardInfo("Hero of the Dunes", 213, Rarity.UNCOMMON, mage.cards.h.HeroOfTheDunes.class)); cards.add(new SetCardInfo("Hurkyl's Final Meditation", 52, Rarity.RARE, mage.cards.h.HurkylsFinalMeditation.class)); cards.add(new SetCardInfo("Hurkyl, Master Wizard", 51, Rarity.RARE, mage.cards.h.HurkylMasterWizard.class)); cards.add(new SetCardInfo("In the Trenches", 8, Rarity.MYTHIC, mage.cards.i.InTheTrenches.class));