diff --git a/Mage.Sets/src/mage/cards/b/BartzAndBoko.java b/Mage.Sets/src/mage/cards/b/BartzAndBoko.java new file mode 100644 index 00000000000..968359caf92 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BartzAndBoko.java @@ -0,0 +1,93 @@ +package mage.cards.b; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AffinityEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetOpponentsCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BartzAndBoko extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.BIRD, "Birds"); + private static final Hint hint = new ValueHint("Birds you control", new PermanentsOnBattlefieldCount(filter)); + + public BartzAndBoko(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.BIRD); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Affinity for Birds + this.addAbility(new SimpleStaticAbility(Zone.ALL, new AffinityEffect(filter)).setRuleAtTheTop(true).addHint(hint)); + + // When Bartz and Boko enters, each other Bird you control deals damage equal to its power to target creature an opponent controls. + Ability ability = new EntersBattlefieldTriggeredAbility(new BartzAndBokoEffect()); + ability.addTarget(new TargetOpponentsCreaturePermanent()); + this.addAbility(ability); + } + + private BartzAndBoko(final BartzAndBoko card) { + super(card); + } + + @Override + public BartzAndBoko copy() { + return new BartzAndBoko(this); + } +} + +class BartzAndBokoEffect extends OneShotEffect { + + private static final FilterPermanent filter = new FilterControlledPermanent(SubType.BIRD); + + static { + filter.add(AnotherPredicate.instance); + } + + BartzAndBokoEffect() { + super(Outcome.Benefit); + staticText = "each other Bird you control deals damage equal to its power to target creature an opponent controls"; + } + + private BartzAndBokoEffect(final BartzAndBokoEffect effect) { + super(effect); + } + + @Override + public BartzAndBokoEffect copy() { + return new BartzAndBokoEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (permanent == null) { + return false; + } + for (Permanent bird : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source, game)) { + permanent.damage(bird.getPower().getValue(), bird.getId(), source, game); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RinoaHeartilly.java b/Mage.Sets/src/mage/cards/r/RinoaHeartilly.java index c6f911ce47b..fe7bbf4609c 100644 --- a/Mage.Sets/src/mage/cards/r/RinoaHeartilly.java +++ b/Mage.Sets/src/mage/cards/r/RinoaHeartilly.java @@ -1,6 +1,5 @@ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; @@ -9,24 +8,25 @@ import mage.abilities.dynamicvalue.common.CreaturesYouControlCount; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.hint.common.CreaturesYouControlHint; -import mage.constants.SubType; -import mage.constants.SuperType; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; import mage.filter.StaticFilters; import mage.game.permanent.token.AngeloToken; import mage.target.TargetPermanent; +import java.util.UUID; + /** - * * @author TheElk801 */ public final class RinoaHeartilly extends CardImpl { public RinoaHeartilly(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{W}"); - + this.supertype.add(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.REBEL); @@ -38,9 +38,11 @@ public final class RinoaHeartilly extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new AngeloToken()))); // Angelo Cannon -- Whenever Rinoa Heartilly attacks, another target creature you control gets +1/+1 until end of turn for each creature you control. - Ability ability=new AttacksTriggeredAbility(new BoostTargetEffect( - CreaturesYouControlCount.instance,CreaturesYouControlCount.instance - ).setText("another target creature you control gets +1/+1 until end of turn for each creature you control"));ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));this.addAbility(ability.withFlavorWord("Angelo Cannon").addHint(CreaturesYouControlHint.instance)); + Ability ability = new AttacksTriggeredAbility(new BoostTargetEffect( + CreaturesYouControlCount.instance, CreaturesYouControlCount.instance + ).setText("another target creature you control gets +1/+1 until end of turn for each creature you control")); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL)); + this.addAbility(ability.withFlavorWord("Angelo Cannon").addHint(CreaturesYouControlHint.instance)); } private RinoaHeartilly(final RinoaHeartilly card) { diff --git a/Mage.Sets/src/mage/sets/FinalFantasy.java b/Mage.Sets/src/mage/sets/FinalFantasy.java index 25182ead58f..86faa30dd45 100644 --- a/Mage.Sets/src/mage/sets/FinalFantasy.java +++ b/Mage.Sets/src/mage/sets/FinalFantasy.java @@ -34,6 +34,8 @@ public final class FinalFantasy extends ExpansionSet { cards.add(new SetCardInfo("Ardyn, the Usurper", 444, Rarity.RARE, mage.cards.a.ArdynTheUsurper.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Ardyn, the Usurper", 524, Rarity.RARE, mage.cards.a.ArdynTheUsurper.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Ardyn, the Usurper", 89, Rarity.RARE, mage.cards.a.ArdynTheUsurper.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Bartz and Boko", 175, Rarity.RARE, mage.cards.b.BartzAndBoko.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Bartz and Boko", 469, Rarity.RARE, mage.cards.b.BartzAndBoko.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Black Mage's Rod", 90, Rarity.COMMON, mage.cards.b.BlackMagesRod.class)); cards.add(new SetCardInfo("Chaos, the Endless", 221, Rarity.UNCOMMON, mage.cards.c.ChaosTheEndless.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Chaos, the Endless", 486, Rarity.UNCOMMON, mage.cards.c.ChaosTheEndless.class, NON_FULL_USE_VARIOUS));