mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
* Energy Field - Fixed sometimes wrong detection of card going to own graveyard.
This commit is contained in:
parent
3d00a00802
commit
50c31f78d7
1 changed files with 3 additions and 1 deletions
|
@ -33,6 +33,7 @@ import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.PreventionEffectImpl;
|
import mage.abilities.effects.PreventionEffectImpl;
|
||||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
@ -134,7 +135,8 @@ class PutIntoYourGraveyardTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
if (event.getType() == GameEvent.EventType.ZONE_CHANGE) {
|
if (event.getType() == GameEvent.EventType.ZONE_CHANGE) {
|
||||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||||
if (zEvent.getToZone() == Zone.GRAVEYARD) {
|
if (zEvent.getToZone() == Zone.GRAVEYARD) {
|
||||||
if (game.getControllerId(event.getTargetId()) == this.getControllerId()){
|
Card card = game.getCard(event.getTargetId());
|
||||||
|
if (card != null && card.getOwnerId().equals(getControllerId())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue