mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
isSick removed from Card in favour of hasSickness
This commit is contained in:
@@ -2719,24 +2719,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
* @return a boolean.
|
* @return a boolean.
|
||||||
*/
|
*/
|
||||||
public final boolean hasSickness() {
|
public final boolean hasSickness() {
|
||||||
if (hasKeyword("Haste")) {
|
return !hasKeyword("Haste") && sickness;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return sickness;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>isSick.</p>
|
|
||||||
*
|
|
||||||
* @return a boolean.
|
|
||||||
*/
|
|
||||||
public final boolean isSick() {
|
|
||||||
if (hasKeyword("Haste")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return sickness && isCreature();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ public class CombatUtil {
|
|||||||
* @return a boolean.
|
* @return a boolean.
|
||||||
*/
|
*/
|
||||||
public static boolean canAttack(Card c) {
|
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);
|
return canAttackNextTurn(c);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ public class EndOfTurn implements java.io.Serializable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if (c.getName().equals("Erg Raiders") && !c.getCreatureAttackedThisTurn()
|
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 Card raider = c;
|
||||||
final SpellAbility change = new Ability(raider, "0") {
|
final SpellAbility change = new Ability(raider, "0") {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class CostTap extends CostPart {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPay(SpellAbility ability, Card source, Player activator, Cost cost) {
|
public boolean canPay(SpellAbility ability, Card source, Player activator, Cost cost) {
|
||||||
return !(source.isTapped() || source.isSick());
|
return source.isUntapped() && (!source.hasSickness() || !source.isCreature());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class CostUntap extends CostPart {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPay(SpellAbility ability, Card source, Player activator, Cost cost) {
|
public boolean canPay(SpellAbility ability, Card source, Player activator, Cost cost) {
|
||||||
return !(source.isUntapped() || source.isSick());
|
return source.isTapped() && (!source.hasSickness() || !source.isCreature());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user