* Enters battlefield, played land triggered abilities - fixed multiple rollback errors on missing target;

This commit is contained in:
Oleg Agafonov 2019-12-24 16:19:57 +04:00
parent 9cf1ee2f42
commit 49ea0205d0
18 changed files with 89 additions and 106 deletions

View file

@ -14,7 +14,6 @@ import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent;
/**
*
* @author jeffwadsworth
*/
public class ControllerPlaysLandTriggeredAbility extends TriggeredAbilityImpl {
@ -35,7 +34,7 @@ public class ControllerPlaysLandTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Permanent land = game.getPermanent(event.getTargetId());
return land.getControllerId().equals(controllerId);
return land != null && land.getControllerId().equals(controllerId);
}
@Override