mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
* Some code cleanup.
This commit is contained in:
parent
2fec825523
commit
0f4cf84d93
2 changed files with 0 additions and 37 deletions
|
|
@ -9,7 +9,6 @@ import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeEvent;
|
import mage.game.events.ZoneChangeEvent;
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author noxx
|
* @author noxx
|
||||||
|
|
@ -45,11 +44,6 @@ public class DiesThisOrAnotherCreatureOrPlaneswalkerTriggeredAbility extends Tri
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||||
// if (game.getPermanentOrLKIBattlefield(getSourceId()) == null) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
//
|
|
||||||
if (zEvent.isDiesEvent()) {
|
if (zEvent.isDiesEvent()) {
|
||||||
if (zEvent.getTarget() != null) {
|
if (zEvent.getTarget() != null) {
|
||||||
if (zEvent.getTarget().getId().equals(this.getSourceId())) {
|
if (zEvent.getTarget().getId().equals(this.getSourceId())) {
|
||||||
|
|
@ -67,18 +61,6 @@ public class DiesThisOrAnotherCreatureOrPlaneswalkerTriggeredAbility extends Tri
|
||||||
@Override
|
@Override
|
||||||
public boolean isInUseableZone(Game game, MageObject source, GameEvent event) {
|
public boolean isInUseableZone(Game game, MageObject source, GameEvent event) {
|
||||||
return TriggeredAbilityImpl.isInUseableZoneDiesTrigger(this, event, game);
|
return TriggeredAbilityImpl.isInUseableZoneDiesTrigger(this, event, game);
|
||||||
// Permanent sourcePermanent = null;
|
|
||||||
// if (game.getState().getZone(getSourceId()) == Zone.BATTLEFIELD) {
|
|
||||||
// sourcePermanent = game.getPermanent(getSourceId());
|
|
||||||
// } else {
|
|
||||||
// if (game.getShortLivingLKI(getSourceId(), Zone.BATTLEFIELD)) {
|
|
||||||
// sourcePermanent = (Permanent) game.getLastKnownInformation(getSourceId(), Zone.BATTLEFIELD);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (sourcePermanent == null) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// return hasSourceObjectAbility(game, sourcePermanent, event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeEvent;
|
import mage.game.events.ZoneChangeEvent;
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author noxx
|
* @author noxx
|
||||||
|
|
@ -51,11 +50,6 @@ public class DiesThisOrAnotherCreatureTriggeredAbility extends TriggeredAbilityI
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||||
//
|
|
||||||
// if (game.getPermanentOrLKIBattlefield(getSourceId()) == null) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
if (zEvent.isDiesEvent()) {
|
if (zEvent.isDiesEvent()) {
|
||||||
if (zEvent.getTarget() != null) {
|
if (zEvent.getTarget() != null) {
|
||||||
if (!applyFilterOnSource && zEvent.getTarget().getId().equals(this.getSourceId())) {
|
if (!applyFilterOnSource && zEvent.getTarget().getId().equals(this.getSourceId())) {
|
||||||
|
|
@ -73,19 +67,6 @@ public class DiesThisOrAnotherCreatureTriggeredAbility extends TriggeredAbilityI
|
||||||
@Override
|
@Override
|
||||||
public boolean isInUseableZone(Game game, MageObject source, GameEvent event) {
|
public boolean isInUseableZone(Game game, MageObject source, GameEvent event) {
|
||||||
return TriggeredAbilityImpl.isInUseableZoneDiesTrigger(this, event, game);
|
return TriggeredAbilityImpl.isInUseableZoneDiesTrigger(this, event, game);
|
||||||
//
|
|
||||||
// Permanent sourcePermanent = null;
|
|
||||||
// if (game.getState().getZone(getSourceId()) == Zone.BATTLEFIELD) {
|
|
||||||
// sourcePermanent = game.getPermanent(getSourceId());
|
|
||||||
// } else {
|
|
||||||
// if (game.getShortLivingLKI(getSourceId(), Zone.BATTLEFIELD)) {
|
|
||||||
// sourcePermanent = (Permanent) game.getLastKnownInformation(getSourceId(), Zone.BATTLEFIELD);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (sourcePermanent == null) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// return hasSourceObjectAbility(game, sourcePermanent, event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue