forked from External/mage
changed enum comparison to ==.
isDependentTo returns empty set rather than null
This commit is contained in:
parent
297203dab5
commit
972ed6a3f2
61 changed files with 159 additions and 195 deletions
|
|
@ -16,7 +16,6 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CastOnlyDuringPhaseStepSourceEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
|
@ -49,8 +48,8 @@ public class CastOnlyDuringPhaseStepSourceEffect extends ContinuousRuleModifying
|
|||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
// has to return true, if the spell cannot be cast in the current phase / step
|
||||
if (event.getSourceId().equals(source.getSourceId())) {
|
||||
if ((turnPhase != null && !game.getPhase().getType().equals(turnPhase))
|
||||
|| (phaseStep != null && !game.getTurn().getStepType().equals(phaseStep))
|
||||
if ((turnPhase != null && game.getPhase().getType() != turnPhase)
|
||||
|| (phaseStep != null && (game.getTurn().getStepType() != phaseStep))
|
||||
|| (condition != null && !condition.apply(game, source))) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue