mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Reverted Max' change of CardManaCost, because it messed up some parts of the game.
This commit is contained in:
@@ -61,12 +61,11 @@ public final class CardManaCost implements Comparable<CardManaCost> {
|
|||||||
* @param parser
|
* @param parser
|
||||||
* the parser
|
* the parser
|
||||||
*/
|
*/
|
||||||
final static List<ManaCostShard> shardsTemp = new ArrayList<ManaCostShard>();
|
|
||||||
public CardManaCost(final IParserManaCost parser) {
|
public CardManaCost(final IParserManaCost parser) {
|
||||||
if (!parser.hasNext()) {
|
if (!parser.hasNext()) {
|
||||||
throw new RuntimeException("Empty manacost passed to parser (this should have been handled before)");
|
throw new RuntimeException("Empty manacost passed to parser (this should have been handled before)");
|
||||||
}
|
}
|
||||||
shardsTemp.clear();
|
final List<ManaCostShard> shardsTemp = new ArrayList<ManaCostShard>();
|
||||||
this.hasNoCost = false;
|
this.hasNoCost = false;
|
||||||
while (parser.hasNext()) {
|
while (parser.hasNext()) {
|
||||||
final ManaCostShard shard = parser.next();
|
final ManaCostShard shard = parser.next();
|
||||||
@@ -79,7 +78,6 @@ public final class CardManaCost implements Comparable<CardManaCost> {
|
|||||||
// here
|
// here
|
||||||
this.shards = Collections.unmodifiableList(shardsTemp);
|
this.shards = Collections.unmodifiableList(shardsTemp);
|
||||||
this.stringValue = this.getSimpleString();
|
this.stringValue = this.getSimpleString();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getSimpleString() {
|
private String getSimpleString() {
|
||||||
|
|||||||
Reference in New Issue
Block a user