diff --git a/Mage.Sets/src/mage/cards/c/ChargingWarBoar.java b/Mage.Sets/src/mage/cards/c/ChargingWarBoar.java new file mode 100644 index 0000000000..64cc6041eb --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChargingWarBoar.java @@ -0,0 +1,65 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPlaneswalkerPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ChargingWarBoar extends CardImpl { + + private static final Condition condition + = new PermanentsOnTheBattlefieldCondition(new FilterControlledPlaneswalkerPermanent(SubType.DOMRI)); + + public ChargingWarBoar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); + + this.subtype.add(SubType.BOAR); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // As long as you control a Domri planeswalker, Charging War Boar gets +1/+1 and has trample. + Ability ability = new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), + condition, "As long as you control a Domri planeswalker, {this} gets +1/+1" + ) + ); + ability.addEffect(new ConditionalContinuousEffect( + new GainAbilitySourceEffect( + TrampleAbility.getInstance(), Duration.WhileOnBattlefield + ), condition, "and has trample" + )); + this.addAbility(ability); + } + + private ChargingWarBoar(final ChargingWarBoar card) { + super(card); + } + + @Override + public ChargingWarBoar copy() { + return new ChargingWarBoar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java index 792a991442..884780fb72 100644 --- a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java +++ b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java @@ -60,6 +60,7 @@ public final class RavnicaAllegiance extends ExpansionSet { cards.add(new SetCardInfo("Burning-Tree Vandal", 94, Rarity.COMMON, mage.cards.b.BurningTreeVandal.class)); cards.add(new SetCardInfo("Captive Audience", 160, Rarity.MYTHIC, mage.cards.c.CaptiveAudience.class)); cards.add(new SetCardInfo("Carnival // Carnage", 222, Rarity.UNCOMMON, mage.cards.c.CarnivalCarnage.class)); + cards.add(new SetCardInfo("Charging War Boar", 271, Rarity.UNCOMMON, mage.cards.c.ChargingWarBoar.class)); cards.add(new SetCardInfo("Clan Guildmage", 162, Rarity.UNCOMMON, mage.cards.c.ClanGuildmage.class)); cards.add(new SetCardInfo("Collision // Colossus", 223, Rarity.UNCOMMON, mage.cards.c.CollisionColossus.class)); cards.add(new SetCardInfo("Combine Guildmage", 163, Rarity.UNCOMMON, mage.cards.c.CombineGuildmage.class)); diff --git a/Mage/src/main/java/mage/filter/common/FilterControlledPlaneswalkerPermanent.java b/Mage/src/main/java/mage/filter/common/FilterControlledPlaneswalkerPermanent.java index 9cbee3044f..ef474acf32 100644 --- a/Mage/src/main/java/mage/filter/common/FilterControlledPlaneswalkerPermanent.java +++ b/Mage/src/main/java/mage/filter/common/FilterControlledPlaneswalkerPermanent.java @@ -6,7 +6,6 @@ import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate; /** - * * @author LevelX2 */ public class FilterControlledPlaneswalkerPermanent extends FilterControlledPermanent { @@ -15,6 +14,10 @@ public class FilterControlledPlaneswalkerPermanent extends FilterControlledPerma this("planeswalker you control"); } + public FilterControlledPlaneswalkerPermanent(SubType subType) { + this(subType, "a " + subType + " planeswalker"); + } + public FilterControlledPlaneswalkerPermanent(SubType subType, String name) { super(name); this.add(new CardTypePredicate(CardType.PLANESWALKER));