- Removed the unused variable uncastable from the card class.

This commit is contained in:
Sloth
2011-11-10 21:22:14 +00:00
parent cf30244ad0
commit 39171f050d
4 changed files with 3 additions and 41 deletions

View File

@@ -213,7 +213,6 @@ public class Card extends GameEntity implements Comparable<Card> {
private Map<Card, Integer> dealtDamageToThisTurn = new TreeMap<Card, Integer>();
private Map<Card, Integer> assignedDamageMap = new TreeMap<Card, Integer>();
private boolean unCastable;
private boolean drawnThisTurn = false;
private boolean tapped;
private boolean sickness = true; // summoning sickness
@@ -4923,31 +4922,6 @@ public class Card extends GameEntity implements Comparable<Card> {
setTapped(false);
}
/**
* <p>
* isUnCastable.
* </p>
*
* @return a boolean.
*/
public final boolean isUnCastable() {
return unCastable;
}
/**
* <p>
* Setter for the field <code>unCastable</code>.
* </p>
*
* @param b
* a boolean.
*/
public final void setUnCastable(final boolean b) {
unCastable = b;
updateObservers();
}
// keywords are like flying, fear, first strike, etc...
/**
* <p>
@@ -6555,7 +6529,7 @@ public class Card extends GameEntity implements Comparable<Card> {
} else {
String restriction = property.split("SharesColorWith ")[1];
if (restriction.equals("TopCardOfLibrary")) {
CardList list = this.getOwner().getCardsIn(Zone.Library);
CardList list = sourceController.getCardsIn(Zone.Library);
if (list.isEmpty() || !sharesColorWith(list.get(0))) {
return false;
}

View File

@@ -121,7 +121,7 @@ public final class GameActionUtil {
} // while
GuiUtils.getChoiceOptional("Revealed cards:", revealed.toArray());
if (cascadedCard != null && !cascadedCard.isUnCastable()) {
if (cascadedCard != null) {
if (cascadedCard.getController().isHuman()) {
StringBuilder title = new StringBuilder();
@@ -249,7 +249,7 @@ public final class GameActionUtil {
} // for
GuiUtils.getChoiceOptional("Revealed cards:", revealed.toArray());
for (int i = 0; i < rippleMax; i++) {
if (rippledCards[i] != null && !rippledCards[i].isUnCastable()) {
if (rippledCards[i] != null) {
if (rippledCards[i].getController().isHuman()) {
Object[] possibleValues = { "Yes", "No" };

View File

@@ -90,10 +90,6 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
}
}
if (card.isUnCastable()) {
return false;
}
if (this.getPayCosts() != null) {
if (!CostPayment.canPayAdditionalCosts(this.getPayCosts(), this)) {
return false;

View File

@@ -410,14 +410,6 @@ public class CardDetailPanel extends JPanel implements CardContainer {
area.append("^");
}
// uncastable
if (card.isUnCastable()) {
if (area.length() != 0) {
area.append("\n");
}
area.append("This card can't be cast.");
}
// must block
if (!card.getMustBlockCards().isEmpty()) {
if (area.length() != 0) {