forked from External/mage
Fixed some cards that did not correctly retrieve target object if it was not destroyed (fixes #1486) .
This commit is contained in:
parent
fb7d05e82a
commit
ecedc360e9
12 changed files with 135 additions and 74 deletions
|
|
@ -56,7 +56,6 @@ public class Polymorph extends CardImpl {
|
|||
super(ownerId, 67, "Polymorph", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{U}");
|
||||
this.expansionSetCode = "M10";
|
||||
|
||||
|
||||
// Destroy target creature. It can't be regenerated.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
|
||||
|
|
@ -93,11 +92,7 @@ class PolymorphEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent == null) {
|
||||
permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD);
|
||||
}
|
||||
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
|
||||
if (permanent != null) {
|
||||
Player player = game.getPlayer(permanent.getControllerId());
|
||||
if (player != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue