forked from External/mage
Fixed potential NPE errors in getPhase usage (fixed Berserker's Frenzy, etc)
This commit is contained in:
parent
cfd7464b49
commit
a15a0daa04
81 changed files with 162 additions and 130 deletions
|
|
@ -46,8 +46,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() != turnPhase)
|
||||
|| (phaseStep != null && (game.getTurn().getStepType() != phaseStep))
|
||||
if ((turnPhase != null && game.getTurnPhaseType() != turnPhase)
|
||||
|| (phaseStep != null && (game.getTurnStepType() != phaseStep))
|
||||
|| (condition != null && !condition.apply(game, source))) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue