- Added Dream Halls.

This commit is contained in:
Sloth
2012-08-27 21:04:46 +00:00
parent fdaca93066
commit 49b79ec4ae
5 changed files with 38 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -2525,6 +2525,7 @@ res/cardsfolder/d/dream_cache.txt svneol=native#text/plain
res/cardsfolder/d/dream_coat.txt -text svneol=unset#text/plain
res/cardsfolder/d/dream_fighter.txt -text
res/cardsfolder/d/dream_fracture.txt svneol=native#text/plain
res/cardsfolder/d/dream_halls.txt -text
res/cardsfolder/d/dream_prowler.txt svneol=native#text/plain
res/cardsfolder/d/dream_stalker.txt svneol=native#text/plain
res/cardsfolder/d/dream_thief.txt -text

View File

@@ -0,0 +1,11 @@
Name:Dream Halls
ManaCost:3 U U
Types:Enchantment
Text:no text
S:Mode$ Continuous | Affected$ Card.YouCtrl | AddHiddenKeyword$ HIDDEN Alternative Cost Discard<1/Card.SharesColorWith/color sharing> | AffectedZone$ Hand,Graveyard,Exile,Library | Description$ Rather than pay the mana cost for a spell, its controller may discard a card that shares a color with that spell.
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/dream_halls.jpg
SetInfo:STH|Rare|http://magiccards.info/scans/en/sh/28.jpg
Oracle:Rather than pay the mana cost for a spell, its controller may discard a card that shares a color with that spell.
End

View File

@@ -2264,6 +2264,8 @@ public class Card extends GameEntity implements Comparable<Card> {
final String costDesc = upkeepCostParams.length > 2 ? "- " + upkeepCostParams[2] : cost;
sbLong.append(costDesc);
sbLong.append("\r\n");
} else if (keyword.get(i).startsWith("Alternative Cost")) {
sbLong.append("Has alternative cost.");
} else if (keyword.get(i).startsWith("Champion")) {
final String k = this.getKeyword().get(i);
final String[] kk = k.split(":");

View File

@@ -1909,7 +1909,7 @@ public final class GameActionUtil {
newSA.setBasicSpell(false);
newSA.setPayCosts(cost);
newSA.setManaCost("");
newSA.setDescription(sa.getDescription() + " (by paying " + keyword.substring(17) + " instead of its mana cost)");
newSA.setDescription(sa.getDescription() + " (by paying " + cost.toSimpleString() + " instead of its mana cost)");
alternatives.add(newSA);
}
}

View File

@@ -476,6 +476,29 @@ public class Cost {
return this.spellToString(false);
}
/**
* <p>
* toSimpleString.
* </p>
*
* @return a {@link java.lang.String} object.
*/
public final String toSimpleString() {
final StringBuilder cost = new StringBuilder();
boolean first = true;
for (final CostPart part : this.costParts) {
if (part instanceof CostMana) {
continue;
}
if (!first) {
cost.append(" and ");
}
cost.append(part.toString());
first = false;
}
return cost.toString();
}
/**
* <p>
* spellToString.