mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
removed ability to cancel choice of reflected mana color
This commit is contained in:
@@ -29,12 +29,6 @@ public class ManaReflectedEffect extends SpellAbilityEffect {
|
||||
final List<Player> tgtPlayers = getTargetPlayers(sa);
|
||||
for (final Player player : tgtPlayers) {
|
||||
final String generated = generatedReflectedMana(sa, colors, player);
|
||||
if (ma.getCanceled()) {
|
||||
sa.undo();
|
||||
ma.setCanceled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
ma.produceMana(generated, player, sa);
|
||||
}
|
||||
|
||||
@@ -71,14 +65,7 @@ public class ManaReflectedEffect extends SpellAbilityEffect {
|
||||
baseMana = MagicColor.toShortString(colors.iterator().next());
|
||||
} else {
|
||||
if (player.isHuman()) {
|
||||
final Object o = GuiChoose.oneOrNone("Select Mana to Produce", colors);
|
||||
if (o == null) {
|
||||
// User hit cancel
|
||||
sa.getManaPart().setCanceled(true);
|
||||
return "";
|
||||
} else {
|
||||
baseMana = MagicColor.toShortString((String) o);
|
||||
}
|
||||
baseMana = GuiChoose.one("Select Mana to Produce", colors);
|
||||
} else {
|
||||
// AI doesn't really have anything here yet
|
||||
baseMana = sa.getManaPart().getExpressChoice();
|
||||
|
||||
@@ -44,18 +44,17 @@ public class AbilityManaPart implements java.io.Serializable {
|
||||
/** Constant <code>serialVersionUID=-6816356991224950520L</code>. */
|
||||
private static final long serialVersionUID = -6816356991224950520L;
|
||||
|
||||
private String origProduced;
|
||||
private final String origProduced;
|
||||
private String lastExpressChoice = "";
|
||||
private String manaRestrictions = "";
|
||||
private transient ArrayList<Mana> lastManaProduced = new ArrayList<Mana>();
|
||||
private final String manaRestrictions;
|
||||
private final String cannotCounterSpell;
|
||||
|
||||
/** The canceled. */
|
||||
private boolean canceled = false;
|
||||
private transient ArrayList<Mana> lastManaProduced = new ArrayList<Mana>();
|
||||
|
||||
private final transient Card sourceCard;
|
||||
|
||||
// Spells paid with this mana spell can't be countered.
|
||||
private String cannotCounterSpell;
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -75,12 +74,8 @@ public class AbilityManaPart implements java.io.Serializable {
|
||||
this.sourceCard = sourceCard;
|
||||
|
||||
origProduced = params.containsKey("Produced") ? params.get("Produced") : "1";
|
||||
if (params.containsKey("RestrictValid")) {
|
||||
this.manaRestrictions = params.get("RestrictValid");
|
||||
}
|
||||
|
||||
this.manaRestrictions = params.containsKey("RestrictValid") ? params.get("RestrictValid") : "";
|
||||
this.cannotCounterSpell = params.get("AddsNoCounter");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -349,29 +344,6 @@ public class AbilityManaPart implements java.io.Serializable {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>canceled</code>.
|
||||
* </p>
|
||||
*
|
||||
* @param bCancel
|
||||
* a boolean.
|
||||
*/
|
||||
public final void setCanceled(final boolean bCancel) {
|
||||
this.canceled = bCancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Getter for the field <code>canceled</code>.
|
||||
* </p>
|
||||
*
|
||||
* @return a boolean.
|
||||
*/
|
||||
public final boolean getCanceled() {
|
||||
return this.canceled;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final boolean equals(final Object o) {
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import forge.Card;
|
||||
import forge.card.spellability.AbilityManaPart;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.game.event.BlockerAssignedEvent;
|
||||
import forge.game.event.CardDamagedEvent;
|
||||
|
||||
Reference in New Issue
Block a user