mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Changed logic for restricting legendary cards in format to exclude planeswalkers
This commit is contained in:
@@ -217,7 +217,8 @@ public class GameFormat implements Comparable<GameFormat> {
|
|||||||
if(!restrictedCardNames_ro.isEmpty() || restrictedLegendary ) {
|
if(!restrictedCardNames_ro.isEmpty() || restrictedLegendary ) {
|
||||||
for (Entry<PaperCard, Integer> poolEntry : allCards) {
|
for (Entry<PaperCard, Integer> poolEntry : allCards) {
|
||||||
if( poolEntry.getValue().intValue() > 1 && (restrictedCardNames_ro.contains(poolEntry.getKey().getName())
|
if( poolEntry.getValue().intValue() > 1 && (restrictedCardNames_ro.contains(poolEntry.getKey().getName())
|
||||||
|| poolEntry.getKey().getRules().getType().isLegendary() && restrictedLegendary))
|
|| (poolEntry.getKey().getRules().getType().isLegendary()
|
||||||
|
&& !poolEntry.getKey().getRules().getType().isPlaneswalker() && restrictedLegendary)))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user