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