mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Removed getProducedMana from AbilityManaPart (it wasn't really functional anyway).
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user