mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +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;
|
package mage.sets.avacynrestored;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.Constants;
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.Zone;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.keyword.FlashAbility;
|
import mage.abilities.keyword.FlashAbility;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
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.Game;
|
||||||
import mage.game.permanent.Permanent;
|
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> {
|
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 {
|
static {
|
||||||
filter.add(Predicates.not(new SubtypePredicate("Angel")));
|
filter.add(Predicates.not(new SubtypePredicate("Angel")));
|
||||||
|
@ -107,22 +107,17 @@ class RestorationAngelEffect extends OneShotEffect<RestorationAngelEffect> {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
boolean exiled = false;
|
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));
|
Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
permanent.moveToExile(source.getSourceId(), "Restoration Angel", source.getSourceId(), game);
|
permanent.moveToExile(source.getSourceId(), sourcePermanent.getName(), 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) {
|
|
||||||
Card card = game.getCard(targetPointer.getFirst(game, source));
|
Card card = game.getCard(targetPointer.getFirst(game, source));
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
Constants.Zone currentZone = game.getState().getZone(card.getId());
|
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;
|
return exiled;
|
||||||
|
|
Loading…
Reference in a new issue