fixed Archon of Falling Stars (must be return to battlefield instead hand)

This commit is contained in:
Oleg Agafonov 2020-01-04 19:40:25 +04:00
parent bfdbac5552
commit 13da4fd2b3
2 changed files with 16 additions and 8 deletions

View file

@ -3,7 +3,7 @@ package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesTriggeredAbility;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -33,7 +33,7 @@ public final class ArchonOfFallingStars extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// When Archon of Falling Stars dies, you may return target enchantment card from your graveyard to the battlefield.
Ability ability = new DiesTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), true);
Ability ability = new DiesTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(false, false), true);
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);
}

View file

@ -1,9 +1,5 @@
package mage.abilities.effects.common;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.OneShotEffect;
@ -15,26 +11,36 @@ import mage.players.Player;
import mage.target.Target;
import mage.util.CardUtil;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect {
private boolean tapped;
private boolean showUnderControlText = false;
public ReturnFromGraveyardToBattlefieldTargetEffect() {
this(false);
}
public ReturnFromGraveyardToBattlefieldTargetEffect(boolean tapped) {
this(tapped, true);
}
public ReturnFromGraveyardToBattlefieldTargetEffect(boolean tapped, boolean showUnderControlText) {
super(Outcome.PutCreatureInPlay);
this.tapped = tapped;
this.showUnderControlText = showUnderControlText;
}
public ReturnFromGraveyardToBattlefieldTargetEffect(final ReturnFromGraveyardToBattlefieldTargetEffect effect) {
super(effect);
this.tapped = effect.tapped;
this.showUnderControlText = effect.showUnderControlText;
}
@Override
@ -82,7 +88,9 @@ public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect
sb.append(" tapped");
}
}
sb.append(" under your control");
if (showUnderControlText) {
sb.append(" under your control");
}
return sb.toString();
}
}