mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Merge branch 'master' into staticValueRefactor
This commit is contained in:
commit
38fe022fc0
1 changed files with 31 additions and 32 deletions
|
@ -1,7 +1,5 @@
|
|||
package mage.abilities;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.AbilityType;
|
||||
|
@ -14,6 +12,9 @@ import mage.game.events.ZoneChangeEvent;
|
|||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
@ -155,7 +156,9 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
|
|||
* latter triggers trigger from the game state after the move where the
|
||||
* Kozilek card is itself and has the ability.
|
||||
*/
|
||||
if (event != null && event.getTargetId() != null && event.getTargetId().equals(getSourceId())) {
|
||||
if (event == null || event.getTargetId() == null || !event.getTargetId().equals(getSourceId())) {
|
||||
return super.isInUseableZone(game, source, event);
|
||||
}
|
||||
switch (event.getType()) {
|
||||
case ZONE_CHANGE:
|
||||
ZoneChangeEvent zce = (ZoneChangeEvent) event;
|
||||
|
@ -169,7 +172,6 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
|
|||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DESTROYED_PERMANENT:
|
||||
if (isLeavesTheBattlefieldTrigger()) {
|
||||
if (event.getType() == EventType.DESTROYED_PERMANENT) {
|
||||
|
@ -180,14 +182,11 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
|
|||
source = game.getLastKnownInformation(getSourceId(), event.getZone());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PHASED_OUT:
|
||||
case PHASED_IN:
|
||||
if (this.zone == Zone.ALL || game.getLastKnownInformation(getSourceId(), zone) != null) {
|
||||
return this.hasSourceObjectAbility(game, source, event);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.isInUseableZone(game, source, event);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue