mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
removal of setBeforePayMana
This commit is contained in:
@@ -14,7 +14,6 @@ import forge.card.spellability.SpellAbility;
|
||||
import forge.card.spellability.Target;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.gui.GuiChoose;
|
||||
import forge.util.Aggregates;
|
||||
|
||||
public class ChooseCardEffect extends SpellAbilityEffect {
|
||||
|
||||
@@ -23,11 +23,8 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Vector;
|
||||
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
import forge.Card;
|
||||
@@ -41,18 +38,14 @@ import forge.card.CardType;
|
||||
import forge.card.cost.Cost;
|
||||
import forge.card.spellability.Spell;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.control.input.Input;
|
||||
import forge.control.input.InputPayManaExecuteCommands;
|
||||
import forge.control.input.InputPayManaSimple;
|
||||
import forge.game.GameState;
|
||||
import forge.game.ai.ComputerUtil;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.player.PlayerUtil;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.gui.GuiChoose;
|
||||
import forge.gui.match.CMatchUI;
|
||||
import forge.util.Aggregates;
|
||||
import forge.view.ButtonUtil;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
||||
@@ -35,7 +35,6 @@ import forge.card.cost.CostPart;
|
||||
import forge.card.cost.CostPartMana;
|
||||
import forge.card.mana.Mana;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.control.input.Input;
|
||||
import forge.game.player.AIPlayer;
|
||||
import forge.game.player.Player;
|
||||
|
||||
@@ -83,8 +82,6 @@ public abstract class SpellAbility implements ISpellAbility {
|
||||
private boolean cycling = false;
|
||||
private boolean delve = false;
|
||||
|
||||
private Input beforePayMana;
|
||||
|
||||
/** The pay costs. */
|
||||
private Cost payCosts = null;
|
||||
|
||||
@@ -557,29 +554,6 @@ public abstract class SpellAbility implements ISpellAbility {
|
||||
}
|
||||
|
||||
// begin - Input methods
|
||||
/**
|
||||
* <p>
|
||||
* Getter for the field <code>beforePayMana</code>.
|
||||
* </p>
|
||||
*
|
||||
* @return a {@link forge.control.input.Input} object.
|
||||
*/
|
||||
public Input getBeforePayMana() {
|
||||
return this.beforePayMana;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>beforePayMana</code>.
|
||||
* </p>
|
||||
*
|
||||
* @param in
|
||||
* a {@link forge.control.input.Input} object.
|
||||
*/
|
||||
public void setBeforePayMana(final Input in) {
|
||||
this.beforePayMana = in;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Getter for the field <code>payCosts</code>.
|
||||
|
||||
@@ -16,7 +16,6 @@ import forge.card.spellability.ISpellAbility;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.card.spellability.SpellAbilityRestriction;
|
||||
import forge.card.spellability.Target;
|
||||
import forge.control.input.Input;
|
||||
import forge.game.GameState;
|
||||
import forge.game.ai.ComputerUtil;
|
||||
import forge.game.player.AIPlayer;
|
||||
@@ -154,11 +153,6 @@ public class WrappedAbility extends Ability implements ISpellAbility {
|
||||
return sa.getActivatingPlayer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Input getBeforePayMana() {
|
||||
return sa.getBeforePayMana();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return sa.getDescription();
|
||||
@@ -280,11 +274,6 @@ public class WrappedAbility extends Ability implements ISpellAbility {
|
||||
sa.setActivatingPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBeforePayMana(final Input in) {
|
||||
sa.setBeforePayMana(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDescription(final String s) {
|
||||
sa.setDescription(s);
|
||||
|
||||
@@ -16,7 +16,6 @@ import forge.card.ability.ApiType;
|
||||
import forge.card.ability.effects.CharmEffect;
|
||||
import forge.card.cost.Cost;
|
||||
import forge.card.cost.CostPayment;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.card.mana.ManaCostBeingPaid;
|
||||
import forge.card.mana.ManaCostShard;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
@@ -85,7 +84,7 @@ public class GameActionPlay {
|
||||
final SpellAbilityRequirements req = new SpellAbilityRequirements(sa, ts, payment);
|
||||
req.setFree(true);
|
||||
req.fillRequirements();
|
||||
} else if (sa.getBeforePayMana() == null) {
|
||||
} else {
|
||||
if (sa.isSpell()) {
|
||||
final Card c = sa.getSourceCard();
|
||||
if (!c.isCopiedSpell()) {
|
||||
@@ -95,9 +94,6 @@ public class GameActionPlay {
|
||||
boolean x = sa.getSourceCard().getManaCost().getShardCount(ManaCostShard.X) > 0;
|
||||
|
||||
game.getStack().add(sa, x);
|
||||
} else {
|
||||
sa.setManaCost(ManaCost.ZERO); // Beached As
|
||||
matchInput.setInput(sa.getBeforePayMana());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,17 +403,14 @@ public class GameActionPlay {
|
||||
} else {
|
||||
manaCost = this.getSpellCostChange(sa, new ManaCostBeingPaid(sa.getManaCost()));
|
||||
}
|
||||
if (manaCost.isPaid() && (sa.getBeforePayMana() == null)) {
|
||||
if (manaCost.isPaid()) {
|
||||
if (sa.isSpell() && !source.isCopiedSpell()) {
|
||||
sa.setSourceCard(game.getAction().moveToStack(source));
|
||||
}
|
||||
|
||||
game.getStack().add(sa);
|
||||
return;
|
||||
} else if (sa.getBeforePayMana() == null) {
|
||||
matchInput.setInput(new InputPayManaSimple(game, sa, manaCost));
|
||||
} else {
|
||||
matchInput.setInput(sa.getBeforePayMana());
|
||||
matchInput.setInput(new InputPayManaSimple(game, sa, manaCost));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -453,13 +446,11 @@ public class GameActionPlay {
|
||||
} else {
|
||||
manaCost = this.getSpellCostChange(sa, new ManaCostBeingPaid(sa.getManaCost()));
|
||||
}
|
||||
if (manaCost.isPaid() && (sa.getBeforePayMana() == null)) {
|
||||
if (manaCost.isPaid()) {
|
||||
AbilityUtils.resolve(sa, false);
|
||||
return;
|
||||
} else if (sa.getBeforePayMana() == null) {
|
||||
matchInput.setInput(new InputPayManaSimple(game, sa, true));
|
||||
} else {
|
||||
matchInput.setInput(sa.getBeforePayMana());
|
||||
matchInput.setInput(new InputPayManaSimple(game, sa, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user