mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Fixed wrong select text of Restoration Angel..
This commit is contained in:
parent
d074050151
commit
6a5e1ae98f
1 changed files with 13 additions and 18 deletions
|
@ -27,25 +27,25 @@
|
|||
*/
|
||||
package mage.sets.avacynrestored;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -54,7 +54,7 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public class RestorationAngel extends CardImpl<RestorationAngel> {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Angel creature you control, then ");
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("non-Angel creature you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new SubtypePredicate("Angel")));
|
||||
|
@ -107,22 +107,17 @@ class RestorationAngelEffect extends OneShotEffect<RestorationAngelEffect> {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
boolean exiled = false;
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent == null) {
|
||||
sourcePermanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
|
||||
}
|
||||
Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
|
||||
if (permanent != null) {
|
||||
permanent.moveToExile(source.getSourceId(), "Restoration Angel", source.getSourceId(), game);
|
||||
exiled = true;
|
||||
} else {
|
||||
Card card = game.getCard(targetPointer.getFirst(game, source));
|
||||
if (card != null) {
|
||||
card.moveToExile(source.getSourceId(), "Restoration Angel", source.getSourceId(), game);
|
||||
exiled = true;
|
||||
}
|
||||
}
|
||||
if (exiled) {
|
||||
permanent.moveToExile(source.getSourceId(), sourcePermanent.getName(), source.getSourceId(), game);
|
||||
Card card = game.getCard(targetPointer.getFirst(game, source));
|
||||
if (card != null) {
|
||||
Constants.Zone currentZone = game.getState().getZone(card.getId());
|
||||
return card.putOntoBattlefield(game, currentZone, source.getId(), source.getControllerId());
|
||||
return card.putOntoBattlefield(game, currentZone, source.getSourceId(), source.getControllerId());
|
||||
}
|
||||
}
|
||||
return exiled;
|
||||
|
|
Loading…
Reference in a new issue