mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 12:49:39 -08:00
* Fixed provisional game freezing bugs of the show playable cards feature #457 (caused by DelverAbility, OfferingAbility, Rooftop Storm, Omniscience, Aluren).
This commit is contained in:
parent
ad9b73c34c
commit
142e95fe42
20 changed files with 106 additions and 34 deletions
|
|
@ -114,7 +114,7 @@ class CantBeBlockedUnlessAllEffect extends RestrictionEffect {
|
|||
// check if all creatures of defender are able to block this permanent
|
||||
// permanent.canBlock() can't be used because causing recursive call
|
||||
for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filter, blocker.getControllerId(), game)) {
|
||||
if (permanent.isTapped() && !game.getState().getContinuousEffects().asThough(this.getId(), AsThoughEffectType.BLOCK_TAPPED, blocker.getControllerId(), game)) {
|
||||
if (permanent.isTapped() && !game.getState().getContinuousEffects().asThough(this.getId(), AsThoughEffectType.BLOCK_TAPPED, source, blocker.getControllerId(), game)) {
|
||||
return false;
|
||||
}
|
||||
// check blocker restrictions
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ import mage.players.Player;
|
|||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.ActivatedAbility;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -100,9 +101,10 @@ class RooftopStormCostReductionEffect extends CostModificationEffectImpl {
|
|||
Card sourceCard = game.getCard(spell.getSourceId());
|
||||
if (sourceCard != null && sourceCard.hasSubtype("Zombie")) {
|
||||
Player player = game.getPlayer(spell.getControllerId());
|
||||
if (player != null && player.chooseUse(Outcome.Benefit, "Pay {0} rather than pay the mana cost for Zombie creature", game)) {
|
||||
if (player != null &&
|
||||
(CardUtil.isCheckPlayableMode(spell) || player.chooseUse(Outcome.Benefit, "Pay {0} rather than pay the mana cost for Zombie creature", game))) {
|
||||
spell.getManaCostsToPay().clear();
|
||||
spell.getManaCostsToPay().addAll(new ManaCostsImpl("{0}"));
|
||||
spell.getManaCostsToPay().addAll(new ManaCostsImpl<>("{0}"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ import mage.game.stack.StackObject;
|
|||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -99,7 +100,8 @@ class OmniscienceEffect extends CostModificationEffectImpl {
|
|||
&& !sourceCard.getCardType().contains(CardType.LAND)) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
String message = "Cast " + sourceCard.getName() + " without paying its mana costs?";
|
||||
if (player != null && player.chooseUse(outcome, message, game)) {
|
||||
if (player != null &&
|
||||
(CardUtil.isCheckPlayableMode(abilityToModify) || player.chooseUse(outcome, message, game))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ import mage.game.Game;
|
|||
import mage.game.stack.Spell;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -113,7 +114,8 @@ class AlurenEffect extends CostModificationEffectImpl {
|
|||
if (sourceCard != null && sourceCard.getCardType().contains(CardType.CREATURE) && sourceCard.getManaCost().convertedManaCost() <= 3) {
|
||||
Player player = game.getPlayer(stackObject.getControllerId());
|
||||
String message = "Cast " + sourceCard.getName() + " without paying its mana costs?";
|
||||
if (player != null && player.chooseUse(outcome, message, game)) {
|
||||
if (player != null &&
|
||||
(CardUtil.isCheckPlayableMode(abilityToModify) || player.chooseUse(outcome, message, game))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue