From 47972dcb75e45720cc11b7f8359c5e156406e022 Mon Sep 17 00:00:00 2001 From: jimga150 Date: Tue, 20 Aug 2024 10:13:35 -0400 Subject: [PATCH] remove unnecessary constructors --- Mage.Sets/src/mage/cards/a/AmzuSwarmsHunger.java | 2 +- .../common/CardsLeaveGraveyardTriggeredAbility.java | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AmzuSwarmsHunger.java b/Mage.Sets/src/mage/cards/a/AmzuSwarmsHunger.java index 109c51700594..7bab071a12ff 100644 --- a/Mage.Sets/src/mage/cards/a/AmzuSwarmsHunger.java +++ b/Mage.Sets/src/mage/cards/a/AmzuSwarmsHunger.java @@ -54,7 +54,7 @@ public AmzuSwarmsHunger(UUID ownerId, CardSetInfo setInfo) { // Whenever one or more cards leave your graveyard, you may create a 1/1 black and green Insect creature token, // then put a number of +1/+1 counters on it equal to the greatest mana value among those cards. // Do this only once each turn. - this.addAbility(new CardsLeaveGraveyardTriggeredAbility(new AmzuSwarmsHungerEffect(), true).setDoOnlyOnceEachTurn(true)); + this.addAbility(new CardsLeaveGraveyardTriggeredAbility(new AmzuSwarmsHungerEffect()).setDoOnlyOnceEachTurn(true)); } private AmzuSwarmsHunger(final AmzuSwarmsHunger card) { diff --git a/Mage/src/main/java/mage/abilities/common/CardsLeaveGraveyardTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/CardsLeaveGraveyardTriggeredAbility.java index 45fde91ad669..93f6d13a534c 100644 --- a/Mage/src/main/java/mage/abilities/common/CardsLeaveGraveyardTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/CardsLeaveGraveyardTriggeredAbility.java @@ -26,15 +26,7 @@ public CardsLeaveGraveyardTriggeredAbility(Effect effect) { } public CardsLeaveGraveyardTriggeredAbility(Effect effect, FilterCard filter) { - this(effect, filter, false); - } - - public CardsLeaveGraveyardTriggeredAbility(Effect effect, boolean optional) { - this(effect, StaticFilters.FILTER_CARD_CARDS, false); - } - - public CardsLeaveGraveyardTriggeredAbility(Effect effect, FilterCard filter, boolean optional) { - super(Zone.BATTLEFIELD, effect, optional); + super(Zone.BATTLEFIELD, effect, false); this.filter = filter; setTriggerPhrase("Whenever one or more " + filter + " leave your graveyard, "); } @@ -62,6 +54,7 @@ public boolean checkTrigger(GameEvent event, Game game) { .filter(card -> filter.match(card, getControllerId(), this, game)) .filter(card -> this.isControlledBy(card.getOwnerId())) .collect(Collectors.toSet()); + this.getAllEffects().setValue("cardsLeavingGraveyard", cards); return !cards.isEmpty(); }