diff --git a/src/main/java/forge/GameAction.java b/src/main/java/forge/GameAction.java index cb1e8af44ee..073e9646eb1 100644 --- a/src/main/java/forge/GameAction.java +++ b/src/main/java/forge/GameAction.java @@ -1723,7 +1723,7 @@ public class GameAction { } if (spell.isSpell()) { - if (spell.getIsDelve()) { + if (spell.isDelve()) { final int cardsInGrave = originalCard.getController().getCardsIn(ZoneType.Graveyard).size(); final Player pc = originalCard.getController(); @@ -2010,12 +2010,6 @@ public class GameAction { } game.getStack().add(sa); - if (sa.isTapAbility() && !sa.wasCancelled()) { - sa.getSourceCard().tap(); - } - if (sa.isUntapAbility()) { - sa.getSourceCard().untap(); - } return; } else { Singletons.getModel().getMatch().getInput().setInput(sa.getAfterPayMana()); @@ -2062,12 +2056,6 @@ public class GameAction { if (manaCost.isPaid() && (sa.getBeforePayMana() == null)) { if (sa.getAfterPayMana() == null) { AbilityFactory.resolve(sa, false); - if (sa.isTapAbility() && !sa.wasCancelled()) { - sa.getSourceCard().tap(); - } - if (sa.isUntapAbility()) { - sa.getSourceCard().untap(); - } return; } else { Singletons.getModel().getMatch().getInput().setInput(sa.getAfterPayMana()); diff --git a/src/main/java/forge/card/cardfactory/CardFactoryUtil.java b/src/main/java/forge/card/cardfactory/CardFactoryUtil.java index 0b30a8d8711..206e9c7f472 100644 --- a/src/main/java/forge/card/cardfactory/CardFactoryUtil.java +++ b/src/main/java/forge/card/cardfactory/CardFactoryUtil.java @@ -3963,7 +3963,7 @@ public class CardFactoryUtil { } if (card.hasKeyword("Delve")) { - card.getSpellAbilities().get(0).setIsDelve(true); + card.getSpellAbilities().get(0).setDelve(true); } if (card.hasStartOfKeyword("Haunt")) { diff --git a/src/main/java/forge/card/spellability/AbilityTriggered.java b/src/main/java/forge/card/spellability/AbilityTriggered.java index 9078e54d0b9..12e7e55ad3a 100644 --- a/src/main/java/forge/card/spellability/AbilityTriggered.java +++ b/src/main/java/forge/card/spellability/AbilityTriggered.java @@ -82,7 +82,6 @@ public class AbilityTriggered extends Ability implements Command { */ public AbilityTriggered(final Card sourceCard, final Command sourceCommand, final ZCTrigger situation) { super(sourceCard, "0"); - this.setTrigger(true); this.todo = sourceCommand; this.trigger = situation; if (this.todo instanceof AbilityTriggered) { @@ -181,4 +180,9 @@ public class AbilityTriggered extends Ability implements Command { return (this.restrictions.length == 1) && this.restrictions[0].equals("named " + this.getSourceCard().getName()); } + + @Override + public final boolean isTrigger() { + return true; + } } diff --git a/src/main/java/forge/card/spellability/SpellAbility.java b/src/main/java/forge/card/spellability/SpellAbility.java index 81c5ae923a5..dceb9ddadff 100644 --- a/src/main/java/forge/card/spellability/SpellAbility.java +++ b/src/main/java/forge/card/spellability/SpellAbility.java @@ -72,17 +72,14 @@ public abstract class SpellAbility implements ISpellAbility { private boolean trigger = false; private boolean optionalTrigger = false; private int sourceTrigger = -1; - private boolean mandatory = false; private boolean temporarilySuppressed = false; - private boolean tapAbility; - private boolean untapAbility; private boolean flashBackAbility = false; private boolean multiKicker = false; private boolean replicate = false; private boolean xCost = false; private boolean cycling = false; - private boolean isDelve = false; + private boolean delve = false; private Input beforePayMana; private Input afterResolve; @@ -335,38 +332,6 @@ public abstract class SpellAbility implements ISpellAbility { public boolean isSpell() { return false; } public boolean isAbility() { return true; } - /** - *
- * isTapAbility. - *
- * - * @return a boolean. - */ - public boolean isTapAbility() { - return this.tapAbility; - } - - /** - *- * isUntapAbility. - *
- * - * @return a boolean. - */ - public boolean isUntapAbility() { - return this.untapAbility; - } - - /** - *- * makeUntapAbility. - *
- */ - public void makeUntapAbility() { - this.untapAbility = true; - this.tapAbility = false; - } - /** ** isBuyBackAbility. @@ -1499,18 +1464,6 @@ public abstract class SpellAbility implements ISpellAbility { return this.sourceTrigger; } - /** - *
- * Setter for the field mandatory.
- *
* isMandatory. @@ -1518,8 +1471,8 @@ public abstract class SpellAbility implements ISpellAbility { * * @return a boolean. */ - public final boolean isMandatory() { - return this.mandatory; + public boolean isMandatory() { + return false; } /** @@ -1610,8 +1563,8 @@ public abstract class SpellAbility implements ISpellAbility { * * @return the isDelve */ - public final boolean getIsDelve() { - return this.isDelve; + public final boolean isDelve() { + return this.delve; } /** @@ -1620,8 +1573,8 @@ public abstract class SpellAbility implements ISpellAbility { * @param isDelve0 * the isDelve to set */ - public final void setIsDelve(final boolean isDelve0) { - this.isDelve = isDelve0; + public final void setDelve(final boolean isDelve0) { + this.delve = isDelve0; } /** diff --git a/src/main/java/forge/card/trigger/WrappedAbility.java b/src/main/java/forge/card/trigger/WrappedAbility.java index ecaf0e2a4ce..b7d74aefa66 100644 --- a/src/main/java/forge/card/trigger/WrappedAbility.java +++ b/src/main/java/forge/card/trigger/WrappedAbility.java @@ -32,6 +32,8 @@ public class WrappedAbility extends Ability implements ISpellAbility { final private SpellAbility sa; final private Trigger regtrig; final private Player decider; + + boolean mandatory = false; public WrappedAbility(final Trigger regTrig, final SpellAbility sa0, final Player decider0) { super(regTrig.getHostCard(), "0"); @@ -46,6 +48,19 @@ public class WrappedAbility extends Ability implements ISpellAbility { return true; } + + public final void setMandatory(final boolean mand) { + this.mandatory = mand; + } + + /** + * @return the mandatory + */ + @Override + public boolean isMandatory() { + return mandatory; + } + @Override public String getParam(String key) { return sa.getParam(key); } @@ -281,16 +296,6 @@ public class WrappedAbility extends Ability implements ISpellAbility { return sa.isSpell(); } - @Override - public boolean isTapAbility() { - return sa.isTapAbility(); - } - - @Override - public boolean isUntapAbility() { - return sa.isUntapAbility(); - } - @Override public boolean isXCost() { return sa.isXCost(); diff --git a/src/main/java/forge/control/input/InputPayManaCost.java b/src/main/java/forge/control/input/InputPayManaCost.java index f0ee0c5dca8..a9215886199 100644 --- a/src/main/java/forge/control/input/InputPayManaCost.java +++ b/src/main/java/forge/control/input/InputPayManaCost.java @@ -152,12 +152,6 @@ public class InputPayManaCost extends InputMana { // Kher Keep, Pendelhaven, Blinkmoth Nexus, and Mikokoro, Center of the // Sea, .... - if (this.originalCard.equals(card) && this.spell.isTapAbility()) { - // I'm not sure if this actually prevents anything that wouldn't be - // handled by canPlay below - return; - } - this.manaCost = InputPayManaCostUtil.activateManaAbility(this.spell, card, this.manaCost); // only show message if this is the active input @@ -204,16 +198,6 @@ public class InputPayManaCost extends InputMana { Singletons.getControl().getPlayer().getManaPool().clearManaPaid(this.spell, false); this.resetManaCost(); - // if tap ability, tap card - if (this.spell.isTapAbility()) { - this.originalCard.tap(); - } - if (this.spell.isUntapAbility()) { - this.originalCard.untap(); - } - - // if this is a spell, move it to the Stack ZOne - if (this.spell.isSpell()) { this.spell.setSourceCard(Singletons.getModel().getGame().getAction().moveToStack(this.originalCard)); } diff --git a/src/main/java/forge/control/input/InputPayManaCost2.java b/src/main/java/forge/control/input/InputPayManaCost2.java index 9e09e10c204..054ffdfea07 100644 --- a/src/main/java/forge/control/input/InputPayManaCost2.java +++ b/src/main/java/forge/control/input/InputPayManaCost2.java @@ -49,10 +49,6 @@ public class InputPayManaCost2 extends InputMana { public void selectCard(final Card card, final PlayerZone zone) { // prevent cards from tapping themselves if ability is a // tapability, although it should already be tapped - if (sa.getSourceCard().equals(card) && sa.isTapAbility()) { - return; - } - this.manaCost = InputPayManaCostUtil.activateManaAbility(sa, card, this.manaCost); if (this.manaCost.isPaid()) { diff --git a/src/main/java/forge/control/input/InputPayManaCostUtil.java b/src/main/java/forge/control/input/InputPayManaCostUtil.java index 5dbe1bd0510..67245251df9 100644 --- a/src/main/java/forge/control/input/InputPayManaCostUtil.java +++ b/src/main/java/forge/control/input/InputPayManaCostUtil.java @@ -379,11 +379,6 @@ public class InputPayManaCostUtil { // selectCard @Override public void selectCard(final Card card, final PlayerZone zone) { - if (sa.getSourceCard().equals(card) && sa.isTapAbility()) { - // this really shouldn't happen but just in case - return; - } - this.manaCost = activateManaAbility(sa, card, this.manaCost); if (this.manaCost.isPaid()) { if (!this.colorsPaid.contains(this.manaCost.getColorsPaid())) { diff --git a/src/main/java/forge/game/phase/Upkeep.java b/src/main/java/forge/game/phase/Upkeep.java index 5f794dabf95..4b201a62ca3 100644 --- a/src/main/java/forge/game/phase/Upkeep.java +++ b/src/main/java/forge/game/phase/Upkeep.java @@ -2174,8 +2174,7 @@ public class Upkeep extends Phase { return false; } for (SpellAbility sa : c.getAllSpellAbilities()) { - if (sa.isTapAbility() - || sa.getPayCosts() != null && sa.getPayCosts().getTap()) { + if ( sa.getPayCosts() != null && sa.getPayCosts().getTap()) { return false; } }