Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions Mage.Sets/src/mage/cards/s/SplinterAndLeoFatherAndSon.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
package mage.cards.s;

import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenTargetEffect;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType;
import mage.filter.FilterPlayer;
import mage.filter.predicate.other.AnotherTargetPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.RedMutantToken;
import mage.players.Player;
import mage.target.TargetPlayer;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;

/**
*
* @author muz
*/
public final class SplinterAndLeoFatherAndSon extends CardImpl {

private static final FilterPlayer filter0 = new FilterPlayer("a different player");
private static final FilterPlayer filter1 = new FilterPlayer();
private static final FilterPlayer filter2 = new FilterPlayer();

static {
filter1.add(new AnotherTargetPredicate(1, true));
filter2.add(new AnotherTargetPredicate(2, true));
}

public SplinterAndLeoFatherAndSon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");

this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.MUTANT);
this.subtype.add(SubType.NINJA);
this.subtype.add(SubType.RAT);
this.subtype.add(SubType.TURTLE);
this.power = new MageInt(2);
this.toughness = new MageInt(2);

// When Splinter & Leo enter, choose one or both. Each mode must target a different player.
// * Target player creates a 2/2 red Mutant creature token.
Ability ability = new EntersBattlefieldTriggeredAbility(new CreateTokenTargetEffect(new RedMutantToken()));
ability.addTarget(new TargetPlayer(filter1).withChooseHint("creates a 2/2 red Mutant creature token"));
ability.getModes().setMinModes(1);
ability.getModes().setMaxModes(2);
ability.getModes().setLimitUsageByOnce(false);
ability.getModes().setMaxModesFilter(filter0);

// * Put a +1/+1 counter on each other creature target player controls.
ability.addMode(new Mode(new SplinterAndLeoFatherAndSonEffect())
.addTarget(new TargetPlayer(filter2).withChooseHint("put a +1/+1 counter on each other creature they control")));
this.addAbility(ability);
}

private SplinterAndLeoFatherAndSon(final SplinterAndLeoFatherAndSon card) {
super(card);
}

@Override
public SplinterAndLeoFatherAndSon copy() {
return new SplinterAndLeoFatherAndSon(this);
}
}

class SplinterAndLeoFatherAndSonEffect extends OneShotEffect {

SplinterAndLeoFatherAndSonEffect() {
super(Outcome.Benefit);
staticText = "put a +1/+1 counter on each other creature target player controls";
}

private SplinterAndLeoFatherAndSonEffect(final SplinterAndLeoFatherAndSonEffect effect) {
super(effect);
}

@Override
public SplinterAndLeoFatherAndSonEffect copy() {
return new SplinterAndLeoFatherAndSonEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
if (player == null) {
return false;
}
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(player.getId())) {
if (permanent.isCreature() && !permanent.getId().equals(source.getSourceId())) {
permanent.addCounters(CounterType.P1P1.createInstance(), source, game);
}
}
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ private TeenageMutantNinjaTurtlesEternal() {
cards.add(new SetCardInfo("Sodden Verdure", 74, Rarity.RARE, mage.cards.s.SoddenVerdure.class));
cards.add(new SetCardInfo("Sol Ring", 59, Rarity.UNCOMMON, mage.cards.s.SolRing.class));
cards.add(new SetCardInfo("Spire Garden", 75, Rarity.RARE, mage.cards.s.SpireGarden.class));
cards.add(new SetCardInfo("Splinter & Leo, Father & Son", 103, Rarity.RARE, mage.cards.s.SplinterAndLeoFatherAndSon.class));
cards.add(new SetCardInfo("Splinter, Aging Champion", 104, Rarity.RARE, mage.cards.s.SplinterAgingChampion.class));
cards.add(new SetCardInfo("Splinter, the Mentor", 3, Rarity.MYTHIC, mage.cards.s.SplinterTheMentor.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Splinter, the Mentor", 89, Rarity.MYTHIC, mage.cards.s.SplinterTheMentor.class, NON_FULL_USE_VARIOUS));
Expand Down