From fc663c2d3e0be53cca99c4e8b69a3be0a3af22a8 Mon Sep 17 00:00:00 2001 From: jimga150 Date: Tue, 20 Aug 2024 11:01:45 -0400 Subject: [PATCH] return false early if no token --- Mage.Sets/src/mage/cards/a/AmzuSwarmsHunger.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AmzuSwarmsHunger.java b/Mage.Sets/src/mage/cards/a/AmzuSwarmsHunger.java index 7bab071a12ff..5c90f48ca90e 100644 --- a/Mage.Sets/src/mage/cards/a/AmzuSwarmsHunger.java +++ b/Mage.Sets/src/mage/cards/a/AmzuSwarmsHunger.java @@ -89,6 +89,9 @@ public AmzuSwarmsHungerEffect copy() { public boolean apply(Game game, Ability source) { CreateTokenEffect effect = new CreateTokenEffect(new IzoniInsectToken()); boolean result = effect.apply(game, source); + if (!result){ + return false; + } Object cardsLeavingGraveyardObj = this.getValue("cardsLeavingGraveyard"); if (!(cardsLeavingGraveyardObj instanceof Set)) { @@ -101,8 +104,8 @@ public boolean apply(Game game, Ability source) { .max() .orElse(0); - if (xvalue <= 0 || !result) { - return result; + if (xvalue <= 0) { + return true; } for (UUID id : effect.getLastAddedTokenIds()) { Permanent token = game.getPermanent(id);