removed couple of methods, whose results can be derived from other members

This commit is contained in:
Maxmtg
2013-04-01 21:17:31 +00:00
parent 7666f67067
commit e797ce337a
4 changed files with 4 additions and 36 deletions

View File

@@ -316,7 +316,7 @@ public class CardFactoryCreatures {
c.addCounter(CounterType.P1P1, xCounters, true); c.addCounter(CounterType.P1P1, xCounters, true);
} }
}; };
spell.setIsXCost(true); spell.setXManaCost(1);
// Do not remove SpellAbilities created by AbilityFactory or // Do not remove SpellAbilities created by AbilityFactory or
// Keywords. // Keywords.
card.clearFirstSpell(); card.clearFirstSpell();

View File

@@ -2394,7 +2394,6 @@ public class CardFactoryUtil {
final String[] k = parse.split("kicker "); final String[] k = parse.split("kicker ");
final SpellAbility sa = card.getSpellAbility()[0]; final SpellAbility sa = card.getSpellAbility()[0];
sa.setIsMultiKicker(true);
sa.setMultiKickerManaCost(new ManaCost(new ManaCostParser(k[1]))); sa.setMultiKickerManaCost(new ManaCost(new ManaCostParser(k[1])));
} }
} }
@@ -2557,7 +2556,6 @@ public class CardFactoryUtil {
int xCount = card.getManaCost().getShardCount(ManaCostShard.X); int xCount = card.getManaCost().getShardCount(ManaCostShard.X);
if (xCount > 0) { if (xCount > 0) {
final SpellAbility sa = card.getSpellAbility()[0]; final SpellAbility sa = card.getSpellAbility()[0];
sa.setIsXCost(true);
sa.setXManaCost(xCount); sa.setXManaCost(xCount);
} // X } // X

View File

@@ -74,9 +74,7 @@ public abstract class SpellAbility implements ISpellAbility {
private boolean temporarilySuppressed = false; private boolean temporarilySuppressed = false;
private boolean flashBackAbility = false; private boolean flashBackAbility = false;
private boolean multiKicker = false;
private boolean replicate = false; private boolean replicate = false;
private boolean xCost = false;
private boolean cycling = false; private boolean cycling = false;
private boolean delve = false; private boolean delve = false;
@@ -387,19 +385,7 @@ public abstract class SpellAbility implements ISpellAbility {
return false; return false;
} }
/** /**
* <p>
* setIsMultiKicker.
* </p>
*
* @param b
* a boolean.
*/
public final void setIsMultiKicker(final boolean b) {
this.multiKicker = b;
}
/**
* <p> * <p>
* isMultiKicker. * isMultiKicker.
* </p> * </p>
@@ -407,7 +393,7 @@ public abstract class SpellAbility implements ISpellAbility {
* @return a boolean. * @return a boolean.
*/ */
public boolean isMultiKicker() { public boolean isMultiKicker() {
return this.multiKicker; return this.multiKickerManaCost != null;
} }
/** /**
@@ -433,17 +419,6 @@ public abstract class SpellAbility implements ISpellAbility {
return this.replicate; return this.replicate;
} }
/**
* <p>
* setIsXCost.
* </p>
*
* @param b
* a boolean.
*/
public void setIsXCost(final boolean b) {
this.xCost = b;
}
/** /**
* <p> * <p>
@@ -453,7 +428,7 @@ public abstract class SpellAbility implements ISpellAbility {
* @return a boolean. * @return a boolean.
*/ */
public boolean isXCost() { public boolean isXCost() {
return this.xCost; return getXManaCost() > 0;
} }
/** /**

View File

@@ -284,11 +284,6 @@ public class WrappedAbility extends Ability implements ISpellAbility {
sa.setFlashBackAbility(flashBackAbility); sa.setFlashBackAbility(flashBackAbility);
} }
@Override
public void setIsXCost(final boolean b) {
sa.setIsXCost(b);
}
@Override @Override
public void setMultiKickerManaCost(final ManaCost cost) { public void setMultiKickerManaCost(final ManaCost cost) {
sa.setMultiKickerManaCost(cost); sa.setMultiKickerManaCost(cost);