mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Fixed Oblivion Ring issue (LeavesBattlefieldTriggeredAbility).
This commit is contained in:
parent
569faf8fd3
commit
46439e7ffe
1 changed files with 8 additions and 0 deletions
|
@ -36,6 +36,7 @@ import mage.Constants.AbilityType;
|
|||
import mage.Constants.EffectType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.costs.*;
|
||||
import mage.abilities.costs.mana.KickerManaCost;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
|
@ -463,6 +464,13 @@ public abstract class AbilityImpl<T extends AbilityImpl<T>> implements Ability {
|
|||
|
||||
@Override
|
||||
public boolean isInUseableZone(Game game) {
|
||||
// try LKI first
|
||||
MageObject lkiTest = game.getLastKnownInformation(getSourceId(), zone);
|
||||
if (lkiTest != null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// check against current state
|
||||
Zone test = game.getState().getZone(sourceId);
|
||||
return test != null && zone.match(test);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue