Support colorless regions

This commit is contained in:
drdev
2014-12-18 03:13:49 +00:00
parent 9980926c8a
commit 41e4479f00
4 changed files with 15 additions and 8 deletions

View File

@@ -44,9 +44,12 @@ public class ConquestDataIO {
/*ConquestData temp = new ConquestData("My Conquest", 0,
ConquestPlane.Alara,
ConquestPlane.Alara.getCardPool().getCard("Rafiq of the Many"));*/
ConquestData temp = new ConquestData("My Conquest", 0,
/*ConquestData temp = new ConquestData("My Conquest", 0,
ConquestPlane.Kamigawa,
ConquestPlane.Kamigawa.getCardPool().getCard("Meloku the Clouded Mirror"));
ConquestPlane.Kamigawa.getCardPool().getCard("Meloku the Clouded Mirror"));*/
ConquestData temp = new ConquestData("My Conquest", 0,
ConquestPlane.Mirrodin,
ConquestPlane.Mirrodin.getCardPool().getCard("Glissa Sunseeker"));
return temp;
}

View File

@@ -20,6 +20,7 @@ package forge.planarconquest;
import java.util.HashSet;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import forge.GuiBase;
import forge.assets.ISkinImage;
@@ -330,6 +331,9 @@ public enum ConquestPlane {
}
if (cards.isEmpty()) { //if all commanders are used, we can't prevent duplicates
cards.addAll(commanders);
if (cards.isEmpty()) {
Iterables.addAll(cards, FModel.getConquest().getModel().getCurrentPlane().getCommanders());
}
}
return new ConquestCommander(Aggregates.random(cards), cardPool, true, this);
}

View File

@@ -143,11 +143,8 @@ public class ConquestPlaneMap {
q = q0;
r = r0;
region = region0;
if (region == null) {
colorIndex = 0;
}
else if (region.getColorSet().isColorless()) {
colorIndex = 0;
if (region.getColorSet().isColorless()) {
colorIndex = -1;
}
else if (region.getColorSet().isMonoColor()) {
int index;