mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
23 lines
693 B
Java
23 lines
693 B
Java
package mage.abilities.condition.common;
|
|
|
|
import mage.abilities.Ability;
|
|
import mage.abilities.condition.Condition;
|
|
import mage.game.Game;
|
|
import mage.watchers.common.PlayLandWatcher;
|
|
|
|
/**
|
|
* @author jeffwadsworth
|
|
*/
|
|
public enum PlayLandCondition implements Condition {
|
|
instance;
|
|
|
|
@Override
|
|
public boolean apply(Game game, Ability source) {
|
|
if (game.getTurn().getPhase() == null) { // only for getFrameColor for River of Tears before game started
|
|
return false;
|
|
}
|
|
PlayLandWatcher watcher = game.getState().getWatcher(PlayLandWatcher.class);
|
|
return watcher != null
|
|
&& watcher.landPlayed(source.getControllerId());
|
|
}
|
|
}
|