forked from External/mage
commit
3e6a925271
571 changed files with 1896 additions and 1817 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue