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 lastExpressChoice = "";
|
||||||
private String manaRestrictions = "";
|
private String manaRestrictions = "";
|
||||||
private transient ArrayList<Mana> lastProduced = new ArrayList<Mana>();
|
private transient ArrayList<Mana> lastProduced = new ArrayList<Mana>();
|
||||||
private int amount = 1;
|
|
||||||
|
|
||||||
/** The reflected. */
|
/** The reflected. */
|
||||||
private boolean reflected = false;
|
private boolean reflected = false;
|
||||||
@@ -94,7 +93,7 @@ public class AbilityManaPart implements java.io.Serializable {
|
|||||||
* @param ability
|
* @param ability
|
||||||
*/
|
*/
|
||||||
public final void produceMana(SpellAbility sa) {
|
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)
|
} // 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>
|
* <p>
|
||||||
* cannotCounterPaidWith.
|
* cannotCounterPaidWith.
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ public class InputPayManaCostUtil {
|
|||||||
colorsProduced = m.getComboColors().split(" ");
|
colorsProduced = m.getComboColors().split(" ");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
colorsProduced = m.getManaProduced().split(" ");
|
colorsProduced = m.getOrigProduced().split(" ");
|
||||||
}
|
}
|
||||||
for (final String color : colorsProduced) {
|
for (final String color : colorsProduced) {
|
||||||
if (manaCost.isColor(color)) {
|
if (manaCost.isColor(color)) {
|
||||||
@@ -262,7 +262,7 @@ public class InputPayManaCostUtil {
|
|||||||
colorsProduced = m.getComboColors().split(" ");
|
colorsProduced = m.getComboColors().split(" ");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
colorsProduced = m.getManaProduced().split(" ");
|
colorsProduced = m.getOrigProduced().split(" ");
|
||||||
}
|
}
|
||||||
for (final String color : colorsProduced) {
|
for (final String color : colorsProduced) {
|
||||||
if (mana.contains(color)) {
|
if (mana.contains(color)) {
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ public class EventVisualizer {
|
|||||||
final List<SpellAbility> manaProduced = land.getManaAbility();
|
final List<SpellAbility> manaProduced = land.getManaAbility();
|
||||||
|
|
||||||
for (SpellAbility sa : manaProduced) {
|
for (SpellAbility sa : manaProduced) {
|
||||||
String manaColors = sa.getManaPart().getManaProduced();
|
String manaColors = sa.getManaPart().getOrigProduced();
|
||||||
|
|
||||||
if (manaColors.contains("B")) {
|
if (manaColors.contains("B")) {
|
||||||
return SoundEffectType.BlackLand;
|
return SoundEffectType.BlackLand;
|
||||||
|
|||||||
Reference in New Issue
Block a user