mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Exploit - Fixed that Exploit also triggered if the creature with Exploit left the battlefield before the first ability of Exploit resolved.
This commit is contained in:
parent
a56cccebf9
commit
f62d3ac227
17 changed files with 231 additions and 44 deletions
|
|
@ -67,6 +67,7 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.game.command.Emblem;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.ManaEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentCard;
|
||||
|
|
@ -864,11 +865,10 @@ public abstract class AbilityImpl implements Ability {
|
|||
*
|
||||
* @param game
|
||||
* @param source
|
||||
* @param checkShortLivingLKI if the object was in the needed zone as the effect that's currently applied started, the check returns true
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean isInUseableZone(Game game, MageObject source, boolean checkShortLivingLKI) {
|
||||
public boolean isInUseableZone(Game game, MageObject source, GameEvent event) {
|
||||
if (zone.equals(Zone.COMMAND)) {
|
||||
if (this.getSourceId() == null) { // commander effects
|
||||
return true;
|
||||
|
|
@ -880,17 +880,6 @@ public abstract class AbilityImpl implements Ability {
|
|||
}
|
||||
}
|
||||
|
||||
// try LKI first (was the object with the id in the needed zone before)
|
||||
if (checkShortLivingLKI) {
|
||||
if (game.getShortLivingLKI(getSourceId(), zone)) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (game.getLastKnownInformation(getSourceId(), zone) != null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
MageObject object;
|
||||
UUID parameterSourceId;
|
||||
// for singleton abilities like Flying we can't rely on abilities' source because it's only once in continuous effects
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue