mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Improved snow land decision making on LDA deck generator
This commit is contained in:
@@ -21,7 +21,7 @@ public class ArchetypeDeckBuilder extends CardThemedDeckBuilder{
|
|||||||
archetype = archetype0;
|
archetype = archetype0;
|
||||||
for(Pair<String, Double> pair : archetype.getCardProbabilities()){
|
for(Pair<String, Double> pair : archetype.getCardProbabilities()){
|
||||||
for(int i=0;i<5;++i){
|
for(int i=0;i<5;++i){
|
||||||
if (pair.getLeft().equals(MagicColor.Constant.SNOW_LANDS.get(i))) {
|
if (pair.getLeft().equals(MagicColor.Constant.SNOW_LANDS.get(i)) && pair.getRight() > 0.04) {
|
||||||
needsSnowLands=true;
|
needsSnowLands=true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -704,24 +704,11 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
|||||||
System.out.printf("Basics[%s]: %d/%d = %f%% = %d cards%n", MagicColor.Constant.BASIC_LANDS.get(i), clrCnts[i], totalColor, 100*p, nLand + 1);
|
System.out.printf("Basics[%s]: %d/%d = %f%% = %d cards%n", MagicColor.Constant.BASIC_LANDS.get(i), clrCnts[i], totalColor, 100*p, nLand + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
PaperCard snowLand = null;
|
|
||||||
// if appropriate snow-covered lands are available, add them
|
|
||||||
for (final PaperCard cp : basicLands) {
|
|
||||||
if (cp.getName().equals(MagicColor.Constant.SNOW_LANDS.get(i))) {
|
|
||||||
snowLand = cp;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int j = 0; j < nLand; j++) {
|
for (int j = 0; j < nLand; j++) {
|
||||||
if(snowLand!=null){
|
|
||||||
deckList.add(snowLand);
|
|
||||||
}else {
|
|
||||||
deckList.add(getBasicLand(i));
|
deckList.add(getBasicLand(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// A common problem at this point is that p in the above loop was exactly 1/2,
|
// A common problem at this point is that p in the above loop was exactly 1/2,
|
||||||
// and nLand rounded up for both colors, so that one too many lands was added.
|
// and nLand rounded up for both colors, so that one too many lands was added.
|
||||||
|
|||||||
Reference in New Issue
Block a user