diff --git a/Mage.Sets/src/mage/cards/a/AzoriusSkyguard.java b/Mage.Sets/src/mage/cards/a/AzoriusSkyguard.java index 8f0cae7019..58cb054d70 100644 --- a/Mage.Sets/src/mage/cards/a/AzoriusSkyguard.java +++ b/Mage.Sets/src/mage/cards/a/AzoriusSkyguard.java @@ -33,7 +33,7 @@ public final class AzoriusSkyguard extends CardImpl { this.addAbility(FirstStrikeAbility.getInstance()); // Creatures your opponents control get -1/-0. - this.addAbility(new SimpleStaticAbility(new BoostOpponentsEffect(-1, 0, Duration.EndOfTurn))); + this.addAbility(new SimpleStaticAbility(new BoostOpponentsEffect(-1, 0, Duration.WhileOnBattlefield))); } private AzoriusSkyguard(final AzoriusSkyguard card) { diff --git a/Mage.Sets/src/mage/cards/d/DomriChaosBringer.java b/Mage.Sets/src/mage/cards/d/DomriChaosBringer.java index 56818fd890..d1f796f221 100644 --- a/Mage.Sets/src/mage/cards/d/DomriChaosBringer.java +++ b/Mage.Sets/src/mage/cards/d/DomriChaosBringer.java @@ -55,7 +55,7 @@ public final class DomriChaosBringer extends CardImpl { this.addAbility(new LoyaltyAbility(new LookLibraryAndPickControllerEffect( new StaticValue(4), false, new StaticValue(2), StaticFilters.FILTER_CARD_CREATURE, Zone.LIBRARY, false, - true, false, Zone.HAND, false, false, false + true, true, Zone.HAND, false, false, false ).setText( "Look at the top four cards of your library. " + "You may reveal up to two creature cards from among them " + diff --git a/Mage.Sets/src/mage/cards/f/FlamesOfTheRazeBoar.java b/Mage.Sets/src/mage/cards/f/FlamesOfTheRazeBoar.java new file mode 100644 index 0000000000..57230b6b87 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlamesOfTheRazeBoar.java @@ -0,0 +1,78 @@ +package mage.cards.f; + +import mage.abilities.Ability; +import mage.abilities.condition.common.FerociousCondition; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.filter.predicate.permanent.PermanentIdPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetOpponentsCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FlamesOfTheRazeBoar extends CardImpl { + + public FlamesOfTheRazeBoar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{5}{R}"); + + // Flames of the Raze-Boar deals 4 damage to target creature an opponent controls. Then Flames of the Raze-Boar deals 2 damage to each other creature that player controls if you control a creature with power 4 or greater. + this.getSpellAbility().addEffect(new FlamesOfTheRazeBoarEffect()); + this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent()); + } + + private FlamesOfTheRazeBoar(final FlamesOfTheRazeBoar card) { + super(card); + } + + @Override + public FlamesOfTheRazeBoar copy() { + return new FlamesOfTheRazeBoar(this); + } +} + +class FlamesOfTheRazeBoarEffect extends OneShotEffect { + + FlamesOfTheRazeBoarEffect() { + super(Outcome.Benefit); + staticText = "{this} deals 4 damage to target creature an opponent controls. " + + "Then {this} deals 2 damage to each other creature that player controls " + + "if you control a creature with power 4 or greater."; + } + + private FlamesOfTheRazeBoarEffect(final FlamesOfTheRazeBoarEffect effect) { + super(effect); + } + + @Override + public FlamesOfTheRazeBoarEffect copy() { + return new FlamesOfTheRazeBoarEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent == null) { + return false; + } + permanent.damage(4, source.getSourceId(), game); + if (!FerociousCondition.instance.apply(game, source)) { + return true; + } + FilterPermanent filter = new FilterCreaturePermanent(); + filter.add(new ControllerIdPredicate(permanent.getControllerId())); + filter.add(Predicates.not(new PermanentIdPredicate(permanent.getId()))); + return new DamageAllEffect(2, filter).apply(game, source); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/o/Offalsnout.java b/Mage.Sets/src/mage/cards/o/Offalsnout.java index 042e3ec854..3bc244c8c9 100644 --- a/Mage.Sets/src/mage/cards/o/Offalsnout.java +++ b/Mage.Sets/src/mage/cards/o/Offalsnout.java @@ -1,10 +1,9 @@ package mage.cards.o; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.keyword.EvokeAbility; import mage.abilities.keyword.FlashAbility; @@ -15,14 +14,15 @@ import mage.constants.SubType; import mage.target.Target; import mage.target.common.TargetCardInGraveyard; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class Offalsnout extends CardImpl { public Offalsnout(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); @@ -31,7 +31,7 @@ public final class Offalsnout extends CardImpl { // Flash this.addAbility(FlashAbility.getInstance()); // When Offalsnout leaves the battlefield, exile target card from a graveyard. - Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(),false); + Ability ability = new LeavesBattlefieldTriggeredAbility(new ExileTargetEffect(), false); Target target = new TargetCardInGraveyard(); ability.addTarget(target); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/r/RakdosTheShowstopper.java b/Mage.Sets/src/mage/cards/r/RakdosTheShowstopper.java index aa8661c8a0..327883a2d9 100644 --- a/Mage.Sets/src/mage/cards/r/RakdosTheShowstopper.java +++ b/Mage.Sets/src/mage/cards/r/RakdosTheShowstopper.java @@ -76,6 +76,7 @@ class RakdosTheShowstopperEffect extends OneShotEffect { } for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) { if (permanent != null + && permanent.isCreature() && !permanent.hasSubtype(SubType.DEMON, game) && !permanent.hasSubtype(SubType.DEVIL, game) && !permanent.hasSubtype(SubType.IMP, game) diff --git a/Mage.Sets/src/mage/cards/r/RavagerWurm.java b/Mage.Sets/src/mage/cards/r/RavagerWurm.java index b3691662de..f8af6558fc 100644 --- a/Mage.Sets/src/mage/cards/r/RavagerWurm.java +++ b/Mage.Sets/src/mage/cards/r/RavagerWurm.java @@ -12,8 +12,11 @@ import mage.cards.CardSetInfo; import mage.constants.AbilityType; import mage.constants.CardType; import mage.constants.SubType; +import mage.constants.TargetController; import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicate; +import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.TargetPermanent; @@ -25,10 +28,14 @@ import java.util.UUID; */ public final class RavagerWurm extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent("land with an activated ability that isn't a mana ability"); + private static final FilterPermanent filter + = new FilterCreaturePermanent("creature you don't control"); + private static final FilterPermanent filter2 + = new FilterPermanent("land with an activated ability that isn't a mana ability"); static { - filter.add(RavagerWurmPredicate.instance); + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + filter2.add(RavagerWurmPredicate.instance); } public RavagerWurm(UUID ownerId, CardSetInfo setInfo) { @@ -43,13 +50,16 @@ public final class RavagerWurm extends CardImpl { // When Ravager Wurm enters the battlefield, choose up to one — // • Ravager Wurm fights target creature you don't control. - Ability ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect().setText("{this} fights target creature you don't control"), false); + Ability ability = new EntersBattlefieldTriggeredAbility( + new FightTargetSourceEffect().setText("{this} fights target creature you don't control"), false + ); + ability.addTarget(new TargetPermanent(filter)); ability.getModes().setMinModes(0); ability.getModes().setMaxModes(1); // • Destroy target land with an activated ability that isn't a mana ability. Mode mode = new Mode(new DestroyTargetEffect()); - mode.addTarget(new TargetPermanent(filter)); + mode.addTarget(new TargetPermanent(filter2)); ability.addMode(mode); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TinStreetDodger.java b/Mage.Sets/src/mage/cards/t/TinStreetDodger.java new file mode 100644 index 0000000000..064a804c41 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TinStreetDodger.java @@ -0,0 +1,57 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TinStreetDodger extends CardImpl { + + private static final FilterCreaturePermanent filter + = new FilterCreaturePermanent("except by creatures with defender"); + + static { + filter.add(Predicates.not(new AbilityPredicate(DefenderAbility.class))); + } + + public TinStreetDodger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); + + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // {R}: Tin Street Dodger can't be blocked this turn except by creatures with defender. + this.addAbility(new SimpleActivatedAbility( + new CantBeBlockedByCreaturesSourceEffect(filter, Duration.EndOfTurn), new ManaCostsImpl("{R}") + )); + } + + private TinStreetDodger(final TinStreetDodger card) { + super(card); + } + + @Override + public TinStreetDodger copy() { + return new TinStreetDodger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java index 3b5ab416df..14d1cc84e2 100644 --- a/Mage.Sets/src/mage/sets/RavnicaAllegiance.java +++ b/Mage.Sets/src/mage/sets/RavnicaAllegiance.java @@ -114,6 +114,7 @@ public final class RavnicaAllegiance extends ExpansionSet { cards.add(new SetCardInfo("Feral Maaka", 100, Rarity.COMMON, mage.cards.f.FeralMaaka.class)); cards.add(new SetCardInfo("Final Payment", 171, Rarity.COMMON, mage.cards.f.FinalPayment.class)); cards.add(new SetCardInfo("Fireblade Artist", 172, Rarity.UNCOMMON, mage.cards.f.FirebladeArtist.class)); + cards.add(new SetCardInfo("Flames of the Raze-Boar", 101, Rarity.UNCOMMON, mage.cards.f.FlamesOfTheRazeBoar.class)); cards.add(new SetCardInfo("Font of Agonies", 74, Rarity.RARE, mage.cards.f.FontOfAgonies.class)); cards.add(new SetCardInfo("Footlight Fiend", 216, Rarity.COMMON, mage.cards.f.FootlightFiend.class)); cards.add(new SetCardInfo("Forbidding Spirit", 9, Rarity.UNCOMMON, mage.cards.f.ForbiddingSpirit.class)); @@ -279,6 +280,7 @@ public final class RavnicaAllegiance extends ExpansionSet { cards.add(new SetCardInfo("Thirsting Shade", 87, Rarity.COMMON, mage.cards.t.ThirstingShade.class)); cards.add(new SetCardInfo("Thought Collapse", 57, Rarity.COMMON, mage.cards.t.ThoughtCollapse.class)); cards.add(new SetCardInfo("Thrash // Threat", 229, Rarity.RARE, mage.cards.t.ThrashThreat.class)); + cards.add(new SetCardInfo("Tin Street Dodger", 120, Rarity.UNCOMMON, mage.cards.t.TinStreetDodger.class)); cards.add(new SetCardInfo("Titanic Brawl", 146, Rarity.COMMON, mage.cards.t.TitanicBrawl.class)); cards.add(new SetCardInfo("Tithe Taker", 27, Rarity.RARE, mage.cards.t.TitheTaker.class)); cards.add(new SetCardInfo("Tome of the Guildpact", 242, Rarity.RARE, mage.cards.t.TomeOfTheGuildpact.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesSourceEffect.java index 4c25091625..e06358e487 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByCreaturesSourceEffect.java @@ -9,7 +9,6 @@ import mage.game.Game; import mage.game.permanent.Permanent; /** - * * @author LevelX2 */ public class CantBeBlockedByCreaturesSourceEffect extends RestrictionEffect { @@ -19,8 +18,8 @@ public class CantBeBlockedByCreaturesSourceEffect extends RestrictionEffect { public CantBeBlockedByCreaturesSourceEffect(FilterCreaturePermanent filter, Duration duration) { super(duration); this.filter = filter; - staticText = new StringBuilder("{this} can't be blocked ") - .append(filter.getMessage().startsWith("except by") ? "" : "by ").append(filter.getMessage()).toString(); + staticText = "{this} can't be blocked " + (duration == Duration.EndOfTurn ? "this turn " : "") + + (filter.getMessage().startsWith("except by") ? "" : "by ") + filter.getMessage(); } public CantBeBlockedByCreaturesSourceEffect(final CantBeBlockedByCreaturesSourceEffect effect) {