changed enum comparison to ==.

isDependentTo returns empty set rather than null
This commit is contained in:
ingmargoudt 2017-02-19 23:38:47 +01:00
parent 297203dab5
commit 972ed6a3f2
61 changed files with 159 additions and 195 deletions

View file

@ -23,8 +23,7 @@ public class AfterUpkeepStepCondtion implements Condition {
@Override
public boolean apply(Game game, Ability source) {
return !(game.getStep().getType() == PhaseStep.UNTAP
|| game.getStep().getType() == PhaseStep.UPKEEP);
return game.getStep().getType().isAfter(PhaseStep.UPKEEP);
}
@Override

View file

@ -26,10 +26,7 @@ public class BeforeBlockersAreDeclaredCondition implements Condition {
@Override
public boolean apply(Game game, Ability source) {
return !(game.getStep().getType().equals(PhaseStep.DECLARE_BLOCKERS)
|| game.getStep().getType().equals(PhaseStep.FIRST_COMBAT_DAMAGE)
|| game.getStep().getType().equals(PhaseStep.COMBAT_DAMAGE)
|| game.getStep().getType().equals(PhaseStep.END_COMBAT));
return game.getStep().getType().isBefore(PhaseStep.DECLARE_BLOCKERS);
}
@Override