Merge pull request #3088 from ingmargoudt/fixes

Fixes
This commit is contained in:
Derek M 2017-04-12 10:08:27 -04:00 committed by GitHub
commit 3e6a925271
571 changed files with 1896 additions and 1817 deletions

View file

@ -27,10 +27,10 @@
*/
package mage.abilities.common;
import mage.constants.ComparisonType;
import mage.abilities.StateTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.constants.Zone;
import mage.filter.Filter.ComparisonType;
import mage.filter.FilterPermanent;
import mage.game.Game;
import mage.game.events.GameEvent;
@ -69,24 +69,7 @@ public class ControlsPermanentsControllerTriggeredAbility extends StateTriggered
@Override
public boolean checkTrigger(GameEvent event, Game game) {
int inputValue = game.getBattlefield().countAll(filter, getControllerId(), game);
switch (type) {
case Equal:
if (inputValue != value) {
return false;
}
break;
case GreaterThan:
if (inputValue <= value) {
return false;
}
break;
case LessThan:
if (inputValue >= value) {
return false;
}
break;
}
return true;
return ComparisonType.compare(value, type, inputValue);
}
@Override