mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 13:32:06 -08:00
God-Eternal Bontu - fixed game freeze with NPE error
This commit is contained in:
parent
ee051ef478
commit
886b96072e
4 changed files with 35 additions and 43 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.common;
|
||||
|
||||
import mage.MageObjectReference;
|
||||
|
|
@ -28,10 +27,12 @@ public class GodEternalDiesTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
return zEvent.getFromZone() == Zone.BATTLEFIELD
|
||||
&& (zEvent.getToZone() == Zone.GRAVEYARD
|
||||
|| zEvent.getToZone() == Zone.EXILED);
|
||||
if (event.getType() == GameEvent.EventType.ZONE_CHANGE) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
return zEvent.getFromZone() == Zone.BATTLEFIELD
|
||||
&& (zEvent.getToZone() == Zone.GRAVEYARD || zEvent.getToZone() == Zone.EXILED);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -19,19 +18,17 @@ import mage.game.events.GameEvent.EventType;
|
|||
import mage.game.events.ZoneChangeEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* <p>
|
||||
* 702.82. Unearth
|
||||
*
|
||||
* <p>
|
||||
* 702.82a Unearth is an activated ability that functions while the card with
|
||||
* unearth is in a graveyard. "Unearth [cost]" means "[Cost]: Return this card
|
||||
* from your graveyard to the battlefield. It gains haste. Exile it at the
|
||||
* beginning of the next end step. If it would leave the battlefield, exile it
|
||||
* instead of putting it anywhere else. Activate this ability only any time you
|
||||
* could cast a sorcery."
|
||||
*
|
||||
*/
|
||||
public class UnearthAbility extends ActivatedAbilityImpl {
|
||||
|
||||
|
|
@ -111,7 +108,7 @@ class UnearthLeavesBattlefieldEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return EventType.ZONE_CHANGE == event.getType();
|
||||
return event.getType() == EventType.ZONE_CHANGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue