* Fixed a problem with check playable methods causing e.g. endless loop if Shared Fate was on the battlefield.

This commit is contained in:
LevelX2 2019-12-25 16:01:02 +01:00
parent 32bd88a6c0
commit 133cc7342d
19 changed files with 227 additions and 230 deletions

View file

@ -1,5 +1,7 @@
package mage.abilities;
import java.util.Optional;
import java.util.UUID;
import mage.MageObject;
import mage.MageObjectReference;
import mage.abilities.costs.Cost;
@ -15,9 +17,6 @@ import mage.game.events.GameEvent;
import mage.game.stack.Spell;
import mage.players.Player;
import java.util.Optional;
import java.util.UUID;
/**
* @author BetaSteward_at_googlemail.com
*/
@ -91,7 +90,7 @@ public class SpellAbility extends ActivatedAbilityImpl {
}
}
// Check if rule modifying events prevent to cast the spell in check playable mode
if (this.isCheckPlayableMode()) {
if (game.inCheckPlayableState()) {
if (game.getContinuousEffects().preventedByRuleModification(
GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, this.getId(), this.getSourceId(), playerId), this, game, true)) {
return ActivationStatus.getFalse();