Moved some custom "Cast only" effects to the framework.

This commit is contained in:
LevelX2 2016-01-16 12:48:23 +01:00
parent e2c8b8f583
commit f4a9a66974
22 changed files with 421 additions and 678 deletions

View file

@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mage.abilities.condition.common;
import mage.abilities.Ability;
import mage.abilities.condition.Condition;
import mage.game.Game;
/**
*
* @author LevelX2
*/
public class OnOpponentsTurnCondition implements Condition {
private static final OnOpponentsTurnCondition fInstance = new OnOpponentsTurnCondition();
public static Condition getInstance() {
return fInstance;
}
@Override
public boolean apply(Game game, Ability source) {
return !game.getOpponents(source.getControllerId()).contains(game.getActivePlayerId());
}
@Override
public String toString() {
return "on an opponent's turn";
}
}