Merge branch 'assorted-fixes' into 'master'

Removing references to mana pool in code (and updating the relevant code parts).

See merge request core-developers/forge!493
This commit is contained in:
Hans Mackowiak
2018-04-28 10:40:03 +00:00
6 changed files with 10 additions and 10 deletions

View File

@@ -405,10 +405,10 @@ public abstract class DeckGeneratorBase {
Predicate<PaperCard> dualLandFilter = Predicates.compose(CardRulesPredicates.coreType(true, CardType.CoreType.Land), PaperCard.FN_GET_RULES); Predicate<PaperCard> dualLandFilter = Predicates.compose(CardRulesPredicates.coreType(true, CardType.CoreType.Land), PaperCard.FN_GET_RULES);
Predicate<PaperCard> exceptBasicLand = Predicates.not(Predicates.compose(CardRulesPredicates.Presets.IS_BASIC_LAND, PaperCard.FN_GET_RULES)); Predicate<PaperCard> exceptBasicLand = Predicates.not(Predicates.compose(CardRulesPredicates.Presets.IS_BASIC_LAND, PaperCard.FN_GET_RULES));
Iterable<PaperCard> landCards = pool.getAllCards(Predicates.and(dualLandFilter,exceptBasicLand)); Iterable<PaperCard> landCards = pool.getAllCards(Predicates.and(dualLandFilter,exceptBasicLand));
Iterable<String> dualLandPatterns = Arrays.asList("Add \\{([WUBRG])\\} or \\{([WUBRG])\\} to your mana pool", Iterable<String> dualLandPatterns = Arrays.asList("Add \\{([WUBRG])\\} or \\{([WUBRG])\\}",
"Add \\{([WUBRG])\\}, \\{([WUBRG])\\}, or \\{([WUBRG])\\} to your mana pool", "Add \\{([WUBRG])\\}, \\{([WUBRG])\\}, or \\{([WUBRG])\\}",
"Add \\{([WUBRG])\\}\\{([WUBRG])\\} to your mana pool", "Add \\{([WUBRG])\\}\\{([WUBRG])\\}",
"Add \\{[WUBRG]\\}\\{[WUBRG]\\}, \\{([WUBRG])\\}\\{([WUBRG])\\}, or \\{[WUBRG]\\}\\{[WUBRG]\\} to your mana pool"); "Add \\{[WUBRG]\\}\\{[WUBRG]\\}, \\{([WUBRG])\\}\\{([WUBRG])\\}, or \\{[WUBRG]\\}\\{[WUBRG]\\}");
for (String pattern:dualLandPatterns){ for (String pattern:dualLandPatterns){
regexLandSearch(pattern, landCards); regexLandSearch(pattern, landCards);
} }

View File

@@ -63,7 +63,7 @@ public final class GameActionUtil {
for (int i = 0; i < MagicColor.WUBRG.length; i++ ) { for (int i = 0; i < MagicColor.WUBRG.length; i++ ) {
String color = MagicColor.toShortString(MagicColor.WUBRG[i]); String color = MagicColor.toShortString(MagicColor.WUBRG[i]);
String abString = "AB$ Mana | Cost$ T | Produced$ " + color + String abString = "AB$ Mana | Cost$ T | Produced$ " + color +
" | SpellDescription$ Add {" + color + "} to your mana pool."; " | SpellDescription$ Add {" + color + "}.";
Map<String, String> mapParams = AbilityFactory.getMapParams(abString); Map<String, String> mapParams = AbilityFactory.getMapParams(abString);
BASIC_LAND_ABILITIES_PARAMS[i] = mapParams; BASIC_LAND_ABILITIES_PARAMS[i] = mapParams;
BASIC_LAND_ABILITIES_TYPES[i] = AbilityRecordType.getRecordType(mapParams); BASIC_LAND_ABILITIES_TYPES[i] = AbilityRecordType.getRecordType(mapParams);

View File

@@ -36,7 +36,7 @@ public class ManaEffect extends SpellAbilityEffect {
final boolean optional = sa.hasParam("Optional"); final boolean optional = sa.hasParam("Optional");
final Game game = sa.getActivatingPlayer().getGame(); final Game game = sa.getActivatingPlayer().getGame();
if (optional && !sa.getActivatingPlayer().getController().confirmAction(sa, null, "Do you want to add mana to your mana pool?")) { if (optional && !sa.getActivatingPlayer().getController().confirmAction(sa, null, "Do you want to add mana?")) {
return; return;
} }
@@ -205,7 +205,7 @@ public class ManaEffect extends SpellAbilityEffect {
final StringBuilder sb = new StringBuilder(); final StringBuilder sb = new StringBuilder();
String mana = !sa.hasParam("Amount") || StringUtils.isNumeric(sa.getParam("Amount")) String mana = !sa.hasParam("Amount") || StringUtils.isNumeric(sa.getParam("Amount"))
? GameActionUtil.generatedMana(sa) : "mana"; ? GameActionUtil.generatedMana(sa) : "mana";
sb.append("Add ").append(mana).append(" to your mana pool."); sb.append("Add ").append(mana).append(".");
return sb.toString(); return sb.toString();
} }
} }

View File

@@ -56,7 +56,7 @@ public class CostAddMana extends CostPart {
public final String toString() { public final String toString() {
final StringBuilder sb = new StringBuilder(); final StringBuilder sb = new StringBuilder();
final Integer i = this.convertAmount(); final Integer i = this.convertAmount();
sb.append("Add ").append(StringUtils.repeat("{" + this.getType() + "}", i)).append(" to your mana pool"); sb.append("Add ").append(StringUtils.repeat("{" + this.getType() + "}", i));
return sb.toString(); return sb.toString();
} }

View File

@@ -14,4 +14,4 @@ humanhand=Savage Alliance;Hungry Flames;Confiscation Coup;Tezzeret's Touch;Yahen
humanbattlefield=Island;Swamp;Swamp;Mountain;Electrostatic Pummeler;Tezzeret the Schemer|Counters:LOYALTY=7;t:Etherium Cell,P:0,T:0,Cost:no cost,Types:Artifact,Keywords:,Image:c_etherium_cell|Ability:Petal;t:Etherium Cell,P:0,T:0,Cost:no cost,Types:Artifact,Keywords:,Image:c_etherium_cell|Ability:Petal;t:Etherium Cell,P:0,T:0,Cost:no cost,Types:Artifact,Keywords:,Image:c_etherium_cell|Ability:Petal;t:Etherium Cell,P:0,T:0,Cost:no cost,Types:Artifact,Keywords:,Image:c_etherium_cell|Ability:Petal humanbattlefield=Island;Swamp;Swamp;Mountain;Electrostatic Pummeler;Tezzeret the Schemer|Counters:LOYALTY=7;t:Etherium Cell,P:0,T:0,Cost:no cost,Types:Artifact,Keywords:,Image:c_etherium_cell|Ability:Petal;t:Etherium Cell,P:0,T:0,Cost:no cost,Types:Artifact,Keywords:,Image:c_etherium_cell|Ability:Petal;t:Etherium Cell,P:0,T:0,Cost:no cost,Types:Artifact,Keywords:,Image:c_etherium_cell|Ability:Petal;t:Etherium Cell,P:0,T:0,Cost:no cost,Types:Artifact,Keywords:,Image:c_etherium_cell|Ability:Petal
aihand=Island;Bound by Moonsilver;Plains;Plains;Emissary of the Sleepless;Nearheath Chaplain;Plains aihand=Island;Bound by Moonsilver;Plains;Plains;Emissary of the Sleepless;Nearheath Chaplain;Plains
aibattlefield=Kessig Dire Swine;Brood Monitor;Consulate Skygate;t:Servo,P:1,T:1,Cost:no cost,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_servo3;t:Servo,P:1,T:1,Cost:no cost,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_servo3;t:Servo,P:1,T:1,Cost:no cost,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_servo3;t:Servo,P:1,T:1,Cost:no cost,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_servo3 aibattlefield=Kessig Dire Swine;Brood Monitor;Consulate Skygate;t:Servo,P:1,T:1,Cost:no cost,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_servo3;t:Servo,P:1,T:1,Cost:no cost,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_servo3;t:Servo,P:1,T:1,Cost:no cost,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_servo3;t:Servo,P:1,T:1,Cost:no cost,Types:Artifact-Creature-Servo,Keywords:,Image:c_1_1_servo3
AbilityPetal=AB$ Mana | Cost$ T Sac<1/CARDNAME> | Produced$ Any | SpellDescription$ Add one mana of any color to your mana pool. AbilityPetal=AB$ Mana | Cost$ T Sac<1/CARDNAME> | Produced$ Any | SpellDescription$ Add one mana of any color.

View File

@@ -152,7 +152,7 @@ public class CardReaderExperiments {
//check for other key phrases that might be missing "{G}" formatting //check for other key phrases that might be missing "{G}" formatting
String[] phrases = new String[] { String[] phrases = new String[] {
"Add * to your mana pool", "Add * to your mana pool", // TODO: "Add *" instead of "Add * to your mana pool"? Is that too lax?
"CostDesc\\$ * \\|" "CostDesc\\$ * \\|"
}; };
for (String phrase : phrases) { for (String phrase : phrases) {