Fixed Ghostform

This commit is contained in:
North 2012-09-07 00:36:32 +03:00
parent 9c814083a1
commit c0e4e7a431
2 changed files with 7 additions and 9 deletions

View file

@ -27,16 +27,13 @@
*/
package mage.sets.avacynrestored;
import mage.Constants;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
import mage.abilities.keyword.UnblockableAbility;
import mage.abilities.effects.common.UnblockableTargetEffect;
import mage.cards.CardImpl;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author noxx
@ -50,7 +47,7 @@ public class Ghostform extends CardImpl<Ghostform> {
this.color.setBlue(true);
// Up to two target creatures are unblockable this turn.
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(UnblockableAbility.getInstance(), Constants.Duration.EndOfTurn));
this.getSpellAbility().addEffect(new UnblockableTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
}

View file

@ -61,7 +61,7 @@ public class UnblockableTargetEffect extends RestrictionEffect<UnblockableTarget
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
return permanent.getId().equals(source.getFirstTarget());
return this.targetPointer.getTargets(game, source).contains(permanent.getId());
}
@Override
@ -80,10 +80,11 @@ public class UnblockableTargetEffect extends RestrictionEffect<UnblockableTarget
}
sb.append("target ").append(mode.getTargets().get(0).getTargetName());
if (target.getMaxNumberOfTargets() > 1) {
sb.append("s");
sb.append("s are unblockable");
} else {
sb.append(" is unblockable");
}
sb.append(" is unblockable");
if (Duration.EndOfTurn.equals(this.duration)) {
sb.append(" this turn");
}