fixed Dissipation Field returning creatures that have left the battlefield

This commit is contained in:
Evan Kranzler 2018-05-14 11:43:15 -04:00
parent 40ff146764
commit e0bead005a

View file

@ -47,8 +47,7 @@ import mage.target.targetpointer.FixedTarget;
public class DissipationField extends CardImpl { public class DissipationField extends CardImpl {
public DissipationField(UUID ownerId, CardSetInfo setInfo) { public DissipationField(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}");
// Whenever a permanent deals damage to you, return it to its owner's hand. // Whenever a permanent deals damage to you, return it to its owner's hand.
this.addAbility(new DissipationFieldAbility()); this.addAbility(new DissipationFieldAbility());
@ -89,7 +88,7 @@ class DissipationFieldAbility extends TriggeredAbilityImpl {
if (event.getTargetId().equals(this.controllerId)) { if (event.getTargetId().equals(this.controllerId)) {
Permanent permanent = game.getPermanent(event.getSourceId()); Permanent permanent = game.getPermanent(event.getSourceId());
if (permanent != null) { if (permanent != null) {
this.getEffects().get(0).setTargetPointer(new FixedTarget(permanent.getId())); this.getEffects().get(0).setTargetPointer(new FixedTarget(permanent, game));
return true; return true;
} }
} }