* Afterlife - Fixed that the target controller got also the token, if target was e.g. indestructible.

This commit is contained in:
LevelX2 2014-02-14 15:12:16 +01:00
parent 2eebdb3b5b
commit 3a8f630582

View file

@ -54,8 +54,8 @@ public class Afterlife extends CardImpl<Afterlife> {
this.color.setWhite(true); this.color.setWhite(true);
// Destroy target creature. It can't be regenerated. Its controller puts a // Destroy target creature. It can't be regenerated. Its controller puts a
// 1/1 white Spirit creature token with flying onto the battlefield. // 1/1 white Spirit creature token with flying onto the battlefield.
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addEffect(new AfterlifeEffect()); this.getSpellAbility().addEffect(new AfterlifeEffect());
@ -89,10 +89,10 @@ class AfterlifeEffect extends OneShotEffect<AfterlifeEffect> {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Permanent permanent = (Permanent) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.BATTLEFIELD); Permanent permanent = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source));
if (permanent != null) { if (permanent != null) {
SpiritWhiteToken token = new SpiritWhiteToken(); SpiritWhiteToken token = new SpiritWhiteToken();
token.putOntoBattlefield(1, game, source.getId(), permanent.getControllerId()); token.putOntoBattlefield(1, game, source.getSourceId(), permanent.getControllerId());
} }
return true; return true;
} }