- ChangeZone: don't return a legend to the battlefield if another is already present.

This commit is contained in:
Michael Kamensky
2021-09-30 08:28:11 +03:00
parent 4d95708065
commit cd0659d518

View File

@@ -746,6 +746,18 @@ public class ChangeZoneAi extends SpellAbilityAi {
}
}
}
// predict Legendary cards already present
if (!ai.getGame().getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noLegendRule)) {
boolean nothingWillReturn = true;
for (final Card c : retrieval) {
if (!(c.getType().isLegendary() && ai.isCardInPlay(c.getName()))) {
nothingWillReturn = false;
}
}
if (nothingWillReturn) {
return false;
}
}
}
}