Search in sources :

Example 1 with ControlsPermanentsComparedToOpponentsCondition

use of mage.abilities.condition.common.ControlsPermanentsComparedToOpponentsCondition in project mage by magefree.

the class ChaosLordEffect method checkInterveningIfClause.

@Override
public boolean checkInterveningIfClause(Game game) {
    Condition condition = new ControlsPermanentsComparedToOpponentsCondition(ComparisonType.EQUAL_TO, new FilterPermanent());
    Player controller = game.getPlayer(controllerId);
    if (controller != null && condition.apply(game, this)) {
        return super.checkInterveningIfClause(game);
    }
    return false;
}
Also used : ControlsPermanentsComparedToOpponentsCondition(mage.abilities.condition.common.ControlsPermanentsComparedToOpponentsCondition) Condition(mage.abilities.condition.Condition) ControlsPermanentsComparedToOpponentsCondition(mage.abilities.condition.common.ControlsPermanentsComparedToOpponentsCondition) Player(mage.players.Player) FilterPermanent(mage.filter.FilterPermanent)

Aggregations

Condition (mage.abilities.condition.Condition)1 ControlsPermanentsComparedToOpponentsCondition (mage.abilities.condition.common.ControlsPermanentsComparedToOpponentsCondition)1 FilterPermanent (mage.filter.FilterPermanent)1 Player (mage.players.Player)1