This commit is contained in:
tool4EvEr
2021-11-19 23:56:24 +01:00
parent eafdafafec
commit e98fea8879
6 changed files with 10 additions and 18 deletions

View File

@@ -566,7 +566,7 @@ public class DamageDealAi extends DamageAiBase {
TargetChoices tcs = sa.getTargets(); TargetChoices tcs = sa.getTargets();
// Do not use if would kill self // Do not use if would kill self
if (("SelfDamage".equals(logic)) && (ai.getLife() <= Integer.parseInt(source.getSVar("SelfDamageAmount")))) { if ("SelfDamage".equals(logic) && ai.getLife() <= Integer.parseInt(source.getSVar("SelfDamageAmount"))) {
return false; return false;
} }

View File

@@ -92,7 +92,6 @@ public abstract class DeckGeneratorBase {
final Iterable<PaperCard> cards = selectCardsOfMatchingColorForPlayer(forAi); final Iterable<PaperCard> cards = selectCardsOfMatchingColorForPlayer(forAi);
// build subsets based on type // build subsets based on type
final Iterable<PaperCard> creatures = Iterables.filter(cards, Predicates.compose(CardRulesPredicates.Presets.IS_CREATURE, PaperCard.FN_GET_RULES)); final Iterable<PaperCard> creatures = Iterables.filter(cards, Predicates.compose(CardRulesPredicates.Presets.IS_CREATURE, PaperCard.FN_GET_RULES));
final int creatCnt = (int) Math.ceil(getCreaturePercentage() * size); final int creatCnt = (int) Math.ceil(getCreaturePercentage() * size);
trace.append("Creatures to add:").append(creatCnt).append("\n"); trace.append("Creatures to add:").append(creatCnt).append("\n");

View File

@@ -26,7 +26,6 @@ public class LangGerman extends Lang {
return getPossesive(owner) + " " + object; return getPossesive(owner) + " " + object;
} }
@Override @Override
public String getNickName(final String name) { public String getNickName(final String name) {
if (name.contains(",")) { if (name.contains(",")) {

View File

@@ -216,8 +216,7 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
System.out.println("Post more creatures and spells : " + deckList.size()); System.out.println("Post more creatures and spells : " + deckList.size());
} }
// 5. If there are still on-color cards, and the average cmc is low, add // 5. If there are still on-color cards, and the average cmc is low, add extras.
// extras.
double avCMC = getAverageCMC(deckList); double avCMC = getAverageCMC(deckList);
//calculated required lands based on https://www.channelfireball.com/articles/how-many-lands-do-you-need-to-consistently-hit-your-land-drops/ //calculated required lands based on https://www.channelfireball.com/articles/how-many-lands-do-you-need-to-consistently-hit-your-land-drops/
float baseLandParameter = 16f; float baseLandParameter = 16f;
@@ -326,14 +325,12 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
aiPlayables.remove(sbCard); aiPlayables.remove(sbCard);
rankedColorList.remove(sbCard); rankedColorList.remove(sbCard);
++i; ++i;
} }
if (logToConsole) { if (logToConsole) {
debugFinalDeck(); debugFinalDeck();
} }
return result; return result;
} }
//Extend to playsets for non land cards to fill out deck for when no other suitable cards are available //Extend to playsets for non land cards to fill out deck for when no other suitable cards are available
@@ -714,7 +711,6 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
while (deckList.size() > targetSize) { while (deckList.size() > targetSize) {
deckList.remove(deckList.size() - 1); deckList.remove(deckList.size() - 1);
} }
} }
/** /**
@@ -872,9 +868,7 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
Collections.shuffle(possibleList); Collections.shuffle(possibleList);
//addManaCurveCards(CardRanker.rankCardsInDeck(possibleList.subList(0, targetSize*3 <= possibleList.size() ? targetSize*3 : possibleList.size())), //addManaCurveCards(CardRanker.rankCardsInDeck(possibleList.subList(0, targetSize*3 <= possibleList.size() ? targetSize*3 : possibleList.size())),
//num, "Random Card"); //num, "Random Card");
addManaCurveCards(possibleList, addManaCurveCards(possibleList, num, "Random Card");
num, "Random Card");
} }
/** /**

View File

@@ -144,7 +144,7 @@ public abstract class AbstractTournament implements Serializable {
} }
} }
public List<TournamentPlayer> getAllPlayers(){ public List<TournamentPlayer> getAllPlayers() {
return allPlayers; return allPlayers;
} }