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
|
|
@ -41,7 +41,7 @@ class LukeSkywalkerEmblemEffect extends PreventionEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (game.getPhase().getType() == TurnPhase.COMBAT
|
||||
if (game.getTurnPhaseType() == TurnPhase.COMBAT
|
||||
&& super.applies(event, source, game)
|
||||
&& event.getType() == GameEvent.EventType.DAMAGE_PLAYER) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class EdgeOfMalacolEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
// Prevent untap event of creatures of target player
|
||||
if (game.getTurn().getStepType() == PhaseStep.UNTAP) {
|
||||
if (game.getTurnStepType() == PhaseStep.UNTAP) {
|
||||
Plane cPlane = game.getState().getCurrentPlane();
|
||||
if (cPlane == null) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue