Can't be target/attached effects - fixed that user gets multiple warning message about prevention effect;

This commit is contained in:
Oleg Agafonov 2020-01-28 05:31:32 +04:00
parent 105062beb7
commit 8ca6fd8552
18 changed files with 91 additions and 114 deletions

View file

@ -1,7 +1,5 @@
package mage.cards.b;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -15,25 +13,22 @@ import mage.abilities.keyword.DoubleStrikeAbility;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.FilterPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
*
* @author Saga
*/
public final class BalanWanderingKnight extends CardImpl {
private static final String rule = "{this} has double strike as long as two or more Equipment are attached to it.";
public BalanWanderingKnight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.CAT, SubType.KNIGHT);
this.power = new MageInt(3);
@ -41,11 +36,11 @@ public final class BalanWanderingKnight extends CardImpl {
// First Strike
this.addAbility(FirstStrikeAbility.getInstance());
// Balan, Wandering Knight has double strike as long as two or more Equipment are attached to it.
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance()), EquippedMultipleSourceCondition.instance, rule);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
// {1}{W}: Attach all Equipment you control to Balan.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BalanWanderingKnightEffect(), new ManaCostsImpl("{1}{W}")));
}
@ -81,10 +76,10 @@ public final class BalanWanderingKnight extends CardImpl {
if (balan != null) {
FilterPermanent filter = new FilterPermanent();
filter.add(SubType.EQUIPMENT.getPredicate());
for (Permanent equipment : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(),game)) {
for (Permanent equipment : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
if (equipment != null) {
//If an Equipment can't equip, it isn't attached, and it doesn't become unattached (if it's attached to a creature).
if (!balan.cantBeAttachedBy(equipment, game)) {
if (!balan.cantBeAttachedBy(equipment, game, false)) {
balan.addAttachment(equipment.getId(), game);
}
}

View file

@ -1,8 +1,5 @@
package mage.cards.c;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -26,6 +23,8 @@ import mage.players.Player;
import mage.target.Target;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author spjspj
*/
@ -106,7 +105,7 @@ class CrownOfTheAgesEffect extends OneShotEffect {
}
// Check for protection
MageObject auraObject = game.getObject(aura.getId());
if (auraObject != null && creatureToAttachAura.cantBeAttachedBy(auraObject, game)) {
if (auraObject != null && creatureToAttachAura.cantBeAttachedBy(auraObject, game, true)) {
passed = false;
}
}

View file

@ -4,7 +4,9 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.AsTurnedFaceUpEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.keyword.EnchantAbility;
@ -12,26 +14,22 @@ import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.MorphAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.*;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.AttachEffect;
import static mage.constants.Outcome.Benefit;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.targetadjustment.TargetAdjuster;
import java.util.UUID;
import static mage.constants.Outcome.Benefit;
/**
* @author TheElk801
*/
@ -132,7 +130,7 @@ class GiftOfDoomEffect extends OneShotEffect {
target.setNotTarget(true);
if (player.choose(outcome, target, source.getSourceId(), game)
&& game.getPermanent(target.getFirstTarget()) != null
&& !game.getPermanent(target.getFirstTarget()).cantBeAttachedBy(giftOfDoom, game)) {
&& !game.getPermanent(target.getFirstTarget()).cantBeAttachedBy(giftOfDoom, game, false)) {
game.getState().setValue("attachTo:" + giftOfDoom.getId(), target.getFirstTarget());
game.getPermanent(target.getFirstTarget()).addAttachment(giftOfDoom.getId(), game);
return true;

View file

@ -1,8 +1,5 @@
package mage.cards.g;
import java.util.LinkedList;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
@ -13,8 +10,8 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.ControllerIdPredicate;
@ -25,14 +22,16 @@ import mage.players.Player;
import mage.target.Target;
import mage.target.TargetPermanent;
import java.util.LinkedList;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*/
public final class GlamerSpinners extends CardImpl {
public GlamerSpinners(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W/U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W/U}");
this.subtype.add(SubType.FAERIE);
this.subtype.add(SubType.WIZARD);
@ -117,8 +116,8 @@ class GlamerSpinnersEffect extends OneShotEffect {
}
// Check for protection
MageObject auraObject = game.getObject(auraId);
if(auraObject != null) {
if (permanentToAttachAuras.cantBeAttachedBy(auraObject, game)) {
if (auraObject != null) {
if (permanentToAttachAuras.cantBeAttachedBy(auraObject, game, true)) {
passed = false;
}
}

View file

@ -1,7 +1,5 @@
package mage.cards.g;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
@ -23,8 +21,9 @@ import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
*/
public final class GryffsBoon extends CardImpl {
@ -81,7 +80,7 @@ class GryffsBoonEffect extends OneShotEffect {
if (aura != null && controller != null
&& game.getState().getZone(aura.getId()) == Zone.GRAVEYARD) {
Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (!targetPermanent.cantBeAttachedBy(aura, game)) {
if (!targetPermanent.cantBeAttachedBy(aura, game, false)) {
game.getState().setValue("attachTo:" + aura.getId(), targetPermanent);
controller.moveCards(aura, Zone.BATTLEFIELD, source, game);
return targetPermanent.addAttachment(aura.getId(), game);

View file

@ -1,6 +1,5 @@
package mage.cards.h;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -15,11 +14,7 @@ import mage.abilities.keyword.DoubleStrikeAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledPermanent;
@ -30,8 +25,9 @@ import mage.players.Player;
import mage.target.Target;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
* @author TheElk801
*/
public final class HeavenlyBlademaster extends CardImpl {
@ -120,7 +116,7 @@ class HeavenlyBlademasterEffect extends OneShotEffect {
).filter(
attachment -> attachment != null
).forEachOrdered((attachment) -> {
if (!sourcePermanent.cantBeAttachedBy(attachment, game)) {
if (!sourcePermanent.cantBeAttachedBy(attachment, game, true)) {
if (attachment.getAttachedTo() != sourcePermanent.getId()) {
if (attachment.getAttachedTo() != null) {
Permanent fromPermanent = game.getPermanent(attachment.getAttachedTo());

View file

@ -1,7 +1,5 @@
package mage.cards.n;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -23,8 +21,9 @@ import mage.players.Player;
import mage.target.common.TargetCardInGraveyard;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*/
public final class NomadMythmaker extends CardImpl {
@ -91,7 +90,7 @@ class NomadMythmakerEffect extends OneShotEffect {
if (controller.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
Permanent permanent = game.getPermanent(target.getFirstTarget());
if (permanent != null
&& !permanent.cantBeAttachedBy(aura, game)) {
&& !permanent.cantBeAttachedBy(aura, game, false)) {
game.getState().setValue("attachTo:" + aura.getId(), permanent);
controller.moveCards(aura, Zone.BATTLEFIELD, source, game);
return permanent.addAttachment(aura.getId(), game);

View file

@ -1,9 +1,5 @@
package mage.cards.r;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.DiesAttachedTriggeredAbility;
@ -25,8 +21,11 @@ import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*/
public final class ReinsOfTheVinesteed extends CardImpl {
@ -97,7 +96,7 @@ class ReinsOfTheVinesteedEffect extends OneShotEffect {
if (controller != null
&& controller.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
Permanent targetPermanent = game.getPermanent(target.getFirstTarget());
if (!targetPermanent.cantBeAttachedBy(aura, game)) {
if (!targetPermanent.cantBeAttachedBy(aura, game, false)) {
game.getState().setValue("attachTo:" + aura.getId(), targetPermanent);
controller.moveCards(aura, Zone.BATTLEFIELD, source, game);
return targetPermanent.addAttachment(aura.getId(), game);

View file

@ -1,10 +1,5 @@
package mage.cards.r;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.abilities.effects.OneShotEffect;
@ -23,8 +18,12 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.UUID;
/**
*
* @author L_J
*/
public final class Retether extends CardImpl {
@ -105,7 +104,7 @@ class RetetherEffect extends OneShotEffect {
target.setTargetName("creature to enchant (" + aura.getLogName() + ')');
if (controller.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
Permanent permanent = game.getPermanent(target.getFirstTarget());
if (permanent != null && !permanent.cantBeAttachedBy(aura, game)) {
if (permanent != null && !permanent.cantBeAttachedBy(aura, game, true)) {
auraMap.put(aura, permanent);
game.getState().setValue("attachTo:" + aura.getId(), permanent);
continue auraCardsInGraveyard;

View file

@ -1,7 +1,5 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.MageItem;
import mage.abilities.Ability;
@ -32,8 +30,9 @@ import mage.target.Target;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author anonymous
*/
public final class SimicGuildmage extends CardImpl {
@ -197,7 +196,7 @@ class MoveAuraEffect extends OneShotEffect {
Permanent permanentToAttachAura = game.getPermanent(chosenPermanentToAttachAuras.getFirstTarget());
if (permanentToAttachAura != null) {
// Check for protection
if (permanentToAttachAura.cantBeAttachedBy(aura, game)) {
if (permanentToAttachAura.cantBeAttachedBy(aura, game, true)) {
passed = false;
}
if (passed) {

View file

@ -1,9 +1,5 @@
package mage.cards.s;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
@ -19,11 +15,7 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
@ -39,8 +31,12 @@ import mage.target.TargetCard;
import mage.target.TargetPermanent;
import mage.target.targetpointer.FixedTargets;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class StormHerald extends CardImpl {
@ -113,7 +109,7 @@ class StormHeraldEffect extends OneShotEffect {
targetCreature.setNotTarget(true);
if (controller.choose(Outcome.PutCardInPlay, targetCreature, source.getSourceId(), game)) {
Permanent targetPermanent = game.getPermanent(targetCreature.getFirstTarget());
if (!targetPermanent.cantBeAttachedBy(auraCard, game)) {
if (!targetPermanent.cantBeAttachedBy(auraCard, game, true)) {
game.getState().setValue("attachTo:" + auraCard.getId(), targetPermanent);
controller.moveCards(auraCard, Zone.BATTLEFIELD, source, game);
targetPermanent.addAttachment(auraCard.getId(), game);
@ -175,13 +171,10 @@ class StormHeraldReplacementEffect extends ReplacementEffectImpl {
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getType() == GameEvent.EventType.ZONE_CHANGE
return event.getType() == GameEvent.EventType.ZONE_CHANGE
&& ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD
&& ((ZoneChangeEvent) event).getToZone() != Zone.EXILED
&& getTargetPointer().getTargets(game, source).contains(event.getTargetId())) {
return true;
}
return false;
&& getTargetPointer().getTargets(game, source).contains(event.getTargetId());
}
@Override

View file

@ -135,7 +135,7 @@ class TravelingPlagueEffect extends OneShotEffect {
target.setNotTarget(true);
if (controllerOfEnchantedCreature.choose(Outcome.Detriment, target, source.getSourceId(), game)) {
Permanent targetPermanent = game.getPermanent(target.getFirstTarget());
if (!targetPermanent.cantBeAttachedBy(travelingPlague, game)) {
if (!targetPermanent.cantBeAttachedBy(travelingPlague, game, false)) {
game.getState().setValue("attachTo:" + travelingPlague.getId(), targetPermanent);
controllerOfEnchantedCreature.moveCards(travelingPlague, Zone.BATTLEFIELD, source, game);
return targetPermanent.addAttachment(travelingPlague.getId(), game);

View file

@ -1,7 +1,5 @@
package mage.cards.v;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -16,14 +14,15 @@ import mage.filter.FilterPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
*
* @author Derpthemeus
*/
public final class VulshokBattlemaster extends CardImpl {
public VulshokBattlemaster(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(2);
@ -69,7 +68,7 @@ public final class VulshokBattlemaster extends CardImpl {
for (Permanent equipment : game.getBattlefield().getAllActivePermanents(filter, game)) {
if (equipment != null) {
//If an Equipment can't equip Vulshok Battlemaster, it isn't attached to the Battlemaster, and it doesn't become unattached (if it's attached to a creature). (https://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=48125)
if (!battlemaster.cantBeAttachedBy(equipment, game)) {
if (!battlemaster.cantBeAttachedBy(equipment, game, false)) {
battlemaster.addAttachment(equipment.getId(), game);
}
}

View file

@ -738,13 +738,13 @@ public class ContinuousEffects implements Serializable {
* Checks if an event won't happen because of an rule modifying effect
*
* @param event
* @param targetAbility ability the event is attached to. can be null.
* @param targetAbility ability the event is attached to. can be null.
* @param game
* @param checkPlayableMode true if the event does not really happen but
* it's checked if the event would be replaced
* @param silentMode true if the event does not really happen but
* it's checked if the event would be replaced
* @return
*/
public boolean preventedByRuleModification(GameEvent event, Ability targetAbility, Game game, boolean checkPlayableMode) {
public boolean preventedByRuleModification(GameEvent event, Ability targetAbility, Game game, boolean silentMode) {
for (ContinuousRuleModifyingEffect effect : continuousRuleModifyingEffects) {
if (!effect.checksEventType(event, game)) {
continue;
@ -755,7 +755,7 @@ public class ContinuousEffects implements Serializable {
if (effect.getDuration() != Duration.OneUse || !effect.isUsed()) {
effect.setValue("targetAbility", targetAbility);
if (effect.applies(event, sourceAbility, game)) {
if (!game.inCheckPlayableState()) {
if (!game.inCheckPlayableState() && !silentMode) {
String message = effect.getInfoMessage(sourceAbility, event, game);
if (message != null && !message.isEmpty()) {
if (effect.sendMessageToUser()) {

View file

@ -1,4 +1,3 @@
package mage.filter.predicate.permanent;
import mage.MageObject;
@ -13,13 +12,13 @@ public class CanBeEnchantedByPredicate implements Predicate<Permanent> {
private final MageObject auraEnchantment;
public CanBeEnchantedByPredicate(MageObject auraEnchantment){
public CanBeEnchantedByPredicate(MageObject auraEnchantment) {
this.auraEnchantment = auraEnchantment;
}
@Override
public boolean apply(Permanent input, Game game) {
return !input.cantBeAttachedBy(auraEnchantment, game);
return !input.cantBeAttachedBy(auraEnchantment, game, true);
}
@Override

View file

@ -1971,12 +1971,12 @@ public abstract class GameImpl implements Game, Serializable {
Filter auraFilter = spellAbility.getTargets().get(0).getFilter();
if (auraFilter instanceof FilterControlledPermanent) {
if (!((FilterControlledPermanent) auraFilter).match(attachedTo, perm.getId(), perm.getControllerId(), this)
|| attachedTo.cantBeAttachedBy(perm, this)) {
|| attachedTo.cantBeAttachedBy(perm, this, true)) {
if (movePermanentToGraveyardWithInfo(perm)) {
somethingHappened = true;
}
}
} else if (!auraFilter.match(attachedTo, this) || attachedTo.cantBeAttachedBy(perm, this)) {
} else if (!auraFilter.match(attachedTo, this) || attachedTo.cantBeAttachedBy(perm, this, true)) {
// handle bestow unattachment
Card card = this.getCard(perm.getId());
if (card != null && card.isCreature()) {

View file

@ -1,4 +1,3 @@
package mage.game.permanent;
import mage.MageObject;
@ -94,14 +93,20 @@ public interface Permanent extends Card, Controllable {
void unattach(Game game);
// boolean addAttachment(UUID permanentId, Game game);
// boolean addAttachment(UUID permanentId, Game game);
//
// boolean removeAttachment(UUID permanentId, Game game);
boolean canBeTargetedBy(MageObject source, UUID controllerId, Game game);
boolean hasProtectionFrom(MageObject source, Game game);
boolean cantBeAttachedBy(MageObject source, Game game);
/**
* @param source
* @param game
* @param silentMode - use it to ignore warning message for users (e.g. for checking only)
* @return
*/
boolean cantBeAttachedBy(MageObject source, Game game, boolean silentMode);
boolean wasControlledFromStartOfControllerTurn();
@ -210,9 +215,8 @@ public interface Permanent extends Card, Controllable {
void setMaxBlockedBy(int maxBlockedBy);
/**
*
* @param defenderId id of planeswalker or player to attack - can be empty
* to check generally
* to check generally
* @param game
* @return
*/
@ -282,7 +286,7 @@ public interface Permanent extends Card, Controllable {
/**
* Get card that was imprinted on this one.
*
* <p>
* Can be null if no card was imprinted.
*
* @return Imprinted card UUID.
@ -358,8 +362,8 @@ public interface Permanent extends Card, Controllable {
void setCreateOrder(int createOrder);
default boolean isAttachedTo(UUID otherId){
if(getAttachedTo() == null){
default boolean isAttachedTo(UUID otherId) {
if (getAttachedTo() == null) {
return false;
}
return getAttachedTo().equals(otherId);

View file

@ -1076,7 +1076,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
}
@Override
public boolean cantBeAttachedBy(MageObject source, Game game) {
public boolean cantBeAttachedBy(MageObject source, Game game, boolean silentMode) {
for (ProtectionAbility ability : this.getAbilities(game).getProtectionAbilities()) {
if (!(source.hasSubtype(SubType.AURA, game)
&& !ability.removesAuras())
@ -1085,7 +1085,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
return true;
}
}
return game.getContinuousEffects().preventedByRuleModification(GameEvent.getEvent(EventType.STAY_ATTACHED, objectId, source.getId(), null), null, game, false);
return game.getContinuousEffects().preventedByRuleModification(GameEvent.getEvent(EventType.STAY_ATTACHED, objectId, source.getId(), null), null, game, silentMode);
}
protected boolean canDamage(MageObject source, Game game) {