forked from External/mage
rewrote enum comparisons, iterator to removeIf, added some stream and filters
This commit is contained in:
parent
05e5ca3c78
commit
3a152ab3d6
41 changed files with 178 additions and 239 deletions
|
|
@ -11,7 +11,6 @@ import mage.constants.PhaseStep;
|
|||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class AfterUpkeepStepCondtion implements Condition {
|
||||
|
|
@ -24,8 +23,8 @@ public class AfterUpkeepStepCondtion implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return !(game.getStep().getType().equals(PhaseStep.UNTAP)
|
||||
|| game.getStep().getType().equals(PhaseStep.UPKEEP));
|
||||
return !(game.getStep().getType() == PhaseStep.UNTAP
|
||||
|| game.getStep().getType() == PhaseStep.UPKEEP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public class CardsInHandCondition implements Condition {
|
||||
|
||||
public static enum CountType {
|
||||
public enum CountType {
|
||||
MORE_THAN, FEWER_THAN, EQUAL_TO
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class IsStepCondition implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return phaseStep.equals(game.getStep().getType()) && (!onlyDuringYourSteps || game.getActivePlayerId().equals(source.getControllerId()));
|
||||
return phaseStep == game.getStep().getType() && (!onlyDuringYourSteps || game.getActivePlayerId().equals(source.getControllerId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue