diff --git a/Mage.Sets/src/mage/cards/s/SewerCrocodile.java b/Mage.Sets/src/mage/cards/s/SewerCrocodile.java new file mode 100644 index 00000000000..71262d8589c --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SewerCrocodile.java @@ -0,0 +1,63 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.DifferentManaValuesInGraveCondition; +import mage.abilities.costs.CostAdjuster; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; +import mage.abilities.hint.common.DifferentManaValuesInGraveHint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.game.Game; +import mage.util.CardUtil; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SewerCrocodile extends CardImpl { + + public SewerCrocodile(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}"); + + this.subtype.add(SubType.CROCODILE); + this.power = new MageInt(4); + this.toughness = new MageInt(6); + + // {3}{U}: Sewer Crocodile can't be blocked this turn. This ability costs {3} less to activate if there are five or more mana values among cards in your graveyard. + Ability ability = new SimpleActivatedAbility( + new CantBeBlockedSourceEffect(Duration.EndOfTurn), new ManaCostsImpl<>("{3}{U}") + ); + ability.addEffect(new InfoEffect("This ability costs {3} less to activate " + + "if there are five or more mana values among cards in your graveyard")); + ability.setCostAdjuster(SewerCrocodileAdjuster.instance); + this.addAbility(ability.addHint(DifferentManaValuesInGraveHint.instance)); + } + + private SewerCrocodile(final SewerCrocodile card) { + super(card); + } + + @Override + public SewerCrocodile copy() { + return new SewerCrocodile(this); + } +} + +enum SewerCrocodileAdjuster implements CostAdjuster { + instance; + + @Override + public void adjustCosts(Ability ability, Game game) { + if (DifferentManaValuesInGraveCondition.FIVE.apply(game, ability)) { + CardUtil.reduceCost(ability, 3); + } + } +} diff --git a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java index 63abda9b786..9bae0c6879e 100644 --- a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java +++ b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java @@ -193,6 +193,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet { cards.add(new SetCardInfo("Sanctuary Warden", 30, Rarity.MYTHIC, mage.cards.s.SanctuaryWarden.class)); cards.add(new SetCardInfo("Sanguine Spy", 93, Rarity.RARE, mage.cards.s.SanguineSpy.class)); cards.add(new SetCardInfo("Security Bypass", 59, Rarity.COMMON, mage.cards.s.SecurityBypass.class)); + cards.add(new SetCardInfo("Sewer Crocodile", 60, Rarity.COMMON, mage.cards.s.SewerCrocodile.class)); cards.add(new SetCardInfo("Shadow of Mortality", 94, Rarity.RARE, mage.cards.s.ShadowOfMortality.class)); cards.add(new SetCardInfo("Shakedown Heavy", 95, Rarity.RARE, mage.cards.s.ShakedownHeavy.class)); cards.add(new SetCardInfo("Skybridge Towers", 256, Rarity.COMMON, mage.cards.s.SkybridgeTowers.class));