mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Commander Quest checkstyle and bugfixes
-QuestEventCommanderDuelManager Removed unused imports -CEditorQuest Fixed colorless cards getting filtered out of deck creation.
This commit is contained in:
@@ -322,7 +322,7 @@ public final class CEditorQuest extends CDeckEditor<Deck> {
|
||||
public boolean apply(PaperCard subject) {
|
||||
CardRules cr = subject.getRules();
|
||||
ManaCost mc = cr.getManaCost();
|
||||
return !mc.isPureGeneric() && allowedColor.containsAllColorsFrom(cr.getColorIdentity().getColor());
|
||||
return allowedColor.containsAllColorsFrom(cr.getColorIdentity().getColor());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,7 +336,10 @@ public final class CEditorQuest extends CDeckEditor<Deck> {
|
||||
List<String> colors = new ArrayList<>();
|
||||
|
||||
//Return early if there are no current commanders
|
||||
if(commanders.size() == 0) return ColorSet.fromNames(colors);
|
||||
if(commanders.size() == 0){
|
||||
colors.add("c");
|
||||
return ColorSet.fromNames(colors);
|
||||
}
|
||||
|
||||
//For each commander,add each color of its color identity if not already added
|
||||
for(PaperCard pc : commanders){
|
||||
@@ -347,6 +350,8 @@ public final class CEditorQuest extends CDeckEditor<Deck> {
|
||||
if(!colors.contains("g") && pc.getRules().getColorIdentity().hasGreen()) colors.add("g");
|
||||
}
|
||||
|
||||
colors.add("c");
|
||||
|
||||
return ColorSet.fromNames(colors);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,10 +4,7 @@ import forge.deck.*;
|
||||
import forge.item.PaperCard;
|
||||
import forge.model.FModel;
|
||||
import forge.quest.data.QuestPreferences;
|
||||
import forge.util.CollectionSuppliers;
|
||||
import forge.util.MyRandom;
|
||||
import forge.util.maps.EnumMapOfLists;
|
||||
import forge.util.maps.MapOfLists;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
Reference in New Issue
Block a user