- Removed getProducedMana from AbilityManaPart (it wasn't really functional anyway).

This commit is contained in:
Sloth
2012-11-27 21:19:07 +00:00
parent f569dd7857
commit 9f03d306b1
3 changed files with 4 additions and 34 deletions

View File

@@ -46,7 +46,6 @@ public class AbilityManaPart implements java.io.Serializable {
private String lastExpressChoice = "";
private String manaRestrictions = "";
private transient ArrayList<Mana> lastProduced = new ArrayList<Mana>();
private int amount = 1;
/** The reflected. */
private boolean reflected = false;
@@ -94,7 +93,7 @@ public class AbilityManaPart implements java.io.Serializable {
* @param ability
*/
public final void produceMana(SpellAbility sa) {
this.produceMana(this.getManaProduced(), this.getSourceCard().getController(), sa);
this.produceMana(this.getOrigProduced(), this.getSourceCard().getController(), sa);
}
/**
@@ -154,35 +153,6 @@ public class AbilityManaPart implements java.io.Serializable {
} // end produceMana(String)
/**
* <p>
* getProducedMana.
* </p>
*
* @return a {@link java.lang.String} object.
*/
public String getManaProduced() {
StringBuilder sb = new StringBuilder();
if (this.amount == 0) {
sb.append("0");
}
else {
try {
// if baseMana is an integer(colorless), just multiply amount and baseMana
int base = Integer.parseInt(this.getOrigProduced());
sb.append(base * this.amount);
} catch (NumberFormatException e) {
for (int i = 0; i < this.amount; i++) {
if (i != 0) {
sb.append(" ");
}
sb.append(mana());
}
}
}
return sb.toString();
}
/**
* <p>
* cannotCounterPaidWith.

View File

@@ -163,7 +163,7 @@ public class InputPayManaCostUtil {
colorsProduced = m.getComboColors().split(" ");
}
else {
colorsProduced = m.getManaProduced().split(" ");
colorsProduced = m.getOrigProduced().split(" ");
}
for (final String color : colorsProduced) {
if (manaCost.isColor(color)) {
@@ -262,7 +262,7 @@ public class InputPayManaCostUtil {
colorsProduced = m.getComboColors().split(" ");
}
else {
colorsProduced = m.getManaProduced().split(" ");
colorsProduced = m.getOrigProduced().split(" ");
}
for (final String color : colorsProduced) {
if (mana.contains(color)) {

View File

@@ -166,7 +166,7 @@ public class EventVisualizer {
final List<SpellAbility> manaProduced = land.getManaAbility();
for (SpellAbility sa : manaProduced) {
String manaColors = sa.getManaPart().getManaProduced();
String manaColors = sa.getManaPart().getOrigProduced();
if (manaColors.contains("B")) {
return SoundEffectType.BlackLand;