This commit is contained in:
Jeff 2018-11-19 15:09:36 -06:00
parent d1c1abb967
commit 0eedca5283
3 changed files with 19 additions and 16 deletions

View file

@ -44,7 +44,7 @@ public class AminatouTheFateShifter extends CardImpl {
} }
public AminatouTheFateShifter(UUID ownerId, CardSetInfo setInfo) { public AminatouTheFateShifter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{W}{U}{B}"); super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{W}{U}{B}");
this.addSuperType(SuperType.LEGENDARY); this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.AMINATOU); this.subtype.add(SubType.AMINATOU);
@ -56,7 +56,7 @@ public class AminatouTheFateShifter extends CardImpl {
// -1: Exile another target permanent you own, then return it to the battlefield under your control. // -1: Exile another target permanent you own, then return it to the battlefield under your control.
ability = new LoyaltyAbility(new ExileTargetForSourceEffect(), -1); ability = new LoyaltyAbility(new ExileTargetForSourceEffect(), -1);
ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect()); ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect(true));
ability.addTarget(new TargetPermanent(filter)); ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability); this.addAbility(ability);
@ -68,6 +68,7 @@ public class AminatouTheFateShifter extends CardImpl {
// Aminatou, the Fateshifter can be your commander. // Aminatou, the Fateshifter can be your commander.
this.addAbility(CanBeYourCommanderAbility.getInstance()); this.addAbility(CanBeYourCommanderAbility.getInstance());
} }
public AminatouTheFateShifter(final AminatouTheFateShifter card) { public AminatouTheFateShifter(final AminatouTheFateShifter card) {
super(card); super(card);
} }
@ -79,6 +80,7 @@ public class AminatouTheFateShifter extends CardImpl {
} }
class AminatouPlusEffect extends OneShotEffect { class AminatouPlusEffect extends OneShotEffect {
public AminatouPlusEffect() { public AminatouPlusEffect() {
super(Outcome.DrawCard); super(Outcome.DrawCard);
staticText = "draw a card, then put a card from your hand on top of your library"; staticText = "draw a card, then put a card from your hand on top of your library";
@ -118,10 +120,11 @@ class AminatouPlusEffect extends OneShotEffect {
} }
class AminatouUltimateEffect extends OneShotEffect { class AminatouUltimateEffect extends OneShotEffect {
public AminatouUltimateEffect (){
public AminatouUltimateEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = "Choose left or right. Each player gains control of all nonland permanents other than Aminatou," + staticText = "Choose left or right. Each player gains control of all nonland permanents other than Aminatou,"
" the Fateshifter controlled by the next player in the chosen direction."; + " the Fateshifter controlled by the next player in the chosen direction.";
} }
public AminatouUltimateEffect(final AminatouUltimateEffect effect) { public AminatouUltimateEffect(final AminatouUltimateEffect effect) {
@ -129,7 +132,9 @@ class AminatouUltimateEffect extends OneShotEffect {
} }
@Override @Override
public AminatouUltimateEffect copy(){return new AminatouUltimateEffect(this);} public AminatouUltimateEffect copy() {
return new AminatouUltimateEffect(this);
}
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
@ -154,7 +159,7 @@ class AminatouUltimateEffect extends OneShotEffect {
return false; return false;
} }
// skip players out of range // skip players out of range
if (!game.getState().getPlayersInRange(controller.getId(), game).contains(nextPlayer)){ if (!game.getState().getPlayersInRange(controller.getId(), game).contains(nextPlayer)) {
continue; continue;
} }
// save first next player to check for iteration stop // save first next player to check for iteration stop
@ -164,7 +169,7 @@ class AminatouUltimateEffect extends OneShotEffect {
FilterNonlandPermanent nextPlayerNonlandPermanentsFilter = new FilterNonlandPermanent(); FilterNonlandPermanent nextPlayerNonlandPermanentsFilter = new FilterNonlandPermanent();
nextPlayerNonlandPermanentsFilter.add(new ControllerIdPredicate(nextPlayer)); nextPlayerNonlandPermanentsFilter.add(new ControllerIdPredicate(nextPlayer));
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(nextPlayerNonlandPermanentsFilter, game)) { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(nextPlayerNonlandPermanentsFilter, game)) {
if (permanent.getId().equals(source.getSourceId())){ if (permanent.getId().equals(source.getSourceId())) {
continue; continue;
} }
ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, currentPlayer); ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, currentPlayer);
@ -188,4 +193,3 @@ class AminatouUltimateEffect extends OneShotEffect {
return nextPlayerId; return nextPlayerId;
} }
} }

View file

@ -1,4 +1,3 @@
package mage.cards.t; package mage.cards.t;
import java.util.UUID; import java.util.UUID;
@ -13,7 +12,6 @@ import mage.constants.SagaChapter;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
@ -35,6 +33,7 @@ public final class TheEldestReborn extends CardImpl {
} }
private static final FilterControlledPermanent filterSacrifice = new FilterControlledPermanent("creature or planeswalker"); private static final FilterControlledPermanent filterSacrifice = new FilterControlledPermanent("creature or planeswalker");
static { static {
filterSacrifice.add(Predicates.or( filterSacrifice.add(Predicates.or(
new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.CREATURE),

View file

@ -1,4 +1,3 @@
package mage.abilities.common; package mage.abilities.common;
import mage.abilities.Ability; import mage.abilities.Ability;
@ -138,7 +137,8 @@ class ChapterTriggeredAbility extends TriggeredAbilityImpl {
if (event.getTargetId().equals(getSourceId()) && event.getData().equals(CounterType.LORE.getName())) { if (event.getTargetId().equals(getSourceId()) && event.getData().equals(CounterType.LORE.getName())) {
int amountAdded = event.getAmount(); int amountAdded = event.getAmount();
int loreCounters = amountAdded; int loreCounters = amountAdded;
Permanent sourceSaga = game.getPermanentOrLKIBattlefield(getSourceId()); //Permanent sourceSaga = game.getPermanentOrLKIBattlefield(getSourceId()); BUG #5393
Permanent sourceSaga = game.getPermanent(getSourceId());
if (sourceSaga == null) { if (sourceSaga == null) {
sourceSaga = game.getPermanentEntering(getSourceId()); sourceSaga = game.getPermanentEntering(getSourceId());
} }