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();
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|||||||
@@ -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(",")) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:3 W
|
|||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
K:Flash
|
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.
|
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
|
K:Cycling:W
|
||||||
SVar:OblivionRing:TRUE
|
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.)
|
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());
|
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");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ public abstract class AbstractTournament implements Serializable {
|
|||||||
protected final List<TournamentPairing> completedPairings = new ArrayList<>();
|
protected final List<TournamentPairing> completedPairings = new ArrayList<>();
|
||||||
protected final List<TournamentPairing> activePairings = new ArrayList<>();
|
protected final List<TournamentPairing> activePairings = new ArrayList<>();
|
||||||
|
|
||||||
public List<TournamentPairing> getCompletedPairings() { return completedPairings; }
|
public List<TournamentPairing> getCompletedPairings() { return completedPairings; }
|
||||||
public List<TournamentPairing> getActivePairings() { return activePairings; }
|
public List<TournamentPairing> getActivePairings() { return activePairings; }
|
||||||
|
|
||||||
public AbstractTournament(int ttlRnds) {
|
public AbstractTournament(int ttlRnds) {
|
||||||
activeRound = 0;
|
activeRound = 0;
|
||||||
@@ -60,13 +60,13 @@ public abstract class AbstractTournament implements Serializable {
|
|||||||
public int getActiveRound() { return activeRound; }
|
public int getActiveRound() { return activeRound; }
|
||||||
public int getTotalRounds() { return totalRounds; }
|
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 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) {
|
public boolean isPlayerRemaining(TournamentPlayer player) {
|
||||||
return remainingPlayers.contains(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;
|
return allPlayers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user