Cleanup in PumpEffect.java

This commit is contained in:
Maxmtg
2013-05-27 12:08:36 +00:00
parent 165434942a
commit f22f2057fa
2 changed files with 6 additions and 43 deletions

View File

@@ -3956,30 +3956,6 @@ public class Card extends GameEntity implements Comparable<Card> {
this.tempDefenseBoost += n;
}
/**
* <p>
* Setter for the field <code>tempAttackBoost</code>.
* </p>
*
* @param n
* a int.
*/
public final void setTempAttackBoost(final int n) {
this.tempAttackBoost = n;
}
/**
* <p>
* Setter for the field <code>tempDefenseBoost</code>.
* </p>
*
* @param n
* a int.
*/
public final void setTempDefenseBoost(final int n) {
this.tempDefenseBoost = n;
}
// for cards like Glorious Anthem, etc.
/**
* <p>

View File

@@ -16,8 +16,8 @@ import forge.card.spellability.Target;
import forge.game.GameState;
import forge.game.player.Player;
import forge.game.zone.ZoneType;
import forge.gui.GuiDialog;
import forge.util.Aggregates;
import forge.util.Lang;
public class PumpEffect extends SpellAbilityEffect {
@@ -241,25 +241,12 @@ public class PumpEffect extends SpellAbilityEffect {
}
if (sa.hasParam("Optional")) {
if (sa.getActivatingPlayer().isHuman()) {
final StringBuilder targets = new StringBuilder();
for (final Card tc : tgtCards) {
targets.append(tc);
}
final StringBuilder sb = new StringBuilder();
final String descBasic = "Apply pump to " + targets + "?";
final String pumpDesc = sa.hasParam("OptionQuestion")
? sa.getParam("OptionQuestion").replace("TARGETS", targets) : descBasic;
sb.append(pumpDesc);
if (!GuiDialog.confirm(sa.getSourceCard(), sb.toString())) {
final String targets = Lang.joinHomogenous(tgtCards);
final String message = sa.hasParam("OptionQuestion") ? sa.getParam("OptionQuestion").replace("TARGETS", targets) : "Apply pump to " + targets + "?";
if ( !sa.getActivatingPlayer().getController().confirmAction(sa, null, message) )
return;
}
} else { //Computer player
//TODO Add logic here if necessary but I think the AI won't cast
//the spell in the first place if it would curse its own creature
//and the pump isn't mandatory
}
}
if (sa.hasParam("RememberObjects")) {
pumpRemembered = sa.getParam("RememberObjects");