mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +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.EffectType;
|
||||||
import mage.Constants.Outcome;
|
import mage.Constants.Outcome;
|
||||||
import mage.Constants.Zone;
|
import mage.Constants.Zone;
|
||||||
|
import mage.MageObject;
|
||||||
import mage.abilities.costs.*;
|
import mage.abilities.costs.*;
|
||||||
import mage.abilities.costs.mana.KickerManaCost;
|
import mage.abilities.costs.mana.KickerManaCost;
|
||||||
import mage.abilities.costs.mana.ManaCost;
|
import mage.abilities.costs.mana.ManaCost;
|
||||||
|
@ -463,6 +464,13 @@ public abstract class AbilityImpl<T extends AbilityImpl<T>> implements Ability {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInUseableZone(Game game) {
|
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);
|
Zone test = game.getState().getZone(sourceId);
|
||||||
return test != null && zone.match(test);
|
return test != null && zone.match(test);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue