isSick removed from Card in favour of hasSickness

This commit is contained in:
Maxmtg
2011-09-20 15:58:29 +00:00
parent 71f00b3c8d
commit 7bf5ccc6e9
5 changed files with 5 additions and 22 deletions

View File

@@ -2719,24 +2719,7 @@ public class Card extends GameEntity implements Comparable<Card> {
* @return a boolean.
*/
public final boolean hasSickness() {
if (hasKeyword("Haste")) {
return false;
}
return sickness;
}
/**
* <p>isSick.</p>
*
* @return a boolean.
*/
public final boolean isSick() {
if (hasKeyword("Haste")) {
return false;
}
return sickness && isCreature();
return !hasKeyword("Haste") && sickness;
}
/**

View File

@@ -463,7 +463,7 @@ public class CombatUtil {
* @return a boolean.
*/
public static boolean canAttack(Card c) {
if (c.isTapped() || (c.isSick() && !c.isEnchantedBy("Instill Energy"))) return false;
if (c.isTapped() || (c.hasSickness() && !c.isEnchantedBy("Instill Energy"))) return false;
return canAttackNextTurn(c);
}

View File

@@ -167,7 +167,7 @@ public class EndOfTurn implements java.io.Serializable {
}
if (c.getName().equals("Erg Raiders") && !c.getCreatureAttackedThisTurn()
&& !c.isSick() && AllZone.getPhase().isPlayerTurn(c.getController()))
&& !c.hasSickness() && AllZone.getPhase().isPlayerTurn(c.getController()))
{
final Card raider = c;
final SpellAbility change = new Ability(raider, "0") {

View File

@@ -22,7 +22,7 @@ public class CostTap extends CostPart {
@Override
public boolean canPay(SpellAbility ability, Card source, Player activator, Cost cost) {
return !(source.isTapped() || source.isSick());
return source.isUntapped() && (!source.hasSickness() || !source.isCreature());
}
@Override

View File

@@ -22,7 +22,7 @@ public class CostUntap extends CostPart {
@Override
public boolean canPay(SpellAbility ability, Card source, Player activator, Cost cost) {
return !(source.isUntapped() || source.isSick());
return source.isTapped() && (!source.hasSickness() || !source.isCreature());
}
@Override