mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Merge branch 'dungeon' into 'master'
Add Dungeon to EditionSectionWithCollectorNumbers See merge request core-developers/forge!5099
This commit is contained in:
@@ -322,7 +322,6 @@ public class StaticData {
|
||||
}
|
||||
|
||||
public PaperCard getCardByEditionDate(PaperCard card, Date editionDate) {
|
||||
|
||||
PaperCard c = this.getCommonCards().getCardFromEdition(card.getName(), editionDate, CardDb.SetPreference.LatestCoreExp, card.getArtIndex());
|
||||
|
||||
if (null != c) {
|
||||
@@ -346,7 +345,6 @@ public class StaticData {
|
||||
}
|
||||
|
||||
public PaperCard getCardFromLatestorEarliest(PaperCard card) {
|
||||
|
||||
PaperCard c = this.getCommonCards().getCardFromEdition(card.getName(), null, CardDb.SetPreference.Latest, card.getArtIndex());
|
||||
|
||||
if (null != c && c.hasImage()) {
|
||||
@@ -376,7 +374,6 @@ public class StaticData {
|
||||
}
|
||||
|
||||
public PaperCard getCardFromEarliestCoreExp(PaperCard card) {
|
||||
|
||||
PaperCard c = this.getCommonCards().getCardFromEdition(card.getName(), null, CardDb.SetPreference.EarliestCoreExp, card.getArtIndex());
|
||||
|
||||
if (null != c && c.hasImage()) {
|
||||
|
||||
@@ -212,16 +212,14 @@ public final class CardDb implements ICardDatabase, IDeckGenPool {
|
||||
CardRules cr = rulesByName.get(cis.name);
|
||||
if (cr != null) {
|
||||
addSetCard(e, cis, cr);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
missingCards.add(cis.name);
|
||||
}
|
||||
}
|
||||
if (isCoreExpSet && logMissingPerEdition) {
|
||||
if (missingCards.isEmpty()) {
|
||||
System.out.println(" ... 100% ");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
int missing = (e.getAllCardsInSet().size() - missingCards.size()) * 10000 / e.getAllCardsInSet().size();
|
||||
System.out.printf(" ... %.2f%% (%s missing: %s)%n", missing * 0.01f, Lang.nounWithAmount(missingCards.size(), "card"), StringUtils.join(missingCards, " | "));
|
||||
}
|
||||
@@ -505,7 +503,6 @@ public final class CardDb implements ICardDatabase, IDeckGenPool {
|
||||
if (pc.hasImage()) {
|
||||
return pc;
|
||||
}
|
||||
else {
|
||||
if (firstWithoutImage == null) {
|
||||
firstWithoutImage = pc; //ensure first without image returns if none have image
|
||||
}
|
||||
@@ -515,7 +512,7 @@ public final class CardDb implements ICardDatabase, IDeckGenPool {
|
||||
}
|
||||
cards.remove(randomIndex); //remove card from collection and try another random card
|
||||
sz--;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,8 @@ public final class CardEdition implements Comparable<CardEdition> {
|
||||
BUY_A_BOX("buy a box"),
|
||||
PROMO("promo"),
|
||||
BUNDLE("bundle"),
|
||||
BOX_TOPPER("box topper");
|
||||
BOX_TOPPER("box topper"),
|
||||
DUNGEONS("dungeons");
|
||||
|
||||
private final String name;
|
||||
|
||||
|
||||
@@ -451,8 +451,7 @@ public final class CardType implements Comparable<CardType>, CardTypeView {
|
||||
if (calculatedType == null) {
|
||||
if (subtypes.isEmpty()) {
|
||||
calculatedType = StringUtils.join(getTypesBeforeDash(), ' ');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
calculatedType = StringUtils.join(getTypesBeforeDash(), ' ') + " - " + StringUtils.join(subtypes, " ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,8 +73,7 @@ public class DamageAllEffect extends DamageBaseEffect {
|
||||
CardCollectionView list;
|
||||
if (sa.hasParam("ValidCards")) {
|
||||
list = game.getCardsIn(ZoneType.Battlefield);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
list = CardCollection.EMPTY;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,8 +36,7 @@ public class ManaConversionMatrix {
|
||||
rowIdx = rowIdx < 0 ? identityMatrix.length - 1 : rowIdx;
|
||||
if (additive) {
|
||||
colorConversionMatrix[rowIdx] |= replacementColor;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
colorRestrictionMatrix[rowIdx] &= replacementColor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,8 +258,7 @@ public class ManaCostBeingPaid {
|
||||
ManaCostShard shard;
|
||||
if (StringUtils.isEmpty(xColor)) {
|
||||
shard = ManaCostShard.GENERIC;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
shard = ManaCostShard.parseNonGeneric(xColor);
|
||||
}
|
||||
increaseShard(shard, xCost, true);
|
||||
|
||||
@@ -137,18 +137,15 @@ public class ManaPool extends ManaConversionMatrix implements Iterable<Mana> {
|
||||
if (convertToColorless) {
|
||||
convertManaColor(b, (byte)ManaAtom.COLORLESS);
|
||||
cm.addAll(pMana);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
cleared.addAll(cm);
|
||||
cm.clear();
|
||||
floatingMana.putAll(b, pMana);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (convertToColorless) {
|
||||
convertManaColor(b, (byte)ManaAtom.COLORLESS);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
cleared.addAll(cm);
|
||||
cm.clear();
|
||||
}
|
||||
@@ -261,8 +258,7 @@ public class ManaPool extends ManaConversionMatrix implements Iterable<Mana> {
|
||||
|
||||
if (poolLane != null && poolLane.contains(mana)) {
|
||||
removeFloating.add(mana);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
manaNotAccountedFor = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,6 @@ public class StaticAbilityCantBeCast {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (stAb.hasParam("AffectedZone") && !card.isInZone(ZoneType.smartValueOf(stAb.getParam("AffectedZone")))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -48,11 +48,7 @@ public class StaticAbilityCastWithFlash {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static boolean commonParts(final StaticAbility stAb, final SpellAbility sa, final Card card, final Player activator) {
|
||||
|
||||
if (!stAb.matchesValidParam("ValidCard", card)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -535,14 +535,12 @@ public abstract class Trigger extends TriggerReplacementBase {
|
||||
return this.numberTurnActivations;
|
||||
}
|
||||
|
||||
public void triggerRun()
|
||||
{
|
||||
public void triggerRun() {
|
||||
this.numberTurnActivations++;
|
||||
}
|
||||
|
||||
// Resets the state stored each turn for per-turn and per-instance restriction
|
||||
public void resetTurnState()
|
||||
{
|
||||
public void resetTurnState() {
|
||||
this.numberTurnActivations = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user