Revert Comment out some currently unsupported cards in Commander precons

This commit is contained in:
tool4EvEr
2021-09-04 11:33:44 +02:00
committed by leriomaggio
parent 3e9e9396b0
commit ba5ef78f31
12 changed files with 17 additions and 19 deletions

View File

@@ -67,7 +67,7 @@ public final class CardRules implements ICardCharacteristics {
} }
void reinitializeFromRules(CardRules newRules) { void reinitializeFromRules(CardRules newRules) {
if(!newRules.getName().equals(this.getName())) if (!newRules.getName().equals(this.getName()))
throw new UnsupportedOperationException("You cannot rename the card using the same CardRules object"); throw new UnsupportedOperationException("You cannot rename the card using the same CardRules object");
splitType = newRules.splitType; splitType = newRules.splitType;
@@ -91,7 +91,7 @@ public final class CardRules implements ICardCharacteristics {
} }
} }
int len = oracleText.length(); int len = oracleText.length();
for(int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
char c = oracleText.charAt(i); // This is to avoid needless allocations performed by toCharArray() char c = oracleText.charAt(i); // This is to avoid needless allocations performed by toCharArray()
switch(c) { switch(c) {
case('('): isReminder = i > 0; break; // if oracle has only reminder, consider it valid rules (basic and true lands need this) case('('): isReminder = i > 0; break; // if oracle has only reminder, consider it valid rules (basic and true lands need this)
@@ -99,7 +99,7 @@ public final class CardRules implements ICardCharacteristics {
case('{'): isSymbol = true; break; case('{'): isSymbol = true; break;
case('}'): isSymbol = false; break; case('}'): isSymbol = false; break;
default: default:
if(isSymbol && !isReminder) { if (isSymbol && !isReminder) {
switch(c) { switch(c) {
case('W'): res |= MagicColor.WHITE; break; case('W'): res |= MagicColor.WHITE; break;
case('U'): res |= MagicColor.BLUE; break; case('U'): res |= MagicColor.BLUE; break;
@@ -317,7 +317,7 @@ public final class CardRules implements ICardCharacteristics {
/** Instantiates class, reads a card. For batch operations better create you own reader instance. */ /** Instantiates class, reads a card. For batch operations better create you own reader instance. */
public static CardRules fromScript(Iterable<String> script) { public static CardRules fromScript(Iterable<String> script) {
Reader crr = new Reader(); Reader crr = new Reader();
for(String line : script) { for (String line : script) {
crr.parseLine(line); crr.parseLine(line);
} }
return crr.getCard(); return crr.getCard();

View File

@@ -270,7 +270,6 @@ public final class CardRulesPredicates {
return new PredicateSuperType(type, isEqual); return new PredicateSuperType(type, isEqual);
} }
/** /**
* Checks for color. * Checks for color.
* *

View File

@@ -122,7 +122,7 @@ public class PaperToken implements InventoryItemFromSet, IPaperCard {
String formatEdition = null == edition || CardEdition.UNKNOWN == edition ? "" : "_" + edition.getCode().toLowerCase(); String formatEdition = null == edition || CardEdition.UNKNOWN == edition ? "" : "_" + edition.getCode().toLowerCase();
this.imageFileName.add(String.format("%s%s", imageFileName, formatEdition)); this.imageFileName.add(String.format("%s%s", imageFileName, formatEdition));
for(int idx = 2; idx <= this.artIndex; idx++) { for (int idx = 2; idx <= this.artIndex; idx++) {
this.imageFileName.add(String.format("%s%d%s", imageFileName, idx, formatEdition)); this.imageFileName.add(String.format("%s%d%s", imageFileName, idx, formatEdition));
} }
} }

View File

@@ -40,7 +40,7 @@ public class TokenDb implements ITokenDatabase {
} }
public void preloadTokens() { public void preloadTokens() {
for(CardEdition edition : this.editions) { for (CardEdition edition : this.editions) {
for (String name : edition.getTokens().keySet()) { for (String name : edition.getTokens().keySet()) {
try { try {
getToken(name, edition.getCode()); getToken(name, edition.getCode());

View File

@@ -33,20 +33,20 @@ public class TokenCreateTable extends ForwardingTable<Player, Card, Integer> {
this.put(p, c, newValue); this.put(p, c, newValue);
return newValue; return newValue;
} }
public int getFilterAmount(String validOwner, String validToken, final CardTraitBase ctb) { public int getFilterAmount(String validOwner, String validToken, final CardTraitBase ctb) {
final Card host = ctb.getHostCard(); final Card host = ctb.getHostCard();
int result = 0; int result = 0;
List<Card> filteredCards = null; List<Card> filteredCards = null;
List<Player> filteredPlayer = null; List<Player> filteredPlayer = null;
if (validOwner == null && validToken == null) { if (validOwner == null && validToken == null) {
for (Integer i : values()) { for (Integer i : values()) {
result += i; result += i;
} }
return result; return result;
} }
if (validOwner != null) { if (validOwner != null) {
filteredPlayer = Lists.newArrayList(Iterables.filter(rowKeySet(), filteredPlayer = Lists.newArrayList(Iterables.filter(rowKeySet(),
GameObjectPredicates.restriction(validOwner.split(","), host.getController(), host, ctb))); GameObjectPredicates.restriction(validOwner.split(","), host.getController(), host, ctb)));
@@ -78,7 +78,7 @@ public class TokenCreateTable extends ForwardingTable<Player, Card, Integer> {
} }
return result; return result;
} }
for (Table.Cell<Player, Card, Integer> c : this.cellSet()) { for (Table.Cell<Player, Card, Integer> c : this.cellSet()) {
if (!filteredPlayer.contains(c.getRowKey())) { if (!filteredPlayer.contains(c.getRowKey())) {
continue; continue;
@@ -89,7 +89,6 @@ public class TokenCreateTable extends ForwardingTable<Player, Card, Integer> {
result += c.getValue(); result += c.getValue();
} }
return result; return result;
} }
} }

View File

@@ -152,7 +152,7 @@ public class TokenInfo {
} }
static protected void protoTypeApplyTextChange(final Card result, final SpellAbility sa) { static protected void protoTypeApplyTextChange(final Card result, final SpellAbility sa) {
// update Token with CardTextChanges // update Token with CardTextChanges
Map<String, String> colorMap = sa.getChangedTextColors(); Map<String, String> colorMap = sa.getChangedTextColors();
Map<String, String> typeMap = sa.getChangedTextTypes(); Map<String, String> typeMap = sa.getChangedTextTypes();
if (!colorMap.isEmpty()) { if (!colorMap.isEmpty()) {

View File

@@ -2,7 +2,7 @@ Name:Chrome Mox
ManaCost:0 ManaCost:0
Types:Artifact Types:Artifact
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Imprint — When CARDNAME enters the battlefield, you may exile a nonartifact, nonland card from your hand. T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Imprint — When CARDNAME enters the battlefield, you may exile a nonartifact, nonland card from your hand.
SVar:TrigExile:DB$ChangeZone | Imprint$ True | Origin$ Hand | Destination$ Exile | ChangeType$ Card.nonArtifact+nonLand | ChangeNum$ 1 SVar:TrigExile:DB$ ChangeZone | Imprint$ True | Origin$ Hand | Destination$ Exile | ChangeType$ Card.nonArtifact+nonLand | ChangeNum$ 1
A:AB$ ManaReflected | Cost$ T | Valid$ Defined.Imprinted | ColorOrType$ Color | ReflectProperty$ Is | SpellDescription$ Add one mana of any of the exiled card's colors. A:AB$ ManaReflected | Cost$ T | Valid$ Defined.Imprinted | ColorOrType$ Color | ReflectProperty$ Is | SpellDescription$ Add one mana of any of the exiled card's colors.
T:Mode$ ChangesZone | Origin$ Battlefield | ValidCard$ Card.Self | Destination$ Any | Execute$ DBCleanup | Static$ True T:Mode$ ChangesZone | Origin$ Battlefield | ValidCard$ Card.Self | Destination$ Any | Execute$ DBCleanup | Static$ True
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsImprinted+ExiledWithSource | Execute$ DBForget T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsImprinted+ExiledWithSource | Execute$ DBForget

View File

@@ -6,7 +6,7 @@ A:AB$ ChangeZoneAll | Cost$ Sac<1/CARDNAME> | ChangeType$ Card.Creature+IsRememb
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered+ExiledWithSource | Execute$ DBForget T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered+ExiledWithSource | Execute$ DBForget
SVar:DBForget:DB$ Pump | ForgetObjects$ TriggeredCard SVar:DBForget:DB$ Pump | ForgetObjects$ TriggeredCard
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.Self | Execute$ DBCleanup T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.Self | Execute$ DBCleanup
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:NonStackingEffect:True SVar:NonStackingEffect:True
AI:RemoveDeck:All AI:RemoveDeck:All
SVar:Picture:http://www.wizards.com/global/images/magic/general/cold_storage.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/cold_storage.jpg

View File

@@ -32,7 +32,7 @@ Name=Built from Scratch (2018)
1 Great Furnace|CM2 1 Great Furnace|CM2
1 Hoard-Smelter Dragon|CM2 1 Hoard-Smelter Dragon|CM2
1 Ichor Wellspring|CM2 1 Ichor Wellspring|CM2
#1 Impact Resonance|CM2 1 Impact Resonance|CM2
1 Incite Rebellion|CM2 1 Incite Rebellion|CM2
1 Ingot Chewer|CM2 1 Ingot Chewer|CM2
1 Jalum Tome|CM2 1 Jalum Tome|CM2

View File

@@ -32,7 +32,7 @@ Name=Built from Scratch
1 Great Furnace|C14 1 Great Furnace|C14
1 Hoard-Smelter Dragon|C14 1 Hoard-Smelter Dragon|C14
1 Ichor Wellspring|C14 1 Ichor Wellspring|C14
#1 Impact Resonance|C14 1 Impact Resonance|C14
1 Incite Rebellion|C14 1 Incite Rebellion|C14
1 Ingot Chewer|C14 1 Ingot Chewer|C14
1 Jalum Tome|C14 1 Jalum Tome|C14

View File

@@ -83,6 +83,6 @@ Name=Entropic Uprising
1 Curtains' Call|C16 1 Curtains' Call|C16
1 Parting Thoughts|C16 1 Parting Thoughts|C16
1 Grave Upheaval|C16 1 Grave Upheaval|C16
#1 Cruel Entertainment|C16 1 Cruel Entertainment|C16
1 Treacherous Terrain|C16 1 Treacherous Terrain|C16
1 Ash Barrens|C16 1 Ash Barrens|C16

View File

@@ -77,7 +77,7 @@ Name=Feline Ferocity
1 Soul's Majesty|C17 1 Soul's Majesty|C17
1 Spirit of the Hearth|C17 1 Spirit of the Hearth|C17
1 Staff of Nin|C17 1 Staff of Nin|C17
#1 Stalking Leonin|C17 1 Stalking Leonin|C17
1 Stirring Wildwood|C17 1 Stirring Wildwood|C17
1 Sunspear Shikari|C17 1 Sunspear Shikari|C17
1 Swiftfoot Boots|C17 1 Swiftfoot Boots|C17