mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
* Commented out showXXX commands in tests to reduce the output.
This commit is contained in:
parent
b8754af355
commit
82371456cd
19 changed files with 85 additions and 114 deletions
|
|
@ -1,20 +1,23 @@
|
|||
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) {
|
||||
PlayLandWatcher watcher = game.getState().getWatcher(PlayLandWatcher.class);
|
||||
return watcher != null
|
||||
&& watcher.landPlayed(source.getControllerId());
|
||||
}
|
||||
}
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue