mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
- ChangeZone: don't return a legend to the battlefield if another is already present.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user