mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Clean up
This commit is contained in:
@@ -566,7 +566,7 @@ public class DamageDealAi extends DamageAiBase {
|
||||
TargetChoices tcs = sa.getTargets();
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,6 @@ public abstract class DeckGeneratorBase {
|
||||
final Iterable<PaperCard> cards = selectCardsOfMatchingColorForPlayer(forAi);
|
||||
// build subsets based on type
|
||||
|
||||
|
||||
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);
|
||||
trace.append("Creatures to add:").append(creatCnt).append("\n");
|
||||
|
||||
@@ -26,7 +26,6 @@ public class LangGerman extends Lang {
|
||||
return getPossesive(owner) + " " + object;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getNickName(final String name) {
|
||||
if (name.contains(",")) {
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:3 W
|
||||
Types:Enchantment
|
||||
K:Flash
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile target nonland permanent an opponent controls until CARDNAME leaves the battlefield.
|
||||
SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent an opponent controls | Duration$ UntilHostLeavesPlay
|
||||
SVar:TrigExile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | ValidTgts$ Permanent.nonLand+OppCtrl | TgtPrompt$ Select target nonland permanent an opponent controls | Duration$ UntilHostLeavesPlay
|
||||
K:Cycling:W
|
||||
SVar:OblivionRing:TRUE
|
||||
Oracle:Flash\nWhen Cast Out enters the battlefield, exile target nonland permanent an opponent controls until Cast Out leaves the battlefield.\nCycling {W} ({W}, Discard this card: Draw a card.)
|
||||
|
||||
@@ -216,8 +216,7 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
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
|
||||
// extras.
|
||||
// 5. If there are still on-color cards, and the average cmc is low, add extras.
|
||||
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/
|
||||
float baseLandParameter = 16f;
|
||||
@@ -326,14 +325,12 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
aiPlayables.remove(sbCard);
|
||||
rankedColorList.remove(sbCard);
|
||||
|
||||
|
||||
++i;
|
||||
}
|
||||
if (logToConsole) {
|
||||
debugFinalDeck();
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
//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) {
|
||||
deckList.remove(deckList.size() - 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -872,9 +868,7 @@ public class CardThemedDeckBuilder extends DeckGeneratorBase {
|
||||
Collections.shuffle(possibleList);
|
||||
//addManaCurveCards(CardRanker.rankCardsInDeck(possibleList.subList(0, targetSize*3 <= possibleList.size() ? targetSize*3 : possibleList.size())),
|
||||
//num, "Random Card");
|
||||
addManaCurveCards(possibleList,
|
||||
num, "Random Card");
|
||||
|
||||
addManaCurveCards(possibleList, num, "Random Card");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,8 +28,8 @@ public abstract class AbstractTournament implements Serializable {
|
||||
protected final List<TournamentPairing> completedPairings = new ArrayList<>();
|
||||
protected final List<TournamentPairing> activePairings = new ArrayList<>();
|
||||
|
||||
public List<TournamentPairing> getCompletedPairings() { return completedPairings; }
|
||||
public List<TournamentPairing> getActivePairings() { return activePairings; }
|
||||
public List<TournamentPairing> getCompletedPairings() { return completedPairings; }
|
||||
public List<TournamentPairing> getActivePairings() { return activePairings; }
|
||||
|
||||
public AbstractTournament(int ttlRnds) {
|
||||
activeRound = 0;
|
||||
@@ -60,13 +60,13 @@ public abstract class AbstractTournament implements Serializable {
|
||||
public int getActiveRound() { return activeRound; }
|
||||
public int getTotalRounds() { return totalRounds; }
|
||||
|
||||
public boolean isContinualPairing() { return continualPairing; }
|
||||
public boolean isContinualPairing() { return continualPairing; }
|
||||
|
||||
public void setContinualPairing(boolean continualPairing) { this.continualPairing = continualPairing; }
|
||||
public void setContinualPairing(boolean continualPairing) { this.continualPairing = continualPairing; }
|
||||
|
||||
public boolean isInitialized() { return initialized; }
|
||||
|
||||
public void setInitialized(boolean initialized) { this.initialized = initialized; }
|
||||
public void setInitialized(boolean initialized) { this.initialized = initialized; }
|
||||
|
||||
public boolean isPlayerRemaining(TournamentPlayer player) {
|
||||
return remainingPlayers.contains(player);
|
||||
@@ -144,7 +144,7 @@ public abstract class AbstractTournament implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
public List<TournamentPlayer> getAllPlayers(){
|
||||
public List<TournamentPlayer> getAllPlayers() {
|
||||
return allPlayers;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user