mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Removed the unused variable uncastable from the card class.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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" };
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user