diff --git a/Mage.Sets/src/mage/cards/b/Badgermole.java b/Mage.Sets/src/mage/cards/b/Badgermole.java index 0c6326da4e9..24d46635ab7 100644 --- a/Mage.Sets/src/mage/cards/b/Badgermole.java +++ b/Mage.Sets/src/mage/cards/b/Badgermole.java @@ -13,7 +13,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; import mage.filter.StaticFilters; -import mage.target.TargetPermanent; +import mage.target.common.TargetControlledLandPermanent; import java.util.UUID; @@ -32,7 +32,7 @@ public final class Badgermole extends CardImpl { // When this creature enters, earthbend 2. Ability ability = new EntersBattlefieldTriggeredAbility(new EarthbendTargetEffect(2)); - ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND)); + ability.addTarget(new TargetControlledLandPermanent()); this.addAbility(ability); // Creatures you control with +1/+1 counters on them have trample. diff --git a/Mage.Sets/src/mage/cards/b/BumiEclecticEarthbender.java b/Mage.Sets/src/mage/cards/b/BumiEclecticEarthbender.java index f8ad29546ec..6fc1617a324 100644 --- a/Mage.Sets/src/mage/cards/b/BumiEclecticEarthbender.java +++ b/Mage.Sets/src/mage/cards/b/BumiEclecticEarthbender.java @@ -13,9 +13,8 @@ import mage.constants.SubType; import mage.constants.SuperType; import mage.counters.CounterType; import mage.filter.FilterPermanent; -import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.target.TargetPermanent; +import mage.target.common.TargetControlledLandPermanent; import java.util.UUID; @@ -42,7 +41,7 @@ public final class BumiEclecticEarthbender extends CardImpl { // When Bumi enters, earthbend 1. Ability ability = new EntersBattlefieldTriggeredAbility(new EarthbendTargetEffect(1)); - ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND)); + ability.addTarget(new TargetControlledLandPermanent()); this.addAbility(ability); // Whenever Bumi attacks, put two +1/+1 counters on each land creature you control. diff --git a/Mage.Sets/src/mage/cards/b/BuzzardWaspColony.java b/Mage.Sets/src/mage/cards/b/BuzzardWaspColony.java new file mode 100644 index 00000000000..25eef058a85 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BuzzardWaspColony.java @@ -0,0 +1,99 @@ +package mage.cards.b; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.counters.Counter; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.filter.predicate.permanent.CounterAnyPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BuzzardWaspColony extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another creature you control"); + + static { + filter.add(AnotherPredicate.instance); + filter.add(CounterAnyPredicate.instance); + } + + public BuzzardWaspColony(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.INSECT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When this creature enters, you may sacrifice an artifact or creature. If you do, draw a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid( + new DrawCardSourceControllerEffect(1), + new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE) + ))); + + // Whenever another creature you control dies, if it had counters on it, put its counters on this creature. + this.addAbility(new DiesCreatureTriggeredAbility(new BuzzardWaspColonyEffect(), false, filter)); + } + + private BuzzardWaspColony(final BuzzardWaspColony card) { + super(card); + } + + @Override + public BuzzardWaspColony copy() { + return new BuzzardWaspColony(this); + } +} + +class BuzzardWaspColonyEffect extends OneShotEffect { + + BuzzardWaspColonyEffect() { + super(Outcome.Benefit); + staticText = "if it had counters on it, put its counters on {this}"; + } + + private BuzzardWaspColonyEffect(final BuzzardWaspColonyEffect effect) { + super(effect); + } + + @Override + public BuzzardWaspColonyEffect copy() { + return new BuzzardWaspColonyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = source.getSourcePermanentIfItStillExists(game); + Permanent creature = (Permanent) getValue("creatureDied"); + if (permanent == null || creature == null) { + return false; + } + for (Counter counter : creature.getCounters(game).values()) { + permanent.addCounters(counter.copy(), source, game); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/d/DaiLiIndoctrination.java b/Mage.Sets/src/mage/cards/d/DaiLiIndoctrination.java index 7b5a7c24c06..04a7b59fc45 100644 --- a/Mage.Sets/src/mage/cards/d/DaiLiIndoctrination.java +++ b/Mage.Sets/src/mage/cards/d/DaiLiIndoctrination.java @@ -8,10 +8,9 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.filter.FilterCard; -import mage.filter.StaticFilters; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.Predicates; -import mage.target.TargetPermanent; +import mage.target.common.TargetControlledLandPermanent; import mage.target.common.TargetOpponent; import java.util.UUID; @@ -39,7 +38,7 @@ public final class DaiLiIndoctrination extends CardImpl { // * Earthbend 2. this.getSpellAbility().addMode(new Mode(new EarthbendTargetEffect(2)) - .addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND))); + .addTarget(new TargetControlledLandPermanent())); } private DaiLiIndoctrination(final DaiLiIndoctrination card) { diff --git a/Mage.Sets/src/mage/cards/e/EarthRumble.java b/Mage.Sets/src/mage/cards/e/EarthRumble.java index cda332c1739..9a90e31c967 100644 --- a/Mage.Sets/src/mage/cards/e/EarthRumble.java +++ b/Mage.Sets/src/mage/cards/e/EarthRumble.java @@ -9,10 +9,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; -import mage.filter.StaticFilters; import mage.game.Game; -import mage.target.TargetPermanent; import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetControlledLandPermanent; import mage.target.common.TargetOpponentsCreaturePermanent; import java.util.UUID; @@ -27,7 +26,7 @@ public final class EarthRumble extends CardImpl { // Earthbend 2. When you do, up to one target creature you control fights target creature an opponent controls. this.getSpellAbility().addEffect(new EarthbendTargetEffect(2)); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND)); + this.getSpellAbility().addTarget(new TargetControlledLandPermanent()); this.getSpellAbility().addEffect(new EarthRumbleEffect()); } diff --git a/Mage.Sets/src/mage/cards/e/EarthVillageRuffians.java b/Mage.Sets/src/mage/cards/e/EarthVillageRuffians.java index 19a0aeb8634..25245ce79be 100644 --- a/Mage.Sets/src/mage/cards/e/EarthVillageRuffians.java +++ b/Mage.Sets/src/mage/cards/e/EarthVillageRuffians.java @@ -8,8 +8,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.StaticFilters; -import mage.target.TargetPermanent; +import mage.target.common.TargetControlledLandPermanent; import java.util.UUID; @@ -29,7 +28,7 @@ public final class EarthVillageRuffians extends CardImpl { // When this creature dies, earthbend 2. Ability ability = new DiesSourceTriggeredAbility(new EarthbendTargetEffect(2)); - ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND)); + ability.addTarget(new TargetControlledLandPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/EarthbendingLesson.java b/Mage.Sets/src/mage/cards/e/EarthbendingLesson.java index 5a44f3d666c..61962ad7d52 100644 --- a/Mage.Sets/src/mage/cards/e/EarthbendingLesson.java +++ b/Mage.Sets/src/mage/cards/e/EarthbendingLesson.java @@ -5,8 +5,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.StaticFilters; -import mage.target.TargetPermanent; +import mage.target.common.TargetControlledLandPermanent; import java.util.UUID; @@ -22,7 +21,7 @@ public final class EarthbendingLesson extends CardImpl { // Earthbend 4. this.getSpellAbility().addEffect(new EarthbendTargetEffect(4)); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND)); + this.getSpellAbility().addTarget(new TargetControlledLandPermanent()); } private EarthbendingLesson(final EarthbendingLesson card) { diff --git a/Mage.Sets/src/mage/cards/e/EarthbendingStudent.java b/Mage.Sets/src/mage/cards/e/EarthbendingStudent.java new file mode 100644 index 00000000000..462f2ef3e18 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EarthbendingStudent.java @@ -0,0 +1,60 @@ +package mage.cards.e; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.effects.keyword.EarthbendTargetEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetControlledLandPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class EarthbendingStudent extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("land creatures"); + + static { + filter.add(CardType.LAND.getPredicate()); + } + + public EarthbendingStudent(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // When this creature enters, earthbend 2. + Ability ability = new EntersBattlefieldTriggeredAbility(new EarthbendTargetEffect(2)); + ability.addTarget(new TargetControlledLandPermanent()); + this.addAbility(ability); + + // Land creatures you control have vigilance. + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, filter + ))); + } + + private EarthbendingStudent(final EarthbendingStudent card) { + super(card); + } + + @Override + public EarthbendingStudent copy() { + return new EarthbendingStudent(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FireNationArchers.java b/Mage.Sets/src/mage/cards/f/FireNationArchers.java new file mode 100644 index 00000000000..bcced837911 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FireNationArchers.java @@ -0,0 +1,49 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.game.permanent.token.SoldierRedToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FireNationArchers extends CardImpl { + + public FireNationArchers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARCHER); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // {5}: This creature deals 2 damage to each opponent. Create a 2/2 red Soldier creature token. + Ability ability = new SimpleActivatedAbility(new DamagePlayersEffect(2, TargetController.OPPONENT), new GenericManaCost(5)); + ability.addEffect(new CreateTokenEffect(new SoldierRedToken())); + this.addAbility(ability); + } + + private FireNationArchers(final FireNationArchers card) { + super(card); + } + + @Override + public FireNationArchers copy() { + return new FireNationArchers(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FireNationEngineer.java b/Mage.Sets/src/mage/cards/f/FireNationEngineer.java new file mode 100644 index 00000000000..93f4c6fd078 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FireNationEngineer.java @@ -0,0 +1,63 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.condition.common.RaidCondition; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.hint.common.RaidHint; +import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.target.TargetPermanent; +import mage.watchers.common.PlayerAttackedWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FireNationEngineer extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent("another target creature or Vehicle you control"); + + static { + filter.add(AnotherPredicate.instance); + filter.add(Predicates.or( + CardType.CREATURE.getPredicate(), + SubType.VEHICLE.getPredicate() + )); + } + + public FireNationEngineer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Raid -- At the beginning of your end step, if you attacked this turn, put a +1/+1 counter on another target creature or Vehicle you control. + Ability ability = new BeginningOfEndStepTriggeredAbility( + new AddCountersTargetEffect(CounterType.P1P1.createInstance()) + ).withInterveningIf(RaidCondition.instance); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability.setAbilityWord(AbilityWord.RAID).addHint(RaidHint.instance), new PlayerAttackedWatcher()); + } + + private FireNationEngineer(final FireNationEngineer card) { + super(card); + } + + @Override + public FireNationEngineer copy() { + return new FireNationEngineer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FireNationSentinels.java b/Mage.Sets/src/mage/cards/f/FireNationSentinels.java new file mode 100644 index 00000000000..3cb6c8653b7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FireNationSentinels.java @@ -0,0 +1,51 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterOpponentsCreaturePermanent; +import mage.filter.predicate.permanent.TokenPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FireNationSentinels extends CardImpl { + + private static final FilterPermanent filter = new FilterOpponentsCreaturePermanent("nontoken creature an opponent controls"); + + static { + filter.add(TokenPredicate.FALSE); + } + + public FireNationSentinels(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever a nontoken creature an opponent controls dies, put a +1/+1 counter on each creature you control. + this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersAllEffect( + CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE + ), false, filter)); + } + + private FireNationSentinels(final FireNationSentinels card) { + super(card); + } + + @Override + public FireNationSentinels copy() { + return new FireNationSentinels(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FireNationsConquest.java b/Mage.Sets/src/mage/cards/f/FireNationsConquest.java new file mode 100644 index 00000000000..c5f9fbc9084 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FireNationsConquest.java @@ -0,0 +1,32 @@ +package mage.cards.f; + +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FireNationsConquest extends CardImpl { + + public FireNationsConquest(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + + // Creatures you control get +1/+0. + this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield))); + } + + private FireNationsConquest(final FireNationsConquest card) { + super(card); + } + + @Override + public FireNationsConquest copy() { + return new FireNationsConquest(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FireSages.java b/Mage.Sets/src/mage/cards/f/FireSages.java new file mode 100644 index 00000000000..dd7794a3380 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FireSages.java @@ -0,0 +1,46 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FirebendingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FireSages extends CardImpl { + + public FireSages(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Firebending 1 + this.addAbility(new FirebendingAbility(1)); + + // {1}{R}{R}: Put a +1/+1 counter on this creature. + this.addAbility(new SimpleActivatedAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl<>("{1}{R}{R}") + )); + } + + private FireSages(final FireSages card) { + super(card); + } + + @Override + public FireSages copy() { + return new FireSages(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FirstTimeFlyer.java b/Mage.Sets/src/mage/cards/f/FirstTimeFlyer.java new file mode 100644 index 00000000000..945c34d9b2b --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FirstTimeFlyer.java @@ -0,0 +1,56 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.CardsInControllerGraveyardCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.hint.ConditionHint; +import mage.abilities.hint.Hint; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterCard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FirstTimeFlyer extends CardImpl { + + private static final Condition condition = new CardsInControllerGraveyardCondition(1, new FilterCard(SubType.LESSON)); + private static final Hint hint = new ConditionHint(condition, "There's a Lesson card in your graveyard"); + + public FirstTimeFlyer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PILOT); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // This creature gets +1/+1 as long as there's a Lesson card in your graveyard. + this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( + new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), + condition, "{this} gets +1/+1 as long as there's a Lesson card in your graveyard" + )).addHint(hint)); + } + + private FirstTimeFlyer(final FirstTimeFlyer card) { + super(card); + } + + @Override + public FirstTimeFlyer copy() { + return new FirstTimeFlyer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlexibleWaterbender.java b/Mage.Sets/src/mage/cards/f/FlexibleWaterbender.java new file mode 100644 index 00000000000..c315c30d5e6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlexibleWaterbender.java @@ -0,0 +1,47 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.WaterbendCost; +import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FlexibleWaterbender extends CardImpl { + + public FlexibleWaterbender(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Waterbend {3}: This creature has base power and toughness 5/2 until end of turn. + this.addAbility(new SimpleActivatedAbility( + new SetBasePowerToughnessSourceEffect(3, 2, Duration.EndOfTurn), new WaterbendCost(3) + )); + } + + private FlexibleWaterbender(final FlexibleWaterbender card) { + super(card); + } + + @Override + public FlexibleWaterbender copy() { + return new FlexibleWaterbender(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlopsieBumisBuddy.java b/Mage.Sets/src/mage/cards/f/FlopsieBumisBuddy.java new file mode 100644 index 00000000000..993778fe326 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlopsieBumisBuddy.java @@ -0,0 +1,60 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneAllEffect; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FlopsieBumisBuddy extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent("creature you control with power 4 or greater"); + + static { + filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 3)); + } + + public FlopsieBumisBuddy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.APE); + this.subtype.add(SubType.GOAT); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Flopsie enters, put a +1/+1 counter on each creature you control. + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersAllEffect( + CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE + ))); + + // Each creature you control with power 4 or greater can't be blocked by more than one creature. + this.addAbility(new SimpleStaticAbility(new CantBeBlockedByMoreThanOneAllEffect(filter))); + } + + private FlopsieBumisBuddy(final FlopsieBumisBuddy card) { + super(card); + } + + @Override + public FlopsieBumisBuddy copy() { + return new FlopsieBumisBuddy(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FlyingDolphinFish.java b/Mage.Sets/src/mage/cards/f/FlyingDolphinFish.java new file mode 100644 index 00000000000..15f2ed50561 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlyingDolphinFish.java @@ -0,0 +1,37 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FlyingDolphinFish extends CardImpl { + + public FlyingDolphinFish(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.WHALE); + this.subtype.add(SubType.FISH); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + } + + private FlyingDolphinFish(final FlyingDolphinFish card) { + super(card); + } + + @Override + public FlyingDolphinFish copy() { + return new FlyingDolphinFish(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FrogSquirrels.java b/Mage.Sets/src/mage/cards/f/FrogSquirrels.java new file mode 100644 index 00000000000..b9696c43088 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FrogSquirrels.java @@ -0,0 +1,37 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FrogSquirrels extends CardImpl { + + public FrogSquirrels(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.FROG); + this.subtype.add(SubType.SQUIRREL); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Reach + this.addAbility(ReachAbility.getInstance()); + } + + private FrogSquirrels(final FrogSquirrels card) { + super(card); + } + + @Override + public FrogSquirrels copy() { + return new FrogSquirrels(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GeyserLeaper.java b/Mage.Sets/src/mage/cards/g/GeyserLeaper.java new file mode 100644 index 00000000000..ac92da1f133 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GeyserLeaper.java @@ -0,0 +1,46 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.WaterbendCost; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GeyserLeaper extends CardImpl { + + public GeyserLeaper(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Waterbend {4}: Draw a card, then discard a card. + this.addAbility(new SimpleActivatedAbility( + new DrawDiscardControllerEffect(1, 1), new WaterbendCost(4) + )); + } + + private GeyserLeaper(final GeyserLeaper card) { + super(card); + } + + @Override + public GeyserLeaper copy() { + return new GeyserLeaper(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GiantKoi.java b/Mage.Sets/src/mage/cards/g/GiantKoi.java new file mode 100644 index 00000000000..1ff553cbd44 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GiantKoi.java @@ -0,0 +1,46 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.WaterbendCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; +import mage.abilities.keyword.IslandcyclingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GiantKoi extends CardImpl { + + public GiantKoi(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); + + this.subtype.add(SubType.FISH); + this.power = new MageInt(5); + this.toughness = new MageInt(7); + + // Waterbend {3}: This creature can't be blocked this turn. + this.addAbility(new SimpleActivatedAbility( + new CantBeBlockedSourceEffect(Duration.EndOfTurn), new WaterbendCost(3) + )); + + // Islandcycling {2} + this.addAbility(new IslandcyclingAbility(new ManaCostsImpl<>("{2}"))); + } + + private GiantKoi(final GiantKoi card) { + super(card); + } + + @Override + public GiantKoi copy() { + return new GiantKoi(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/Gilacorn.java b/Mage.Sets/src/mage/cards/g/Gilacorn.java new file mode 100644 index 00000000000..b1ae6068c72 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/Gilacorn.java @@ -0,0 +1,36 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Gilacorn extends CardImpl { + + public Gilacorn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + + this.subtype.add(SubType.LIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + } + + private Gilacorn(final Gilacorn card) { + super(card); + } + + @Override + public Gilacorn copy() { + return new Gilacorn(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HaruHiddenTalent.java b/Mage.Sets/src/mage/cards/h/HaruHiddenTalent.java index 4c46979c96d..a7a1f7f82a5 100644 --- a/Mage.Sets/src/mage/cards/h/HaruHiddenTalent.java +++ b/Mage.Sets/src/mage/cards/h/HaruHiddenTalent.java @@ -10,15 +10,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.filter.FilterPermanent; -import mage.filter.StaticFilters; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.AnotherPredicate; -import mage.target.TargetPermanent; +import mage.target.common.TargetControlledLandPermanent; import java.util.UUID; /** - * * @author Grath */ public final class HaruHiddenTalent extends CardImpl { @@ -30,7 +28,7 @@ public final class HaruHiddenTalent extends CardImpl { } public HaruHiddenTalent(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.PEASANT); this.subtype.add(SubType.ALLY); @@ -40,7 +38,7 @@ public final class HaruHiddenTalent extends CardImpl { // Whenever another Ally you control enters, earthbend 1. Ability ability = new EntersBattlefieldAllTriggeredAbility(new EarthbendTargetEffect(1), filter); - ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND)); + ability.addTarget(new TargetControlledLandPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/h/HeiBaiSpiritOfBalance.java b/Mage.Sets/src/mage/cards/h/HeiBaiSpiritOfBalance.java new file mode 100644 index 00000000000..4ea8c21f004 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HeiBaiSpiritOfBalance.java @@ -0,0 +1,56 @@ +package mage.cards.h; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.PutSourceCountersOnTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class HeiBaiSpiritOfBalance extends CardImpl { + + public HeiBaiSpiritOfBalance(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W/B}{W/B}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.BEAR); + this.subtype.add(SubType.SPIRIT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever Hei Bai enters or attacks, you may sacrifice another creature or artifact. If you do, put two +1/+1 counters on Hei Bai. + this.addAbility(new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DoIfCostPaid( + new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), + new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE_OR_ARTIFACT) + ))); + + // When Hei Bai leaves the battlefield, put its counters on target creature you control. + Ability ability = new LeavesBattlefieldTriggeredAbility(new PutSourceCountersOnTargetEffect()); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + } + + private HeiBaiSpiritOfBalance(final HeiBaiSpiritOfBalance card) { + super(card); + } + + @Override + public HeiBaiSpiritOfBalance copy() { + return new HeiBaiSpiritOfBalance(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HippoCows.java b/Mage.Sets/src/mage/cards/h/HippoCows.java new file mode 100644 index 00000000000..057228b5452 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HippoCows.java @@ -0,0 +1,37 @@ +package mage.cards.h; + +import mage.MageInt; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class HippoCows extends CardImpl { + + public HippoCows(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); + + this.subtype.add(SubType.HIPPO); + this.subtype.add(SubType.OX); + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + } + + private HippoCows(final HippoCows card) { + super(card); + } + + @Override + public HippoCows copy() { + return new HippoCows(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HogMonkey.java b/Mage.Sets/src/mage/cards/h/HogMonkey.java new file mode 100644 index 00000000000..07a53c05ff4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HogMonkey.java @@ -0,0 +1,53 @@ +package mage.cards.h; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.ExhaustAbility; +import mage.abilities.keyword.MenaceAbility; +import mage.abilities.triggers.BeginningOfCombatTriggeredAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class HogMonkey extends CardImpl { + + public HogMonkey(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.BOAR); + this.subtype.add(SubType.MONKEY); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // At the beginning of combat on your turn, target creature you control with a +1/+1 counter on it gains menace until end of turn. + Ability ability = new BeginningOfCombatTriggeredAbility(new GainAbilityTargetEffect(new MenaceAbility(false))); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_P1P1)); + this.addAbility(ability); + + // Exhaust -- {5}: Put two +1/+1 counters on this creature. + this.addAbility(new ExhaustAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), new GenericManaCost(5) + )); + } + + private HogMonkey(final HogMonkey card) { + super(card); + } + + @Override + public HogMonkey copy() { + return new HogMonkey(this); + } +} diff --git a/Mage.Sets/src/mage/cards/i/IrohFirebendingInstructor.java b/Mage.Sets/src/mage/cards/i/IrohFirebendingInstructor.java new file mode 100644 index 00000000000..c42876393e6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IrohFirebendingInstructor.java @@ -0,0 +1,45 @@ +package mage.cards.i; + +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class IrohFirebendingInstructor extends CardImpl { + + public IrohFirebendingInstructor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOBLE); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Iroh attacks, attacking creatures get +1/+1 until end of turn. + this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect( + 1, 1, Duration.EndOfTurn, StaticFilters.FILTER_ATTACKING_CREATURES, false + ))); + } + + private IrohFirebendingInstructor(final IrohFirebendingInstructor card) { + super(card); + } + + @Override + public IrohFirebendingInstructor copy() { + return new IrohFirebendingInstructor(this); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JeongJeongsDeserters.java b/Mage.Sets/src/mage/cards/j/JeongJeongsDeserters.java new file mode 100644 index 00000000000..da65b8b4f03 --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JeongJeongsDeserters.java @@ -0,0 +1,44 @@ +package mage.cards.j; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class JeongJeongsDeserters extends CardImpl { + + public JeongJeongsDeserters(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.REBEL); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // When this creature enters, put a +1/+1 counter on target creature. + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + private JeongJeongsDeserters(final JeongJeongsDeserters card) { + super(card); + } + + @Override + public JeongJeongsDeserters copy() { + return new JeongJeongsDeserters(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KataraBendingProdigy.java b/Mage.Sets/src/mage/cards/k/KataraBendingProdigy.java new file mode 100644 index 00000000000..0a40304dd68 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KataraBendingProdigy.java @@ -0,0 +1,51 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.SourceTappedCondition; +import mage.abilities.costs.common.WaterbendCost; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.counters.CounterType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KataraBendingProdigy extends CardImpl { + + public KataraBendingProdigy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // At the beginning of your end step, if Katara is tapped, put a +1/+1 counter on her. + this.addAbility(new BeginningOfEndStepTriggeredAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance()).setText("put a +1/+1 counter on her") + ).withInterveningIf(SourceTappedCondition.TAPPED)); + + // Waterbend {6}: Draw a card. + this.addAbility(new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new WaterbendCost(6))); + } + + private KataraBendingProdigy(final KataraBendingProdigy card) { + super(card); + } + + @Override + public KataraBendingProdigy copy() { + return new KataraBendingProdigy(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KataraHeroicHealer.java b/Mage.Sets/src/mage/cards/k/KataraHeroicHealer.java new file mode 100644 index 00000000000..3ffec0a09ed --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KataraHeroicHealer.java @@ -0,0 +1,49 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KataraHeroicHealer extends CardImpl { + + public KataraHeroicHealer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + + // When Katara enters, put a +1/+1 counter on each other creature you control. + this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersAllEffect( + CounterType.P1P1.createInstance(), StaticFilters.FILTER_OTHER_CONTROLLED_CREATURE + ))); + } + + private KataraHeroicHealer(final KataraHeroicHealer card) { + super(card); + } + + @Override + public KataraHeroicHealer copy() { + return new KataraHeroicHealer(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KomodoRhino.java b/Mage.Sets/src/mage/cards/k/KomodoRhino.java new file mode 100644 index 00000000000..a355f77936a --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KomodoRhino.java @@ -0,0 +1,37 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KomodoRhino extends CardImpl { + + public KomodoRhino(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.LIZARD); + this.subtype.add(SubType.RHINO); + this.power = new MageInt(5); + this.toughness = new MageInt(2); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + } + + private KomodoRhino(final KomodoRhino card) { + super(card); + } + + @Override + public KomodoRhino copy() { + return new KomodoRhino(this); + } +} diff --git a/Mage.Sets/src/mage/cards/k/KyoshiWarriorGuard.java b/Mage.Sets/src/mage/cards/k/KyoshiWarriorGuard.java new file mode 100644 index 00000000000..d34844caece --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KyoshiWarriorGuard.java @@ -0,0 +1,34 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KyoshiWarriorGuard extends CardImpl { + + public KyoshiWarriorGuard(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + } + + private KyoshiWarriorGuard(final KyoshiWarriorGuard card) { + super(card); + } + + @Override + public KyoshiWarriorGuard copy() { + return new KyoshiWarriorGuard(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LionVulture.java b/Mage.Sets/src/mage/cards/l/LionVulture.java new file mode 100644 index 00000000000..adf1b4da970 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LionVulture.java @@ -0,0 +1,51 @@ +package mage.cards.l; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.condition.common.OpponentsLostLifeCondition; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.hint.common.OpponentsLostLifeHint; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class LionVulture extends CardImpl { + + public LionVulture(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.BIRD); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // At the beginning of your end step, if an opponent lost life this turn, put a +1/+1 counter on this creature and draw a card. + Ability ability = new BeginningOfEndStepTriggeredAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance()) + ).withInterveningIf(OpponentsLostLifeCondition.instance); + ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy("and")); + this.addAbility(ability.addHint(OpponentsLostLifeHint.instance)); + } + + private LionVulture(final LionVulture card) { + super(card); + } + + @Override + public LionVulture copy() { + return new LionVulture(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LostInTheSpiritWorld.java b/Mage.Sets/src/mage/cards/l/LostInTheSpiritWorld.java new file mode 100644 index 00000000000..e486eeb4d6d --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LostInTheSpiritWorld.java @@ -0,0 +1,35 @@ +package mage.cards.l; + +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.SpiritWorldToken; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class LostInTheSpiritWorld extends CardImpl { + + public LostInTheSpiritWorld(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}"); + + // Return up to one target creature to its owner's hand. Create a 1/1 colorless Spirit creature token with "This token can't block or be blocked by non-Spirit creatures." + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 1)); + this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiritWorldToken())); + } + + private LostInTheSpiritWorld(final LostInTheSpiritWorld card) { + super(card); + } + + @Override + public LostInTheSpiritWorld copy() { + return new LostInTheSpiritWorld(this); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LoyalFireSage.java b/Mage.Sets/src/mage/cards/l/LoyalFireSage.java new file mode 100644 index 00000000000..112d79e8089 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LoyalFireSage.java @@ -0,0 +1,45 @@ +package mage.cards.l; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.FirebendingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.AllyToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class LoyalFireSage extends CardImpl { + + public LoyalFireSage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Firebending 1 + this.addAbility(new FirebendingAbility(1)); + + // {5}: Create a 1/1 white Ally creature token. + this.addAbility(new SimpleActivatedAbility(new CreateTokenEffect(new AllyToken()), new GenericManaCost(5))); + } + + private LoyalFireSage(final LoyalFireSage card) { + super(card); + } + + @Override + public LoyalFireSage copy() { + return new LoyalFireSage(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MasterPakku.java b/Mage.Sets/src/mage/cards/m/MasterPakku.java new file mode 100644 index 00000000000..2ee107fed73 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MasterPakku.java @@ -0,0 +1,57 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BecomesTappedSourceTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.MillCardsTargetEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.abilities.keyword.ProwessAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterCard; +import mage.target.TargetPlayer; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MasterPakku extends CardImpl { + + private static final DynamicValue xValue = new CardsInControllerGraveyardCount(new FilterCard(SubType.LESSON, "Lesson cards"), null); + private static final Hint hint = new ValueHint("Lesson cards in your graveyard", xValue); + + public MasterPakku(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ADVISOR); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Prowess + this.addAbility(new ProwessAbility()); + + // Whenever Master Pakku becomes tapped, target player mills X cards, where X is the number of Lesson cards in your graveyard. + Ability ability = new BecomesTappedSourceTriggeredAbility(new MillCardsTargetEffect(xValue)); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability.addHint(hint)); + } + + private MasterPakku(final MasterPakku card) { + super(card); + } + + @Override + public MasterPakku copy() { + return new MasterPakku(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MasterPiandao.java b/Mage.Sets/src/mage/cards/m/MasterPiandao.java new file mode 100644 index 00000000000..3c9174dd44f --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MasterPiandao.java @@ -0,0 +1,60 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.PutCards; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MasterPiandao extends CardImpl { + + private static final FilterCard filter = new FilterCard("Ally, Equipment, or Lesson card"); + + static { + filter.add(Predicates.or( + SubType.ALLY.getPredicate(), + SubType.EQUIPMENT.getPredicate(), + SubType.LESSON.getPredicate() + )); + } + + public MasterPiandao(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Whenever Master Piandao attacks, look at the top four cards of your library. You may reveal an Ally, Equipment, or Lesson card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. + this.addAbility(new AttacksTriggeredAbility(new LookLibraryAndPickControllerEffect( + 4, 1, filter, PutCards.HAND, PutCards.BOTTOM_RANDOM + ))); + } + + private MasterPiandao(final MasterPiandao card) { + super(card); + } + + @Override + public MasterPiandao copy() { + return new MasterPiandao(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MatchTheOdds.java b/Mage.Sets/src/mage/cards/m/MatchTheOdds.java new file mode 100644 index 00000000000..259b9e62c1a --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MatchTheOdds.java @@ -0,0 +1,86 @@ +package mage.cards.m; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.token.AllyToken; +import mage.game.permanent.token.Token; + +import java.util.Optional; +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MatchTheOdds extends CardImpl { + + private static final Hint hint = new ValueHint( + "Creatures your opponents control", + new PermanentsOnBattlefieldCount(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE) + ); + + public MatchTheOdds(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); + + this.subtype.add(SubType.LESSON); + + // Create a 1/1 white Ally creature token. Put a +1/+1 counter on it for each creature your opponents control. + this.getSpellAbility().addEffect(new MatchTheOddsEffect()); + this.getSpellAbility().addHint(hint); + } + + private MatchTheOdds(final MatchTheOdds card) { + super(card); + } + + @Override + public MatchTheOdds copy() { + return new MatchTheOdds(this); + } +} + +class MatchTheOddsEffect extends OneShotEffect { + + MatchTheOddsEffect() { + super(Outcome.Benefit); + staticText = "create a 1/1 white Ally creature token. " + + "Put a +1/+1 counter on it for each creature your opponents control"; + } + + private MatchTheOddsEffect(final MatchTheOddsEffect effect) { + super(effect); + } + + @Override + public MatchTheOddsEffect copy() { + return new MatchTheOddsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Token token = new AllyToken(); + token.putOntoBattlefield(1, game, source); + int count = game + .getBattlefield() + .count(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE, source.getControllerId(), source, game); + if (count < 1) { + return true; + } + for (UUID tokenId : token.getLastAddedTokenIds()) { + Optional.ofNullable(tokenId) + .map(game::getPermanent) + .ifPresent(permanent -> permanent.addCounters(CounterType.P1P1.createInstance(count), source, game)); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/m/MechanicalGlider.java b/Mage.Sets/src/mage/cards/m/MechanicalGlider.java new file mode 100644 index 00000000000..a827a9ab0a8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MechanicalGlider.java @@ -0,0 +1,46 @@ +package mage.cards.m; + +import mage.abilities.common.EntersBattlefieldAttachToTarget; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MechanicalGlider extends CardImpl { + + public MechanicalGlider(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); + + this.subtype.add(SubType.EQUIPMENT); + + // When this Equipment enters, attach it to target creature you control. + this.addAbility(new EntersBattlefieldAttachToTarget()); + + // Equipped creature has flying. + this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect( + FlyingAbility.getInstance(), AttachmentType.EQUIPMENT + ))); + + // Equip {2} + this.addAbility(new EquipAbility(2)); + } + + private MechanicalGlider(final MechanicalGlider card) { + super(card); + } + + @Override + public MechanicalGlider copy() { + return new MechanicalGlider(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MerchantOfManyHats.java b/Mage.Sets/src/mage/cards/m/MerchantOfManyHats.java new file mode 100644 index 00000000000..7e16cb253af --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MerchantOfManyHats.java @@ -0,0 +1,43 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MerchantOfManyHats extends CardImpl { + + public MerchantOfManyHats(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PEASANT); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {2}{B}: Return this card from your graveyard to your hand. + this.addAbility(new SimpleActivatedAbility( + Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl<>("{2}{B}") + )); + } + + private MerchantOfManyHats(final MerchantOfManyHats card) { + super(card); + } + + @Override + public MerchantOfManyHats copy() { + return new MerchantOfManyHats(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MomoRambunctiousRascal.java b/Mage.Sets/src/mage/cards/m/MomoRambunctiousRascal.java new file mode 100644 index 00000000000..9a5c1f20eac --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MomoRambunctiousRascal.java @@ -0,0 +1,58 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterOpponentsCreaturePermanent; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MomoRambunctiousRascal extends CardImpl { + + private static final FilterPermanent filter = new FilterOpponentsCreaturePermanent("tapped creature an opponent controls"); + + static { + filter.add(TappedPredicate.TAPPED); + } + + public MomoRambunctiousRascal(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.LEMUR); + this.subtype.add(SubType.BAT); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Momo enters, he deals 4 damage to target tapped creature an opponent controls. + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(4, "he")); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + private MomoRambunctiousRascal(final MomoRambunctiousRascal card) { + super(card); + } + + @Override + public MomoRambunctiousRascal copy() { + return new MomoRambunctiousRascal(this); + } +} diff --git a/Mage.Sets/src/mage/cards/m/MongooseLizard.java b/Mage.Sets/src/mage/cards/m/MongooseLizard.java new file mode 100644 index 00000000000..c11c6e6004d --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MongooseLizard.java @@ -0,0 +1,51 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.abilities.keyword.MountaincyclingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.target.common.TargetAnyTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MongooseLizard extends CardImpl { + + public MongooseLizard(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + + this.subtype.add(SubType.MONGOOSE); + this.subtype.add(SubType.LIZARD); + this.power = new MageInt(5); + this.toughness = new MageInt(6); + + // Menace + this.addAbility(new MenaceAbility()); + + // When this creature enters, it deals 1 damage to any target. + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1, "it")); + ability.addTarget(new TargetAnyTarget()); + this.addAbility(ability); + + // Mountaincycling {2} + this.addAbility(new MountaincyclingAbility(new ManaCostsImpl<>("{2}"))); + } + + private MongooseLizard(final MongooseLizard card) { + super(card); + } + + @Override + public MongooseLizard copy() { + return new MongooseLizard(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OstrichHorse.java b/Mage.Sets/src/mage/cards/o/OstrichHorse.java new file mode 100644 index 00000000000..4c4131db6f5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OstrichHorse.java @@ -0,0 +1,43 @@ +package mage.cards.o; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.MillThenPutInHandEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class OstrichHorse extends CardImpl { + + public OstrichHorse(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.BIRD); + this.subtype.add(SubType.HORSE); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // When this creature enters, mill three cards. You may put a land card from among them into your hand. If you don't, put a +1/+1 counter on this creature. + this.addAbility(new EntersBattlefieldTriggeredAbility(new MillThenPutInHandEffect( + 3, StaticFilters.FILTER_CARD_LAND, new AddCountersSourceEffect(CounterType.P1P1.createInstance()) + ))); + } + + private OstrichHorse(final OstrichHorse card) { + super(card); + } + + @Override + public OstrichHorse copy() { + return new OstrichHorse(this); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OtterPenguin.java b/Mage.Sets/src/mage/cards/o/OtterPenguin.java new file mode 100644 index 00000000000..8154ea837e1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OtterPenguin.java @@ -0,0 +1,43 @@ +package mage.cards.o; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DrawNthCardTriggeredAbility; +import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class OtterPenguin extends CardImpl { + + public OtterPenguin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.OTTER); + this.subtype.add(SubType.BIRD); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Whenever you draw your second card each turn, this creature gets +1/+2 until end of turn and can't be blocked this turn. + Ability ability = new DrawNthCardTriggeredAbility(new BoostSourceEffect(1, 2, Duration.EndOfTurn)); + ability.addEffect(new CantBeBlockedSourceEffect(Duration.EndOfTurn).setText("and can't be blocked this turn")); + this.addAbility(ability); + } + + private OtterPenguin(final OtterPenguin card) { + super(card); + } + + @Override + public OtterPenguin copy() { + return new OtterPenguin(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PathToRedemption.java b/Mage.Sets/src/mage/cards/p/PathToRedemption.java new file mode 100644 index 00000000000..d891ecc4354 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PathToRedemption.java @@ -0,0 +1,62 @@ +package mage.cards.p; + +import mage.abilities.Ability; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.MyTurnCondition; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ExileAttachedEffect; +import mage.abilities.effects.common.combat.CantAttackBlockAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.permanent.token.AllyToken; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PathToRedemption extends CardImpl { + + public PathToRedemption(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget)); + + // Enchanted creature can't attack or block. + this.addAbility(new SimpleStaticAbility(new CantAttackBlockAttachedEffect(AttachmentType.AURA))); + + // {5}, Sacrifice this Aura: Exile enchanted creature. Create a 1/1 white Ally creature token. Activate only during your turn. + Ability ability = new ActivateIfConditionActivatedAbility( + new ExileAttachedEffect(), new GenericManaCost(5), MyTurnCondition.instance + ); + ability.addCost(new SacrificeSourceCost()); + ability.addEffect(new CreateTokenEffect(new AllyToken())); + this.addAbility(ability); + } + + private PathToRedemption(final PathToRedemption card) { + super(card); + } + + @Override + public PathToRedemption copy() { + return new PathToRedemption(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PillarLaunch.java b/Mage.Sets/src/mage/cards/p/PillarLaunch.java new file mode 100644 index 00000000000..53beb87d8d7 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PillarLaunch.java @@ -0,0 +1,37 @@ +package mage.cards.p; + +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PillarLaunch extends CardImpl { + + public PillarLaunch(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); + + // Target creature gets +2/+2 and gains reach until end of turn. Untap it. + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2).setText("target creature gets +2/+2")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(ReachAbility.getInstance()).setText("and gain reach until end of turn")); + this.getSpellAbility().addEffect(new UntapTargetEffect("Untap it")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + private PillarLaunch(final PillarLaunch card) { + super(card); + } + + @Override + public PillarLaunch copy() { + return new PillarLaunch(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PurplePentapus.java b/Mage.Sets/src/mage/cards/p/PurplePentapus.java new file mode 100644 index 00000000000..54cbd6152fd --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PurplePentapus.java @@ -0,0 +1,52 @@ +package mage.cards.p; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.abilities.effects.keyword.SurveilEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PurplePentapus extends CardImpl { + + public PurplePentapus(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + + this.subtype.add(SubType.OCTOPUS); + this.subtype.add(SubType.STARFISH); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When this creature enters, surveil 1. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SurveilEffect(1))); + + // {2}{B}, Tap an untapped creature you control: Return this card from your graveyard to the battlefield tapped. + Ability ability = new SimpleActivatedAbility( + Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new ManaCostsImpl<>("{2}{B}") + ); + ability.addCost(new TapTargetCost(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE)); + this.addAbility(ability); + } + + private PurplePentapus(final PurplePentapus card) { + super(card); + } + + @Override + public PurplePentapus copy() { + return new PurplePentapus(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RabarooTroop.java b/Mage.Sets/src/mage/cards/r/RabarooTroop.java new file mode 100644 index 00000000000..e62ca233ca2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RabarooTroop.java @@ -0,0 +1,49 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LandfallAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.PlainscyclingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RabarooTroop extends CardImpl { + + public RabarooTroop(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + + this.subtype.add(SubType.RABBIT); + this.subtype.add(SubType.KANGAROO); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Landfall -- Whenever a land you control enters, this creature gains flying until end of turn and you gain 1 life. + Ability ability = new LandfallAbility(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn)); + ability.addEffect(new GainLifeEffect(1).concatBy("and")); + this.addAbility(ability); + + // Plainscycling {2} + this.addAbility(new PlainscyclingAbility(new ManaCostsImpl<>("{2}"))); + } + + private RabarooTroop(final RabarooTroop card) { + super(card); + } + + @Override + public RabarooTroop copy() { + return new RabarooTroop(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RaucousAudience.java b/Mage.Sets/src/mage/cards/r/RaucousAudience.java new file mode 100644 index 00000000000..70ea6650c62 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RaucousAudience.java @@ -0,0 +1,46 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.Mana; +import mage.abilities.condition.common.FerociousCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalManaEffect; +import mage.abilities.effects.mana.BasicManaEffect; +import mage.abilities.hint.common.FerociousHint; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RaucousAudience extends CardImpl { + + public RaucousAudience(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CITIZEN); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // {T}: Add {G}. If you control a creature with power 4 or greater, add {G}{G} instead. + this.addAbility(new SimpleManaAbility(new ConditionalManaEffect( + new BasicManaEffect(Mana.GreenMana(2)), new BasicManaEffect(Mana.GreenMana(1)), + FerociousCondition.instance, "Add {G}. If you control a creature with power 4 or greater, add {G}{G} instead." + ), new TapSourceCost()).addHint(FerociousHint.instance)); + } + + private RaucousAudience(final RaucousAudience card) { + super(card); + } + + @Override + public RaucousAudience copy() { + return new RaucousAudience(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RebelliousCaptives.java b/Mage.Sets/src/mage/cards/r/RebelliousCaptives.java new file mode 100644 index 00000000000..bfb736d6453 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RebelliousCaptives.java @@ -0,0 +1,49 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.keyword.EarthbendTargetEffect; +import mage.abilities.keyword.ExhaustAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.target.common.TargetControlledLandPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RebelliousCaptives extends CardImpl { + + public RebelliousCaptives(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PEASANT); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Exhaust -- {6}: Put two +1/+1 counters on this creature, then earthbend 2. + Ability ability = new ExhaustAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), new GenericManaCost(6) + ); + ability.addEffect(new EarthbendTargetEffect(2).concatBy(", then")); + ability.addTarget(new TargetControlledLandPermanent()); + this.addAbility(ability); + } + + private RebelliousCaptives(final RebelliousCaptives card) { + super(card); + } + + @Override + public RebelliousCaptives copy() { + return new RebelliousCaptives(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RockyRebuke.java b/Mage.Sets/src/mage/cards/r/RockyRebuke.java new file mode 100644 index 00000000000..799d43f7b6c --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RockyRebuke.java @@ -0,0 +1,34 @@ +package mage.cards.r; + +import mage.abilities.effects.common.DamageWithPowerFromOneToAnotherTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetOpponentsCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RockyRebuke extends CardImpl { + + public RockyRebuke(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); + + // Target creature you control deals damage equal to its power to target creature an opponent controls. + this.getSpellAbility().addEffect(new DamageWithPowerFromOneToAnotherTargetEffect()); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent()); + } + + private RockyRebuke(final RockyRebuke card) { + super(card); + } + + @Override + public RockyRebuke copy() { + return new RockyRebuke(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RokusMastery.java b/Mage.Sets/src/mage/cards/r/RokusMastery.java new file mode 100644 index 00000000000..628368354f8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RokusMastery.java @@ -0,0 +1,50 @@ +package mage.cards.r; + +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.dynamicvalue.common.GetXValue; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.Game; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RokusMastery extends CardImpl { + + public RokusMastery(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{R}{R}"); + + // Roku's Mastery deals X damage to target creature. If X is 4 or greater, scry 2. + this.getSpellAbility().addEffect(new DamageTargetEffect(GetXValue.instance)); + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new ScryEffect(2), RokusMasteryCondition.instance, "If X is 4 or greater, scry 2" + )); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + private RokusMastery(final RokusMastery card) { + super(card); + } + + @Override + public RokusMastery copy() { + return new RokusMastery(this); + } +} + +enum RokusMasteryCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + return GetXValue.instance.calculate(game, source, null) >= 4; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RoughRhinoCavalry.java b/Mage.Sets/src/mage/cards/r/RoughRhinoCavalry.java new file mode 100644 index 00000000000..77b3f745b3a --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RoughRhinoCavalry.java @@ -0,0 +1,54 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.ExhaustAbility; +import mage.abilities.keyword.FirebendingAbility; +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.counters.CounterType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RoughRhinoCavalry extends CardImpl { + + public RoughRhinoCavalry(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MERCENARY); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Firebending 2 + this.addAbility(new FirebendingAbility(2)); + + // Exhaust -- {8}: Put two +1/+1 counters on this creature. It gains trample until end of turn. + Ability ability = new ExhaustAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), new GenericManaCost(8) + ); + ability.addEffect(new GainAbilitySourceEffect( + TrampleAbility.getInstance(), Duration.EndOfTurn + ).setText("It gains trample until end of turn")); + this.addAbility(ability); + } + + private RoughRhinoCavalry(final RoughRhinoCavalry card) { + super(card); + } + + @Override + public RoughRhinoCavalry copy() { + return new RoughRhinoCavalry(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RowdySnowballers.java b/Mage.Sets/src/mage/cards/r/RowdySnowballers.java new file mode 100644 index 00000000000..c6651fc17c5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RowdySnowballers.java @@ -0,0 +1,46 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.target.common.TargetOpponentsCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RowdySnowballers extends CardImpl { + + public RowdySnowballers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PEASANT); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When this creature enters, tap target creature an opponent controls and put a stun counter on it. + Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect()); + ability.addEffect(new AddCountersTargetEffect(CounterType.STUN.createInstance()).setText("and put a stun counter on it")); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + } + + private RowdySnowballers(final RowdySnowballers card) { + super(card); + } + + @Override + public RowdySnowballers copy() { + return new RowdySnowballers(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SeismicTutelage.java b/Mage.Sets/src/mage/cards/s/SeismicTutelage.java new file mode 100644 index 00000000000..c93c4e06f2c --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SeismicTutelage.java @@ -0,0 +1,54 @@ +package mage.cards.s; + +import mage.abilities.common.AttacksAttachedTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DoubleCountersTargetEffect; +import mage.abilities.effects.common.counter.AddCountersAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.counters.CounterType; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SeismicTutelage extends CardImpl { + + public SeismicTutelage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget)); + + // When this Aura enters, put a +1/+1 counter on enchanted creature. + this.addAbility(new EntersBattlefieldTriggeredAbility( + new AddCountersAttachedEffect(CounterType.P1P1.createInstance(), "enchanted creature") + )); + + // Whenever enchanted creature attacks, double the number of +1/+1 counters on it. + this.addAbility(new AttacksAttachedTriggeredAbility( + new DoubleCountersTargetEffect(CounterType.P1P1), + AttachmentType.AURA, false, SetTargetPointer.PERMANENT + )); + } + + private SeismicTutelage(final SeismicTutelage card) { + super(card); + } + + @Override + public SeismicTutelage copy() { + return new SeismicTutelage(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SleddingOtterPenguin.java b/Mage.Sets/src/mage/cards/s/SleddingOtterPenguin.java new file mode 100644 index 00000000000..bc1cd5a5f5e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SleddingOtterPenguin.java @@ -0,0 +1,42 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SleddingOtterPenguin extends CardImpl { + + public SleddingOtterPenguin(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.OTTER); + this.subtype.add(SubType.BIRD); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {3}: Put a +1/+1 counter on this creature. + this.addAbility(new SimpleActivatedAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new GenericManaCost(3) + )); + } + + private SleddingOtterPenguin(final SleddingOtterPenguin card) { + super(card); + } + + @Override + public SleddingOtterPenguin copy() { + return new SleddingOtterPenguin(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SokkaWolfCovesProtector.java b/Mage.Sets/src/mage/cards/s/SokkaWolfCovesProtector.java new file mode 100644 index 00000000000..378da070f96 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SokkaWolfCovesProtector.java @@ -0,0 +1,40 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SokkaWolfCovesProtector extends CardImpl { + + public SokkaWolfCovesProtector(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + } + + private SokkaWolfCovesProtector(final SokkaWolfCovesProtector card) { + super(card); + } + + @Override + public SokkaWolfCovesProtector copy() { + return new SokkaWolfCovesProtector(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SukiKyoshiWarrior.java b/Mage.Sets/src/mage/cards/s/SukiKyoshiWarrior.java new file mode 100644 index 00000000000..b5db8835d9b --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SukiKyoshiWarrior.java @@ -0,0 +1,49 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.CreaturesYouControlCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.game.permanent.token.AllyToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SukiKyoshiWarrior extends CardImpl { + + public SukiKyoshiWarrior(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G/W}{G/W}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Suki's power is equal to the number of creatures you control. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerSourceEffect(CreaturesYouControlCount.PLURAL))); + + // Whenever Suki attacks, create a 1/1 white Ally creature token that's tapped and attacking. + this.addAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new AllyToken(), 1, true, true))); + } + + private SukiKyoshiWarrior(final SukiKyoshiWarrior card) { + super(card); + } + + @Override + public SukiKyoshiWarrior copy() { + return new SukiKyoshiWarrior(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TophTheBlindBandit.java b/Mage.Sets/src/mage/cards/t/TophTheBlindBandit.java new file mode 100644 index 00000000000..ccea918c260 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TophTheBlindBandit.java @@ -0,0 +1,98 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect; +import mage.abilities.effects.keyword.EarthbendTargetEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.target.common.TargetControlledLandPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TophTheBlindBandit extends CardImpl { + + public TophTheBlindBandit(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.ALLY); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // When Toph enters, earthbend 2. + Ability ability = new EntersBattlefieldTriggeredAbility(new EarthbendTargetEffect(2)); + ability.addTarget(new TargetControlledLandPermanent()); + this.addAbility(ability); + + // Toph's power is equal to the number of +1/+1 counters on lands you control. + this.addAbility(new SimpleStaticAbility( + Zone.ALL, new SetBasePowerSourceEffect(TophTheBlindBanditValue.instance) + ).addHint(TophTheBlindBanditValue.getHint())); + } + + private TophTheBlindBandit(final TophTheBlindBandit card) { + super(card); + } + + @Override + public TophTheBlindBandit copy() { + return new TophTheBlindBandit(this); + } +} + +enum TophTheBlindBanditValue implements DynamicValue { + instance; + private static final Hint hint = new ValueHint("+1/+1 counters on lands you control", instance); + + public static Hint getHint() { + return hint; + } + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + return game + .getBattlefield() + .getActivePermanents( + StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND, + sourceAbility.getControllerId(), sourceAbility, game + ) + .stream() + .map(permanent -> permanent.getCounters(game)) + .mapToInt(counters -> counters.getCount(CounterType.P1P1)) + .sum(); + } + + @Override + public TophTheBlindBanditValue copy() { + return this; + } + + @Override + public String getMessage() { + return "+1/+1 counters on lands you control"; + } + + @Override + public String toString() { + return "1"; + } +} diff --git a/Mage.Sets/src/mage/cards/t/TophTheFirstMetalbender.java b/Mage.Sets/src/mage/cards/t/TophTheFirstMetalbender.java index bb8cb053c15..480c7237efd 100644 --- a/Mage.Sets/src/mage/cards/t/TophTheFirstMetalbender.java +++ b/Mage.Sets/src/mage/cards/t/TophTheFirstMetalbender.java @@ -10,12 +10,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.FilterPermanent; -import mage.filter.StaticFilters; import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.predicate.permanent.TokenPredicate; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.target.TargetPermanent; +import mage.target.common.TargetControlledLandPermanent; import java.util.UUID; @@ -39,7 +38,7 @@ public final class TophTheFirstMetalbender extends CardImpl { // At the beginning of your end step, earthbend 2. Ability ability = new BeginningOfEndStepTriggeredAbility(new EarthbendTargetEffect(2)); - ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND)); + ability.addTarget(new TargetControlledLandPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TopographyTracker.java b/Mage.Sets/src/mage/cards/t/TopographyTracker.java index d404986ae14..50d92e42044 100644 --- a/Mage.Sets/src/mage/cards/t/TopographyTracker.java +++ b/Mage.Sets/src/mage/cards/t/TopographyTracker.java @@ -1,26 +1,26 @@ package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.common.CreateTokenEffect; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.SubType; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; import mage.game.Game; import mage.game.events.ExploreEvent; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.game.permanent.token.MapToken; +import java.util.UUID; + /** - * * @author Grath */ public final class TopographyTracker extends CardImpl { @@ -74,7 +74,7 @@ class TopographyTrackerEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - return permanent != null && permanent.isControlledBy(event.getPlayerId()); + return permanent != null && permanent.isControlledBy(source.getControllerId()); } @Override @@ -83,4 +83,4 @@ class TopographyTrackerEffect extends ReplacementEffectImpl { exploreEvent.doubleExplores(); return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/t/TurtleDuck.java b/Mage.Sets/src/mage/cards/t/TurtleDuck.java new file mode 100644 index 00000000000..a111f047c40 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TurtleDuck.java @@ -0,0 +1,48 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect; +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 java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TurtleDuck extends CardImpl { + + public TurtleDuck(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); + + this.subtype.add(SubType.TURTLE); + this.subtype.add(SubType.BIRD); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // {3}: Until end of turn, this creature has base power 4 and gains trample. + Ability ability = new SimpleActivatedAbility(new SetBasePowerSourceEffect(4, Duration.EndOfTurn) + .setText("until end of turn, this creature has base power 4"), new GenericManaCost(3)); + ability.addEffect(new GainAbilitySourceEffect( + TrampleAbility.getInstance(), Duration.EndOfTurn + ).setText("and gains trample")); + this.addAbility(ability); + } + + private TurtleDuck(final TurtleDuck card) { + super(card); + } + + @Override + public TurtleDuck copy() { + return new TurtleDuck(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TurtleSeals.java b/Mage.Sets/src/mage/cards/t/TurtleSeals.java new file mode 100644 index 00000000000..ca402fa8aa1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TurtleSeals.java @@ -0,0 +1,37 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TurtleSeals extends CardImpl { + + public TurtleSeals(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.TURTLE); + this.subtype.add(SubType.SEAL); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + } + + private TurtleSeals(final TurtleSeals card) { + super(card); + } + + @Override + public TurtleSeals copy() { + return new TurtleSeals(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VindictiveWarden.java b/Mage.Sets/src/mage/cards/v/VindictiveWarden.java new file mode 100644 index 00000000000..ac86ef51529 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VindictiveWarden.java @@ -0,0 +1,50 @@ +package mage.cards.v; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.keyword.FirebendingAbility; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class VindictiveWarden extends CardImpl { + + public VindictiveWarden(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B/R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Menace + this.addAbility(new MenaceAbility()); + + // Firebending 1 + this.addAbility(new FirebendingAbility(1)); + + // {3}: This creature deals 1 damage to each opponent. + this.addAbility(new SimpleActivatedAbility( + new DamagePlayersEffect(1, TargetController.OPPONENT), new GenericManaCost(3) + )); + } + + private VindictiveWarden(final VindictiveWarden card) { + super(card); + } + + @Override + public VindictiveWarden copy() { + return new VindictiveWarden(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WarshipScout.java b/Mage.Sets/src/mage/cards/w/WarshipScout.java new file mode 100644 index 00000000000..3aed4831ebd --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WarshipScout.java @@ -0,0 +1,33 @@ +package mage.cards.w; + +import mage.MageInt; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class WarshipScout extends CardImpl { + + public WarshipScout(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SCOUT); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + } + + private WarshipScout(final WarshipScout card) { + super(card); + } + + @Override + public WarshipScout copy() { + return new WarshipScout(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WaterbendingLesson.java b/Mage.Sets/src/mage/cards/w/WaterbendingLesson.java new file mode 100644 index 00000000000..7d41f6b534e --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WaterbendingLesson.java @@ -0,0 +1,40 @@ +package mage.cards.w; + +import mage.abilities.costs.common.WaterbendCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.discard.DiscardControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class WaterbendingLesson extends CardImpl { + + public WaterbendingLesson(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}"); + + this.subtype.add(SubType.LESSON); + + // Draw three cards. Then discard a card unless you waterbend {2}. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(3)); + this.getSpellAbility().addEffect(new DoIfCostPaid( + null, new DiscardControllerEffect(1), + new WaterbendCost(2).setText("waterbend {2} instead of discarding a card") + ).setText("Then discard a card unless you waterbend {2}")); + } + + private WaterbendingLesson(final WaterbendingLesson card) { + super(card); + } + + @Override + public WaterbendingLesson copy() { + return new WaterbendingLesson(this); + } +} diff --git a/Mage.Sets/src/mage/cards/w/WateryGrasp.java b/Mage.Sets/src/mage/cards/w/WateryGrasp.java new file mode 100644 index 00000000000..288b5062f29 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WateryGrasp.java @@ -0,0 +1,87 @@ +package mage.cards.w; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.WaterbendCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.Optional; +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class WateryGrasp extends CardImpl { + + public WateryGrasp(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget)); + + // Enchanted creature doesn't untap during its controller's untap step. + this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepEnchantedEffect())); + + // Waterbend {5}: Enchanted creature's owner shuffles it into their library. + this.addAbility(new SimpleActivatedAbility(new WateryGraspEffect(), new WaterbendCost(5))); + } + + private WateryGrasp(final WateryGrasp card) { + super(card); + } + + @Override + public WateryGrasp copy() { + return new WateryGrasp(this); + } +} + +class WateryGraspEffect extends OneShotEffect { + + WateryGraspEffect() { + super(Outcome.Benefit); + staticText = "enchanted creature's owner shuffles it into their library"; + } + + private WateryGraspEffect(final WateryGraspEffect effect) { + super(effect); + } + + @Override + public WateryGraspEffect copy() { + return new WateryGraspEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = Optional + .ofNullable(source.getSourcePermanentOrLKI(game)) + .map(Permanent::getAttachedTo) + .map(game::getPermanent) + .orElse(null); + if (permanent == null) { + return false; + } + Player player = game.getPlayer(permanent.getOwnerId()); + return player != null && player.shuffleCardsToLibrary(permanent, game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/z/ZukoAvatarHunter.java b/Mage.Sets/src/mage/cards/z/ZukoAvatarHunter.java new file mode 100644 index 00000000000..a8867db8960 --- /dev/null +++ b/Mage.Sets/src/mage/cards/z/ZukoAvatarHunter.java @@ -0,0 +1,56 @@ +package mage.cards.z; + +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.permanent.token.SoldierRedToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ZukoAvatarHunter extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a red spell"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + public ZukoAvatarHunter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.NOBLE); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // Whenever you cast a red spell, create a 2/2 red Soldier creature token. + this.addAbility(new SpellCastControllerTriggeredAbility( + new CreateTokenEffect(new SoldierRedToken()), filter, false + )); + } + + private ZukoAvatarHunter(final ZukoAvatarHunter card) { + super(card); + } + + @Override + public ZukoAvatarHunter copy() { + return new ZukoAvatarHunter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java b/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java index 2362c1b005b..363d71b4765 100644 --- a/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java +++ b/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java @@ -42,6 +42,7 @@ public final class AvatarTheLastAirbender extends ExpansionSet { cards.add(new SetCardInfo("Barrels of Blasting Jelly", 254, Rarity.COMMON, mage.cards.b.BarrelsOfBlastingJelly.class)); cards.add(new SetCardInfo("Beetle-Headed Merchants", 86, Rarity.COMMON, mage.cards.b.BeetleHeadedMerchants.class)); cards.add(new SetCardInfo("Bender's Waterskin", 255, Rarity.COMMON, mage.cards.b.BendersWaterskin.class)); + cards.add(new SetCardInfo("Buzzard-Wasp Colony", 88, Rarity.UNCOMMON, mage.cards.b.BuzzardWaspColony.class)); cards.add(new SetCardInfo("Cat-Gator", 91, Rarity.UNCOMMON, mage.cards.c.CatGator.class)); cards.add(new SetCardInfo("Cat-Owl", 212, Rarity.COMMON, mage.cards.c.CatOwl.class)); cards.add(new SetCardInfo("Corrupt Court Official", 92, Rarity.COMMON, mage.cards.c.CorruptCourtOfficial.class)); @@ -57,34 +58,65 @@ public final class AvatarTheLastAirbender extends ExpansionSet { cards.add(new SetCardInfo("Fire Lord Zuko", 221, Rarity.RARE, mage.cards.f.FireLordZuko.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Fire Lord Zuko", 360, Rarity.RARE, mage.cards.f.FireLordZuko.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Fire Nation Attacks", 133, Rarity.UNCOMMON, mage.cards.f.FireNationAttacks.class)); + cards.add(new SetCardInfo("Fire Nation Engineer", 99, Rarity.UNCOMMON, mage.cards.f.FireNationEngineer.class)); + cards.add(new SetCardInfo("Fire Sages", 136, Rarity.UNCOMMON, mage.cards.f.FireSages.class)); + cards.add(new SetCardInfo("First-Time Flyer", 49, Rarity.COMMON, mage.cards.f.FirstTimeFlyer.class)); + cards.add(new SetCardInfo("Flexible Waterbender", 50, Rarity.COMMON, mage.cards.f.FlexibleWaterbender.class)); + cards.add(new SetCardInfo("Flopsie, Bumi's Buddy", 179, Rarity.UNCOMMON, mage.cards.f.FlopsieBumisBuddy.class)); cards.add(new SetCardInfo("Forest", 291, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); + cards.add(new SetCardInfo("Geyser Leaper", 52, Rarity.COMMON, mage.cards.g.GeyserLeaper.class)); + cards.add(new SetCardInfo("Giant Koi", 53, Rarity.COMMON, mage.cards.g.GiantKoi.class)); cards.add(new SetCardInfo("Glider Kids", 21, Rarity.COMMON, mage.cards.g.GliderKids.class)); cards.add(new SetCardInfo("Haru, Hidden Talent", 182, Rarity.UNCOMMON, mage.cards.h.HaruHiddenTalent.class)); cards.add(new SetCardInfo("Heartless Act", 103, Rarity.UNCOMMON, mage.cards.h.HeartlessAct.class)); + cards.add(new SetCardInfo("Hei Bai, Spirit of Balance", 225, Rarity.UNCOMMON, mage.cards.h.HeiBaiSpiritOfBalance.class)); + cards.add(new SetCardInfo("Hog-Monkey", 104, Rarity.COMMON, mage.cards.h.HogMonkey.class)); cards.add(new SetCardInfo("Iguana Parrot", 56, Rarity.COMMON, mage.cards.i.IguanaParrot.class)); cards.add(new SetCardInfo("Island", 288, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("It'll Quench Ya!", 58, Rarity.COMMON, mage.cards.i.ItllQuenchYa.class)); + cards.add(new SetCardInfo("Jeong Jeong's Deserters", 25, Rarity.COMMON, mage.cards.j.JeongJeongsDeserters.class)); + cards.add(new SetCardInfo("Katara, Bending Prodigy", 59, Rarity.UNCOMMON, mage.cards.k.KataraBendingProdigy.class)); cards.add(new SetCardInfo("Katara, Water Tribe's Hope", 231, Rarity.RARE, mage.cards.k.KataraWaterTribesHope.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Katara, Water Tribe's Hope", 351, Rarity.RARE, mage.cards.k.KataraWaterTribesHope.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Katara, the Fearless", 230, Rarity.RARE, mage.cards.k.KataraTheFearless.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Katara, the Fearless", 350, Rarity.RARE, mage.cards.k.KataraTheFearless.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Katara, the Fearless", 361, Rarity.RARE, mage.cards.k.KataraTheFearless.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Lightning Strike", 146, Rarity.COMMON, mage.cards.l.LightningStrike.class)); + cards.add(new SetCardInfo("Master Pakku", 63, Rarity.UNCOMMON, mage.cards.m.MasterPakku.class)); + cards.add(new SetCardInfo("Master Piandao", 28, Rarity.UNCOMMON, mage.cards.m.MasterPiandao.class)); + cards.add(new SetCardInfo("Merchant of Many Hats", 110, Rarity.COMMON, mage.cards.m.MerchantOfManyHats.class)); + cards.add(new SetCardInfo("Mongoose Lizard", 148, Rarity.COMMON, mage.cards.m.MongooseLizard.class)); cards.add(new SetCardInfo("Mountain", 290, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS)); + cards.add(new SetCardInfo("Ostrich-Horse", 188, Rarity.COMMON, mage.cards.o.OstrichHorse.class)); + cards.add(new SetCardInfo("Otter-Penguin", 67, Rarity.COMMON, mage.cards.o.OtterPenguin.class)); cards.add(new SetCardInfo("Ozai's Cruelty", 113, Rarity.UNCOMMON, mage.cards.o.OzaisCruelty.class)); + cards.add(new SetCardInfo("Path to Redemption", 31, Rarity.COMMON, mage.cards.p.PathToRedemption.class)); + cards.add(new SetCardInfo("Pillar Launch", 189, Rarity.COMMON, mage.cards.p.PillarLaunch.class)); cards.add(new SetCardInfo("Plains", 287, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Pretending Poxbearers", 237, Rarity.COMMON, mage.cards.p.PretendingPoxbearers.class)); + cards.add(new SetCardInfo("Rabaroo Troop", 32, Rarity.COMMON, mage.cards.r.RabarooTroop.class)); + cards.add(new SetCardInfo("Raucous Audience", 190, Rarity.COMMON, mage.cards.r.RaucousAudience.class)); + cards.add(new SetCardInfo("Rebellious Captives", 191, Rarity.COMMON, mage.cards.r.RebelliousCaptives.class)); cards.add(new SetCardInfo("Redirect Lightning", 151, Rarity.RARE, mage.cards.r.RedirectLightning.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Redirect Lightning", 343, Rarity.RARE, mage.cards.r.RedirectLightning.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Rocky Rebuke", 193, Rarity.COMMON, mage.cards.r.RockyRebuke.class)); + cards.add(new SetCardInfo("Rough Rhino Cavalry", 152, Rarity.COMMON, mage.cards.r.RoughRhinoCavalry.class)); + cards.add(new SetCardInfo("Rowdy Snowballers", 68, Rarity.COMMON, mage.cards.r.RowdySnowballers.class)); cards.add(new SetCardInfo("Saber-Tooth Moose-Lion", 194, Rarity.COMMON, mage.cards.s.SaberToothMooseLion.class)); cards.add(new SetCardInfo("Sokka's Haiku", 71, Rarity.UNCOMMON, mage.cards.s.SokkasHaiku.class)); cards.add(new SetCardInfo("Sokka, Bold Boomeranger", 240, Rarity.RARE, mage.cards.s.SokkaBoldBoomeranger.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sokka, Bold Boomeranger", 383, Rarity.RARE, mage.cards.s.SokkaBoldBoomeranger.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Southern Air Temple", 36, Rarity.UNCOMMON, mage.cards.s.SouthernAirTemple.class)); + cards.add(new SetCardInfo("Suki, Kyoshi Warrior", 243, Rarity.UNCOMMON, mage.cards.s.SukiKyoshiWarrior.class)); cards.add(new SetCardInfo("Swamp", 289, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS)); + cards.add(new SetCardInfo("Toph, the Blind Bandit", 198, Rarity.UNCOMMON, mage.cards.t.TophTheBlindBandit.class)); cards.add(new SetCardInfo("Toph, the First Metalbender", 247, Rarity.RARE, mage.cards.t.TophTheFirstMetalbender.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Toph, the First Metalbender", 353, Rarity.RARE, mage.cards.t.TophTheFirstMetalbender.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Toph, the First Metalbender", 362, Rarity.RARE, mage.cards.t.TophTheFirstMetalbender.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Turtle-Duck", 200, Rarity.COMMON, mage.cards.t.TurtleDuck.class)); + cards.add(new SetCardInfo("Vindictive Warden", 249, Rarity.COMMON, mage.cards.v.VindictiveWarden.class)); + cards.add(new SetCardInfo("Waterbending Lesson", 80, Rarity.COMMON, mage.cards.w.WaterbendingLesson.class)); + cards.add(new SetCardInfo("Watery Grasp", 82, Rarity.COMMON, mage.cards.w.WateryGrasp.class)); cards.add(new SetCardInfo("Yue, the Moon Spirit", 338, Rarity.RARE, mage.cards.y.YueTheMoonSpirit.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Yue, the Moon Spirit", 83, Rarity.RARE, mage.cards.y.YueTheMoonSpirit.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Yuyan Archers", 161, Rarity.COMMON, mage.cards.y.YuyanArchers.class)); diff --git a/Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java b/Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java index ad994b23881..877f0be8ad6 100644 --- a/Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java +++ b/Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java @@ -36,16 +36,39 @@ public final class AvatarTheLastAirbenderEternal extends ExpansionSet { cards.add(new SetCardInfo("Capital Guard", 234, Rarity.COMMON, mage.cards.c.CapitalGuard.class)); cards.add(new SetCardInfo("Deny Entry", 222, Rarity.COMMON, mage.cards.d.DenyEntry.class)); cards.add(new SetCardInfo("Dragon Moose", 235, Rarity.COMMON, mage.cards.d.DragonMoose.class)); + cards.add(new SetCardInfo("Earthbending Student", 249, Rarity.UNCOMMON, mage.cards.e.EarthbendingStudent.class)); cards.add(new SetCardInfo("Eel-Hounds", 250, Rarity.UNCOMMON, mage.cards.e.EelHounds.class)); cards.add(new SetCardInfo("Elephant-Rat", 228, Rarity.COMMON, mage.cards.e.ElephantRat.class)); cards.add(new SetCardInfo("Explore", 259, Rarity.COMMON, mage.cards.e.Explore.class)); cards.add(new SetCardInfo("Explosive Shot", 236, Rarity.COMMON, mage.cards.e.ExplosiveShot.class)); cards.add(new SetCardInfo("Feed the Swarm", 257, Rarity.COMMON, mage.cards.f.FeedTheSwarm.class)); cards.add(new SetCardInfo("Fire Nation Ambushers", 229, Rarity.COMMON, mage.cards.f.FireNationAmbushers.class)); + cards.add(new SetCardInfo("Fire Nation Archers", 237, Rarity.RARE, mage.cards.f.FireNationArchers.class)); + cards.add(new SetCardInfo("Fire Nation Sentinels", 230, Rarity.RARE, mage.cards.f.FireNationSentinels.class)); cards.add(new SetCardInfo("Fire Nation Soldier", 238, Rarity.COMMON, mage.cards.f.FireNationSoldier.class)); + cards.add(new SetCardInfo("Fire Nation's Conquest", 239, Rarity.UNCOMMON, mage.cards.f.FireNationsConquest.class)); + cards.add(new SetCardInfo("Flying Dolphin-Fish", 223, Rarity.COMMON, mage.cards.f.FlyingDolphinFish.class)); cards.add(new SetCardInfo("Force of Negation", 13, Rarity.MYTHIC, mage.cards.f.ForceOfNegation.class)); + cards.add(new SetCardInfo("Frog-Squirrels", 251, Rarity.COMMON, mage.cards.f.FrogSquirrels.class)); + cards.add(new SetCardInfo("Gilacorn", 231, Rarity.COMMON, mage.cards.g.Gilacorn.class)); + cards.add(new SetCardInfo("Hippo-Cows", 252, Rarity.COMMON, mage.cards.h.HippoCows.class)); + cards.add(new SetCardInfo("Iroh, Firebending Instructor", 240, Rarity.UNCOMMON, mage.cards.i.IrohFirebendingInstructor.class)); + cards.add(new SetCardInfo("Katara, Heroic Healer", 215, Rarity.UNCOMMON, mage.cards.k.KataraHeroicHealer.class)); cards.add(new SetCardInfo("Katara, Waterbending Master", 93, Rarity.MYTHIC, mage.cards.k.KataraWaterbendingMaster.class)); + cards.add(new SetCardInfo("Komodo Rhino", 241, Rarity.COMMON, mage.cards.k.KomodoRhino.class)); + cards.add(new SetCardInfo("Kyoshi Warrior Guard", 216, Rarity.COMMON, mage.cards.k.KyoshiWarriorGuard.class)); + cards.add(new SetCardInfo("Lion Vulture", 232, Rarity.RARE, mage.cards.l.LionVulture.class)); + cards.add(new SetCardInfo("Lost in the Spirit World", 224, Rarity.UNCOMMON, mage.cards.l.LostInTheSpiritWorld.class)); + cards.add(new SetCardInfo("Loyal Fire Sage", 242, Rarity.UNCOMMON, mage.cards.l.LoyalFireSage.class)); + cards.add(new SetCardInfo("Match the Odds", 253, Rarity.UNCOMMON, mage.cards.m.MatchTheOdds.class)); + cards.add(new SetCardInfo("Mechanical Glider", 256, Rarity.COMMON, mage.cards.m.MechanicalGlider.class)); + cards.add(new SetCardInfo("Momo, Rambunctious Rascal", 217, Rarity.UNCOMMON, mage.cards.m.MomoRambunctiousRascal.class)); + cards.add(new SetCardInfo("Purple Pentapus", 233, Rarity.COMMON, mage.cards.p.PurplePentapus.class)); + cards.add(new SetCardInfo("Roku's Mastery", 243, Rarity.UNCOMMON, mage.cards.r.RokusMastery.class)); cards.add(new SetCardInfo("Run Amok", 258, Rarity.COMMON, mage.cards.r.RunAmok.class)); + cards.add(new SetCardInfo("Seismic Tutelage", 254, Rarity.RARE, mage.cards.s.SeismicTutelage.class)); + cards.add(new SetCardInfo("Sledding Otter-Penguin", 218, Rarity.COMMON, mage.cards.s.SleddingOtterPenguin.class)); + cards.add(new SetCardInfo("Sokka, Wolf Cove's Protector", 219, Rarity.UNCOMMON, mage.cards.s.SokkaWolfCovesProtector.class)); cards.add(new SetCardInfo("The Cabbage Merchant", 134, Rarity.RARE, mage.cards.t.TheCabbageMerchant.class)); cards.add(new SetCardInfo("The Great Henge", 41, Rarity.MYTHIC, mage.cards.t.TheGreatHenge.class)); cards.add(new SetCardInfo("The Terror of Serpent's Pass", 225, Rarity.RARE, mage.cards.t.TheTerrorOfSerpentsPass.class)); @@ -55,10 +78,13 @@ public final class AvatarTheLastAirbenderEternal extends ExpansionSet { cards.add(new SetCardInfo("Thriving Isle", 263, Rarity.COMMON, mage.cards.t.ThrivingIsle.class)); cards.add(new SetCardInfo("Thriving Moor", 264, Rarity.COMMON, mage.cards.t.ThrivingMoor.class)); cards.add(new SetCardInfo("Tundra Wall", 220, Rarity.COMMON, mage.cards.t.TundraWall.class)); + cards.add(new SetCardInfo("Turtle-Seals", 226, Rarity.COMMON, mage.cards.t.TurtleSeals.class)); + cards.add(new SetCardInfo("Warship Scout", 244, Rarity.COMMON, mage.cards.w.WarshipScout.class)); cards.add(new SetCardInfo("Water Whip", 227, Rarity.RARE, mage.cards.w.WaterWhip.class)); cards.add(new SetCardInfo("Wolf Cove Villager", 221, Rarity.COMMON, mage.cards.w.WolfCoveVillager.class)); cards.add(new SetCardInfo("Zhao, the Seething Flame", 245, Rarity.UNCOMMON, mage.cards.z.ZhaoTheSeethingFlame.class)); cards.add(new SetCardInfo("Zuko's Offense", 247, Rarity.COMMON, mage.cards.z.ZukosOffense.class)); + cards.add(new SetCardInfo("Zuko, Avatar Hunter", 246, Rarity.RARE, mage.cards.z.ZukoAvatarHunter.class)); cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); } diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 53c9ecd2fe3..4e6b7ca361d 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -246,6 +246,7 @@ public enum SubType { JUGGERNAUT("Juggernaut", SubTypeSet.CreatureType), // K KALEESH("Kaleesh", SubTypeSet.CreatureType, true), // Star Wars + KANGAROO("Kangaroo", SubTypeSet.CreatureType), KAVU("Kavu", SubTypeSet.CreatureType), KELDOR("KelDor", SubTypeSet.CreatureType, true), KILLBOT("Killbot", SubTypeSet.CreatureType, true), // Unstable @@ -261,6 +262,7 @@ public enum SubType { LAMIA("Lamia", SubTypeSet.CreatureType), LAMMASU("Lammasu", SubTypeSet.CreatureType), LEECH("Leech", SubTypeSet.CreatureType), + LEMUR("Lemur", SubTypeSet.CreatureType), LEVIATHAN("Leviathan", SubTypeSet.CreatureType), LHURGOYF("Lhurgoyf", SubTypeSet.CreatureType), LICID("Licid", SubTypeSet.CreatureType), diff --git a/Mage/src/main/java/mage/game/permanent/token/SoldierRedToken.java b/Mage/src/main/java/mage/game/permanent/token/SoldierRedToken.java new file mode 100644 index 00000000000..3d6b5d3b400 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/SoldierRedToken.java @@ -0,0 +1,28 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class SoldierRedToken extends TokenImpl { + + public SoldierRedToken() { + super("Soldier Token", "2/2 red Soldier creature token"); + cardType.add(CardType.CREATURE); + color.setRed(true); + subtype.add(SubType.SOLDIER); + power = new MageInt(2); + toughness = new MageInt(2); + } + + private SoldierRedToken(final SoldierRedToken token) { + super(token); + } + + public SoldierRedToken copy() { + return new SoldierRedToken(this); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/SpiritWorldToken.java b/Mage/src/main/java/mage/game/permanent/token/SpiritWorldToken.java new file mode 100644 index 00000000000..b67361323db --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/SpiritWorldToken.java @@ -0,0 +1,44 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.abilities.effects.common.combat.CantBlockCreaturesSourceEffect; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; + +/** + * @author TheElk801 + */ +public final class SpiritWorldToken extends TokenImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(Predicates.not(SubType.SPIRIT.getPredicate())); + } + + public SpiritWorldToken() { + super("Spirit Token", "1/1 colorless Spirit creature token with \"This token can't block or be blocked by non-Spirit creatures.\""); + cardType.add(CardType.CREATURE); + subtype.add(SubType.SPIRIT); + power = new MageInt(1); + toughness = new MageInt(1); + + Ability ability = new SimpleStaticAbility(new CantBlockCreaturesSourceEffect(filter).setText("this token can't block")); + ability.addEffect(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield).setText("or be blocked by non-Spirit creatures")); + this.addAbility(ability); + } + + private SpiritWorldToken(final SpiritWorldToken token) { + super(token); + } + + public SpiritWorldToken copy() { + return new SpiritWorldToken(this); + } +} diff --git a/Mage/src/main/java/mage/target/common/TargetControlledLandPermanent.java b/Mage/src/main/java/mage/target/common/TargetControlledLandPermanent.java new file mode 100644 index 00000000000..6329c37bb9a --- /dev/null +++ b/Mage/src/main/java/mage/target/common/TargetControlledLandPermanent.java @@ -0,0 +1,30 @@ +package mage.target.common; + +import mage.filter.StaticFilters; + +/** + * @author TheElk801 + */ +public class TargetControlledLandPermanent extends TargetControlledPermanent { + + public TargetControlledLandPermanent() { + this(1); + } + + public TargetControlledLandPermanent(int numTargets) { + this(numTargets, numTargets); + } + + public TargetControlledLandPermanent(int minNumTargets, int maxNumTargets) { + super(minNumTargets, maxNumTargets, maxNumTargets > 1 ? StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS : StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND, false); + } + + protected TargetControlledLandPermanent(final TargetControlledLandPermanent target) { + super(target); + } + + @Override + public TargetControlledLandPermanent copy() { + return new TargetControlledLandPermanent(this); + } +} diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 902175316da..9c8920538a8 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -59780,7 +59780,7 @@ Haru, Hidden Talent|Avatar: The Last Airbender|182|U|{1}{G}|Legendary Creature - Ostrich-Horse|Avatar: The Last Airbender|188|C|{2}{G}|Creature - Bird Horse|3|1|When this creature enters, mill three cards. You may put a land card from among them into your hand. If you don't, put a +1/+1 counter on this creature.| Pillar Launch|Avatar: The Last Airbender|189|C|{G}|Instant|||Target creature gets +2/+2 and gains reach until end of turn. Untap it.| Raucous Audience|Avatar: The Last Airbender|190|C|{1}{G}|Creature - Human Citizen|2|1|{T}: Add {G}. If you control a creature with power 4 or greater, add {G}{G} instead.| -Rebellious Captives|Avatar: The Last Airbender|191|C|{1}{G}|Creature - Human Peasant Ally|2|2|Exhaust -- {G}: Put two +1/+1 counters on this creature, then earthbend 2.| +Rebellious Captives|Avatar: The Last Airbender|191|C|{1}{G}|Creature - Human Peasant Ally|2|2|Exhaust -- {6}: Put two +1/+1 counters on this creature, then earthbend 2.| Rocky Rebuke|Avatar: The Last Airbender|193|C|{1}{G}|Instant|||Target creature you control deals damage equal to its power to target creature an opponent controls.| Saber-Tooth Moose-Lion|Avatar: The Last Airbender|194|C|{4}{G}{G}|Creature - Elk Cat|7|7|Reach$Forestcycling {2}| Toph, the Blind Bandit|Avatar: The Last Airbender|198|U|{2}{G}|Legendary Creature - Human Warrior Ally|*|3|When Toph enters, earthbend 2.$Toph's power is equal to the number of +1/+1 counters on lands you control.|