diff --git a/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java b/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java new file mode 100644 index 0000000000..89aba5948b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java @@ -0,0 +1,64 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.MageObject; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.keyword.BackupAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.ObjectSourcePlayer; +import mage.filter.predicate.ObjectSourcePlayerPredicate; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.game.Game; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class StreetwiseNegotiator extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("this creature"); + + static { + filter.add(StreetwiseNegotiatorPredicate.instance); + } + + public StreetwiseNegotiator(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.CITIZEN); + this.power = new MageInt(0); + this.toughness = new MageInt(2); + + // Backup 1 + BackupAbility backupAbility = new BackupAbility(this, 1); + this.addAbility(backupAbility); + + // This creature assigns combat damage equal to its toughness rather than its power. + backupAbility.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessEffect(filter, false))); + } + + private StreetwiseNegotiator(final StreetwiseNegotiator card) { + super(card); + } + + @Override + public StreetwiseNegotiator copy() { + return new StreetwiseNegotiator(this); + } +} + +enum StreetwiseNegotiatorPredicate implements ObjectSourcePlayerPredicate { + instance; + + @Override + public boolean apply(ObjectSourcePlayer input, Game game) { + return !AnotherPredicate.instance.apply(input, game); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index e6def0f5f6..4c13cdcf8a 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -109,6 +109,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Skyclave Invader", 78, Rarity.UNCOMMON, mage.cards.s.SkyclaveInvader.class)); cards.add(new SetCardInfo("Stoke the Flames", 166, Rarity.UNCOMMON, mage.cards.s.StokeTheFlames.class)); cards.add(new SetCardInfo("Storm the Seedcore", 206, Rarity.UNCOMMON, mage.cards.s.StormTheSeedcore.class)); + cards.add(new SetCardInfo("Streetwise Negotiator", 207, Rarity.UNCOMMON, mage.cards.s.StreetwiseNegotiator.class)); cards.add(new SetCardInfo("Sunfall", 40, Rarity.RARE, mage.cards.s.Sunfall.class)); cards.add(new SetCardInfo("Swamp", 279, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Swiftwater Cliffs", 273, Rarity.COMMON, mage.cards.s.SwiftwaterCliffs.class));