mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Fixed bug that Cloudstone Curio triggered also for opponents permanents entering the battlefield.
This commit is contained in:
parent
5336d4c0f9
commit
bde1e90dfb
2 changed files with 12 additions and 9 deletions
|
@ -34,6 +34,7 @@ import mage.Constants;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TargetController;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||
|
@ -58,6 +59,7 @@ public class CloudstoneCurio extends CardImpl<CloudstoneCurio> {
|
|||
private static final FilterPermanent filter = new FilterPermanent("a nonartifact permanent");
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.ARTIFACT)));
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public CloudstoneCurio(UUID ownerId) {
|
||||
|
@ -65,7 +67,7 @@ public class CloudstoneCurio extends CardImpl<CloudstoneCurio> {
|
|||
this.expansionSetCode = "RAV";
|
||||
|
||||
// Whenever a nonartifact permanent enters the battlefield under your control, you may return another permanent you control that shares a card type with it to its owner's hand.
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new CloudstoneCurioEffect(), filter, true, true, ""));
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new CloudstoneCurioEffect(), filter, true, "", true));
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -63,8 +63,7 @@ public class EntersBattlefieldAllTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional) {
|
||||
this(zone, effect, filter, optional, null);
|
||||
this.filter = filter;
|
||||
this(zone, effect, filter, optional, false, null, false);
|
||||
}
|
||||
|
||||
public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, String rule) {
|
||||
|
@ -72,16 +71,18 @@ public class EntersBattlefieldAllTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, String rule, boolean controlled) {
|
||||
this(zone, effect, filter, optional, false, rule, controlled);
|
||||
}
|
||||
|
||||
public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, boolean setTargetPointer, String rule) {
|
||||
this(zone, effect, filter, optional, setTargetPointer, rule, false);
|
||||
}
|
||||
|
||||
public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, boolean setTargetPointer, String rule, boolean controlled) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
this.filter = filter;
|
||||
this.rule = rule;
|
||||
this.controlled = controlled;
|
||||
}
|
||||
|
||||
public EntersBattlefieldAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, boolean setTargetPointer, String rule) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
this.filter = filter;
|
||||
this.rule = rule;
|
||||
this.setTargetPointer = setTargetPointer;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue